Python‎ > ‎

Python date parsing from unstructured text

posted Feb 15, 2019, 7:58 AM by Chris G   [ updated Feb 15, 2019, 7:59 AM ]

Duckling is a Clojure library that parses text into structured data:

“the first Tuesday of October” => {:value "2014-10-07T00:00:00.000-07:00"
                                   :grain :day}

See our blog post announcement for more context.

Duckling is shipped with modules that parse temporal expressions in English, Spanish, French, Italian and Chinese (experimental, thanks to Zhe Wang). It recognizes dates and times described in many ways:

  • today at 5pm
  • 2014-10-01
  • the last Tuesday of October 2012
  • twenty five minutes ago
  • the day before labor day 2020
  • June 10-11 (interval)
  • third monday after christmas 1980

Python wrapper for's Duckling Clojure library