opennlp.tools.namefind
Class DictionaryNameFinder

java.lang.Object
  extended by opennlp.tools.namefind.DictionaryNameFinder
All Implemented Interfaces:
TokenNameFinder

public class DictionaryNameFinder
extends Object
implements TokenNameFinder

This is a dictionary based name finder, it scans text for names inside a dictionary.

Version:
$Revision: 1.4 $, $Date: 2010/09/01 07:36:25 $
Author:
Joern Kottmann

Constructor Summary
DictionaryNameFinder(Dictionary dictionary)
          Initializes the current instance.
 
Method Summary
 void clearAdaptiveData()
          Forgets all adaptive data which was collected during previous calls to one of the find methods.
 Span[] find(String[] tokenStrings)
          Generates name tags for the given sequence, typically a sentence, returning token spans for any identified names.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DictionaryNameFinder

public DictionaryNameFinder(Dictionary dictionary)
Initializes the current instance.

Parameters:
dictionary -
Method Detail

find

public Span[] find(String[] tokenStrings)
Description copied from interface: TokenNameFinder
Generates name tags for the given sequence, typically a sentence, returning token spans for any identified names.

Specified by:
find in interface TokenNameFinder
Parameters:
tokenStrings - 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: TokenNameFinder
Forgets 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:
clearAdaptiveData in interface TokenNameFinder


Copyright © 2010. All Rights Reserved.