duckling icon indicating copy to clipboard operation
duckling copied to clipboard

Date range not recognized at all, mistakenly recognized phone number and seconds

Open belamenso opened this issue 3 years ago • 3 comments

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
        }
    }
]

belamenso avatar Sep 04 '21 20:09 belamenso

What happens if you constrain the output to just the time dimension? See README for how to do that.

chessai avatar Sep 07 '21 22:09 chessai

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"
                }
            ]
        }
    }
]

belamenso avatar Sep 08 '21 05:09 belamenso

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

Benjaminrivard avatar Sep 22 '23 12:09 Benjaminrivard