T
- Output type (MatchedExpression)public static class SequenceMatchRules.AnnotationExtractRule<S,T extends MatchedExpression> extends Object implements SequenceMatchRules.Rule, SequenceMatchRules.ExtractRule<S,T>, Predicate<T>, Serializable
Modifier and Type | Field and Description |
---|---|
boolean |
active |
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)
|
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 |
String |
name
Name of the rule
|
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 |
List<Class> |
resultAnnotationField
Annotation field(s) to put new annotation
|
Class |
resultNestedAnnotationField
Annotation field for child/nested annotations
|
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
|
Class |
tokensAnnotationField |
List<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,
List<T> out) |
boolean |
hasTokensRegexPattern() |
boolean |
isMostlyCompatible(SequenceMatchRules.AnnotationExtractRule<S,T> aer) |
boolean |
test(T obj) |
String |
toString() |
void |
update(Env env,
Map<String,Object> attributes) |
public String name
public int stage
public double priority
public double weight
public Class annotationField
public Class tokensAnnotationField
public List<Class> tokensResultAnnotationField
public List<Class> resultAnnotationField
public Class resultNestedAnnotationField
public SequenceMatcher.FindType matchFindType
public int matchedExpressionGroup
public boolean matchWithResults
public String ruleType
public boolean isComposite
public boolean includeNested
public boolean active
public SequenceMatchRules.ExtractRule<S,T extends MatchedExpression> extractRule
public Predicate<T extends MatchedExpression> filterRule
public Object pattern
public Expression result
public boolean extract(S in, List<T> out)
extract
in interface SequenceMatchRules.ExtractRule<S,T extends MatchedExpression>
public boolean test(T obj)
test
in interface Predicate<T extends MatchedExpression>
public boolean isMostlyCompatible(SequenceMatchRules.AnnotationExtractRule<S,T> aer)
public boolean hasTokensRegexPattern()