public class ParserAnnotator extends SentenceAnnotator
List<CoreLabel> in the TokensAnnotation under each
particular CoreMap in the SentencesAnnotation.
If the words have POS tags, they will be used.
CoreAnnotations.SentencesAnnotation) under
CoreAnnotations.TreeAnnotation).SentenceAnnotator.AnnotatorProcessorDEFAULT_REQUIREMENTS, STANFORD_CDC_TOKENIZE, STANFORD_CLEAN_XML, STANFORD_COLUMN_DATA_CLASSIFIER, STANFORD_COREF, STANFORD_COREF_MENTION, STANFORD_DEPENDENCIES, STANFORD_DETERMINISTIC_COREF, STANFORD_DOCDATE, STANFORD_ENTITY_MENTIONS, STANFORD_GENDER, STANFORD_KBP, STANFORD_LEMMA, STANFORD_LINK, STANFORD_MWT, STANFORD_NATLOG, STANFORD_NER, STANFORD_OPENIE, STANFORD_PARSE, STANFORD_POS, STANFORD_QUOTE, STANFORD_QUOTE_ATTRIBUTION, STANFORD_REGEXNER, STANFORD_RELATION, STANFORD_SENTIMENT, STANFORD_SSPLIT, STANFORD_TOKENIZE, STANFORD_TOKENSREGEX, STANFORD_TRUECASE, STANFORD_UD_FEATURES| Constructor and Description |
|---|
ParserAnnotator(boolean verbose,
int maxSent) |
ParserAnnotator(ParserGrammar parser,
boolean verbose,
int maxSent) |
ParserAnnotator(ParserGrammar parser,
boolean verbose,
int maxSent,
java.util.function.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) |
| Modifier and Type | Method and Description |
|---|---|
void |
doOneFailedSentence(Annotation annotation,
CoreMap sentence)
Fills in empty annotations for trees, tags, etc if the annotator
failed or timed out.
|
protected void |
doOneSentence(Annotation annotation,
CoreMap sentence)
annotation is included in case there is global information we care about
|
protected long |
maxTime()
The maximum time to run this annotator for, in milliseconds.
|
protected int |
nThreads() |
java.util.Set<java.lang.Class<? extends CoreAnnotation>> |
requirementsSatisfied()
Returns a set of requirements for which tasks this annotator can
provide.
|
java.util.Set<java.lang.Class<? extends CoreAnnotation>> |
requires()
Returns the set of tasks which this annotator requires in order
to perform.
|
static java.lang.String |
signature(java.lang.String annotatorName,
java.util.Properties props) |
annotateclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitexactRequirements, unmountpublic ParserAnnotator(boolean verbose,
int maxSent)
public ParserAnnotator(java.lang.String parserLoc,
boolean verbose,
int maxSent,
java.lang.String[] flags)
public ParserAnnotator(ParserGrammar parser, boolean verbose, int maxSent)
public ParserAnnotator(ParserGrammar parser, boolean verbose, int maxSent, java.util.function.Function<Tree,Tree> treeMap)
public ParserAnnotator(java.lang.String annotatorName,
java.util.Properties props)
public static java.lang.String signature(java.lang.String annotatorName,
java.util.Properties props)
protected int nThreads()
nThreads in class SentenceAnnotatorprotected long maxTime()
SentenceAnnotatormaxTime in class SentenceAnnotatorprotected void doOneSentence(Annotation annotation, CoreMap sentence)
SentenceAnnotatordoOneSentence in class SentenceAnnotatorpublic void doOneFailedSentence(Annotation annotation, CoreMap sentence)
SentenceAnnotatordoOneFailedSentence in class SentenceAnnotatorannotation - The whole Annotation object, in case it is needed for context.sentence - The particular sentence to processpublic java.util.Set<java.lang.Class<? extends CoreAnnotation>> requires()
Annotatorpublic java.util.Set<java.lang.Class<? extends CoreAnnotation>> requirementsSatisfied()
Annotator