opennlp.grok.preprocess.namefind
Class NameFinderME

java.lang.Object
  |
  +--opennlp.grok.preprocess.namefind.NameFinderME
All Implemented Interfaces:
opennlp.maxent.Evalable, opennlp.common.preprocess.NameFinder, opennlp.common.preprocess.Pipelink
Direct Known Subclasses:
EnglishNameFinderME

public class NameFinderME
extends java.lang.Object
implements opennlp.common.preprocess.NameFinder, opennlp.maxent.Evalable

A Name Finder that uses maximum entropy to determine if a word is a name or not a name.

Version:
$Revision: 1.12 $, $Date: 2002/02/11 15:43:34 $
Author:
Gann Bierner

Field Summary
protected static opennlp.maxent.ContextGenerator cg
          The feature context generator.
protected  opennlp.maxent.MaxentModel model
          The maximum entropy model to use to evaluate contexts.
 
Constructor Summary
protected NameFinderME()
           
  NameFinderME(opennlp.maxent.MaxentModel mod)
           
 
Method Summary
 opennlp.maxent.EventCollector getEventCollector(java.io.Reader r)
           
 java.lang.String getNegativeOutcome()
           
protected  boolean isName(java.lang.String[] l, int pos)
           
 void localEval(opennlp.maxent.MaxentModel model, java.io.Reader r, opennlp.maxent.Evalable e, boolean verbose)
           
static void main(java.lang.String[] args)
          Example training call:
 void process(opennlp.common.xml.NLPDocument doc)
          Find the names in a document.
 java.util.Set requires()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

model

protected opennlp.maxent.MaxentModel model
The maximum entropy model to use to evaluate contexts.


cg

protected static final opennlp.maxent.ContextGenerator cg
The feature context generator.

Constructor Detail

NameFinderME

protected NameFinderME()

NameFinderME

public NameFinderME(opennlp.maxent.MaxentModel mod)
Method Detail

getNegativeOutcome

public java.lang.String getNegativeOutcome()
Specified by:
getNegativeOutcome in interface opennlp.maxent.Evalable

getEventCollector

public opennlp.maxent.EventCollector getEventCollector(java.io.Reader r)
Specified by:
getEventCollector in interface opennlp.maxent.Evalable

localEval

public void localEval(opennlp.maxent.MaxentModel model,
                      java.io.Reader r,
                      opennlp.maxent.Evalable e,
                      boolean verbose)
Specified by:
localEval in interface opennlp.maxent.Evalable

isName

protected boolean isName(java.lang.String[] l,
                         int pos)

process

public void process(opennlp.common.xml.NLPDocument doc)
Find the names in a document.

Specified by:
process in interface opennlp.common.preprocess.Pipelink

requires

public java.util.Set requires()
Specified by:
requires in interface opennlp.common.preprocess.Pipelink

main

public static void main(java.lang.String[] args)
                 throws java.io.IOException
Example training call:

java -mx512m opennlp.grok.preprocess.namefind.NameFinderME -t -d ./ -c 5 -s NewEngNF5.bin.gz nameTrain.data

java.io.IOException


Copyright © 2003 Jason Baldridge and Gann Bierner. All Rights Reserved.