ctparse: a practical parser for natural language time expressions...
summary
ctparse is a pure python MIT-License library that turns messy time phrases into structured time or interval objects by combining regex terminals with a grammarlike production system and a naive Bayes reranker. It targets near‑future, domain‑specific use (English and German), ships as alpha, and trains on a corpus of ~40,000 labeled strings for evaluation. Performance slightly outperforms Duckling on internal data, but common failures include typos, long search timeouts, and the need to rebuild models when rules change; extensibility and language additions are straightforward.
AI-written summary · about
chapters (13)
- 0:00Parsing natural language time
- 3:57Motivation for ctparse
- 7:32Formal grammars in time parsing
- 12:50Probabilistic context-free grammars
- 21:08How ctparse interprets time
- 24:59Live demo of ctparse
- 27:04Language support and future work
- 32:09Limitations of ctparse
- 34:17Q&A: Rule generation
- 36:48Q&A: Comparison with libraries
- 38:55Q&A: Complex time contexts
- 40:23Q&A: Design choices
- 42:23Closing remarks
related talks
26mText Parsing the Case for Monads
34mLrparsing, when regular expressions aren't enough
39mTree-sitter - a new parsing system for programming tools
01h 05mWelcome To The Time Zone
30mAdvanced parsing of structured data using Python's new match statement
58mGoodbye Regex. Hello Parsers!
38mA Matter of Time
45mTimes and dates in Pandas
