The ClearTK-TimeML module provides annotators for extracting events, times and temporal relations. This module includes code and pre-built models for the top ranking temporal relation identification system in TempEval 2013. Roughly, the system identifies events and times with around 80% precision and 75% recall, and identifies temporal relations with around 85% accuracy.

The ClearTK-TimeML module also includes some code for other related tasks, such as TempEval 2007, TempEval 2010 and the annotated data of (Bethard et. al. 2007), though pre-built models are not included for these tasks, and this code is less actively maintained.

Running the pre-built models

If you just want to run the pre-built models on a piece of text, then the TimeMlAnnotate class is the place to start. This class can be run at the command line, and takes an input file (or directory of input files) and an output directory to which the events, times and temporal relations will be output in TimeML format.

However, most users will probably want to add the annotators to their own pipeline and then work directly with the CAS rather than writing out TimeML documents. The key elements of the TimeML pipeline are listed in the code:


These annotators will generate Event, Time and TemporalLink annotations in the CAS that you can then use as you like within your pipeline. When creating your own pipelines including these annotators, be sure to check the full pipeline in TimeMlAnnotate, as the models require a variety of pre-processing annotators to provide sentences, tokens, part-of-speech tags, stems, syntactic parses, etc.


As shown in the previous section, the ClearTK-TimeML module provides annotators for various tasks related to identifying and categorizing events, time expressions and temporal relations. All of these are machine learning models trained with a small number of linguistic features. Here is a brief description of the main tasks performed by each module: