public class TimeAnnotator extends Object
| Constructor and Description |
|---|
TimeAnnotator() |
TimeAnnotator(File ruleFile) |
TimeAnnotator(String ruleFilename) |
| Modifier and Type | Method and Description |
|---|---|
void |
annotate(Document doc,
Span span,
org.joda.time.DateTime ref)
annotate the time expressions in 'span' with TIMEX2 annotations.
|
Map |
getConfig() |
List<PatternItem[]> |
getPatterns(List<String[]> patternStrings) |
List<String[]> |
getPatternStrings(Map params) |
void |
load(File file)
load the time expression rules from 'in'.
|
void |
load(InputStream in)
load the time expression rules from 'in'.
|
List<TimeRule> |
loadRule(Map params) |
org.joda.time.DateTime |
normalizeMonth(org.joda.time.DateTime ref,
int month) |
public TimeAnnotator()
public TimeAnnotator(String ruleFilename) throws IOException
IOExceptionpublic TimeAnnotator(File ruleFile) throws IOException
IOExceptionpublic void annotate(Document doc, Span span, org.joda.time.DateTime ref)
doc - the document to be annotatedspan - the span of doc to be annotatedref - the reference time -- the time the text was writtenpublic void load(InputStream in) throws IOException
IOExceptionpublic void load(File file) throws IOException
file - the file objectIOException - if an I/O error occurspublic Map getConfig()
public List<PatternItem[]> getPatterns(List<String[]> patternStrings)
public org.joda.time.DateTime normalizeMonth(org.joda.time.DateTime ref,
int month)
Copyright © 2016 New York University. All rights reserved.