public class SpellCheckParameters
extends java.lang.Object
implements com.exalead.util.Checkable, java.io.Serializable
Constructor and Description |
---|
SpellCheckParameters() |
SpellCheckParameters(SpellCheckParameters o)
Copy constructor
|
Modifier and Type | Method and Description |
---|---|
void |
check(boolean deep,
java.lang.String errorContext)
Checks this SpellCheckParameters.
|
static SpellCheckParameters |
fromString(java.lang.String s)
String representation of this SpellCheckParameters.
|
java.lang.String |
getBlacklist()
Reference a dictionary's spellcheck block list resource.
Used to never suggest expressions for the listed words. |
double |
getBlank()
Damerau-Levenshtein distance incurred for inserting or deleting a space.
|
double |
getDeletion()
Damerau-Levenshtein distance incurred for deleting a letter.
|
double |
getFirst()
Additional Damerau-Levenshtein distance incurred for any operation on the first letter of a word.
|
double |
getInsertion()
Damerau-Levenshtein distance incurred for inserting a letter.
|
int |
getMaxApprox()
Maximum number of alternate spellings to retrieve for each word.
|
int |
getMaxSuggestions()
Suggests no more than N alternate expressions
|
int |
getMinLengthCandidate()
Minimum length for a word to trigger a distance 1 spell check.
|
int |
getMinLengthCandidate2()
Minimum length for a word to trigger a distance 2 spell check.
|
int |
getMinLengthInsideMultiWordCandidate()
Minimum length for a word in the middle of a multi-word expression to trigger a distance 1 spell check.
|
int |
getMinLengthInsideMultiWordCandidate2()
Minimum length for a word in the middle of a multi-word expression to trigger a distance 2 spell check.
|
int |
getMinLengthMultiWordCandidate()
Minimum length for a word anywhere in a multi-word expression to trigger a distance 1 spell check.
|
int |
getMinLengthMultiWordCandidate2()
Minimum length for a word anywhere in a multi-word expression to trigger a distance 2 spell check.
|
int |
getMinNGramLengthForDist2()
Minimum length for a multi-word expression to trigger a distance 2 spell check.
|
double |
getPhoneticDist()
Damerau-Levenshtein distance incurred for phonetic matches.
|
double |
getPrecision()
The higher the precision, the less often alternatives are proposed; the lower, the more recall.
|
SpellCheckBlackList |
getSpellCheckBlackList()
Never suggest expressions for these words.
|
SpellCheckWhiteList |
getSpellCheckWhiteList()
Always suggest expressions for these words.
|
double |
getSubstitution()
Damerau-Levenshtein distance incurred for substituting a letter.
|
int |
getTimeoutMS()
Time allotted to the computing of spell suggestions.
|
double |
getTransposition()
Damerau-Levenshtein distance incurred for transposing letters.
|
java.lang.String |
getWhitelist()
Reference a dictionary's spellcheck allow list resource.
Used to always suggest expressions for the listed words. |
boolean |
isAllSuggestionsMustAlwaysBeRetrieved()
Suggests alternate expressions even when they have a lower score than the corresponding expression from the original query.
|
boolean |
isFilterPhonetic()
Applies the minimum length criteria on phonetic matches.
|
boolean |
isFilterWhiteList()
Applies minimum length criteria on allow list entries.
|
boolean |
isTokenizeResults()
Tokenizes the suggested expression, and annotates each token with the corresponding word from the original query.
|
SpellCheckParameters |
makeCopy()
Creates and returns a deep copy of this SpellCheckParameters.
|
static SpellCheckParameters |
readFrom(java.io.InputStream is)
Read this SpellCheckParameters from an XML fragment.
|
void |
setAllSuggestionsMustAlwaysBeRetrieved(boolean allSuggestionsMustAlwaysBeRetrieved)
Suggests alternate expressions even when they have a lower score than the corresponding expression from the original query.
|
void |
setBlacklist(java.lang.String blacklist)
Reference a dictionary's spellcheck block list resource.
Used to never suggest expressions for the listed words. |
void |
setBlank(double blank)
Damerau-Levenshtein distance incurred for inserting or deleting a space.
|
void |
setDeletion(double deletion)
Damerau-Levenshtein distance incurred for deleting a letter.
|
void |
setFilterPhonetic(boolean filterPhonetic)
Applies the minimum length criteria on phonetic matches.
|
void |
setFilterWhiteList(boolean filterWhiteList)
Applies minimum length criteria on allow list entries.
|
void |
setFirst(double first)
Additional Damerau-Levenshtein distance incurred for any operation on the first letter of a word.
|
void |
setInsertion(double insertion)
Damerau-Levenshtein distance incurred for inserting a letter.
|
void |
setMaxApprox(int maxApprox)
Maximum number of alternate spellings to retrieve for each word.
|
void |
setMaxSuggestions(int maxSuggestions)
Suggests no more than N alternate expressions
|
void |
setMinLengthCandidate(int minLengthCandidate)
Minimum length for a word to trigger a distance 1 spell check.
|
void |
setMinLengthCandidate2(int minLengthCandidate2)
Minimum length for a word to trigger a distance 2 spell check.
|
void |
setMinLengthInsideMultiWordCandidate(int minLengthInsideMultiWordCandidate)
Minimum length for a word in the middle of a multi-word expression to trigger a distance 1 spell check.
|
void |
setMinLengthInsideMultiWordCandidate2(int minLengthInsideMultiWordCandidate2)
Minimum length for a word in the middle of a multi-word expression to trigger a distance 2 spell check.
|
void |
setMinLengthMultiWordCandidate(int minLengthMultiWordCandidate)
Minimum length for a word anywhere in a multi-word expression to trigger a distance 1 spell check.
|
void |
setMinLengthMultiWordCandidate2(int minLengthMultiWordCandidate2)
Minimum length for a word anywhere in a multi-word expression to trigger a distance 2 spell check.
|
void |
setMinNGramLengthForDist2(int minNGramLengthForDist2)
Minimum length for a multi-word expression to trigger a distance 2 spell check.
|
void |
setPhoneticDist(double phoneticDist)
Damerau-Levenshtein distance incurred for phonetic matches.
|
void |
setPrecision(double precision)
The higher the precision, the less often alternatives are proposed; the lower, the more recall.
|
void |
setSpellCheckBlackList(SpellCheckBlackList spellCheckBlackList)
Never suggest expressions for these words.
|
void |
setSpellCheckWhiteList(SpellCheckWhiteList spellCheckWhiteList)
Always suggest expressions for these words.
|
void |
setSubstitution(double substitution)
Damerau-Levenshtein distance incurred for substituting a letter.
|
void |
setTimeoutMS(int timeoutMS)
Time allotted to the computing of spell suggestions.
|
void |
setTokenizeResults(boolean tokenizeResults)
Tokenizes the suggested expression, and annotates each token with the corresponding word from the original query.
|
void |
setTransposition(double transposition)
Damerau-Levenshtein distance incurred for transposing letters.
|
void |
setWhitelist(java.lang.String whitelist)
Reference a dictionary's spellcheck allow list resource.
Used to always suggest expressions for the listed words. |
java.lang.String |
toString()
String representation of this SpellCheckParameters.
|
SpellCheckParameters |
withAllSuggestionsMustAlwaysBeRetrieved(boolean allSuggestionsMustAlwaysBeRetrieved) |
SpellCheckParameters |
withAllSuggestionsMustAlwaysBeRetrieved(java.lang.Boolean allSuggestionsMustAlwaysBeRetrieved) |
SpellCheckParameters |
withBlacklist(java.lang.String blacklist) |
SpellCheckParameters |
withBlank(double blank) |
SpellCheckParameters |
withDeletion(double deletion) |
SpellCheckParameters |
withFilterPhonetic(boolean filterPhonetic) |
SpellCheckParameters |
withFilterPhonetic(java.lang.Boolean filterPhonetic) |
SpellCheckParameters |
withFilterWhiteList(boolean filterWhiteList) |
SpellCheckParameters |
withFilterWhiteList(java.lang.Boolean filterWhiteList) |
SpellCheckParameters |
withFirst(double first) |
SpellCheckParameters |
withInsertion(double insertion) |
SpellCheckParameters |
withMaxApprox(int maxApprox) |
SpellCheckParameters |
withMaxApprox(java.lang.Integer maxApprox) |
SpellCheckParameters |
withMaxSuggestions(int maxSuggestions) |
SpellCheckParameters |
withMaxSuggestions(java.lang.Integer maxSuggestions) |
SpellCheckParameters |
withMinLengthCandidate(int minLengthCandidate) |
SpellCheckParameters |
withMinLengthCandidate(java.lang.Integer minLengthCandidate) |
SpellCheckParameters |
withMinLengthCandidate2(int minLengthCandidate2) |
SpellCheckParameters |
withMinLengthCandidate2(java.lang.Integer minLengthCandidate2) |
SpellCheckParameters |
withMinLengthInsideMultiWordCandidate(int minLengthInsideMultiWordCandidate) |
SpellCheckParameters |
withMinLengthInsideMultiWordCandidate(java.lang.Integer minLengthInsideMultiWordCandidate) |
SpellCheckParameters |
withMinLengthInsideMultiWordCandidate2(int minLengthInsideMultiWordCandidate2) |
SpellCheckParameters |
withMinLengthInsideMultiWordCandidate2(java.lang.Integer minLengthInsideMultiWordCandidate2) |
SpellCheckParameters |
withMinLengthMultiWordCandidate(int minLengthMultiWordCandidate) |
SpellCheckParameters |
withMinLengthMultiWordCandidate(java.lang.Integer minLengthMultiWordCandidate) |
SpellCheckParameters |
withMinLengthMultiWordCandidate2(int minLengthMultiWordCandidate2) |
SpellCheckParameters |
withMinLengthMultiWordCandidate2(java.lang.Integer minLengthMultiWordCandidate2) |
SpellCheckParameters |
withMinNGramLengthForDist2(int minNGramLengthForDist2) |
SpellCheckParameters |
withMinNGramLengthForDist2(java.lang.Integer minNGramLengthForDist2) |
SpellCheckParameters |
withPhoneticDist(double phoneticDist) |
SpellCheckParameters |
withPrecision(double precision) |
SpellCheckParameters |
withSpellCheckBlackList(SpellCheckBlackList spellCheckBlackList) |
SpellCheckParameters |
withSpellCheckWhiteList(SpellCheckWhiteList spellCheckWhiteList) |
SpellCheckParameters |
withSubstitution(double substitution) |
SpellCheckParameters |
withTimeoutMS(int timeoutMS) |
SpellCheckParameters |
withTimeoutMS(java.lang.Integer timeoutMS) |
SpellCheckParameters |
withTokenizeResults(boolean tokenizeResults) |
SpellCheckParameters |
withTokenizeResults(java.lang.Boolean tokenizeResults) |
SpellCheckParameters |
withTransposition(double transposition) |
SpellCheckParameters |
withWhitelist(java.lang.String whitelist) |
void |
writeTo(java.io.OutputStream os)
Write this SpellCheckParameters as an XML fragment
|
public int maxApprox
public static final int DEFAULT_MAX_APPROX
public double insertion
public static final double DEFAULT_INSERTION
public double deletion
public static final double DEFAULT_DELETION
public double substitution
public static final double DEFAULT_SUBSTITUTION
public double transposition
public static final double DEFAULT_TRANSPOSITION
public double first
public static final double DEFAULT_FIRST
public double blank
public static final double DEFAULT_BLANK
public double phoneticDist
public static final double DEFAULT_PHONETIC_DIST
public double precision
public static final double DEFAULT_PRECISION
public int minLengthCandidate
public static final int DEFAULT_MIN_LENGTH_CANDIDATE
public int minLengthCandidate2
public static final int DEFAULT_MIN_LENGTH_CANDIDATE2
public int minLengthMultiWordCandidate
public static final int DEFAULT_MIN_LENGTH_MULTI_WORD_CANDIDATE
public int minLengthMultiWordCandidate2
public static final int DEFAULT_MIN_LENGTH_MULTI_WORD_CANDIDATE2
public int minLengthInsideMultiWordCandidate
public static final int DEFAULT_MIN_LENGTH_INSIDE_MULTI_WORD_CANDIDATE
public int minLengthInsideMultiWordCandidate2
public static final int DEFAULT_MIN_LENGTH_INSIDE_MULTI_WORD_CANDIDATE2
public int minNGramLengthForDist2
public static final int DEFAULT_MIN_N_GRAM_LENGTH_FOR_DIST2
public boolean filterWhiteList
public static final boolean DEFAULT_FILTER_WHITE_LIST
public boolean filterPhonetic
public static final boolean DEFAULT_FILTER_PHONETIC
public boolean tokenizeResults
public static final boolean DEFAULT_TOKENIZE_RESULTS
public int maxSuggestions
public static final int DEFAULT_MAX_SUGGESTIONS
public boolean allSuggestionsMustAlwaysBeRetrieved
public static final boolean DEFAULT_ALL_SUGGESTIONS_MUST_ALWAYS_BE_RETRIEVED
public SpellCheckWhiteList spellCheckWhiteList
public SpellCheckBlackList spellCheckBlackList
public java.lang.String whitelist
public java.lang.String blacklist
public int timeoutMS
public static final int DEFAULT_TIMEOUT_M_S
public SpellCheckParameters()
public SpellCheckParameters(SpellCheckParameters o)
public void setMaxApprox(int maxApprox)
public int getMaxApprox()
public SpellCheckParameters withMaxApprox(int maxApprox)
public SpellCheckParameters withMaxApprox(java.lang.Integer maxApprox)
public void setInsertion(double insertion)
public double getInsertion()
public SpellCheckParameters withInsertion(double insertion)
public void setDeletion(double deletion)
public double getDeletion()
public SpellCheckParameters withDeletion(double deletion)
public void setSubstitution(double substitution)
public double getSubstitution()
public SpellCheckParameters withSubstitution(double substitution)
public void setTransposition(double transposition)
public double getTransposition()
public SpellCheckParameters withTransposition(double transposition)
public void setFirst(double first)
public double getFirst()
public SpellCheckParameters withFirst(double first)
public void setBlank(double blank)
public double getBlank()
public SpellCheckParameters withBlank(double blank)
public void setPhoneticDist(double phoneticDist)
public double getPhoneticDist()
public SpellCheckParameters withPhoneticDist(double phoneticDist)
public void setPrecision(double precision)
public double getPrecision()
public SpellCheckParameters withPrecision(double precision)
public void setMinLengthCandidate(int minLengthCandidate)
public int getMinLengthCandidate()
public SpellCheckParameters withMinLengthCandidate(int minLengthCandidate)
public SpellCheckParameters withMinLengthCandidate(java.lang.Integer minLengthCandidate)
public void setMinLengthCandidate2(int minLengthCandidate2)
public int getMinLengthCandidate2()
public SpellCheckParameters withMinLengthCandidate2(int minLengthCandidate2)
public SpellCheckParameters withMinLengthCandidate2(java.lang.Integer minLengthCandidate2)
public void setMinLengthMultiWordCandidate(int minLengthMultiWordCandidate)
public int getMinLengthMultiWordCandidate()
public SpellCheckParameters withMinLengthMultiWordCandidate(int minLengthMultiWordCandidate)
public SpellCheckParameters withMinLengthMultiWordCandidate(java.lang.Integer minLengthMultiWordCandidate)
public void setMinLengthMultiWordCandidate2(int minLengthMultiWordCandidate2)
public int getMinLengthMultiWordCandidate2()
public SpellCheckParameters withMinLengthMultiWordCandidate2(int minLengthMultiWordCandidate2)
public SpellCheckParameters withMinLengthMultiWordCandidate2(java.lang.Integer minLengthMultiWordCandidate2)
public void setMinLengthInsideMultiWordCandidate(int minLengthInsideMultiWordCandidate)
public int getMinLengthInsideMultiWordCandidate()
public SpellCheckParameters withMinLengthInsideMultiWordCandidate(int minLengthInsideMultiWordCandidate)
public SpellCheckParameters withMinLengthInsideMultiWordCandidate(java.lang.Integer minLengthInsideMultiWordCandidate)
public void setMinLengthInsideMultiWordCandidate2(int minLengthInsideMultiWordCandidate2)
public int getMinLengthInsideMultiWordCandidate2()
public SpellCheckParameters withMinLengthInsideMultiWordCandidate2(int minLengthInsideMultiWordCandidate2)
public SpellCheckParameters withMinLengthInsideMultiWordCandidate2(java.lang.Integer minLengthInsideMultiWordCandidate2)
public void setMinNGramLengthForDist2(int minNGramLengthForDist2)
public int getMinNGramLengthForDist2()
public SpellCheckParameters withMinNGramLengthForDist2(int minNGramLengthForDist2)
public SpellCheckParameters withMinNGramLengthForDist2(java.lang.Integer minNGramLengthForDist2)
public void setFilterWhiteList(boolean filterWhiteList)
public boolean isFilterWhiteList()
public SpellCheckParameters withFilterWhiteList(boolean filterWhiteList)
public SpellCheckParameters withFilterWhiteList(java.lang.Boolean filterWhiteList)
public void setFilterPhonetic(boolean filterPhonetic)
public boolean isFilterPhonetic()
public SpellCheckParameters withFilterPhonetic(boolean filterPhonetic)
public SpellCheckParameters withFilterPhonetic(java.lang.Boolean filterPhonetic)
public void setTokenizeResults(boolean tokenizeResults)
public boolean isTokenizeResults()
public SpellCheckParameters withTokenizeResults(boolean tokenizeResults)
public SpellCheckParameters withTokenizeResults(java.lang.Boolean tokenizeResults)
public void setMaxSuggestions(int maxSuggestions)
public int getMaxSuggestions()
public SpellCheckParameters withMaxSuggestions(int maxSuggestions)
public SpellCheckParameters withMaxSuggestions(java.lang.Integer maxSuggestions)
public void setAllSuggestionsMustAlwaysBeRetrieved(boolean allSuggestionsMustAlwaysBeRetrieved)
public boolean isAllSuggestionsMustAlwaysBeRetrieved()
public SpellCheckParameters withAllSuggestionsMustAlwaysBeRetrieved(boolean allSuggestionsMustAlwaysBeRetrieved)
public SpellCheckParameters withAllSuggestionsMustAlwaysBeRetrieved(java.lang.Boolean allSuggestionsMustAlwaysBeRetrieved)
public void setSpellCheckWhiteList(SpellCheckWhiteList spellCheckWhiteList)
public SpellCheckWhiteList getSpellCheckWhiteList()
public SpellCheckParameters withSpellCheckWhiteList(SpellCheckWhiteList spellCheckWhiteList)
public void setSpellCheckBlackList(SpellCheckBlackList spellCheckBlackList)
public SpellCheckBlackList getSpellCheckBlackList()
public SpellCheckParameters withSpellCheckBlackList(SpellCheckBlackList spellCheckBlackList)
public void setWhitelist(java.lang.String whitelist)
public java.lang.String getWhitelist()
public SpellCheckParameters withWhitelist(java.lang.String whitelist)
public void setBlacklist(java.lang.String blacklist)
public java.lang.String getBlacklist()
public SpellCheckParameters withBlacklist(java.lang.String blacklist)
public void setTimeoutMS(int timeoutMS)
public int getTimeoutMS()
public SpellCheckParameters withTimeoutMS(int timeoutMS)
public SpellCheckParameters withTimeoutMS(java.lang.Integer timeoutMS)
public SpellCheckParameters makeCopy()
public static SpellCheckParameters readFrom(java.io.InputStream is) throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBException
public void writeTo(java.io.OutputStream os) throws javax.xml.bind.JAXBException, java.io.IOException
javax.xml.bind.JAXBException
java.io.IOException
public static SpellCheckParameters fromString(java.lang.String s) throws javax.xml.bind.JAXBException, java.io.UnsupportedEncodingException
javax.xml.bind.JAXBException
java.io.UnsupportedEncodingException
public java.lang.String toString()
toString
in class java.lang.Object
public void check(boolean deep, java.lang.String errorContext) throws com.exalead.util.TypedException
check
in interface com.exalead.util.Checkable
com.exalead.util.TypedException
Copyright © 2013 Dassault Systèmes, All Rights Reserved.