Class ComplexNodePattern.StringAnnotationRegexPattern
- java.lang.Object
-
- edu.stanford.nlp.ling.tokensregex.NodePattern<String>
-
- edu.stanford.nlp.ling.tokensregex.ComplexNodePattern.StringAnnotationRegexPattern
-
- All Implemented Interfaces:
Serializable
- Enclosing class:
- ComplexNodePattern<M,K>
public static class ComplexNodePattern.StringAnnotationRegexPattern extends NodePattern<String>
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class edu.stanford.nlp.ling.tokensregex.NodePattern
NodePattern.AnyNodePattern<T>, NodePattern.ConjNodePattern<T>, NodePattern.DisjNodePattern<T>, NodePattern.EqualsNodePattern<T>, NodePattern.NegateNodePattern<T>
-
-
Field Summary
-
Fields inherited from class edu.stanford.nlp.ling.tokensregex.NodePattern
ANY_NODE, CASE_INSENSITIVE, NORMALIZE, UNICODE_CASE
-
-
Constructor Summary
Constructors Constructor Description StringAnnotationRegexPattern(String regex, int flags)StringAnnotationRegexPattern(Pattern pattern)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PatterngetPattern()booleanmatch(String str)Returns true if the input node matches this patternMatchermatcher(String str)ObjectmatchWithResult(String str)Returns result associated with the matchStringtoString()
-
-
-
Method Detail
-
getPattern
public Pattern getPattern()
-
match
public boolean match(String str)
Description copied from class:NodePatternReturns true if the input node matches this pattern- Specified by:
matchin classNodePattern<String>- Parameters:
str- - node to match- Returns:
- true if the node matches the pattern, false otherwise
-
matchWithResult
public Object matchWithResult(String str)
Description copied from class:NodePatternReturns result associated with the match- Overrides:
matchWithResultin classNodePattern<String>- Parameters:
str- node to match- Returns:
- null if not matched, TRUE if there is a match but no other result associated with the match. Any other value is treated as the result value of the match.
-
-