PTime is a pattern-based approach to recognizing time expressions in free text. It collects type sequences as candidate patterns, selecting an appropriate subset from them for extracting time expressions from free texts.
PTime aims to design a new approach which can achieve a good performance on recognizing with an adjustability to different data, and meanwhile provides an explicit structural information to its results.

Publication
A Pattern-based Approach to Recognizing Time Expressions
Wentao Ding(wtding@smail.nju.edu.cn), Guanji Gao, Linfeng Shi and Yuzhong Qu(yzqu@nju.edu.cn)
In Proceedings of the 33rd AAAI Conference on Artificial Intelligence, 2019.
[poster] [appendix files] [evaluation tools]
The original results corresponding to the version of PTime which submitted to AAAI19 can be found in the appendix files. If you want to compare your results with PTime, you can either use the original result, or download the latest source code for comparison.
Code & Data Download
Here is the latest version of PTime and the three benchmark datasets used in our experiments.
We have re-organized our source code to optimize its running speed, and the running results of the current version might be slightly different comparing with the original one. This does not affect our discussions about PTime at all.
The entrance of our code is the "Controller" class, you may need to replace the dependency paths in it to run your customized experiments.

Here is the results of the latest version on benchmark datasets.
Dataset ρ Strict Match Relaxed Match
Pr(%) Re(%) F1(%) Pr(%) Re(%) F1(%)
TempEval-3 0.88 87.79 83.33 85.50 93.89 89.13 91.45
WikiWars 0.94 88.08 87.84 87.96 95.93 95.68 95.81
Tweets 0.95 92.53 94.09 93.31 97.51 99.16 98.33
Token Types
We designed a type system of 32 fine-grained token types for building patterns. Most of the types and their corresponding regexs are collected from SUTime and SynTime. A detailed description of our types can be found here.