duckling
duckling copied to clipboard
Date range not recognized at all, mistakenly recognized phone number and seconds
Offending input: 01.07.2021 - 30.06.2026
Command
curl -XPOST http://0.0.0.0:8000/parse --data 'locale=fr_CH&text="01.07.2021 - 30.06.2026"'
Current erroneous output:
[
{
"body": "01.07.2021 - 30.06.2026",
"dim": "phone-number",
"end": 24,
"latent": false,
"start": 1,
"value": {
"type": "value",
"value": "0107202130062026"
}
},
{
"body": "2026\"",
"dim": "duration",
"end": 25,
"latent": false,
"start": 20,
"value": {
"normalized": {
"unit": "second",
"value": 2026
},
"second": 2026,
"type": "value",
"unit": "second",
"value": 2026
}
}
]
What happens if you constrain the output to just the time dimension? See README for how to do that.
It only recognized years in that case, and not even a year range. Still pretty unsatisfactory.
Command:
curl -XPOST http://0.0.0.0:8000/parse --data 'locale=fr_CH&text="01.07.2021 - 30.06.2026"&dims="["time"]"'
Output:
[
{
"body": "2021",
"dim": "time",
"end": 11,
"latent": false,
"start": 7,
"value": {
"grain": "year",
"type": "value",
"value": "2021-01-01T00:00:00.000-08:00",
"values": [
{
"grain": "year",
"type": "value",
"value": "2021-01-01T00:00:00.000-08:00"
}
]
}
},
{
"body": "2026",
"dim": "time",
"end": 24,
"latent": false,
"start": 20,
"value": {
"grain": "year",
"type": "value",
"value": "2026-01-01T00:00:00.000-08:00",
"values": [
{
"grain": "year",
"type": "value",
"value": "2026-01-01T00:00:00.000-08:00"
}
]
}
}
]
Hello,
We are stumbling on the same issue.
I don't have much experience in Haskell developpement, how can I help to reach a resolution ?
Best, Benjamin