public class SpellingCorrectorOptions extends Object
Learn more
Modifier | Constructor and Description |
---|---|
protected |
SpellingCorrectorOptions()
Initializes a new instance of the
SpellingCorrectorOptions class. |
Modifier and Type | Method and Description |
---|---|
protected static SpellingCorrectorOptions |
create() |
protected static SpellingCorrectorOptions |
create(ArrayReader reader) |
protected static int |
getByteCount(SpellingCorrectorOptions options) |
boolean |
getConsiderTranspositions()
Gets a value indicating whether the algorithm must
consider transposition of two adjacent characters as a single mistake.
|
boolean |
getEnabled()
Gets a value indicating whether the spelling corrector is enabled.
|
int |
getMaxMistakeCount()
Gets the maximum number of mistakes.
|
protected static byte |
getMaxMistakeCount(SpellingCorrectorOptions options) |
boolean |
getOnlyBestResults()
Gets a value indicating whether only the best results will be returned.
|
byte |
getOnlyBestResultsRange()
Gets the maximum exceeding of the minimum number of mistakes that are found.
|
void |
setConsiderTranspositions(boolean value)
Sets a value indicating whether the algorithm must
consider transposition of two adjacent characters as a single mistake.
|
void |
setEnabled(boolean value)
Sets a value indicating whether the spelling corrector is enabled.
|
void |
setMaxMistakeCount(int value)
Sets the maximum number of mistakes.
|
void |
setOnlyBestResults(boolean value)
Sets a value indicating whether only the best results will be returned.
|
void |
setOnlyBestResultsRange(byte value)
Sets the maximum exceeding of the minimum number of mistakes that are found.
|
protected static void |
toByteArray(SpellingCorrectorOptions options,
ArrayWriter writer) |
protected SpellingCorrectorOptions()
SpellingCorrectorOptions
class.protected static SpellingCorrectorOptions create()
public final boolean getEnabled()
false
.public final void setEnabled(boolean value)
false
.value
- A value indicating whether the spelling corrector is enabled.public final int getMaxMistakeCount()
2
.public final void setMaxMistakeCount(int value)
2
.value
- The maximum number of mistakes.protected static byte getMaxMistakeCount(SpellingCorrectorOptions options)
public final boolean getOnlyBestResults()
false
.true
if only the best results will be returned; otherwise false
.public final void setOnlyBestResults(boolean value)
false
.value
- true
if only the best results will be returned; otherwise false
.public final byte getOnlyBestResultsRange()
0
.public final void setOnlyBestResultsRange(byte value)
0
.value
- The maximum exceeding of the minimum number of mistakes found.public final boolean getConsiderTranspositions()
true
.true
if the spelling corrector algorithm considers transpositions; otherwise false
.public final void setConsiderTranspositions(boolean value)
true
.value
- true
if the spelling corrector algorithm considers transpositions; otherwise false
.protected static int getByteCount(SpellingCorrectorOptions options)
protected static void toByteArray(SpellingCorrectorOptions options, ArrayWriter writer)
protected static SpellingCorrectorOptions create(ArrayReader reader)