edu.stanford.nlp.ling.tokensregex
Class SequenceMatchRules.AnnotationExtractRule<S,T extends MatchedExpression>

java.lang.Object
  extended by edu.stanford.nlp.ling.tokensregex.SequenceMatchRules.AnnotationExtractRule<S,T>
Type Parameters:
T - Output type (MatchedExpression)
All Implemented Interfaces:
SequenceMatchRules.ExtractRule<S,T>, SequenceMatchRules.Rule, Filter<T>, java.io.Serializable
Enclosing class:
SequenceMatchRules

public static class SequenceMatchRules.AnnotationExtractRule<S,T extends MatchedExpression>
extends java.lang.Object
implements SequenceMatchRules.Rule, SequenceMatchRules.ExtractRule<S,T>, Filter<T>

Rule that specifies how to extract sequence of MatchedExpression from an annotation (CoreMap).

See Also:
Serialized Form

Field Summary
 boolean active
           
 java.lang.Class annotationField
          Annotation field to apply rule over: text or tokens or numerizedtokens
 SequenceMatchRules.ExtractRule<S,T> extractRule
          Actual rule performing the extraction (converting annotation to MatchedExpression)
 Filter<T> filterRule
           
 boolean includeNested
           
 boolean isComposite
           
 int matchedExpressionGroup
           
 SequenceMatcher.FindType matchFindType
           
 boolean matchWithResults
           
 java.lang.String name
          Name of the rule
 double priority
          Priority in which this rule should be applied with respect to others
 java.util.List<java.lang.Class> resultAnnotationField
          Annotation field(s) to put new annotation
 java.lang.Class resultNestedAnnotationField
          Annotation field for child/nested annotations
 java.lang.String ruleType
          Type of rule to apply: token string match, pattern string match
 int stage
          Stage in which this rule should be applied with respect to others
 java.lang.Class tokensAnnotationField
           
 java.util.List<java.lang.Class> tokensResultAnnotationField
          Annotation field(s) on individual tokens to put new annotation
 double weight
          Weight given to the rule (how likely is this rule to fire)
 
Constructor Summary
SequenceMatchRules.AnnotationExtractRule()
           
 
Method Summary
 boolean accept(T obj)
          Checks if the given object passes the filter.
 boolean extract(S in, java.util.List<T> out)
           
 void update(Env env, java.util.Map<java.lang.String,java.lang.Object> attributes)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

public java.lang.String name
Name of the rule


stage

public int stage
Stage in which this rule should be applied with respect to others


priority

public double priority
Priority in which this rule should be applied with respect to others


weight

public double weight
Weight given to the rule (how likely is this rule to fire)


annotationField

public java.lang.Class annotationField
Annotation field to apply rule over: text or tokens or numerizedtokens


tokensAnnotationField

public java.lang.Class tokensAnnotationField

tokensResultAnnotationField

public java.util.List<java.lang.Class> tokensResultAnnotationField
Annotation field(s) on individual tokens to put new annotation


resultAnnotationField

public java.util.List<java.lang.Class> resultAnnotationField
Annotation field(s) to put new annotation


resultNestedAnnotationField

public java.lang.Class resultNestedAnnotationField
Annotation field for child/nested annotations


matchFindType

public SequenceMatcher.FindType matchFindType

matchedExpressionGroup

public int matchedExpressionGroup

matchWithResults

public boolean matchWithResults

ruleType

public java.lang.String ruleType
Type of rule to apply: token string match, pattern string match


isComposite

public boolean isComposite

includeNested

public boolean includeNested

active

public boolean active

extractRule

public SequenceMatchRules.ExtractRule<S,T extends MatchedExpression> extractRule
Actual rule performing the extraction (converting annotation to MatchedExpression)


filterRule

public Filter<T extends MatchedExpression> filterRule
Constructor Detail

SequenceMatchRules.AnnotationExtractRule

public SequenceMatchRules.AnnotationExtractRule()
Method Detail

update

public void update(Env env,
                   java.util.Map<java.lang.String,java.lang.Object> attributes)

extract

public boolean extract(S in,
                       java.util.List<T> out)
Specified by:
extract in interface SequenceMatchRules.ExtractRule<S,T extends MatchedExpression>

accept

public boolean accept(T obj)
Description copied from interface: Filter
Checks if the given object passes the filter.

Specified by:
accept in interface Filter<T extends MatchedExpression>
Parameters:
obj - an object to test
Returns:
Whether the object should be accepted (for some processing)


Stanford NLP Group