Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grain not provided for TimeInterval #678

Open
joffreyvillard opened this issue Oct 12, 2018 · 0 comments
Open

Grain not provided for TimeInterval #678

joffreyvillard opened this issue Oct 12, 2018 · 0 comments

Comments

@joffreyvillard
Copy link

Hey,
Sorry for the bunch of issues filled today :/

When the utterance is a time interval , e.g. "between 2017 and 2018", then no grain is provided:

{
      "entity": "snips/datetime",
      "range": {
        "end": 21,
        "start": 0
      },
      "rawValue": "between 2017 and 2018",
      "slotName": "date-time",
      "value": {
        "from": "2017-01-01 00:00:00 +01:00",
        "kind": "TimeInterval",
        "to": "2019-01-01 00:00:00 +01:00"
      }
    }

This sentence "between 2017 and 2018" hence results in the same entity as "between Jan 1st, 2017 and Dec 31st, 2018". The timeframe expected by the user may or may not be the same in both cases, and the second form may indicate that the user expects some more details, being herself more accurate in her question.

I don't know of course how difficult it would be to add this, but FYI Duckling behaves this way: https://duckling.wit.ai/

Joffrey

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants