edu.stanford.nlp.ling.tokensregex
Class MatchedExpression.SingleAnnotationExtractor
java.lang.Object
edu.stanford.nlp.ling.tokensregex.MatchedExpression.SingleAnnotationExtractor
- All Implemented Interfaces:
- Function<CoreMap,Value>
- Enclosing class:
- MatchedExpression
public static class MatchedExpression.SingleAnnotationExtractor
- extends java.lang.Object
- implements Function<CoreMap,Value>
Function that takes a CoreMap, applies a extraction function to it, to get a value
Also contains information on how to construct a final annotation.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
name
public java.lang.String name
priority
public double priority
weight
public double weight
tokensAnnotationField
public java.lang.Class tokensAnnotationField
tokensResultAnnotationField
public java.util.List<java.lang.Class> tokensResultAnnotationField
resultAnnotationField
public java.util.List<java.lang.Class> resultAnnotationField
resultNestedAnnotationField
public java.lang.Class resultNestedAnnotationField
includeNested
public boolean includeNested
valueExtractor
public Function<CoreMap,Value> valueExtractor
resultAnnotationExtractor
public Function<MatchedExpression,?> resultAnnotationExtractor
tokensAggregators
public java.util.Map<java.lang.Class,CoreMapAttributeAggregator> tokensAggregators
MatchedExpression.SingleAnnotationExtractor
public MatchedExpression.SingleAnnotationExtractor()
apply
public Value apply(CoreMap in)
- Description copied from interface:
Function
- Converts a T1 to a different T2. For example, a Parser
will convert a Sentence to a Tree. A Tagger will convert a Sentence
to a TaggedSentence.
- Specified by:
apply in interface Function<CoreMap,Value>
- Parameters:
in - The function's argument
- Returns:
- The function's evaluated value
annotate
public void annotate(MatchedExpression matchedExpression,
java.util.List<? extends CoreMap> nested)
annotate
public void annotate(MatchedExpression matchedExpression)
createMatchedExpression
public MatchedExpression createMatchedExpression(Interval<java.lang.Integer> charOffsets,
Interval<java.lang.Integer> tokenOffsets)
Stanford NLP Group