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

Problem with date extraction #371

Open
danielhomsa opened this issue May 14, 2019 · 0 comments
Open

Problem with date extraction #371

danielhomsa opened this issue May 14, 2019 · 0 comments

Comments

@danielhomsa
Copy link

danielhomsa commented May 14, 2019

I am using duckling to extract time entities in RASA, but I am having a problem when using a sentence like "before 1800" or "between 1700 and 1800" where I am getting as value the current year.

Here is an extraction:

{
   'start':26,
   'end':47,
   'text':'between 1700 and 1800',
   'value':{
      'to':'2019-05-14T18:01:00.000+02:00',
      'from':'2019-05-14T17:00:00.000+02:00'
   },
   'confidence':1.0,
   'additional_info':{
      'values':[
         {
            'to':{
               'value':'2019-05-14T18:01:00.000+02:00',
               'grain':'minute'
            },
            'from':{
               'value':'2019-05-14T17:00:00.000+02:00',
               'grain':'minute'
            },
            'type':'interval'
         },
         {
            'to':{
               'value':'2019-05-15T18:01:00.000+02:00',
               'grain':'minute'
            },
            'from':{
               'value':'2019-05-15T17:00:00.000+02:00',
               'grain':'minute'
            },
            'type':'interval'
         },
         {
            'to':{
               'value':'2019-05-16T18:01:00.000+02:00',
               'grain':'minute'
            },
            'from':{
               'value':'2019-05-16T17:00:00.000+02:00',
               'grain':'minute'
            },
            'type':'interval'
         }
      ],
      'to':{
         'value':'2019-05-14T18:01:00.000+02:00',
         'grain':'minute'
      },
      'from':{
         'value':'2019-05-14T17:00:00.000+02:00',
         'grain':'minute'
      },
      'type':'interval'
   },
   'entity':'time',
   'extractor':'ner_duckling_http'
}

Does someone knows why this is happening or how to fix it? When I use a phrase as "in 1700" duckling gets the value correctly, but when using any other sentence I get this.

I also did the test directly to the duckling container and I get the same issue.

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

1 participant