public abstract class TimeRule extends Object
| Constructor and Description |
|---|
TimeRule() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
apply(Document doc,
List<Object> values,
Span span,
org.joda.time.DateTime ref) |
protected String |
assignValues(String value,
List<Object> values) |
Map |
getParameters() |
PatternItem[] |
getPatternItems() |
TimeAnnotator |
getTimeAnnotator() |
Span |
matches(Document doc,
List<Annotation> tokens,
int offset,
org.joda.time.DateTime ref,
List<Object> values)
matches the pattern portion of the current TimeRule against the sequence
of
tokens in doc starting with |
protected int |
nextOffset(List<Annotation> tokens,
int offset,
Span span) |
void |
setParameters(Map params) |
void |
setPatternItems(PatternItem[] patterns) |
void |
setTimeAnnotator(TimeAnnotator timeAnnotator) |
public abstract void apply(Document doc, List<Object> values, Span span, org.joda.time.DateTime ref)
public void setTimeAnnotator(TimeAnnotator timeAnnotator)
public TimeAnnotator getTimeAnnotator()
public void setPatternItems(PatternItem[] patterns)
public PatternItem[] getPatternItems()
public void setParameters(Map params)
public Map getParameters()
public Span matches(Document doc, List<Annotation> tokens, int offset, org.joda.time.DateTime ref, List<Object> values)
tokens in doc starting with tokens[offset].
If the match is successful, adds to values the values of
the items matching the pattern elements.nullprotected int nextOffset(List<Annotation> tokens, int offset, Span span)
Copyright © 2016 New York University. All rights reserved.