facebook / duckling

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

Year range not recognized in French #655

Open belamenso opened 3 years ago

belamenso commented 3 years ago

Offending input: 2011 à aujourd'hui (2011 to today) Command:

curl -XPOST http://0.0.0.0:8000/parse --data 'locale=fr_CH&text="2011 à aujourd\'hui"'

Incorrect output:

[
    {
        "body": "2011",
        "dim": "number",
        "end": 5,
        "latent": false,
        "start": 1,
        "value": {
            "type": "value",
            "value": 2011
        }
    },
    {
        "body": "2011",
        "dim": "time",
        "end": 5,
        "latent": false,
        "start": 1,
        "value": {
            "grain": "year",
            "type": "value",
            "value": "2011-01-01T00:00:00.000-08:00",
            "values": [
                {
                    "grain": "year",
                    "type": "value",
                    "value": "2011-01-01T00:00:00.000-08:00"
                }
            ]
        }
    },
    {
        "body": "aujourd'hui",
        "dim": "time",
        "end": 19,
        "latent": false,
        "start": 8,
        "value": {
            "grain": "day",
            "type": "value",
            "value": "2021-09-04T00:00:00.000-07:00",
            "values": [
                {
                    "grain": "day",
                    "type": "value",
                    "value": "2021-09-04T00:00:00.000-07:00"
                }
            ]
        }
    }
]