Closed clobotorre closed 3 years ago
I can't reproduce.
> debug (makeLocale ES Nothing) "cinco euros" [Seal AmountOfMoney]
<amount> <unit> (cinco euros)
-- number (0..15) (cinco)
-- -- regex (cinco)
-- currencies (euros)
-- -- regex (euros)
[
{
"body": "cinco euros",
"dim": "amount-of-money",
"end": 11,
"latent": false,
"start": 0,
"value": {
"type": "value",
"unit": "EUR",
"value": 5
}
}
]
How are you running duckling?
I'm running it this way:
stack exec duckling-example-exe
Is there any other way?
Also from my local server:
❯ curl -XPOST http://0.0.0.0:5406/parse --data 'locale=es_ES&text="cinco euros"' | jq
[
{
"body": "cinco euros",
"start": 1,
"value": {
"value": 5,
"type": "value",
"unit": "EUR"
},
"end": 12,
"dim": "amount-of-money",
"latent": false
}
]
Solved setting LANG environment variable before launching duckling. Thanks
When we talk about money, we usually say the quantity first and then the currency. For example, we say 'cinco euros'. In such a case Response is empty:
Request:
curl -XPOST http://0.0.0.0:8000/parse --data 'locale=es_ES&text=cinco euros&dims=["amount-of-money"]'
Response:
Using the form 'currency quantity' works, but that isn't the normal way, at least in Spanish: Request:
curl -XPOST http://0.0.0.0:8000/parse --data 'locale=es_ES&text=euros cinco&dims=["amount-of-money"]'
Response: