public class StatisticalNameFinder extends Object implements NameFinder
| Constructor and Description |
|---|
StatisticalNameFinder(Properties props)
Construct a probabilistic name finder specifying lang, model and beamsize.
|
StatisticalNameFinder(Properties props,
NameFactory aNameFactory)
Construct a StatisticalNameFinder specifying the language,
a name factory, the model, the features and the beam size for
decoding.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clearAdaptiveData()
Forgets all adaptive data which was collected during previous calls to one
of the find methods.
|
List<Name> |
getNames(String[] tokens)
Method to produce a list of the
Name objects classified by the
probabilistic model. |
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)
This method receives as input an array of tokenized text and calls the
NameFinderME.find(tokens) to recognize and classify Named Entities.
|
public StatisticalNameFinder(Properties props)
props - the properties to be loadedpublic StatisticalNameFinder(Properties props, NameFactory aNameFactory)
props - the propertiesaNameFactory - the name factory to construct Name objectspublic final List<Name> getNames(String[] tokens)
Name objects classified by the
probabilistic model.
Takes an array of tokens, calls nercToSpans function for probabilistic NERC
and returns a List of Name objects containing the nameString, the
type and the SpangetNames in interface NameFindertokens - an array of tokenized textpublic final opennlp.tools.util.Span[] nercToSpans(String[] tokens)
nercToSpans in interface NameFindertokens - an array of tokenized textSpans of Named Entitiespublic final List<Name> getNamesFromSpans(opennlp.tools.util.Span[] neSpans, String[] tokens)
Name objects from spans and tokens.getNamesFromSpans in interface NameFinderneSpans - the named entity spans of a sentencetokens - the tokens in the sentenceName objectspublic final void clearAdaptiveData()
clearAdaptiveData in interface NameFinderCopyright © 2015 IXA pipes. All rights reserved.