public class TimeExpression extends MatchedExpression
Modifier and Type | Class and Description |
---|---|
static class |
TimeExpression.Annotation
The CoreMap key for storing a TimeExpression annotation.
|
static class |
TimeExpression.ChildrenAnnotation
The CoreMap key for storing a nested annotations.
|
static class |
TimeExpression.TimeIndexAnnotation
The CoreMap key for storing a SUTime.TimeIndex (for looking up Timex Id).
|
MatchedExpression.SingleAnnotationExtractor
Modifier and Type | Field and Description |
---|---|
protected static java.util.function.Function<MatchedExpression,TimeExpression> |
TimeExpressionConverter |
annotation, charOffsets, chunkOffsets, COREMAP_TO_CHAR_OFFSETS_INTERVAL_FUNC, COREMAP_TO_TOKEN_OFFSETS_INTERVAL_FUNC, EXPR_LENGTH_COMPARATOR, EXPR_LENGTH_PRIORITY_COMPARATOR, EXPR_ORDER_COMPARATOR, EXPR_PRIORITY_COMPARATOR, EXPR_PRIORITY_LENGTH_COMPARATOR, EXPR_TO_TOKEN_OFFSETS_INTERVAL_FUNC, EXPR_TOKEN_OFFSET_COMPARATOR, EXPR_TOKEN_OFFSETS_NESTED_FIRST_COMPARATOR, EXPR_WEIGHT_SCORER, extractFunc, text, tokenOffsets, value
Constructor and Description |
---|
TimeExpression(Interval<Integer> charOffsets,
Interval<Integer> tokenOffsets,
java.util.function.Function<CoreMap,SUTime.Temporal> temporalFunc,
double priority,
double weight) |
TimeExpression(MatchedExpression expr) |
Modifier and Type | Method and Description |
---|---|
boolean |
addMod() |
boolean |
extractAnnotation(Env env,
CoreMap sourceAnnotation) |
boolean |
extractAnnotation(Env env,
List<? extends CoreMap> source) |
SUTime.Temporal |
getTemporal() |
void |
setTemporal(SUTime.Temporal temporal) |
extractAnnotation, getAnnotation, getCharOffsets, getChunkOffsets, getOrder, getPriority, getText, getTokenOffsets, getValue, isIncludeNested, removeNested, removeNullValues, removeOverlapping, replaceMerged, replaceMergedUsingTokenOffsets, setIncludeNested, toString
protected static final java.util.function.Function<MatchedExpression,TimeExpression> TimeExpressionConverter
public TimeExpression(MatchedExpression expr)
public TimeExpression(Interval<Integer> charOffsets, Interval<Integer> tokenOffsets, java.util.function.Function<CoreMap,SUTime.Temporal> temporalFunc, double priority, double weight)
public boolean addMod()
public boolean extractAnnotation(Env env, CoreMap sourceAnnotation)
extractAnnotation
in class MatchedExpression
public boolean extractAnnotation(Env env, List<? extends CoreMap> source)
extractAnnotation
in class MatchedExpression
public SUTime.Temporal getTemporal()
public void setTemporal(SUTime.Temporal temporal)