opennlp.grok.preprocess.chunk
Class ChunkerME

java.lang.Object
  |
  +--opennlp.grok.preprocess.chunk.ChunkerME
All Implemented Interfaces:
opennlp.maxent.Evalable, opennlp.common.preprocess.Pipelink, opennlp.common.preprocess.POSTagger
Direct Known Subclasses:
EnglishChunkerME

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

A shallow parser that uses maximum entropy. Trys to predict whether words are in chunks depending on their surrounding context.

Version:
$Revision: 1.2 $, $Date: 2002/11/08 17:57:10 $
Author:
Joerg Tiedemann

Field Summary
protected  opennlp.maxent.MaxentModel _chunkModel
          The maximum entropy model to use to evaluate contexts.
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  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 ChunkerME()
           
  ChunkerME(opennlp.maxent.MaxentModel mod)
           
  ChunkerME(opennlp.maxent.MaxentModel mod, opennlp.maxent.ContextGenerator cg)
           
 
Method Summary
 java.util.List bestSequence(java.util.List words, java.util.List pos)
           
 opennlp.maxent.EventCollector getEventCollector(java.io.Reader r)
           
 java.lang.String getNegativeOutcome()
           
 void localEval(opennlp.maxent.MaxentModel chunkModel, java.io.Reader r, opennlp.maxent.Evalable e, boolean verbose)
           
static void main(java.lang.String[] args)
           
 void process(opennlp.common.xml.NLPDocument doc)
          creates chunk tags in a document.
 void processSimple(opennlp.common.xml.NLPDocument doc)
           
 java.util.Set requires()
           
 java.util.List tag(java.util.List sentence)
           
 java.util.List tag(java.util.List sentence, java.util.List pos)
           
 java.lang.String tag(java.lang.String sentence)
           
 java.lang.String[] tag(java.lang.String[] sentence)
           
 java.lang.String tagTest(java.lang.String sentence)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_chunkModel

protected opennlp.maxent.MaxentModel _chunkModel
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

ChunkerME

protected ChunkerME()

ChunkerME

public ChunkerME(opennlp.maxent.MaxentModel mod)

ChunkerME

public ChunkerME(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)
creates chunk tags in a document.

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

processSimple

public void processSimple(opennlp.common.xml.NLPDocument doc)

tag

public java.util.List tag(java.util.List sentence,
                          java.util.List pos)

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

tagTest

public java.lang.String tagTest(java.lang.String sentence)

localEval

public void localEval(opennlp.maxent.MaxentModel chunkModel,
                      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,
                                   java.util.List pos)

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.