Last Edit: Fri Apr 15 22:21:52 CDT 2016
CSC-301 Prof. Ursula Wolz Grinnell College
- Albert Owusu-Asare
- Uzo Nwike
- Larry Asante-Boateng
- Prabir Pradhan
.
├── bin
├── lib
│ └── jSpellCorrect-0.4.jar
├── res
│ ├── keywords.txt
│ ├── negatives.txt
│ └── Stopwords.txt
└── src
├── InputParser.java
├── Levenshtein.java
├── Main.java
├── test
│ └── InputParserTest.java
├── TestApp.java
└── TextParser.java
The source code can be found in the directory src
. This directory contains:
InputParser.java
: Implements the algorithm for reading and parsing student inputLevenshtein.java
: A Utility program that provides functionality for calculating the levenshtein distances needed for the algorithmMain.java
: A simple test client that can shows how the algorithm worksTestApp.java
: A simple application to look at outputs, given the string inputstest
: a directory containingInputParserTest.java
which is a jUnit test suite for testing edge cases
The resources can be found in the directory res
. This directory contains:
keywords.txt
: a list of keywords for each recognized methodnegatives.txt
: a list of all the recognized negative words, including hedge cuesStopwords.txt
: a list of stopwords
For the compilation and execution of the programs can be done in the UNIX environment. Specifically the following command can be used issued in the bash shell to compile.
To compile, navigate to the nlp_design_submission
directory and run the following command:
javac -d bin -sourcepath src -cp lib/jSpellCorrect-0.4.jar src/*.java
To run the java file use the command:
java -cp bin:lib/jSpellCorrect-0.4.jar edu.grinnell.cs.Main <input sentence>
Command:
java -cp bin:lib/jSpellCorrect-0.4.jar edu.grinnell.cs.Main "I will use quadratic"
Output:
{QuadraticFormula, FactorQuadratic}
For more examples, see src/InputParserTest.java