Class TrigramAutomaton
java.lang.Object
org.apache.lucene.analysis.hunspell.TrigramAutomaton
An automaton allowing to achieve the same results as non-weighted
GeneratingSuggester.ngramScore(int, java.lang.String, java.lang.String, boolean), but faster (in O(s2.length) time).-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final CharacterRunAutomatonprivate final FixedBitSetprivate final charprivate final charprivate static final intprivate final int[] -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) intngramScore(CharsRef s2) private intprivate intsubstringScore(int state, FixedBitSet countedSubstrings) (package private) chartransformChar(char c)
-
Field Details
-
N
private static final int N- See Also:
-
automaton
-
state2Score
private final int[] state2Score -
countedSubstrings
-
minChar
private final char minChar -
maxChar
private final char maxChar
-
-
Constructor Details
-
TrigramAutomaton
TrigramAutomaton(String s1)
-
-
Method Details
-
runAutomatonOnStringChars
-
ngramScore
-
transformChar
char transformChar(char c) -
substringScore
-