Example usage for Java org.apache.lucene.search.spell SpellChecker fields, constructors, methods, implement or subclass
The text is from its open source code.
String | F_WORD Field name for each word in the ngram index. |
SpellChecker(Directory spellIndex) Use the given directory as a spell checker index with a LevenshteinDistance as the default StringDistance . | |
SpellChecker(Directory spellIndex, StringDistance sd) Use the given directory as a spell checker index. | |
SpellChecker(Directory spellIndex, StringDistance sd, Comparator Use the given directory as a spell checker index with the given org.apache.lucene.search.spell.StringDistance measure and the given java.util.Comparator for sorting the results. |
void | clearIndex() Removes all terms from the spell check index. |
void | close() Close the IndexSearcher used by this SpellChecker |
boolean | exist(String word) Check whether the word exists in the index. |
StringDistance | getStringDistance() Returns the StringDistance instance used by this SpellChecker instance. |
void | indexDictionary(Dictionary dict, IndexWriterConfig config, boolean fullMerge) Indexes the data from the given Dictionary . |
void | setAccuracy(float acc) Sets the accuracy 0 < minScore < 1; default #DEFAULT_ACCURACY |
void | setSpellIndex(Directory spellIndexDir) Use a different index as the spell checker index or re-open the existing index if spellIndex is the same value as given in the constructor. |
void | setStringDistance(StringDistance sd) Sets the StringDistance implementation for this SpellChecker instance. |
String[] | suggestSimilar(String word, int numSug) Suggest similar words. |
String[] | suggestSimilar(String word, int numSug, IndexReader ir, String field, SuggestMode suggestMode) Calls #suggestSimilar(String,int,IndexReader,String,SuggestMode,float) suggestSimilar(word, numSug, ir, suggestMode, field, this.accuracy) |
String[] | suggestSimilar(String word, int numSug, float accuracy) Suggest similar words. |