public interface TimeExpressionExtractor
Modifier and Type | Method and Description |
---|---|
java.util.List<CoreMap> |
extractTimeExpressionCoreMaps(CoreMap annotation,
CoreMap docAnnotation)
Extract time expressions from a sentence in a document.
|
java.util.List<CoreMap> |
extractTimeExpressionCoreMaps(CoreMap annotation,
java.lang.String docDate)
Extract time expressions in a document (provided as a CoreMap Annotation).
|
void |
finalize(CoreMap docAnnotation)
Indicates that all annotations on the document has been completed
Performs cleanup on the document annotation.
|
void |
init(Options options) |
void |
init(java.lang.String name,
java.util.Properties props) |
void init(java.lang.String name, java.util.Properties props)
void init(Options options)
java.util.List<CoreMap> extractTimeExpressionCoreMaps(CoreMap annotation, CoreMap docAnnotation)
annotation
- - Annotation holding tokenized text from which the time expressions are to be extracteddocAnnotation
- - Annotation for the entire document
Uses the following annotations:
CoreAnnotations.DocDateAnnotation.class (String representing document date)
TimeExpression.TimeIndexAnnotation.class (Holds index used to generate tids)java.util.List<CoreMap> extractTimeExpressionCoreMaps(CoreMap annotation, java.lang.String docDate)
annotation
- The annotation to run time expression extraction overdocDate
- A date for the document to be used as a reference time.
List<CoreMap> cm = extractTimeExpressionCoreMaps(annotation, docDate);
List<CoreLabel> tokens = cm.get(CoreAnnotations.TokensAnnotation.class);
void finalize(CoreMap docAnnotation)
docAnnotation
- A document annotation.