public class FrequencyAnalyzer extends SemanticProcessor implements com.exalead.util.Checkable, java.io.Serializable
SemanticProcessor.Transformer<T>, SemanticProcessor.Visitor
Modifier and Type | Field and Description |
---|---|
java.lang.String |
annotationDensity |
static boolean |
DEFAULT_TF_IDF |
static java.lang.String |
DEFAULT_TF_IDF_ANNOTATION |
java.lang.String |
densityOutputAnnotation |
double |
densityThreshold |
boolean |
tfIdf |
java.lang.String |
tfIdfAnnotation |
contexts, name, src
Constructor and Description |
---|
FrequencyAnalyzer() |
FrequencyAnalyzer(FrequencyAnalyzer 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 FrequencyAnalyzer.
|
static FrequencyAnalyzer |
fromString(java.lang.String s)
String representation of this FrequencyAnalyzer.
|
java.lang.String |
getAnnotationDensity()
Searches for text spans where the relative amount of tokens covered by this annotation is above a given threshold
|
java.lang.String |
getDensityOutputAnnotation()
The annotation used to mark spans where the density is above the threshold
|
double |
getDensityThreshold()
Annotates text spans where the number of annotated alphanumerical tokens divided by the number of alphanumerical tokens is above this threshold
|
java.lang.String |
getTfIdfAnnotation()
Specifies that tf.idf is to be computed for this type of annotation instead of token forms
|
boolean |
isTfIdf()
tf.idf computation for each token by default
|
FrequencyAnalyzer |
makeCopy()
Creates and returns a deep copy of this FrequencyAnalyzer.
|
static FrequencyAnalyzer |
readFrom(java.io.InputStream is)
Read this FrequencyAnalyzer from an XML fragment.
|
void |
setAnnotationDensity(java.lang.String annotationDensity)
Searches for text spans where the relative amount of tokens covered by this annotation is above a given threshold
|
void |
setDensityOutputAnnotation(java.lang.String densityOutputAnnotation)
The annotation used to mark spans where the density is above the threshold
|
void |
setDensityThreshold(double densityThreshold)
Annotates text spans where the number of annotated alphanumerical tokens divided by the number of alphanumerical tokens is above this threshold
|
void |
setTfIdf(boolean tfIdf)
tf.idf computation for each token by default
|
void |
setTfIdfAnnotation(java.lang.String tfIdfAnnotation)
Specifies that tf.idf is to be computed for this type of annotation instead of token forms
|
java.lang.String |
toString()
String representation of this FrequencyAnalyzer.
|
FrequencyAnalyzer |
withAnnotationDensity(java.lang.String annotationDensity) |
FrequencyAnalyzer |
withContexts(java.lang.String contexts) |
FrequencyAnalyzer |
withDensityOutputAnnotation(java.lang.String densityOutputAnnotation) |
FrequencyAnalyzer |
withDensityThreshold(double densityThreshold) |
FrequencyAnalyzer |
withName(java.lang.String name) |
FrequencyAnalyzer |
withSrc(java.lang.String src)
Deprecated.
|
FrequencyAnalyzer |
withTfIdf(boolean tfIdf) |
FrequencyAnalyzer |
withTfIdf(java.lang.Boolean tfIdf) |
FrequencyAnalyzer |
withTfIdfAnnotation(java.lang.String tfIdfAnnotation) |
void |
writeTo(java.io.OutputStream os)
Write this FrequencyAnalyzer as an XML fragment
|
getContexts, getName, getSrc, setContexts, setName, setSrc
public boolean tfIdf
public static final boolean DEFAULT_TF_IDF
public java.lang.String tfIdfAnnotation
public static final java.lang.String DEFAULT_TF_IDF_ANNOTATION
public java.lang.String annotationDensity
public double densityThreshold
public java.lang.String densityOutputAnnotation
public FrequencyAnalyzer()
public FrequencyAnalyzer(FrequencyAnalyzer o)
public FrequencyAnalyzer withName(java.lang.String name)
withName
in class SemanticProcessor
public FrequencyAnalyzer withContexts(java.lang.String contexts)
withContexts
in class SemanticProcessor
@Deprecated public FrequencyAnalyzer withSrc(java.lang.String src)
withSrc
in class SemanticProcessor
public void setTfIdf(boolean tfIdf)
public boolean isTfIdf()
public FrequencyAnalyzer withTfIdf(boolean tfIdf)
public FrequencyAnalyzer withTfIdf(java.lang.Boolean tfIdf)
public void setTfIdfAnnotation(java.lang.String tfIdfAnnotation)
public java.lang.String getTfIdfAnnotation()
public FrequencyAnalyzer withTfIdfAnnotation(java.lang.String tfIdfAnnotation)
public void setAnnotationDensity(java.lang.String annotationDensity)
public java.lang.String getAnnotationDensity()
public FrequencyAnalyzer withAnnotationDensity(java.lang.String annotationDensity)
public void setDensityThreshold(double densityThreshold)
public double getDensityThreshold()
public FrequencyAnalyzer withDensityThreshold(double densityThreshold)
public void setDensityOutputAnnotation(java.lang.String densityOutputAnnotation)
public java.lang.String getDensityOutputAnnotation()
public FrequencyAnalyzer withDensityOutputAnnotation(java.lang.String densityOutputAnnotation)
public FrequencyAnalyzer makeCopy()
makeCopy
in class SemanticProcessor
public static FrequencyAnalyzer 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 FrequencyAnalyzer 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.