edu.stanford.nlp.pipeline
Class POSTaggerAnnotator
java.lang.Object
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
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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)
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