T
- Output type (MatchedExpression)public static class SequenceMatchRules.AnnotationExtractRule<S,T extends MatchedExpression> extends java.lang.Object implements SequenceMatchRules.Rule, SequenceMatchRules.ExtractRule<S,T>, java.util.function.Predicate<T>, java.io.Serializable
Modifier and Type | Field and Description |
---|---|
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)
|
java.util.function.Predicate<T> |
filterRule |
boolean |
includeNested |
boolean |
isComposite |
int |
matchedExpressionGroup
Which group to take as the matched expression - default is 0
|
SequenceMatcher.FindType |
matchFindType |
boolean |
matchWithResults |
java.lang.String |
name
Name of the rule
|
java.lang.Object |
pattern
Pattern - the type of which is dependent on the rule type
|
double |
priority
Priority in which this rule should be applied with respect to others
|
Expression |
result |
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 and Description |
---|
AnnotationExtractRule() |
Modifier and Type | Method and Description |
---|---|
boolean |
extract(S in,
java.util.List<T> out) |
boolean |
hasTokensRegexPattern() |
boolean |
isMostlyCompatible(SequenceMatchRules.AnnotationExtractRule<S,T> aer) |
boolean |
test(T obj) |
java.lang.String |
toString() |
void |
update(Env env,
java.util.Map<java.lang.String,java.lang.Object> attributes) |
public java.lang.String name
public int stage
public double priority
public double weight
public java.lang.Class annotationField
public java.lang.Class tokensAnnotationField
public java.util.List<java.lang.Class> tokensResultAnnotationField
public java.util.List<java.lang.Class> resultAnnotationField
public java.lang.Class resultNestedAnnotationField
public SequenceMatcher.FindType matchFindType
public int matchedExpressionGroup
public boolean matchWithResults
public java.lang.String ruleType
public boolean isComposite
public boolean includeNested
public boolean active
public SequenceMatchRules.ExtractRule<S,T extends MatchedExpression> extractRule
public java.util.function.Predicate<T extends MatchedExpression> filterRule
public java.lang.Object pattern
public Expression result
public void update(Env env, java.util.Map<java.lang.String,java.lang.Object> attributes)
public boolean extract(S in, java.util.List<T> out)
extract
in interface SequenceMatchRules.ExtractRule<S,T extends MatchedExpression>
public boolean test(T obj)
test
in interface java.util.function.Predicate<T extends MatchedExpression>
public boolean isMostlyCompatible(SequenceMatchRules.AnnotationExtractRule<S,T> aer)
public boolean hasTokensRegexPattern()
public java.lang.String toString()
toString
in class java.lang.Object