facebook/duckling

inconsistent parsing for time with numbers

Open

#13 aperta il 10 mag 2017

Vedi su GitHub
 (3 commenti) (0 reazioni) (0 assegnatari)Haskell (737 fork)batch import
bughelp wanted

Metriche repository

Star
 (4282 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

this one is just wrong

$ curl -s -XPOST http://0.0.0.0:8000/parse --data "text=the second sunday of October last year" | jq .
[
  {
    "dim": "time",
    "body": "the second sunday of October last year",
    "value": "{\"values\":[],\"value\":\"2016-10-02T00:00:00.000-07:00\",\"grain\":\"day\",\"type\":\"value\"}",
    "start": 0,
    "end": 38
  }
]

this one gets both parts right, but why did just changing the one word change so much of the parsing?

$ curl -s -XPOST http://0.0.0.0:8000/parse --data "text=the second thursday of October last year" | jq .
[
  {
    "dim": "time",
    "body": "the second thursday of October",
    "value": "{\"values\":[{\"value\":\"2017-10-12T00:00:00.000-07:00\",\"grain\":\"day\",\"type\":\"value\"}],\"value\":\"2017-10-12T00:00:00.000-07:00\",\"grain\":\"day\",\"type\":\"value\"}",
    "start": 0,
    "end": 30
  },
  {
    "dim": "time",
    "body": "thursday of October last year",
    "value": "{\"values\":[],\"value\":\"2016-10-06T00:00:00.000-07:00\",\"grain\":\"day\",\"type\":\"value\"}",
    "start": 11,
    "end": 40
  }
]

Guida contributor