Package opennlp.tools.namefind
Class DictionaryNameFinder
- java.lang.Object
 - 
- opennlp.tools.namefind.DictionaryNameFinder
 
 
- 
- All Implemented Interfaces:
 TokenNameFinder
public class DictionaryNameFinder extends java.lang.Object implements TokenNameFinder
This is a dictionary based name finder, it scans text for names inside a dictionary. 
- 
- 
Constructor Summary
Constructors Constructor Description DictionaryNameFinder(Dictionary dictionary)Initializes the current instance with the provided dictionary.DictionaryNameFinder(Dictionary dictionary, java.lang.String type)Initialized the current instance with he provided dictionary and a type. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclearAdaptiveData()Forgets all adaptive data which was collected during previous calls to one of the find methods.Span[]find(java.lang.String[] textTokenized)Generates name tags for the given sequence, typically a sentence, returning token spans for any identified names. 
 - 
 
- 
- 
Constructor Detail
- 
DictionaryNameFinder
public DictionaryNameFinder(Dictionary dictionary, java.lang.String type)
Initialized the current instance with he provided dictionary and a type.- Parameters:
 dictionary-type- the name type used for the produced spans
 
- 
DictionaryNameFinder
public DictionaryNameFinder(Dictionary dictionary)
Initializes the current instance with the provided dictionary.- Parameters:
 dictionary-
 
 - 
 
- 
Method Detail
- 
find
public Span[] find(java.lang.String[] textTokenized)
Description copied from interface:TokenNameFinderGenerates name tags for the given sequence, typically a sentence, returning token spans for any identified names.- Specified by:
 findin interfaceTokenNameFinder- Parameters:
 textTokenized- an array of the tokens or words of the sequence, typically a sentence.- Returns:
 - an array of spans for each of the names identified.
 
 
- 
clearAdaptiveData
public void clearAdaptiveData()
Description copied from interface:TokenNameFinderForgets all adaptive data which was collected during previous calls to one of the find methods. This method is typical called at the end of a document.- Specified by:
 clearAdaptiveDatain interfaceTokenNameFinder
 
 - 
 
 -