public final class LanguageOptions extends Object
| Constructor and Description |
|---|
LanguageOptions()
Create a set of language detection options with default values.
|
LanguageOptions(Integer minValidChars,
Integer profileDepth,
Double ambiguityThreshold,
Double invalidityThreshold,
com.basistech.util.LanguageCode languageHint,
Double languageHintWeight,
com.basistech.rosette.util.EncodingCode encodingHint,
Double encodingHintWeight,
Set<LanguageWeight> languageWeightAdjustments)
constructor for
LanguageOptions |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o)
if the param is a
LanguageOptions, compare contents for equality |
Double |
getAmbiguityThreshold()
get the n-gram distance ambiguity threshold, value range [0-100].
|
com.basistech.rosette.util.EncodingCode |
getEncodingHint()
get encoding hint used to help resolve ambiguous results
|
Double |
getEncodingHintWeight()
get the encoding hint weight used to help resolve ambiguous results, value range [1-100].
|
Double |
getInvalidityThreshold()
get the n-gram distance invalidity threshold, value range [0-100].
|
com.basistech.util.LanguageCode |
getLanguageHint()
get the language hint
|
Double |
getLanguageHintWeight()
get the language hint weight used to help resolve ambiguous results.
|
Set<LanguageWeight> |
getLanguageWeightAdjustments()
get the set of language weight adjustments
|
Integer |
getMinValidChars()
get minimum number of valid characters needed for identification
|
Integer |
getProfileDepth()
get the most frequent n-grams to consider in detection.
|
int |
hashCode() |
void |
setAmbiguityThreshold(Double ambiguityThreshold)
set the n-gram distance ambiguity threshold, value range [0-100].
|
void |
setEncodingHint(com.basistech.rosette.util.EncodingCode encodingHint)
set encoding hint used to help resolve ambiguous results
|
void |
setEncodingHintWeight(double encodingHintWeight)
set the encoding hint weight used to help resolve ambiguous results, value range [1-100].
|
void |
setInvalidityThreshold(Double invalidityThreshold)
get the n-gram distance invalidity threshold, value range [0-100].
|
void |
setLanguageHint(com.basistech.util.LanguageCode languageHint)
set the language hint
|
void |
setLanguageHintWeight(double languageHintWeight)
set the language hint weight used to help resolve ambiguous results.
|
void |
setLanguageWeightAdjustments(Set<LanguageWeight> languageWeightAdjustments)
set the set of language weight adjustments
|
void |
setMinValidChars(Integer minValidChars)
set minimum number of valid characters needed for identification
|
void |
setProfileDepth(Integer profileDepth)
set the most frequent n-grams to consider in detection.
|
public LanguageOptions()
null is used to represent defaults.public LanguageOptions(Integer minValidChars, Integer profileDepth, Double ambiguityThreshold, Double invalidityThreshold, com.basistech.util.LanguageCode languageHint, Double languageHintWeight, com.basistech.rosette.util.EncodingCode encodingHint, Double encodingHintWeight, Set<LanguageWeight> languageWeightAdjustments)
LanguageOptionsminValidChars - minimum number of valid characters required for identificationprofileDepth - number of n-grams to consider in detectionambiguityThreshold - number of n-gram distance ambiguity thresholdinvalidityThreshold - number of n-gram distance invalidity thresholdlanguageHint - language hint used to resolve ambiguous resultslanguageHintWeight - language hint weight used to resolve ambiguous resultsencodingHint - encoding hint used to resolve ambiguous resultsencodingHintWeight - encoding hint weight used to resolve ambiguous resultslanguageWeightAdjustments - language weight adjustmentpublic Integer getMinValidChars()
public Integer getProfileDepth()
public Double getAmbiguityThreshold()
public Double getInvalidityThreshold()
public com.basistech.util.LanguageCode getLanguageHint()
public Double getLanguageHintWeight()
public com.basistech.rosette.util.EncodingCode getEncodingHint()
public Double getEncodingHintWeight()
public Set<LanguageWeight> getLanguageWeightAdjustments()
public void setMinValidChars(Integer minValidChars)
minValidChars - minimum number of valid characterspublic void setProfileDepth(Integer profileDepth)
profileDepth - number of n-gramspublic void setAmbiguityThreshold(Double ambiguityThreshold)
ambiguityThreshold - number of n-grams distance ambiguity thresholdpublic void setInvalidityThreshold(Double invalidityThreshold)
invalidityThreshold - number of n-grams distance invalidity thresholdpublic void setLanguageHint(com.basistech.util.LanguageCode languageHint)
languageHint - the language hintpublic void setLanguageHintWeight(double languageHintWeight)
languageHintWeight - hint weight.public void setEncodingHint(com.basistech.rosette.util.EncodingCode encodingHint)
encodingHint - the encoding hintpublic void setEncodingHintWeight(double encodingHintWeight)
encodingHintWeight - the encoding hint weightpublic void setLanguageWeightAdjustments(Set<LanguageWeight> languageWeightAdjustments)
languageWeightAdjustments - the set of language weight adjustmentsCopyright © 2014–2016 Basis Technology Corp.. All rights reserved.