|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectSpellTestCmdLine
public class SpellTestCmdLine
A command-line driver class to test out the spelling correction engine.
Nested Class Summary | |
---|---|
private static class |
SpellTestCmdLine.DictBuilder
Common interface for various dictionary-building algorithms |
private static class |
SpellTestCmdLine.SpeltDictBuilder
Builds a new-style Spelt spelling dictionary |
private static class |
SpellTestCmdLine.SpeltSuggTester
Get spelling suggestions using the Spelt (new) algorithm |
private static interface |
SpellTestCmdLine.SuggTester
Generic strategy for testing spelling suggestion algorithms |
private static class |
SpellTestCmdLine.TextRipper
Scans a directory for files, and rips text from all of them. |
Constructor Summary | |
---|---|
SpellTestCmdLine()
|
Method Summary | |
---|---|
private static void |
buildDictionary(int alg,
String srcDir,
String dictDir)
Rip text from files in a given source directory and add them to a spelling dictionary, using the specified algorithm. |
static void |
main(String[] args)
Parse command line arguments and run. |
private static HashSet |
makeStopSet()
Create a default stop-word set |
private static void |
printUsageAndExit()
Prints out a message saying how to use this tool, then exits. |
private static void |
testDictionary(int alg,
String testFile,
String dictDir)
Test the spelling index |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SpellTestCmdLine()
Method Detail |
---|
public static void main(String[] args)
private static void printUsageAndExit()
private static void buildDictionary(int alg, String srcDir, String dictDir) throws IOException
alg
- 0 for null (to test speed of ripper);
1 for the old Lucene algorithm;
2 for the new Spelt algorithm.srcDir
- Directory to grab files to ripdictDir
- Directory to put spelling dictionary in
IOException
private static void testDictionary(int alg, String testFile, String dictDir) throws IOException
IOException
private static HashSet makeStopSet()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |