public class CoreMapNodePattern extends NodePattern<CoreMap>
Modifier and Type | Class and Description |
---|---|
static class |
CoreMapNodePattern.AbstractStringAnnotationPattern |
static class |
CoreMapNodePattern.AttributesEqualMatchChecker |
static class |
CoreMapNodePattern.IntegerAnnotationPattern |
static class |
CoreMapNodePattern.NilAnnotationPattern |
static class |
CoreMapNodePattern.NotNilAnnotationPattern |
static class |
CoreMapNodePattern.NumericAnnotationPattern |
static class |
CoreMapNodePattern.SequenceRegexPattern<T> |
static class |
CoreMapNodePattern.StringAnnotationPattern |
static class |
CoreMapNodePattern.StringAnnotationRegexPattern |
static class |
CoreMapNodePattern.StringInSetAnnotationPattern |
NodePattern.AnyNodePattern<T>, NodePattern.ConjNodePattern<T>, NodePattern.DisjNodePattern<T>, NodePattern.EqualsNodePattern<T>, NodePattern.NegateNodePattern<T>
Modifier and Type | Field and Description |
---|---|
static CoreMapNodePattern.AttributesEqualMatchChecker |
TEXT_ATTR_EQUAL_CHECKER |
ANY_NODE, CASE_INSENSITIVE, NORMALIZE
Constructor and Description |
---|
CoreMapNodePattern(Class key,
NodePattern pattern) |
CoreMapNodePattern(List<Pair<Class,NodePattern>> annotationPatterns) |
CoreMapNodePattern(Pair<Class,NodePattern>... annotationPatterns) |
Modifier and Type | Method and Description |
---|---|
void |
add(Class c,
NodePattern pattern) |
List<Pair<Class,NodePattern>> |
getAnnotationPatterns() |
boolean |
match(CoreMap token)
Returns true if the input node matches this pattern
|
protected boolean |
match(CoreMap token,
Map<Class,Object> matchResults) |
Object |
matchWithResult(CoreMap token)
Returns result associated with the match
|
static NodePattern<String> |
newStringRegexPattern(String regex,
int flags) |
String |
toString() |
static CoreMapNodePattern |
valueOf(Env env,
Map<String,String> attributes) |
static CoreMapNodePattern |
valueOf(Env env,
String textAnnotationPattern) |
static CoreMapNodePattern |
valueOf(Map<String,String> attributes) |
static CoreMapNodePattern |
valueOf(Pattern textAnnotationPattern) |
static CoreMapNodePattern |
valueOf(String textAnnotationPattern) |
static CoreMapNodePattern |
valueOf(String textAnnotationPattern,
int flags) |
public static final CoreMapNodePattern.AttributesEqualMatchChecker TEXT_ATTR_EQUAL_CHECKER
public CoreMapNodePattern(List<Pair<Class,NodePattern>> annotationPatterns)
public CoreMapNodePattern(Pair<Class,NodePattern>... annotationPatterns)
public CoreMapNodePattern(Class key, NodePattern pattern)
public List<Pair<Class,NodePattern>> getAnnotationPatterns()
public static NodePattern<String> newStringRegexPattern(String regex, int flags)
public static CoreMapNodePattern valueOf(String textAnnotationPattern)
public static CoreMapNodePattern valueOf(String textAnnotationPattern, int flags)
public static CoreMapNodePattern valueOf(Env env, String textAnnotationPattern)
public static CoreMapNodePattern valueOf(Pattern textAnnotationPattern)
public static CoreMapNodePattern valueOf(Map<String,String> attributes)
public static CoreMapNodePattern valueOf(Env env, Map<String,String> attributes)
public void add(Class c, NodePattern pattern)
public boolean match(CoreMap token)
NodePattern
match
in class NodePattern<CoreMap>
token
- - node to matchpublic Object matchWithResult(CoreMap token)
NodePattern
matchWithResult
in class NodePattern<CoreMap>
token
- node to match