facebook / duckling

Language, engine, and tooling for expressing, testing, and evaluating composable language rules on input strings.
Other
4.05k stars 723 forks source link

Number/ES: common separator in decimal numbers #615

Closed clobotorre closed 3 years ago

clobotorre commented 3 years ago

The most common way to say a decimal number in Spanish is using the word 'con' as a separator between integer and decimal parts. For example, to say '5.1' in a natural way one would say 'cinco con uno'. Response contains two different entities: 5 and 1. Request: curl -XPOST http://0.0.0.0:8000/parse --data 'locale=es_ES&text=cinco con uno&dims=["number"]' Response

[{ "body": "cinco", "start": 0, "value": { "value": 5, "type": "value" }, "end": 5, "dim": "number", "latent": false }, { "body": "uno", "start": 10, "value": { "value": 1, "type": "value" }, "end": 13, "dim": "number", "latent": false }]