public class TimePattern extends PatternItem
| Constructor and Description |
|---|
TimePattern(boolean isDuration)
creates a new TimePattern.
|
| Modifier and Type | Method and Description |
|---|---|
PatternMatchResult |
match(Document doc,
List<Annotation> tokens,
int offset)
if the tokens beginning at token[offset] constitute a time expression,
return a PatternMatchResult incorporating that time expression and
its span; otherwise return
null. |
public TimePattern(boolean isDuration)
isDuration - if true, this pattern matches a duration time
expression (one whose VAL feature begins with a P);
if false, matches any other time expressionpublic PatternMatchResult match(Document doc, List<Annotation> tokens, int offset)
null.match in class PatternItemCopyright © 2016 New York University. All rights reserved.