Package org.apache.lucene.search
Class FuzzyAutomatonBuilder
java.lang.Object
org.apache.lucene.search.FuzzyAutomatonBuilder
Builds a set of CompiledAutomaton for fuzzy matching on a given term, with specified maximum edit
distance, fixed prefix and whether or not to allow transpositions.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final LevenshteinAutomata
private final int
private final String
private final String
private final int
-
Constructor Summary
ConstructorsConstructorDescriptionFuzzyAutomatonBuilder
(String term, int maxEdits, int prefixLength, boolean transpositions) -
Method Summary
Modifier and TypeMethodDescription(package private) CompiledAutomaton[]
(package private) CompiledAutomaton
(package private) int
private static int[]
stringToUTF32
(String text)
-
Field Details
-
term
-
maxEdits
private final int maxEdits -
levBuilder
-
prefix
-
termLength
private final int termLength
-
-
Constructor Details
-
FuzzyAutomatonBuilder
FuzzyAutomatonBuilder(String term, int maxEdits, int prefixLength, boolean transpositions)
-
-
Method Details
-
buildAutomatonSet
CompiledAutomaton[] buildAutomatonSet() -
buildMaxEditAutomaton
CompiledAutomaton buildMaxEditAutomaton() -
getTermLength
int getTermLength() -
stringToUTF32
-