public class VocabularyClassifier extends SemanticProcessor implements com.exalead.util.Checkable, java.io.Serializable
Modifier and Type | Class and Description |
---|---|
static interface |
VocabularyClassifier.Transformer<T> |
static interface |
VocabularyClassifier.Visitor |
Modifier and Type | Field and Description |
---|---|
boolean |
addAnnotationsOnKeywords |
java.lang.String |
annotationName |
boolean |
collapseToken |
static boolean |
DEFAULT_ADD_ANNOTATIONS_ON_KEYWORDS |
static boolean |
DEFAULT_COLLAPSE_TOKEN |
static java.lang.String |
DEFAULT_EXCLUDED_LANGUAGES |
static int |
DEFAULT_EXTRA_ANNOTATIONS_MIN_TRUST_LEVEL |
static java.lang.String |
DEFAULT_EXTRA_PREFIX_ANNOTATIONS |
static boolean |
DEFAULT_FORCE_MMAP |
static int |
DEFAULT_MAX_ANNOTATIONS |
static int |
DEFAULT_MAX_KEYWORDS |
static int |
DEFAULT_MIN_KEYWORDS |
static int |
DEFAULT_MIN_TRUST_LEVEL |
java.lang.String |
excludedLanguages |
int |
extraAnnotationsMinTrustLevel |
java.lang.String |
extraPrefixAnnotations |
boolean |
forceMmap |
java.lang.String |
language |
int |
maxAnnotations |
int |
maxKeywords |
int |
minKeywords |
int |
minTrustLevel |
java.lang.String |
resourceDir |
contexts, name, src
Constructor and Description |
---|
VocabularyClassifier() |
VocabularyClassifier(VocabularyClassifier o)
Copy constructor
|
Modifier and Type | Method and Description |
---|---|
<T> T |
accept(SemanticProcessor.Transformer<T> transformer,
T[] t) |
void |
accept(SemanticProcessor.Visitor visitor) |
<T> T |
accept(VocabularyClassifier.Transformer<T> transformer,
T[] t) |
void |
accept(VocabularyClassifier.Visitor visitor) |
void |
check(boolean deep,
java.lang.String errorContext)
Checks this VocabularyClassifier.
|
static VocabularyClassifier |
fromString(java.lang.String s)
String representation of this VocabularyClassifier.
|
java.lang.String |
getAnnotationName()
Name of annotation to add.
|
java.lang.String |
getExcludedLanguages()
Language for which the vocabulary classifier is deactivated (works only if language=xx, coma separated).
|
int |
getExtraAnnotationsMinTrustLevel()
The minimum trust level to keep an extra annotations
|
java.lang.String |
getExtraPrefixAnnotations()
The optional list of prefix annotations to keep (coma separated)
|
java.lang.String |
getLanguage()
Language for which the vocabulary classifier is activated.
|
int |
getMaxAnnotations()
Maximum number annotations per document.
|
int |
getMaxKeywords()
Maximum number of keywords to keep.
|
int |
getMinKeywords()
The minimum number of keywords per class.
|
int |
getMinTrustLevel()
The minimum trust level of categories to keep.
|
java.lang.String |
getResourceDir()
URL for the vocabulary resource (data://, file;// or resource://)
|
boolean |
isAddAnnotationsOnKeywords()
If true, add annotation to all matching tokens.
|
boolean |
isCollapseToken()
If true all identical tokens are collapsed.
|
boolean |
isForceMmap()
Force mmap of the resources (mem is shared but speed is affected)
|
VocabularyClassifier |
makeCopy()
Creates and returns a deep copy of this VocabularyClassifier.
|
static VocabularyClassifier |
readFrom(java.io.InputStream is)
Read this VocabularyClassifier from an XML fragment.
|
void |
setAddAnnotationsOnKeywords(boolean addAnnotationsOnKeywords)
If true, add annotation to all matching tokens.
|
void |
setAnnotationName(java.lang.String annotationName)
Name of annotation to add.
|
void |
setCollapseToken(boolean collapseToken)
If true all identical tokens are collapsed.
|
void |
setExcludedLanguages(java.lang.String excludedLanguages)
Language for which the vocabulary classifier is deactivated (works only if language=xx, coma separated).
|
void |
setExtraAnnotationsMinTrustLevel(int extraAnnotationsMinTrustLevel)
The minimum trust level to keep an extra annotations
|
void |
setExtraPrefixAnnotations(java.lang.String extraPrefixAnnotations)
The optional list of prefix annotations to keep (coma separated)
|
void |
setForceMmap(boolean forceMmap)
Force mmap of the resources (mem is shared but speed is affected)
|
void |
setLanguage(java.lang.String language)
Language for which the vocabulary classifier is activated.
|
void |
setMaxAnnotations(int maxAnnotations)
Maximum number annotations per document.
|
void |
setMaxKeywords(int maxKeywords)
Maximum number of keywords to keep.
|
void |
setMinKeywords(int minKeywords)
The minimum number of keywords per class.
|
void |
setMinTrustLevel(int minTrustLevel)
The minimum trust level of categories to keep.
|
void |
setResourceDir(java.lang.String resourceDir)
URL for the vocabulary resource (data://, file;// or resource://)
|
java.lang.String |
toString()
String representation of this VocabularyClassifier.
|
VocabularyClassifier |
withAddAnnotationsOnKeywords(boolean addAnnotationsOnKeywords) |
VocabularyClassifier |
withAddAnnotationsOnKeywords(java.lang.Boolean addAnnotationsOnKeywords) |
VocabularyClassifier |
withAnnotationName(java.lang.String annotationName) |
VocabularyClassifier |
withCollapseToken(boolean collapseToken) |
VocabularyClassifier |
withCollapseToken(java.lang.Boolean collapseToken) |
VocabularyClassifier |
withContexts(java.lang.String contexts) |
VocabularyClassifier |
withExcludedLanguages(java.lang.String excludedLanguages) |
VocabularyClassifier |
withExtraAnnotationsMinTrustLevel(int extraAnnotationsMinTrustLevel) |
VocabularyClassifier |
withExtraAnnotationsMinTrustLevel(java.lang.Integer extraAnnotationsMinTrustLevel) |
VocabularyClassifier |
withExtraPrefixAnnotations(java.lang.String extraPrefixAnnotations) |
VocabularyClassifier |
withForceMmap(boolean forceMmap) |
VocabularyClassifier |
withForceMmap(java.lang.Boolean forceMmap) |
VocabularyClassifier |
withLanguage(java.lang.String language) |
VocabularyClassifier |
withMaxAnnotations(int maxAnnotations) |
VocabularyClassifier |
withMaxAnnotations(java.lang.Integer maxAnnotations) |
VocabularyClassifier |
withMaxKeywords(int maxKeywords) |
VocabularyClassifier |
withMaxKeywords(java.lang.Integer maxKeywords) |
VocabularyClassifier |
withMinKeywords(int minKeywords) |
VocabularyClassifier |
withMinKeywords(java.lang.Integer minKeywords) |
VocabularyClassifier |
withMinTrustLevel(int minTrustLevel) |
VocabularyClassifier |
withMinTrustLevel(java.lang.Integer minTrustLevel) |
VocabularyClassifier |
withName(java.lang.String name) |
VocabularyClassifier |
withResourceDir(java.lang.String resourceDir) |
VocabularyClassifier |
withSrc(java.lang.String src)
Deprecated.
|
void |
writeTo(java.io.OutputStream os)
Write this VocabularyClassifier as an XML fragment
|
getContexts, getName, getSrc, setContexts, setName, setSrc
public java.lang.String resourceDir
public java.lang.String annotationName
public java.lang.String language
public java.lang.String excludedLanguages
public static final java.lang.String DEFAULT_EXCLUDED_LANGUAGES
public boolean addAnnotationsOnKeywords
public static final boolean DEFAULT_ADD_ANNOTATIONS_ON_KEYWORDS
public int maxAnnotations
public static final int DEFAULT_MAX_ANNOTATIONS
public int minTrustLevel
public static final int DEFAULT_MIN_TRUST_LEVEL
public int maxKeywords
public static final int DEFAULT_MAX_KEYWORDS
public int minKeywords
public static final int DEFAULT_MIN_KEYWORDS
public boolean collapseToken
public static final boolean DEFAULT_COLLAPSE_TOKEN
public java.lang.String extraPrefixAnnotations
public static final java.lang.String DEFAULT_EXTRA_PREFIX_ANNOTATIONS
public int extraAnnotationsMinTrustLevel
public static final int DEFAULT_EXTRA_ANNOTATIONS_MIN_TRUST_LEVEL
public boolean forceMmap
public static final boolean DEFAULT_FORCE_MMAP
public VocabularyClassifier()
public VocabularyClassifier(VocabularyClassifier o)
public VocabularyClassifier withName(java.lang.String name)
withName
in class SemanticProcessor
public VocabularyClassifier withContexts(java.lang.String contexts)
withContexts
in class SemanticProcessor
@Deprecated public VocabularyClassifier withSrc(java.lang.String src)
withSrc
in class SemanticProcessor
public void setResourceDir(java.lang.String resourceDir)
public java.lang.String getResourceDir()
public VocabularyClassifier withResourceDir(java.lang.String resourceDir)
public void setAnnotationName(java.lang.String annotationName)
public java.lang.String getAnnotationName()
public VocabularyClassifier withAnnotationName(java.lang.String annotationName)
public void setLanguage(java.lang.String language)
public java.lang.String getLanguage()
public VocabularyClassifier withLanguage(java.lang.String language)
public void setExcludedLanguages(java.lang.String excludedLanguages)
public java.lang.String getExcludedLanguages()
public VocabularyClassifier withExcludedLanguages(java.lang.String excludedLanguages)
public void setAddAnnotationsOnKeywords(boolean addAnnotationsOnKeywords)
public boolean isAddAnnotationsOnKeywords()
public VocabularyClassifier withAddAnnotationsOnKeywords(boolean addAnnotationsOnKeywords)
public VocabularyClassifier withAddAnnotationsOnKeywords(java.lang.Boolean addAnnotationsOnKeywords)
public void setMaxAnnotations(int maxAnnotations)
public int getMaxAnnotations()
public VocabularyClassifier withMaxAnnotations(int maxAnnotations)
public VocabularyClassifier withMaxAnnotations(java.lang.Integer maxAnnotations)
public void setMinTrustLevel(int minTrustLevel)
public int getMinTrustLevel()
public VocabularyClassifier withMinTrustLevel(int minTrustLevel)
public VocabularyClassifier withMinTrustLevel(java.lang.Integer minTrustLevel)
public void setMaxKeywords(int maxKeywords)
public int getMaxKeywords()
public VocabularyClassifier withMaxKeywords(int maxKeywords)
public VocabularyClassifier withMaxKeywords(java.lang.Integer maxKeywords)
public void setMinKeywords(int minKeywords)
public int getMinKeywords()
public VocabularyClassifier withMinKeywords(int minKeywords)
public VocabularyClassifier withMinKeywords(java.lang.Integer minKeywords)
public void setCollapseToken(boolean collapseToken)
public boolean isCollapseToken()
public VocabularyClassifier withCollapseToken(boolean collapseToken)
public VocabularyClassifier withCollapseToken(java.lang.Boolean collapseToken)
public void setExtraPrefixAnnotations(java.lang.String extraPrefixAnnotations)
public java.lang.String getExtraPrefixAnnotations()
public VocabularyClassifier withExtraPrefixAnnotations(java.lang.String extraPrefixAnnotations)
public void setExtraAnnotationsMinTrustLevel(int extraAnnotationsMinTrustLevel)
public int getExtraAnnotationsMinTrustLevel()
public VocabularyClassifier withExtraAnnotationsMinTrustLevel(int extraAnnotationsMinTrustLevel)
public VocabularyClassifier withExtraAnnotationsMinTrustLevel(java.lang.Integer extraAnnotationsMinTrustLevel)
public void setForceMmap(boolean forceMmap)
public boolean isForceMmap()
public VocabularyClassifier withForceMmap(boolean forceMmap)
public VocabularyClassifier withForceMmap(java.lang.Boolean forceMmap)
public VocabularyClassifier makeCopy()
makeCopy
in class SemanticProcessor
public static VocabularyClassifier 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
writeTo
in class SemanticProcessor
javax.xml.bind.JAXBException
java.io.IOException
public static VocabularyClassifier 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 SemanticProcessor
public void check(boolean deep, java.lang.String errorContext) throws com.exalead.util.TypedException
check
in interface com.exalead.util.Checkable
check
in class SemanticProcessor
com.exalead.util.TypedException
public void accept(VocabularyClassifier.Visitor visitor) throws com.exalead.util.TypedException
com.exalead.util.TypedException
public void accept(SemanticProcessor.Visitor visitor) throws com.exalead.util.TypedException
accept
in class SemanticProcessor
com.exalead.util.TypedException
public <T> T accept(VocabularyClassifier.Transformer<T> transformer, T[] t) throws com.exalead.util.TypedException
com.exalead.util.TypedException
public <T> T accept(SemanticProcessor.Transformer<T> transformer, T[] t) throws com.exalead.util.TypedException
accept
in class SemanticProcessor
com.exalead.util.TypedException
Copyright © 2013 Dassault Systèmes, All Rights Reserved.