opennlp.grok.preprocess.postag
Class POSTaggerME

java.lang.Object
  |
  +--opennlp.grok.preprocess.postag.POSTaggerME
All Implemented Interfaces:
opennlp.maxent.Evalable, opennlp.common.preprocess.Pipelink, opennlp.common.preprocess.POSTagger
Direct Known Subclasses:
EnglishPOSTaggerME

public class POSTaggerME
extends java.lang.Object
implements opennlp.maxent.Evalable, opennlp.common.preprocess.POSTagger

A part-of-speech tagger that uses maximum entropy. Trys to predict whether words are nouns, verbs, or any of 70 other POS tags depending on their surrounding context.

Version:
$Revision: 1.7 $, $Date: 2002/11/07 23:37:46 $
Author:
Gann Bierner

Field Summary
protected  opennlp.common.util.FilterFcn _closedClassTagsFilter
          Decides whether a word can be assigned a particular closed class tag.
protected  opennlp.maxent.ContextGenerator _contextGen
          The feature context generator.
protected  opennlp.maxent.MaxentModel _posModel
          The maximum entropy model to use to evaluate contexts.
protected  boolean _useClosedClassTagsFilter
          Says whether a filter should be used to check whether a tag assignment is to a word outside of a closed class.
 
Constructor Summary
protected POSTaggerME()
           
  POSTaggerME(opennlp.maxent.MaxentModel mod)
           
  POSTaggerME(opennlp.maxent.MaxentModel mod, opennlp.maxent.ContextGenerator cg)
           
 
Method Summary
 java.util.List bestSequence(java.util.List words)
           
 opennlp.maxent.EventCollector getEventCollector(java.io.Reader r)
           
 java.lang.String getNegativeOutcome()
           
 void localEval(opennlp.maxent.MaxentModel posModel, java.io.Reader r, opennlp.maxent.Evalable e, boolean verbose)
           
static void main(java.lang.String[] args)
           
 void process(opennlp.common.xml.NLPDocument doc)
          POS tag the words in a document.
 java.util.Set requires()
           
 java.util.List tag(java.util.List sentence)
           
 java.lang.String tag(java.lang.String sentence)
           
 java.lang.String[] tag(java.lang.String[] sentence)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_posModel

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


_contextGen

protected opennlp.maxent.ContextGenerator _contextGen
The feature context generator.


_closedClassTagsFilter

protected opennlp.common.util.FilterFcn _closedClassTagsFilter
Decides whether a word can be assigned a particular closed class tag.


_useClosedClassTagsFilter

protected boolean _useClosedClassTagsFilter
Says whether a filter should be used to check whether a tag assignment is to a word outside of a closed class.

Constructor Detail

POSTaggerME

protected POSTaggerME()

POSTaggerME

public POSTaggerME(opennlp.maxent.MaxentModel mod)

POSTaggerME

public POSTaggerME(opennlp.maxent.MaxentModel mod,
                   opennlp.maxent.ContextGenerator cg)
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

process

public void process(opennlp.common.xml.NLPDocument doc)
POS tag the words in a document.

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

tag

public java.util.List tag(java.util.List sentence)
Specified by:
tag in interface opennlp.common.preprocess.POSTagger

tag

public java.lang.String[] tag(java.lang.String[] sentence)
Specified by:
tag in interface opennlp.common.preprocess.POSTagger

tag

public java.lang.String tag(java.lang.String sentence)
Specified by:
tag in interface opennlp.common.preprocess.POSTagger

localEval

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

bestSequence

public java.util.List bestSequence(java.util.List words)

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
java.io.IOException


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