Uses of Interface
org.apache.lucene.search.spell.StringDistance
-
Uses of StringDistance in org.apache.lucene.search.spell
Modifier and TypeClassDescriptionclass
Similarity measure for short strings such as person names.final class
Levenshtein edit distance class.final class
Damerau-Levenshtein (optimal string alignment) implemented in a consistent way as Lucene's FuzzyTermsEnum with the transpositions option enabled.class
N-Gram version of edit distance based on paper by Grzegorz Kondrak, "N-gram similarity and distance".Modifier and TypeFieldDescriptionstatic final StringDistance
DirectSpellChecker.INTERNAL_LEVENSHTEIN
The default StringDistance, Damerau-Levenshtein distance implemented internally viaLevenshteinAutomata
.Modifier and TypeMethodDescriptionDirectSpellChecker.getDistance()
Get the string distance metric in use.SpellChecker.getStringDistance()
Returns theStringDistance
instance used by thisSpellChecker
instance.Modifier and TypeMethodDescriptionvoid
DirectSpellChecker.setDistance
(StringDistance distance) Set the string distance metric.void
SpellChecker.setStringDistance
(StringDistance sd) Sets theStringDistance
implementation for thisSpellChecker
instance.ModifierConstructorDescriptionSpellChecker
(Directory spellIndex, StringDistance sd) Use the given directory as a spell checker index.SpellChecker
(Directory spellIndex, StringDistance sd, Comparator<SuggestWord> comparator) Use the given directory as a spell checker index with the givenStringDistance
measure and the givenComparator
for sorting the results.