A GATE processing resource plugin to annotate documents with TIMEML's TIMEX3 tags using the Stanford Temporal Tagger SUTime Java library. SUTime is a deterministic rule-based temporal tagger for recognizing and normalizing temporal expressions developed by the Stanford NLP Group. It is described in detail in the paper:
Angel X. Chang and Christopher D. Manning. 2012. SUTIME: A Library for Recognizing and Normalizing Time Expressions. 8th International Conference on Language Resources and Evaluation (LREC 2012).
2. Getting Up and Running
The instructions given below will get you a working version of the plugin on your local machine. It is assumed that GATE software is installed (download here) and $GATE_HOME refers to the GATE root directory.
The following libraries should be placed inside the $GATE_HOME/lib directory:
Jollyday library (version 0.4.9) (download here).
Stanford CoreNLP library (download here).
Stanford CoreNLP models library (download here).
Download here the latest version, unzip the file and place the folder inside the $GATE_HOME/plugins directory.
Important notice: Java Platform SE 9 no longer includes in the standard classpath the JAXB APIs. In order for SUTime to load properly under Java 9, Mac/Linux users should start GATE inside the $GATE_HOME/bin directory by invoking through terminal the command:
Window users should add to the enviroment variables, the variable "JAVA_TOOL_OPTIONS" with value "--add-modules=java.xml.bind". Watch here on how to find the enviroment variables configuration panel in Windows 10.
The following runtime parameters are available:
inputAnnotationSetName: Name of the annotation set that has the annotation with the date to be used as reference (if
inputAnnotationName: Name of the annotation that has the date to be used as reference (if
inputFeatureName: Name of the feature with value the date to be used as reference (if
referenceDate=annotation). Date should be in "yyy-MM-dd" format.
outputAnnotationSetName: Name of the annotation set to write the results. Default value is SUTime.
outputAnnotationName: Name of the annotation to write the results. Default value is TIMEX3.
referenceDate: Date set by the user as reference for normalizing temporal expressions. Permissible values are:
|2017-08-25||Date provided in "yyy-MM-dd" format.|
|annotation||The user has to provide the
|today||Today's date (default value).|
|creationDate||Date file was created as recorded by the operating system.|
|lastAccessDate||Date file was last accessed as recorded by the operating system.|
|lastModifiedDate||Date file was last modified as recorded by the operating system.|
User should verify that file dates are supported by the operating system.
writeReferenceDate: Write or not (true/false) the reference date in the output annotation set. If set to true, it is written under annotation name DOCINFO with feature name ReferenceDate. Default value is false.
Screenshots from GATE Developer:
Runtime parameters window
Sample document annotated with TIME3X tags
5. Release History
- Version 0.4 - September 16, 2017: Reference date can also be retrieved from a document annotation.
- Version 0.3 - September 12, 2017: Improve reference date handling.
- Version 0.2 - September 10, 2017: Minor corrections to initial version.
- Version 0.1 - September 10, 2017: Initial working version.