mirror of
https://github.com/facebook/duckling.git
synced 2024-12-01 08:19:36 +03:00
788f63eeac
Summary: In general there are some clashes between time formats `hhmm` and date formats `ddmm`. For example, depending on context, `22.10` can mean clock time ten past ten or the twenty second of october. In general it's correct to interpret this as clock time, as Duckling currently does. But there are some cases not currently covered by Duckling where we have more unambiguous dates, e.g. `12.03.2018` and `27.11`. These are included here (in addition to midnight `24:00` which was also missing). #### Changes: - Bug in `ruleDdmm` regex meant that dates on the format `dd/mm` where `mm > 9` were not parsed - `ruleYyyymmdd` now also parses dots and forward slashes, i.e. `2012.05.14` and `2012/05/14` - New rule `rule2400` parses `24:00` and `24.00` (I elected not to include it in `ruleMidnighteodendOfDay` as it has grain minute rather than day) - New rule `ruleDmm` parses `1/10`, `9.12` etc - New rule `ruleDDm` parses `10/3`, `11.1` etc - New rule `ruleDdDotMm` parses `25.02`, `31.10` etc - `ruleDdmmyyyy` now also parses dots, i.e. `03.10.1983` - New tests Pull Request resolved: https://github.com/facebook/duckling/pull/395 Reviewed By: patapizza Differential Revision: D26193069 Pulled By: chessai fbshipit-source-id: cf711807fa1d40be2303f2426d74ded40c2e23b3 |
||
---|---|---|
.. | ||
Corpus.hs | ||
Rules.hs |