public class LanguageConfiguration
extends java.lang.Object
implements com.exalead.util.Checkable, java.io.Serializable
Modifier and Type | Field and Description |
---|---|
static boolean |
DEFAULT_GENERATE_WORD_DICT |
static int |
DEFAULT_MAX_EXTRACTED_SPELL_CHECK_N_GRAM_LENGTH |
static int |
DEFAULT_MAX_EXTRACTED_WORD_LENGTH |
static long |
DEFAULT_MAX_RELATED_TERMS_DICT_CONTEXTS_PER_DOCUMENT |
static long |
DEFAULT_MAX_SPELL_CHECK_N_GRAMS_PER_DOCUMENT |
static long |
DEFAULT_MAX_WORD_DICT_WORDS_PER_DOCUMENT |
static int |
DEFAULT_RELATED_TERMS_DICT_MODULO |
static int |
DEFAULT_SPELL_CHECK_N_GRAM_MAX_SIZE |
static int |
DEFAULT_SPELL_CHECK_N_GRAMS_DICT_MODULO |
static int |
DEFAULT_WORD_DICT_MODULO |
boolean |
generateWordDict |
java.lang.String |
language |
int |
maxExtractedSpellCheckNGramLength |
int |
maxExtractedWordLength |
long |
maxRelatedTermsDictContextsPerDocument |
long |
maxSpellCheckNGramsPerDocument |
long |
maxWordDictWordsPerDocument |
int |
relatedTermsDictModulo |
int |
spellCheckNGramMaxSize |
int |
spellCheckNGramsDictModulo |
int |
wordDictModulo |
Constructor and Description |
---|
LanguageConfiguration() |
LanguageConfiguration(LanguageConfiguration o)
Copy constructor
|
Modifier and Type | Method and Description |
---|---|
void |
check(boolean deep,
java.lang.String errorContext)
Checks this LanguageConfiguration.
|
static LanguageConfiguration |
fromString(java.lang.String s)
String representation of this LanguageConfiguration.
|
java.lang.String |
getLanguage()
The language iso code
|
int |
getMaxExtractedSpellCheckNGramLength()
Maximum length an ngram must have to be extracted.
|
int |
getMaxExtractedWordLength()
Maximum length a word must have to be extracted.
|
long |
getMaxRelatedTermsDictContextsPerDocument()
Maximum number of related terms extracted per document.
|
long |
getMaxSpellCheckNGramsPerDocument()
Maximum number of ngrams extracted per document.
|
long |
getMaxWordDictWordsPerDocument()
Maximum number of words extracted per document.
|
int |
getRelatedTermsDictModulo()
Submits 1 out of X documents for related terms generation.
If the value is set to 0, related terms are not generated for this language. |
int |
getSpellCheckNGramMaxSize()
Maximum number of consecutive words for spellchecking.
If the value is set to '-1', spellcheck data is not generated for this language. 0 and 1 values are illegal, default is 3. |
int |
getSpellCheckNGramsDictModulo()
NGrams extraction modulo.
|
int |
getWordDictModulo()
Word extraction modulo, by default extract all words.
|
boolean |
isGenerateWordDict()
Extracts words for the global dictionary.
|
LanguageConfiguration |
makeCopy()
Creates and returns a deep copy of this LanguageConfiguration.
|
static LanguageConfiguration |
readFrom(java.io.InputStream is)
Read this LanguageConfiguration from an XML fragment.
|
void |
setGenerateWordDict(boolean generateWordDict)
Extracts words for the global dictionary.
|
void |
setLanguage(java.lang.String language)
The language iso code
|
void |
setMaxExtractedSpellCheckNGramLength(int maxExtractedSpellCheckNGramLength)
Maximum length an ngram must have to be extracted.
|
void |
setMaxExtractedWordLength(int maxExtractedWordLength)
Maximum length a word must have to be extracted.
|
void |
setMaxRelatedTermsDictContextsPerDocument(long maxRelatedTermsDictContextsPerDocument)
Maximum number of related terms extracted per document.
|
void |
setMaxSpellCheckNGramsPerDocument(long maxSpellCheckNGramsPerDocument)
Maximum number of ngrams extracted per document.
|
void |
setMaxWordDictWordsPerDocument(long maxWordDictWordsPerDocument)
Maximum number of words extracted per document.
|
void |
setRelatedTermsDictModulo(int relatedTermsDictModulo)
Submits 1 out of X documents for related terms generation.
If the value is set to 0, related terms are not generated for this language. |
void |
setSpellCheckNGramMaxSize(int spellCheckNGramMaxSize)
Maximum number of consecutive words for spellchecking.
If the value is set to '-1', spellcheck data is not generated for this language. 0 and 1 values are illegal, default is 3. |
void |
setSpellCheckNGramsDictModulo(int spellCheckNGramsDictModulo)
NGrams extraction modulo.
|
void |
setWordDictModulo(int wordDictModulo)
Word extraction modulo, by default extract all words.
|
java.lang.String |
toString()
String representation of this LanguageConfiguration.
|
LanguageConfiguration |
withGenerateWordDict(boolean generateWordDict) |
LanguageConfiguration |
withGenerateWordDict(java.lang.Boolean generateWordDict) |
LanguageConfiguration |
withLanguage(java.lang.String language) |
LanguageConfiguration |
withMaxExtractedSpellCheckNGramLength(int maxExtractedSpellCheckNGramLength) |
LanguageConfiguration |
withMaxExtractedSpellCheckNGramLength(java.lang.Integer maxExtractedSpellCheckNGramLength) |
LanguageConfiguration |
withMaxExtractedWordLength(int maxExtractedWordLength) |
LanguageConfiguration |
withMaxExtractedWordLength(java.lang.Integer maxExtractedWordLength) |
LanguageConfiguration |
withMaxRelatedTermsDictContextsPerDocument(long maxRelatedTermsDictContextsPerDocument) |
LanguageConfiguration |
withMaxRelatedTermsDictContextsPerDocument(java.lang.Long maxRelatedTermsDictContextsPerDocument) |
LanguageConfiguration |
withMaxSpellCheckNGramsPerDocument(long maxSpellCheckNGramsPerDocument) |
LanguageConfiguration |
withMaxSpellCheckNGramsPerDocument(java.lang.Long maxSpellCheckNGramsPerDocument) |
LanguageConfiguration |
withMaxWordDictWordsPerDocument(long maxWordDictWordsPerDocument) |
LanguageConfiguration |
withMaxWordDictWordsPerDocument(java.lang.Long maxWordDictWordsPerDocument) |
LanguageConfiguration |
withRelatedTermsDictModulo(int relatedTermsDictModulo) |
LanguageConfiguration |
withRelatedTermsDictModulo(java.lang.Integer relatedTermsDictModulo) |
LanguageConfiguration |
withSpellCheckNGramMaxSize(int spellCheckNGramMaxSize) |
LanguageConfiguration |
withSpellCheckNGramMaxSize(java.lang.Integer spellCheckNGramMaxSize) |
LanguageConfiguration |
withSpellCheckNGramsDictModulo(int spellCheckNGramsDictModulo) |
LanguageConfiguration |
withSpellCheckNGramsDictModulo(java.lang.Integer spellCheckNGramsDictModulo) |
LanguageConfiguration |
withWordDictModulo(int wordDictModulo) |
LanguageConfiguration |
withWordDictModulo(java.lang.Integer wordDictModulo) |
void |
writeTo(java.io.OutputStream os)
Write this LanguageConfiguration as an XML fragment
|
public java.lang.String language
public boolean generateWordDict
public static final boolean DEFAULT_GENERATE_WORD_DICT
public int wordDictModulo
public static final int DEFAULT_WORD_DICT_MODULO
public long maxWordDictWordsPerDocument
public static final long DEFAULT_MAX_WORD_DICT_WORDS_PER_DOCUMENT
public int maxExtractedWordLength
public static final int DEFAULT_MAX_EXTRACTED_WORD_LENGTH
public int spellCheckNGramMaxSize
public static final int DEFAULT_SPELL_CHECK_N_GRAM_MAX_SIZE
public int spellCheckNGramsDictModulo
public static final int DEFAULT_SPELL_CHECK_N_GRAMS_DICT_MODULO
public long maxSpellCheckNGramsPerDocument
public static final long DEFAULT_MAX_SPELL_CHECK_N_GRAMS_PER_DOCUMENT
public int maxExtractedSpellCheckNGramLength
public static final int DEFAULT_MAX_EXTRACTED_SPELL_CHECK_N_GRAM_LENGTH
public int relatedTermsDictModulo
public static final int DEFAULT_RELATED_TERMS_DICT_MODULO
public long maxRelatedTermsDictContextsPerDocument
public static final long DEFAULT_MAX_RELATED_TERMS_DICT_CONTEXTS_PER_DOCUMENT
public LanguageConfiguration()
public LanguageConfiguration(LanguageConfiguration o)
public void setLanguage(java.lang.String language)
public java.lang.String getLanguage()
public LanguageConfiguration withLanguage(java.lang.String language)
public void setGenerateWordDict(boolean generateWordDict)
public boolean isGenerateWordDict()
public LanguageConfiguration withGenerateWordDict(boolean generateWordDict)
public LanguageConfiguration withGenerateWordDict(java.lang.Boolean generateWordDict)
public void setWordDictModulo(int wordDictModulo)
public int getWordDictModulo()
public LanguageConfiguration withWordDictModulo(int wordDictModulo)
public LanguageConfiguration withWordDictModulo(java.lang.Integer wordDictModulo)
public void setMaxWordDictWordsPerDocument(long maxWordDictWordsPerDocument)
public long getMaxWordDictWordsPerDocument()
public LanguageConfiguration withMaxWordDictWordsPerDocument(long maxWordDictWordsPerDocument)
public LanguageConfiguration withMaxWordDictWordsPerDocument(java.lang.Long maxWordDictWordsPerDocument)
public void setMaxExtractedWordLength(int maxExtractedWordLength)
public int getMaxExtractedWordLength()
public LanguageConfiguration withMaxExtractedWordLength(int maxExtractedWordLength)
public LanguageConfiguration withMaxExtractedWordLength(java.lang.Integer maxExtractedWordLength)
public void setSpellCheckNGramMaxSize(int spellCheckNGramMaxSize)
public int getSpellCheckNGramMaxSize()
public LanguageConfiguration withSpellCheckNGramMaxSize(int spellCheckNGramMaxSize)
public LanguageConfiguration withSpellCheckNGramMaxSize(java.lang.Integer spellCheckNGramMaxSize)
public void setSpellCheckNGramsDictModulo(int spellCheckNGramsDictModulo)
public int getSpellCheckNGramsDictModulo()
public LanguageConfiguration withSpellCheckNGramsDictModulo(int spellCheckNGramsDictModulo)
public LanguageConfiguration withSpellCheckNGramsDictModulo(java.lang.Integer spellCheckNGramsDictModulo)
public void setMaxSpellCheckNGramsPerDocument(long maxSpellCheckNGramsPerDocument)
public long getMaxSpellCheckNGramsPerDocument()
public LanguageConfiguration withMaxSpellCheckNGramsPerDocument(long maxSpellCheckNGramsPerDocument)
public LanguageConfiguration withMaxSpellCheckNGramsPerDocument(java.lang.Long maxSpellCheckNGramsPerDocument)
public void setMaxExtractedSpellCheckNGramLength(int maxExtractedSpellCheckNGramLength)
public int getMaxExtractedSpellCheckNGramLength()
public LanguageConfiguration withMaxExtractedSpellCheckNGramLength(int maxExtractedSpellCheckNGramLength)
public LanguageConfiguration withMaxExtractedSpellCheckNGramLength(java.lang.Integer maxExtractedSpellCheckNGramLength)
public void setRelatedTermsDictModulo(int relatedTermsDictModulo)
public int getRelatedTermsDictModulo()
public LanguageConfiguration withRelatedTermsDictModulo(int relatedTermsDictModulo)
public LanguageConfiguration withRelatedTermsDictModulo(java.lang.Integer relatedTermsDictModulo)
public void setMaxRelatedTermsDictContextsPerDocument(long maxRelatedTermsDictContextsPerDocument)
public long getMaxRelatedTermsDictContextsPerDocument()
public LanguageConfiguration withMaxRelatedTermsDictContextsPerDocument(long maxRelatedTermsDictContextsPerDocument)
public LanguageConfiguration withMaxRelatedTermsDictContextsPerDocument(java.lang.Long maxRelatedTermsDictContextsPerDocument)
public LanguageConfiguration makeCopy()
public static LanguageConfiguration 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 LanguageConfiguration 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 © 2021 Dassault Systèmes, All Rights Reserved.