public class DictionariesNameFinder extends Object implements NameFinder
Dictionaries objects This
class provides the following functionalities:
StatisticalNameFinder; it also corrects the Name type
for those detected by a StatisticalNameFinder but also present in a
dictionary.
| Constructor and Description |
|---|
DictionariesNameFinder(Dictionaries aDictionaries)
Construct a DictionaryNameFinder using one dictionary and one named entity
class.
|
DictionariesNameFinder(Dictionaries aDictionaries,
NameFactory aNameFactory)
Construct a DictionariesNameFinder with a dictionary, a type and a name
factory.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clearAdaptiveData()
Clear the adaptiveData for each document.
|
List<Name> |
getNames(String[] tokens)
Dictionaries based Named Entity Detection and Classification. |
List<Name> |
getNamesFromSpans(opennlp.tools.util.Span[] neSpans,
String[] tokens)
Creates a list of
Name objects from spans and tokens. |
opennlp.tools.util.Span[] |
nercToSpans(String[] tokens)
Detects Named Entities in a
Dictionaries by NE type ignoring case. |
opennlp.tools.util.Span[] |
nercToSpansExact(String[] tokens)
Detects Named Entities in a
Dictionaries by NE type This method is
case sensitive. |
public DictionariesNameFinder(Dictionaries aDictionaries)
aDictionaries - the dictionariespublic DictionariesNameFinder(Dictionaries aDictionaries, NameFactory aNameFactory)
aDictionaries - the dictionariesaNameFactory - the factorypublic final List<Name> getNames(String[] tokens)
Dictionaries based Named Entity Detection and Classification.getNames in interface NameFindertokens - the tokenized sentenceName objectspublic final opennlp.tools.util.Span[] nercToSpans(String[] tokens)
Dictionaries by NE type ignoring case.nercToSpans in interface NameFindertokens - the tokenized sentencepublic final opennlp.tools.util.Span[] nercToSpansExact(String[] tokens)
Dictionaries by NE type This method is
case sensitive.tokens - the tokenized sentencepublic final List<Name> getNamesFromSpans(opennlp.tools.util.Span[] neSpans, String[] tokens)
Name objects from spans and tokens.getNamesFromSpans in interface NameFinderneSpans - the spans of the entities in the sentencetokens - the tokenized sentenceName objectspublic void clearAdaptiveData()
clearAdaptiveData in interface NameFinderCopyright © 2016 IXA pipes. All rights reserved.