public class SpellingCorrectorOptions extends Object
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()
Initializes a new instance of the SpellingCorrectorOptions
class.
protected static SpellingCorrectorOptions create()
public final boolean getEnabled()
Gets a value indicating whether the spelling corrector is enabled.
The default value is false
.
public final void setEnabled(boolean value)
Sets a value indicating whether the spelling corrector is enabled.
The default value is false
.
value
- A value indicating whether the spelling corrector is enabled.public final int getMaxMistakeCount()
Gets the maximum number of mistakes.
The default value is 2
.
public final void setMaxMistakeCount(int value)
Sets the maximum number of mistakes.
The default value is 2
.
value
- The maximum number of mistakes.protected static byte getMaxMistakeCount(SpellingCorrectorOptions options)
public final boolean getOnlyBestResults()
Gets a value indicating whether only the best results will be returned.
The default value is false
.
true
if only the best results will be returned; otherwise false
.public final void setOnlyBestResults(boolean value)
Sets a value indicating whether only the best results will be returned.
The default value is false
.
value
- true
if only the best results will be returned; otherwise false
.public final byte getOnlyBestResultsRange()
Gets the maximum exceeding of the minimum number of mistakes that are found.
The default value is 0
.
public final void setOnlyBestResultsRange(byte value)
Sets the maximum exceeding of the minimum number of mistakes that are found.
The default value is 0
.
value
- The maximum exceeding of the minimum number of mistakes found.public final boolean getConsiderTranspositions()
Gets a value indicating whether the algorithm must
consider transposition of two adjacent characters as a single mistake.
The default value is true
.
true
if the spelling corrector algorithm considers transpositions; otherwise false
.public final void setConsiderTranspositions(boolean value)
Sets a value indicating whether the algorithm must
consider transposition of two adjacent characters as a single mistake.
The default value is 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)