mirror of
https://github.com/facebook/duckling.git
synced 2024-09-11 21:27:13 +03:00
Summary: Resolves https://github.com/facebook/duckling/issues/624 Before patch (specifying quantity and numeral, but time still shows up): ``` ❯ curl -XPOST http://0.0.0.0:8000/parse --data 'locale=en_US&text="June 21 and 3 cups of sugar"&dims="[\"quantity\",\"numeral\"]"' | jq [ { "body": "June 21", "start": 1, "value": { "values": [ { "value": "2021-06-21T00:00:00.000-07:00", "grain": "day", "type": "value" }, { "value": "2022-06-21T00:00:00.000-07:00", "grain": "day", "type": "value" }, { "value": "2023-06-21T00:00:00.000-07:00", "grain": "day", "type": "value" } ], "value": "2021-06-21T00:00:00.000-07:00", "grain": "day", "type": "value" }, "end": 8, "dim": "time", "latent": false }, { "body": "3 cups of sugar", "start": 13, "value": { "value": 3, "type": "value", "product": "sugar", "unit": "cup" }, "end": 28, "dim": "quantity", "latent": false } ] ``` After patch (time no longer shows up): ``` ❯ curl -XPOST http://0.0.0.0:8000/parse --data 'locale=en_US&text="June 21 and 3 cups of sugar"&dims="[\"quantity\",\"numeral\"]"' | jq [ { "body": "3 cups of sugar", "start": 13, "value": { "value": 3, "type": "value", "product": "sugar", "unit": "cup" }, "end": 28, "dim": "quantity", "latent": false } ] ``` Pull Request resolved: https://github.com/facebook/duckling/pull/625 Reviewed By: stroxler Differential Revision: D28851759 Pulled By: chessai fbshipit-source-id: d3b3f33092c7e60bf29886939488ed562a213c35 |
||
---|---|---|
.. | ||
Duckling | ||
CustomDimensionExample.hs | ||
DucklingExpensive.hs | ||
DucklingRequestSample.hs | ||
ExampleMain.hs | ||
RegenMain.hs |