edu.stanford.nlp.pipeline
Class POSTaggerAnnotator

java.lang.Object
  extended by edu.stanford.nlp.pipeline.POSTaggerAnnotator
All Implemented Interfaces:
Annotator

public class POSTaggerAnnotator
extends java.lang.Object
implements Annotator

Wrapper for the maxent part of speech tagger.

Author:
Anna Rafferty

Constructor Summary
POSTaggerAnnotator()
           
POSTaggerAnnotator(boolean verbose)
           
POSTaggerAnnotator(MaxentTagger model)
           
POSTaggerAnnotator(MaxentTagger model, int maxSentenceLength)
           
POSTaggerAnnotator(java.lang.String posLoc, boolean verbose)
           
POSTaggerAnnotator(java.lang.String posLoc, boolean verbose, int maxSentenceLength)
           
POSTaggerAnnotator(java.lang.String annotatorName, java.util.Properties props)
           
 
Method Summary
 void annotate(Annotation annotation)
           
 java.util.List<? extends CoreLabel> processText(java.util.List<? extends CoreLabel> text)
          Takes in a list of words and POS tags them.
 void setMaxSentenceLength(int maxLen)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

POSTaggerAnnotator

public POSTaggerAnnotator()

POSTaggerAnnotator

public POSTaggerAnnotator(boolean verbose)

POSTaggerAnnotator

public POSTaggerAnnotator(java.lang.String posLoc,
                          boolean verbose)

POSTaggerAnnotator

public POSTaggerAnnotator(java.lang.String posLoc,
                          boolean verbose,
                          int maxSentenceLength)

POSTaggerAnnotator

public POSTaggerAnnotator(MaxentTagger model)

POSTaggerAnnotator

public POSTaggerAnnotator(MaxentTagger model,
                          int maxSentenceLength)

POSTaggerAnnotator

public POSTaggerAnnotator(java.lang.String annotatorName,
                          java.util.Properties props)
Method Detail

setMaxSentenceLength

public void setMaxSentenceLength(int maxLen)

annotate

public void annotate(Annotation annotation)
Specified by:
annotate in interface Annotator

processText

public java.util.List<? extends CoreLabel> processText(java.util.List<? extends CoreLabel> text)
Takes in a list of words and POS tags them. Tagging is done in place - the returned CoreLabels are the same ones you passed in, with tags added.

Parameters:
text - List of tokens to tag
Returns:
Tokens with tags


Stanford NLP Group