duckling/Duckling/Time
byuan 1dac46a8ce Time/es: Make "n horas" latent". (#478)
Summary:
1. ~~Fixed broken build due to the problem with main test entry point;~~
2. Fixed the ambiguous results caused by mishandling the
ranking rules for parsing frames in ES. For example "una hora"
be interpreted either as "Duration" or "1pm" in "Time" dimension.
And the expected result should be in "Duration" dimension.
3. ~~ignore stack lock file~~
Pull Request resolved: https://github.com/facebook/duckling/pull/478

Test Plan:
```
:test Endpoint.Duckling.Tests --hide-successes
[1003 of 1003] Endpoint.Duckling.Tests (Duckling.Api changed)
Ok, two modules loaded.

All 357 tests passed (79.69s)
```

```
haxlsh> H.io $ debug (makeLocale ES Nothing) "de una horas" [This Time, This Duration]
<integer> <unit-of-duration> (una horas)
-- number (0..15) (una)
-- -- regex (una)
-- hora (grain) (horas)
-- -- regex (horas)
[Entity {dim = "duration", body = "una horas", value = RVal Duration (DurationData {value = 1, grain = Hour}), start = 3, end = 12, latent = False, enode = Node {nodeRange = Range 3 12, token = Token Duration (DurationData {value = 1, grain = Hour}), children = [Node {nodeRange = Range 3 6, token = Token Numeral (NumeralData {value = 1.0, grain = Nothing, multipliable = False, okForAnyTime = True}), children = [Node {nodeRange = Range 3 6, token = Token RegexMatch (GroupMatch ["una","","a","","",""]), children = [], rule = Nothing}], rule = Just "number (0..15)"},Node {nodeRange = Range 7 12, token = Token TimeGrain Hour, children = [Node {nodeRange = Range 7 12, token = Token RegexMatch (GroupMatch ["ora"]), children = [], rule = Nothing}], rule = Just "hora (grain)"}], rule = Just "<integer> <unit-of-duration>"}}]
it :: [Entity]
```

Reviewed By: fascpt

Differential Revision: D21770015

Pulled By: chinmay87

fbshipit-source-id: 3056fcf656140c9d65b70b5c604a286ea2c307b2
2020-05-29 11:09:46 -07:00
..
AR Reuse helpers 2019-08-01 14:46:24 -07: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 Duration/EN: Leverage TimeGrain for number.number hours 2019-12-11 12:38:17 -08:00
EL Duration/EN: Leverage TimeGrain for number.number hours 2019-12-11 12:38:17 -08:00
EN Time/EN: the (nth) closest (day) to (time) 2020-03-03 12:04:53 -08:00
ES Time/es: Make "n horas" latent". (#478) 2020-05-29 11:09:46 -07:00
FR Relicense to BSD3 2019-05-22 10:46:39 -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 Duration/EN: Leverage TimeGrain for number.number hours 2019-12-11 12:38:17 -08:00
KO Duration/EN: Leverage TimeGrain for number.number hours 2019-12-11 12:38:17 -08:00
NB Duration/EN: Leverage TimeGrain for number.number hours 2019-12-11 12:38:17 -08:00
NL Duration/EN: Leverage TimeGrain for number.number hours 2019-12-11 12:38:17 -08:00
PL Duration/EN: Leverage TimeGrain for number.number hours 2019-12-11 12:38:17 -08:00
PT Duration/EN: Leverage TimeGrain for number.number hours 2019-12-11 12:38:17 -08:00
RO Duration/EN: Leverage TimeGrain for number.number hours 2019-12-11 12:38:17 -08:00
SV Duration/EN: Leverage TimeGrain for number.number hours 2019-12-11 12:38:17 -08:00
TimeZone Relicense to BSD3 2019-05-22 10:46:39 -07: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 Add support for computed holidays in ZH 2019-09-17 15:34:08 -07: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 Time/EN_US: Super Tuesday 2020-03-02 10:48:07 -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 Remove ANN pragma for duckling 2019-09-26 02:49:33 -07:00