duckling/Duckling/Time
jfulse 788f63eeac Parse more date formats in Norwegian (#395)
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
2021-02-02 23:18:48 -08:00
..
AR Add Arabic rule for a week ago (#379) 2021-01-29 11:32:32 -08:00
BG Add Time dimension for language BG 2020-01-10 14:34:22 -08:00
DA Duration/EN: Leverage TimeGrain for number.number hours 2019-12-11 12:38:17 -08:00
DE Improve german time approximation (#435) 2020-11-19 13:48:42 -08:00
EL Duration/EN: Leverage TimeGrain for number.number hours 2019-12-11 12:38:17 -08:00
EN parse latent year intervals 2021-01-29 16:33:56 -08:00
ES Fixed a problem in parsing mult-word timestamp for ES 2020-07-17 11:38:43 -07:00
FR Time/FR: Some speed up 2020-08-28 09:48:15 -07:00
GA Duration/EN: Leverage TimeGrain for number.number hours 2019-12-11 12:38:17 -08:00
HE Duration/EN: Leverage TimeGrain for number.number hours 2019-12-11 12:38:17 -08:00
HR Duration/EN: Leverage TimeGrain for number.number hours 2019-12-11 12:38:17 -08:00
HU Relicense to BSD3 2019-05-22 10:46:39 -07:00
IT Duration/EN: Leverage TimeGrain for number.number hours 2019-12-11 12:38:17 -08:00
KA ghc88x compat (#550) 2020-11-12 13:47:46 -08:00
KO Duration/EN: Leverage TimeGrain for number.number hours 2019-12-11 12:38:17 -08:00
NB Parse more date formats in Norwegian (#395) 2021-02-02 23:18:48 -08:00
NL Duration/EN: Leverage TimeGrain for number.number hours 2019-12-11 12:38:17 -08:00
PL Time/PL - new rules (#538) 2020-12-16 13:47:49 -08:00
PT Duration/EN: Leverage TimeGrain for number.number hours 2019-12-11 12:38:17 -08:00
RO implement 'the day after tomorrow' in Romanian 2021-01-29 14:49:13 -08:00
SV Duration/EN: Leverage TimeGrain for number.number hours 2019-12-11 12:38:17 -08:00
TimeZone Correct CDT TimeZone offset 2021-01-12 14:02:52 -08:00
UK Duration/EN: Leverage TimeGrain for number.number hours 2019-12-11 12:38:17 -08:00
VI Duration/EN: Leverage TimeGrain for number.number hours 2019-12-11 12:38:17 -08:00
ZH Time&Duration/ZH: support Cantonese and more common expressions (#516-2) (#523) 2021-01-26 15:17:45 -08:00
Computed.hs Time/EN_US: Super Tuesday 2020-03-02 10:48:07 -08:00
Corpus.hs Relicense to BSD3 2019-05-22 10:46:39 -07:00
Helpers.hs make duckling time not treat 0:xx and 12:xx ambiguously 2020-11-12 14:19:04 -08:00
HolidayHelpers.hs Translated all computed holidays from English into German and added HolidayHelpers to reduce code duplication. 2019-09-20 18:32:13 -07:00
Types.hs parse latent year intervals 2021-01-29 16:33:56 -08:00