public class RelatedTerms extends SemanticProcessor implements com.exalead.util.Checkable, java.io.Serializable
SemanticProcessor.Transformer<T>, SemanticProcessor.Visitor
Modifier and Type | Field and Description |
---|---|
static boolean |
DEFAULT_KEEP_LONGEST_MATCH |
static int |
DEFAULT_MAX_UNKNOWN_WORD_LEN |
static int |
DEFAULT_RELATED_TERMS_MAX_SPAN |
static int |
DEFAULT_RELATED_TERMS_MIN_SPAN |
static boolean |
DEFAULT_WITH_PART_OF_SPEECH |
java.lang.String |
dictionaryDirectory |
boolean |
keepLongestMatch |
int |
maxUnknownWordLen |
java.lang.String |
preprocResourceDir |
int |
relatedTermsMaxSpan |
int |
relatedTermsMinSpan |
boolean |
withPartOfSpeech |
contexts, name, src
Constructor and Description |
---|
RelatedTerms() |
RelatedTerms(RelatedTerms 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 RelatedTerms.
|
static RelatedTerms |
fromString(java.lang.String s)
String representation of this RelatedTerms.
|
java.lang.String |
getDictionaryDirectory()
URL for the resource of the dictionary used to limit the set of terms (data://, file;// or resource://).
If null, the set of extracted terms is not limited. |
int |
getMaxUnknownWordLen()
Maximum length of unknown words used to build a RelatedTerm.
|
java.lang.String |
getPreprocResourceDir()
URL for the resource (data://, file;// or resource://)
if null, uses standard resource of product. |
int |
getRelatedTermsMaxSpan()
Maximum number of words (excluding stop words) in an automatically extracted term (not applicable to allow list).
|
int |
getRelatedTermsMinSpan()
Minimum number of words (excluding stop words) in an automatically extracted term (not applicable to allow list).
|
boolean |
isKeepLongestMatch()
Keeps only the longest term when several overlap.
|
boolean |
isWithPartOfSpeech()
If true, a PartOfSpeechTagger is automatically added to the list of processors.
|
RelatedTerms |
makeCopy()
Creates and returns a deep copy of this RelatedTerms.
|
static RelatedTerms |
readFrom(java.io.InputStream is)
Read this RelatedTerms from an XML fragment.
|
void |
setDictionaryDirectory(java.lang.String dictionaryDirectory)
URL for the resource of the dictionary used to limit the set of terms (data://, file;// or resource://).
If null, the set of extracted terms is not limited. |
void |
setKeepLongestMatch(boolean keepLongestMatch)
Keeps only the longest term when several overlap.
|
void |
setMaxUnknownWordLen(int maxUnknownWordLen)
Maximum length of unknown words used to build a RelatedTerm.
|
void |
setPreprocResourceDir(java.lang.String preprocResourceDir)
URL for the resource (data://, file;// or resource://)
if null, uses standard resource of product. |
void |
setRelatedTermsMaxSpan(int relatedTermsMaxSpan)
Maximum number of words (excluding stop words) in an automatically extracted term (not applicable to allow list).
|
void |
setRelatedTermsMinSpan(int relatedTermsMinSpan)
Minimum number of words (excluding stop words) in an automatically extracted term (not applicable to allow list).
|
void |
setWithPartOfSpeech(boolean withPartOfSpeech)
If true, a PartOfSpeechTagger is automatically added to the list of processors.
|
java.lang.String |
toString()
String representation of this RelatedTerms.
|
RelatedTerms |
withContexts(java.lang.String contexts) |
RelatedTerms |
withDictionaryDirectory(java.lang.String dictionaryDirectory) |
RelatedTerms |
withKeepLongestMatch(boolean keepLongestMatch) |
RelatedTerms |
withKeepLongestMatch(java.lang.Boolean keepLongestMatch) |
RelatedTerms |
withMaxUnknownWordLen(int maxUnknownWordLen) |
RelatedTerms |
withMaxUnknownWordLen(java.lang.Integer maxUnknownWordLen) |
RelatedTerms |
withName(java.lang.String name) |
RelatedTerms |
withPreprocResourceDir(java.lang.String preprocResourceDir) |
RelatedTerms |
withRelatedTermsMaxSpan(int relatedTermsMaxSpan) |
RelatedTerms |
withRelatedTermsMaxSpan(java.lang.Integer relatedTermsMaxSpan) |
RelatedTerms |
withRelatedTermsMinSpan(int relatedTermsMinSpan) |
RelatedTerms |
withRelatedTermsMinSpan(java.lang.Integer relatedTermsMinSpan) |
RelatedTerms |
withSrc(java.lang.String src)
Deprecated.
|
RelatedTerms |
withWithPartOfSpeech(boolean withPartOfSpeech) |
RelatedTerms |
withWithPartOfSpeech(java.lang.Boolean withPartOfSpeech) |
void |
writeTo(java.io.OutputStream os)
Write this RelatedTerms as an XML fragment
|
getContexts, getName, getSrc, setContexts, setName, setSrc
public int relatedTermsMinSpan
public static final int DEFAULT_RELATED_TERMS_MIN_SPAN
public int relatedTermsMaxSpan
public static final int DEFAULT_RELATED_TERMS_MAX_SPAN
public boolean keepLongestMatch
public static final boolean DEFAULT_KEEP_LONGEST_MATCH
public java.lang.String dictionaryDirectory
public java.lang.String preprocResourceDir
public boolean withPartOfSpeech
public static final boolean DEFAULT_WITH_PART_OF_SPEECH
public int maxUnknownWordLen
public static final int DEFAULT_MAX_UNKNOWN_WORD_LEN
public RelatedTerms()
public RelatedTerms(RelatedTerms o)
public RelatedTerms withName(java.lang.String name)
withName
in class SemanticProcessor
public RelatedTerms withContexts(java.lang.String contexts)
withContexts
in class SemanticProcessor
@Deprecated public RelatedTerms withSrc(java.lang.String src)
withSrc
in class SemanticProcessor
public void setRelatedTermsMinSpan(int relatedTermsMinSpan)
public int getRelatedTermsMinSpan()
public RelatedTerms withRelatedTermsMinSpan(int relatedTermsMinSpan)
public RelatedTerms withRelatedTermsMinSpan(java.lang.Integer relatedTermsMinSpan)
public void setRelatedTermsMaxSpan(int relatedTermsMaxSpan)
public int getRelatedTermsMaxSpan()
public RelatedTerms withRelatedTermsMaxSpan(int relatedTermsMaxSpan)
public RelatedTerms withRelatedTermsMaxSpan(java.lang.Integer relatedTermsMaxSpan)
public void setKeepLongestMatch(boolean keepLongestMatch)
public boolean isKeepLongestMatch()
public RelatedTerms withKeepLongestMatch(boolean keepLongestMatch)
public RelatedTerms withKeepLongestMatch(java.lang.Boolean keepLongestMatch)
public void setDictionaryDirectory(java.lang.String dictionaryDirectory)
public java.lang.String getDictionaryDirectory()
public RelatedTerms withDictionaryDirectory(java.lang.String dictionaryDirectory)
public void setPreprocResourceDir(java.lang.String preprocResourceDir)
public java.lang.String getPreprocResourceDir()
public RelatedTerms withPreprocResourceDir(java.lang.String preprocResourceDir)
public void setWithPartOfSpeech(boolean withPartOfSpeech)
public boolean isWithPartOfSpeech()
public RelatedTerms withWithPartOfSpeech(boolean withPartOfSpeech)
public RelatedTerms withWithPartOfSpeech(java.lang.Boolean withPartOfSpeech)
public void setMaxUnknownWordLen(int maxUnknownWordLen)
public int getMaxUnknownWordLen()
public RelatedTerms withMaxUnknownWordLen(int maxUnknownWordLen)
public RelatedTerms withMaxUnknownWordLen(java.lang.Integer maxUnknownWordLen)
public RelatedTerms makeCopy()
makeCopy
in class SemanticProcessor
public static RelatedTerms 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 RelatedTerms 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.