SpellingCorrectorOptions

Inheritance: java.lang.Object

public abstract class SpellingCorrectorOptions

Provides options for the spelling corrector.

Learn more

Constructors

Constructor Description
SpellingCorrectorOptions()

Methods

Method Description
getEnabled() Gets a value indicating whether the spelling corrector is enabled.
setEnabled(boolean value) Sets a value indicating whether the spelling corrector is enabled.
getMaxMistakeCount() Gets the maximum number of mistakes.
setMaxMistakeCount(int value) Sets the maximum number of mistakes.
getOnlyBestResults() Gets a value indicating whether only the best results will be returned.
setOnlyBestResults(boolean value) Sets a value indicating whether only the best results will be returned.
getOnlyBestResultsRange() Gets the maximum exceeding of the minimum number of mistakes that are found.
setOnlyBestResultsRange(byte value) Sets the maximum exceeding of the minimum number of mistakes that are found.
getConsiderTranspositions() Gets a value indicating whether the algorithm must consider transposition of two adjacent characters as a single mistake.
setConsiderTranspositions(boolean value) Sets a value indicating whether the algorithm must consider transposition of two adjacent characters as a single mistake.

SpellingCorrectorOptions()

public SpellingCorrectorOptions()

getEnabled()

public abstract boolean getEnabled()

Gets a value indicating whether the spelling corrector is enabled. The default value is false .

Returns: boolean - A value indicating whether the spelling corrector is enabled.

setEnabled(boolean value)

public abstract void setEnabled(boolean value)

Sets a value indicating whether the spelling corrector is enabled. The default value is false .

Parameters:

Parameter Type Description
value boolean A value indicating whether the spelling corrector is enabled.

getMaxMistakeCount()

public abstract int getMaxMistakeCount()

Gets the maximum number of mistakes. The default value is 2 .

Returns: int - The maximum number of mistakes.

setMaxMistakeCount(int value)

public abstract void setMaxMistakeCount(int value)

Sets the maximum number of mistakes. The default value is 2 .

Parameters:

Parameter Type Description
value int The maximum number of mistakes.

getOnlyBestResults()

public abstract boolean getOnlyBestResults()

Gets a value indicating whether only the best results will be returned. The default value is false .

Returns: boolean - true if only the best results will be returned; otherwise false .

setOnlyBestResults(boolean value)

public abstract void setOnlyBestResults(boolean value)

Sets a value indicating whether only the best results will be returned. The default value is false .

Parameters:

Parameter Type Description
value boolean true if only the best results will be returned; otherwise false .

getOnlyBestResultsRange()

public abstract byte getOnlyBestResultsRange()

Gets the maximum exceeding of the minimum number of mistakes that are found. The default value is 0 .

Returns: byte - The maximum exceeding of the minimum number of mistakes found.

setOnlyBestResultsRange(byte value)

public abstract void setOnlyBestResultsRange(byte value)

Sets the maximum exceeding of the minimum number of mistakes that are found. The default value is 0 .

Parameters:

Parameter Type Description
value byte The maximum exceeding of the minimum number of mistakes found.

getConsiderTranspositions()

public abstract 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 .

Returns: boolean - true if the spelling corrector algorithm considers transpositions; otherwise false .

setConsiderTranspositions(boolean value)

public abstract 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 .

Parameters:

Parameter Type Description
value boolean true if the spelling corrector algorithm considers transpositions; otherwise false .