public class NamedEntitiesMatcher extends SemanticProcessor implements com.exalead.util.Checkable, java.io.Serializable
NE.person
or NE.organization
, using ontology-based matching and/or rule-based matching.SemanticProcessor.FromDataModel, SemanticProcessor.Transformer<T>, SemanticProcessor.Visitor
Modifier and Type | Field and Description |
---|---|
static boolean |
DEFAULT_PART_OF_SPEECH_FILTERING |
static java.lang.String |
DEFAULT_PREFIX |
static java.lang.String |
DEFAULT_RULES |
static boolean |
DEFAULT_USE_KNOWN_WORDS_FOR_DISAMBIGUISATION |
java.lang.String |
language |
boolean |
partOfSpeechFiltering |
java.lang.String |
prefix |
java.lang.String |
resourceDir |
java.lang.String |
rules |
boolean |
useKnownWordsForDisambiguisation |
contexts, dataModelClass, dataModelProperty, dataModelState, DEFAULT_DISABLED, disabled, fromDataModel, name
Constructor and Description |
---|
NamedEntitiesMatcher() |
NamedEntitiesMatcher(NamedEntitiesMatcher 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 NamedEntitiesMatcher.
|
static NamedEntitiesMatcher |
fromString(java.lang.String s)
String representation of this NamedEntitiesMatcher.
|
java.lang.String |
getLanguage()
Languages for which the processor is activated;
if no language is specified, the processor is activated for all languages. |
java.lang.String |
getPrefix()
Prefix to add in front of each annotation generated by the named entity matcher.
|
java.lang.String |
getResourceDir()
URL for the resource (data://, file;// or resource://).
|
java.lang.String |
getRules()
Defines which entities will be extracted:
The default value,
ne triggers the extraction of people, organizations, locations and events.
The value ne-all triggers the extraction of all types of entities.
|
boolean |
isPartOfSpeechFiltering()
It discards annotations for parts of text made of a name followed by a verb or an adverb with the first letter in uppercase.
This filter is useful if your documents contain a lot of titles with several capitalized words (what is called 'Title Case'). |
boolean |
isUseKnownWordsForDisambiguisation()
Uses a resource of known words to disambiguate named entities candidates.
|
NamedEntitiesMatcher |
makeCopy()
Creates and returns a deep copy of this NamedEntitiesMatcher.
|
static NamedEntitiesMatcher |
readFrom(java.io.InputStream is)
Read this NamedEntitiesMatcher from an XML fragment.
|
void |
setLanguage(java.lang.String language)
Languages for which the processor is activated;
if no language is specified, the processor is activated for all languages. |
void |
setPartOfSpeechFiltering(boolean partOfSpeechFiltering)
It discards annotations for parts of text made of a name followed by a verb or an adverb with the first letter in uppercase.
This filter is useful if your documents contain a lot of titles with several capitalized words (what is called 'Title Case'). |
void |
setPrefix(java.lang.String prefix)
Prefix to add in front of each annotation generated by the named entity matcher.
|
void |
setResourceDir(java.lang.String resourceDir)
URL for the resource (data://, file;// or resource://).
|
void |
setRules(java.lang.String rules)
Defines which entities will be extracted:
The default value,
ne triggers the extraction of people, organizations, locations and events.
The value ne-all triggers the extraction of all types of entities.
|
void |
setUseKnownWordsForDisambiguisation(boolean useKnownWordsForDisambiguisation)
Uses a resource of known words to disambiguate named entities candidates.
|
java.lang.String |
toString()
String representation of this NamedEntitiesMatcher.
|
NamedEntitiesMatcher |
withContexts(java.lang.String contexts) |
NamedEntitiesMatcher |
withDataModelClass(java.lang.String dataModelClass) |
NamedEntitiesMatcher |
withDataModelProperty(java.lang.String dataModelProperty) |
NamedEntitiesMatcher |
withDataModelState(java.lang.String dataModelState) |
NamedEntitiesMatcher |
withDisabled(boolean disabled) |
NamedEntitiesMatcher |
withDisabled(java.lang.Boolean disabled) |
NamedEntitiesMatcher |
withFromDataModel(SemanticProcessor fromDataModel) |
NamedEntitiesMatcher |
withLanguage(java.lang.String language) |
NamedEntitiesMatcher |
withName(java.lang.String name) |
NamedEntitiesMatcher |
withPartOfSpeechFiltering(boolean partOfSpeechFiltering) |
NamedEntitiesMatcher |
withPartOfSpeechFiltering(java.lang.Boolean partOfSpeechFiltering) |
NamedEntitiesMatcher |
withPrefix(java.lang.String prefix) |
NamedEntitiesMatcher |
withResourceDir(java.lang.String resourceDir) |
NamedEntitiesMatcher |
withRules(java.lang.String rules) |
NamedEntitiesMatcher |
withUseKnownWordsForDisambiguisation(boolean useKnownWordsForDisambiguisation) |
NamedEntitiesMatcher |
withUseKnownWordsForDisambiguisation(java.lang.Boolean useKnownWordsForDisambiguisation) |
void |
writeTo(java.io.OutputStream os)
Write this NamedEntitiesMatcher as an XML fragment
|
getContexts, getDataModelClass, getDataModelProperty, getDataModelState, getFromDataModel, getName, isDisabled, setContexts, setDataModelClass, setDataModelProperty, setDataModelState, setDisabled, setFromDataModel, setName
public java.lang.String resourceDir
public java.lang.String rules
public static final java.lang.String DEFAULT_RULES
public java.lang.String prefix
public static final java.lang.String DEFAULT_PREFIX
public java.lang.String language
public boolean partOfSpeechFiltering
public static final boolean DEFAULT_PART_OF_SPEECH_FILTERING
public boolean useKnownWordsForDisambiguisation
public static final boolean DEFAULT_USE_KNOWN_WORDS_FOR_DISAMBIGUISATION
public NamedEntitiesMatcher()
public NamedEntitiesMatcher(NamedEntitiesMatcher o)
public NamedEntitiesMatcher withName(java.lang.String name)
withName
in class SemanticProcessor
public NamedEntitiesMatcher withContexts(java.lang.String contexts)
withContexts
in class SemanticProcessor
public NamedEntitiesMatcher withFromDataModel(SemanticProcessor fromDataModel)
public NamedEntitiesMatcher withDataModelState(java.lang.String dataModelState)
withDataModelState
in class SemanticProcessor
public NamedEntitiesMatcher withDataModelClass(java.lang.String dataModelClass)
withDataModelClass
in class SemanticProcessor
public NamedEntitiesMatcher withDataModelProperty(java.lang.String dataModelProperty)
withDataModelProperty
in class SemanticProcessor
public NamedEntitiesMatcher withDisabled(boolean disabled)
withDisabled
in class SemanticProcessor
public NamedEntitiesMatcher withDisabled(java.lang.Boolean disabled)
withDisabled
in class SemanticProcessor
public void setResourceDir(java.lang.String resourceDir)
public java.lang.String getResourceDir()
public NamedEntitiesMatcher withResourceDir(java.lang.String resourceDir)
public void setRules(java.lang.String rules)
ne
triggers the extraction of people, organizations, locations and events.ne-all
triggers the extraction of all types of entities.public java.lang.String getRules()
ne
triggers the extraction of people, organizations, locations and events.ne-all
triggers the extraction of all types of entities.public NamedEntitiesMatcher withRules(java.lang.String rules)
public void setPrefix(java.lang.String prefix)
public java.lang.String getPrefix()
public NamedEntitiesMatcher withPrefix(java.lang.String prefix)
public void setLanguage(java.lang.String language)
public java.lang.String getLanguage()
public NamedEntitiesMatcher withLanguage(java.lang.String language)
public void setPartOfSpeechFiltering(boolean partOfSpeechFiltering)
NE.person
, NE.place
and NE.organization
.public boolean isPartOfSpeechFiltering()
NE.person
, NE.place
and NE.organization
.public NamedEntitiesMatcher withPartOfSpeechFiltering(boolean partOfSpeechFiltering)
public NamedEntitiesMatcher withPartOfSpeechFiltering(java.lang.Boolean partOfSpeechFiltering)
public void setUseKnownWordsForDisambiguisation(boolean useKnownWordsForDisambiguisation)
public boolean isUseKnownWordsForDisambiguisation()
public NamedEntitiesMatcher withUseKnownWordsForDisambiguisation(boolean useKnownWordsForDisambiguisation)
public NamedEntitiesMatcher withUseKnownWordsForDisambiguisation(java.lang.Boolean useKnownWordsForDisambiguisation)
public NamedEntitiesMatcher makeCopy()
makeCopy
in class SemanticProcessor
public static NamedEntitiesMatcher 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 NamedEntitiesMatcher 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 © 2021 Dassault Systèmes, All Rights Reserved.