Problem with date extraction
- Dominant language
- Haskell
- Stars
- 4.3k
- Forks
- 740
- PR merge metrics
- No merged PRs in 30d
Description
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:
```js
{
'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.
Contributor guide
Assessment
This issue has not been assessed yet.