facebook / facebook/duckling

Problem with date extraction

Abierto
#371 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Haskell
Estrellas
4.3k
Forks
740
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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.

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.