edu.stanford.nlp.pipeline
Class ParserAnnotator

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

public class ParserAnnotator
extends java.lang.Object
implements Annotator

This class will add parse information to an Annotation. It assumes that the Annotation already contains the tokenized words as a List<CoreLabel> in the TokensAnnotation under each particular CoreMap in the SentencesAnnotation. If the words have POS tags, they will be used. If the input does not already have sentences, it adds parse information to the Annotation under the key DeprecatedAnnotations.ParsePLAnnotation.class as a List<Tree>. Otherwise, they are added to each sentence's CoreMap (get with CoreAnnotations.SentencesAnnotation) under CoreAnnotations.TreeAnnotation).

Author:
Jenny Finkel

Field Summary
static java.lang.String[] DEFAULT_FLAGS
           
 
Constructor Summary
ParserAnnotator(boolean verbose, int maxSent)
           
ParserAnnotator(LexicalizedParser parser, boolean verbose, int maxSent)
           
ParserAnnotator(LexicalizedParser parser, boolean verbose, int maxSent, Function<Tree,Tree> treeMap)
           
ParserAnnotator(java.lang.String parserLoc, boolean verbose, int maxSent, java.lang.String[] flags)
           
ParserAnnotator(java.lang.String annotatorName, java.util.Properties props)
           
 
Method Summary
 void annotate(Annotation annotation)
           
static java.lang.String[] convertFlagsToArray(java.lang.String parserFlags)
           
static java.lang.String signature(java.lang.String annotatorName, java.util.Properties props)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_FLAGS

public static final java.lang.String[] DEFAULT_FLAGS
Constructor Detail

ParserAnnotator

public ParserAnnotator(boolean verbose,
                       int maxSent)

ParserAnnotator

public ParserAnnotator(java.lang.String parserLoc,
                       boolean verbose,
                       int maxSent,
                       java.lang.String[] flags)

ParserAnnotator

public ParserAnnotator(LexicalizedParser parser,
                       boolean verbose,
                       int maxSent)

ParserAnnotator

public ParserAnnotator(LexicalizedParser parser,
                       boolean verbose,
                       int maxSent,
                       Function<Tree,Tree> treeMap)

ParserAnnotator

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

signature

public static java.lang.String signature(java.lang.String annotatorName,
                                         java.util.Properties props)

convertFlagsToArray

public static java.lang.String[] convertFlagsToArray(java.lang.String parserFlags)

annotate

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


Stanford NLP Group