public class Categorizer extends SemanticProcessor implements com.exalead.util.Checkable, java.io.Serializable
SemanticProcessor.Transformer<T>, SemanticProcessor.Visitor
Modifier and Type | Field and Description |
---|---|
java.lang.String |
annotationName |
static int |
DEFAULT_MAX_ANNOTATIONS |
static int |
DEFAULT_MAX_CATEGORY_LEVEL |
static int |
DEFAULT_MIN_KEYWORDS |
static int |
DEFAULT_MIN_TRUST_LEVEL |
java.lang.String |
language |
int |
maxAnnotations |
int |
maxCategoryLevel |
int |
minKeywords |
int |
minTrustLevel |
java.lang.String |
resourceDir |
contexts, name, src
Constructor and Description |
---|
Categorizer() |
Categorizer(Categorizer o)
Copy constructor
|
Modifier and Type | Method and Description |
---|---|
<T> T |
accept(SemanticProcessor.Transformer<T> transformer,
T[] t) |
void |
accept(SemanticProcessor.Visitor visitor) |
void |
check(boolean deep,
java.lang.String errorContext)
Checks this Categorizer.
|
static Categorizer |
fromString(java.lang.String s)
String representation of this Categorizer.
|
java.lang.String |
getAnnotationName()
Name of annotation to add.
|
java.lang.String |
getLanguage()
Language for which this processor is activated.
|
int |
getMaxAnnotations()
Maximum number of annotations to allow for a document.
|
int |
getMaxCategoryLevel()
Maximum category level (only used in hierarchical Bayesian).
|
int |
getMinKeywords()
The minimum number of keywords the categorizer must have to launch prediction on the document.
|
int |
getMinTrustLevel()
The minimum trust level the predictions must have to be set on the document.
|
java.lang.String |
getResourceDir()
URL for the resource (data://, file:// or resource://)
|
Categorizer |
makeCopy()
Creates and returns a deep copy of this Categorizer.
|
static Categorizer |
readFrom(java.io.InputStream is)
Read this Categorizer from an XML fragment.
|
void |
setAnnotationName(java.lang.String annotationName)
Name of annotation to add.
|
void |
setLanguage(java.lang.String language)
Language for which this processor is activated.
|
void |
setMaxAnnotations(int maxAnnotations)
Maximum number of annotations to allow for a document.
|
void |
setMaxCategoryLevel(int maxCategoryLevel)
Maximum category level (only used in hierarchical Bayesian).
|
void |
setMinKeywords(int minKeywords)
The minimum number of keywords the categorizer must have to launch prediction on the document.
|
void |
setMinTrustLevel(int minTrustLevel)
The minimum trust level the predictions must have to be set on the document.
|
void |
setResourceDir(java.lang.String resourceDir)
URL for the resource (data://, file:// or resource://)
|
java.lang.String |
toString()
String representation of this Categorizer.
|
Categorizer |
withAnnotationName(java.lang.String annotationName) |
Categorizer |
withContexts(java.lang.String contexts) |
Categorizer |
withLanguage(java.lang.String language) |
Categorizer |
withMaxAnnotations(int maxAnnotations) |
Categorizer |
withMaxAnnotations(java.lang.Integer maxAnnotations) |
Categorizer |
withMaxCategoryLevel(int maxCategoryLevel) |
Categorizer |
withMaxCategoryLevel(java.lang.Integer maxCategoryLevel) |
Categorizer |
withMinKeywords(int minKeywords) |
Categorizer |
withMinKeywords(java.lang.Integer minKeywords) |
Categorizer |
withMinTrustLevel(int minTrustLevel) |
Categorizer |
withMinTrustLevel(java.lang.Integer minTrustLevel) |
Categorizer |
withName(java.lang.String name) |
Categorizer |
withResourceDir(java.lang.String resourceDir) |
Categorizer |
withSrc(java.lang.String src)
Deprecated.
|
void |
writeTo(java.io.OutputStream os)
Write this Categorizer 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 int maxAnnotations
public static final int DEFAULT_MAX_ANNOTATIONS
public int maxCategoryLevel
public static final int DEFAULT_MAX_CATEGORY_LEVEL
public int minKeywords
public static final int DEFAULT_MIN_KEYWORDS
public int minTrustLevel
public static final int DEFAULT_MIN_TRUST_LEVEL
public Categorizer()
public Categorizer(Categorizer o)
public Categorizer withName(java.lang.String name)
withName
in class SemanticProcessor
public Categorizer withContexts(java.lang.String contexts)
withContexts
in class SemanticProcessor
@Deprecated public Categorizer withSrc(java.lang.String src)
withSrc
in class SemanticProcessor
public void setResourceDir(java.lang.String resourceDir)
public java.lang.String getResourceDir()
public Categorizer withResourceDir(java.lang.String resourceDir)
public void setAnnotationName(java.lang.String annotationName)
public java.lang.String getAnnotationName()
public Categorizer withAnnotationName(java.lang.String annotationName)
public void setLanguage(java.lang.String language)
public java.lang.String getLanguage()
public Categorizer withLanguage(java.lang.String language)
public void setMaxAnnotations(int maxAnnotations)
public int getMaxAnnotations()
public Categorizer withMaxAnnotations(int maxAnnotations)
public Categorizer withMaxAnnotations(java.lang.Integer maxAnnotations)
public void setMaxCategoryLevel(int maxCategoryLevel)
public int getMaxCategoryLevel()
public Categorizer withMaxCategoryLevel(int maxCategoryLevel)
public Categorizer withMaxCategoryLevel(java.lang.Integer maxCategoryLevel)
public void setMinKeywords(int minKeywords)
public int getMinKeywords()
public Categorizer withMinKeywords(int minKeywords)
public Categorizer withMinKeywords(java.lang.Integer minKeywords)
public void setMinTrustLevel(int minTrustLevel)
public int getMinTrustLevel()
public Categorizer withMinTrustLevel(int minTrustLevel)
public Categorizer withMinTrustLevel(java.lang.Integer minTrustLevel)
public Categorizer makeCopy()
makeCopy
in class SemanticProcessor
public static Categorizer 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 Categorizer 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(SemanticProcessor.Visitor visitor) throws com.exalead.util.TypedException
accept
in class SemanticProcessor
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.