mirror of
https://github.com/facebook/duckling.git
synced 2024-11-30 23:33:33 +03:00
1dac46a8ce
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 |
||
---|---|---|
.. | ||
AR | ||
BG | ||
DA | ||
DE | ||
EL | ||
EN | ||
ES | ||
FR | ||
GA | ||
HE | ||
HR | ||
HU | ||
IT | ||
KA | ||
KO | ||
NB | ||
NL | ||
PL | ||
PT | ||
RO | ||
SV | ||
UK | ||
VI | ||
ZH | ||
Tests.hs |