31 - Temporal Parser
Finding strings that contains an indication of time and then extracting a normalized time format out of it.
Once you found some string that contains an indication of time, you still have to extract a normalized time format out of it. Otherwise you cannot calculate time differences between events or put results in a timeline.
Challenging are the numerous time zones and local formats. But also the relative notations, like ‘tomorrow’ should be normalized and you should declare a reference date that functions as the ‘now’ in relation to the ‘tomorrow’. Another point is the duration, like ‘the summer of 1969’; when does a summer begin and end?
Some of the best temporal parsers are Scrapinghub’s python dateparser and Facebook’s Duckling (in Haskell).
This article is part of the project Periodic Table of NLP Tasks. Click to read more about the making of the Periodic Table and the project to systemize NLP tasks.