Closed chessai closed 3 years ago
Resolves #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 } ]
@chessai has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
@chessai merged this pull request in facebook/duckling@99e1dce9c40e24f925629234849a7457c5f588af.
Resolves #624
Before patch (specifying quantity and numeral, but time still shows up):
After patch (time no longer shows up):