public static class FuzzyOptions.Builder
extends java.lang.Object
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
FuzzyOptions |
build() |
FuzzyOptions.Builder |
setFuzziness(Fuzziness fuzziness)
Sets the level of fuzziness used to create suggestions using a
Fuzziness instance. |
FuzzyOptions.Builder |
setFuzziness(int editDistance)
Sets the level of fuzziness used to create suggestions using a
Fuzziness instance. |
FuzzyOptions.Builder |
setFuzzyMinLength(int fuzzyMinLength)
Sets the minimum length of input string before fuzzy suggestions are returned, defaulting
to 3.
|
FuzzyOptions.Builder |
setFuzzyPrefixLength(int fuzzyPrefixLength)
Sets the minimum length of the input, which is not checked for fuzzy alternatives, defaults to 1
|
FuzzyOptions.Builder |
setMaxDeterminizedStates(int maxDeterminizedStates)
Sets the maximum automaton states allowed for the fuzzy expansion
|
FuzzyOptions.Builder |
setTranspositions(boolean transpositions)
Sets if transpositions (swapping one character for another) counts as one character
change or two.
|
FuzzyOptions.Builder |
setUnicodeAware(boolean unicodeAware)
Set to true if all measurements (like edit distance, transpositions and lengths) are in unicode
code points (actual letters) instead of bytes.
|
public FuzzyOptions.Builder setFuzziness(int editDistance)
Fuzziness
instance.
The default value is Fuzziness.ONE
which allows for an "edit distance" of one.public FuzzyOptions.Builder setFuzziness(Fuzziness fuzziness)
Fuzziness
instance.
The default value is Fuzziness.ONE
which allows for an "edit distance" of one.public FuzzyOptions.Builder setTranspositions(boolean transpositions)
public FuzzyOptions.Builder setFuzzyMinLength(int fuzzyMinLength)
public FuzzyOptions.Builder setFuzzyPrefixLength(int fuzzyPrefixLength)
public FuzzyOptions.Builder setMaxDeterminizedStates(int maxDeterminizedStates)
public FuzzyOptions.Builder setUnicodeAware(boolean unicodeAware)
public FuzzyOptions build()