edu.stanford.nlp.ling.tokensregex
Class CoreMapNodePattern.StringAnnotationRegexPattern
java.lang.Object
edu.stanford.nlp.ling.tokensregex.NodePattern<java.lang.String>
edu.stanford.nlp.ling.tokensregex.CoreMapNodePattern.StringAnnotationRegexPattern
- Enclosing class:
- CoreMapNodePattern
public static class CoreMapNodePattern.StringAnnotationRegexPattern
- extends NodePattern<java.lang.String>
|
Method Summary |
java.util.regex.Pattern |
getPattern()
|
boolean |
match(java.lang.String str)
Returns true if the input node matches this pattern |
java.util.regex.Matcher |
matcher(java.lang.String str)
|
java.lang.Object |
matchWithResult(java.lang.String str)
Returns result associated with the match |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
CoreMapNodePattern.StringAnnotationRegexPattern
public CoreMapNodePattern.StringAnnotationRegexPattern(java.util.regex.Pattern pattern)
CoreMapNodePattern.StringAnnotationRegexPattern
public CoreMapNodePattern.StringAnnotationRegexPattern(java.lang.String regex,
int flags)
getPattern
public java.util.regex.Pattern getPattern()
matcher
public java.util.regex.Matcher matcher(java.lang.String str)
match
public boolean match(java.lang.String str)
- Description copied from class:
NodePattern
- Returns true if the input node matches this pattern
- Specified by:
match in class NodePattern<java.lang.String>
- Parameters:
str - - node to match
- Returns:
- true if the node matches the pattern, false otherwise
matchWithResult
public java.lang.Object matchWithResult(java.lang.String str)
- Description copied from class:
NodePattern
- Returns result associated with the match
- Overrides:
matchWithResult in class NodePattern<java.lang.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.
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
Stanford NLP Group