duckling_old icon indicating copy to clipboard operation
duckling_old copied to clipboard

Tomorrow after [TIME] example : tomorrow after lunch

Open victorboissiere opened this issue 8 years ago • 0 comments

I found an issue in both English and French version. In fact if we have an interval like lunch (which is between 12pm and 2pm) if you say tomorrow after [TIME] it takes the first value of the interval. In that case tomorrow at 12pm instead of tomorrow at 2pm.

Example :

Lunch definition (12pm/2pm) OK

myproject.core=> (p/parse :en$core "lunch" [:time])
({:dim :time, :body "lunch", :value {:type "interval", :from {:value "2016-10-11T12:00:00.000+02:00", :grain :hour}, :to {:value "2016-10-11T14:00:00.000+02:00", :grain :hour}, :values ({:type "interval", :from {:value "2016-10-11T12:00:00.000+02:00", :grain :hour}, :to {:value "2016-10-11T14:00:00.000+02:00", :grain :hour}} {:type "interval", :from {:value "2016-10-12T12:00:00.000+02:00", :grain :hour}, :to {:value "2016-10-12T14:00:00.000+02:00", :grain :hour}} {:type "interval", :from {:value "2016-10-13T12:00:00.000+02:00", :grain :hour}, :to {:value "2016-10-13T14:00:00.000+02:00", :grain :hour}})}, :start 0, :end 5, :latent true})

After lunch definition (1pm, 5pm) OK

myproject.core=> (p/parse :en$core "after lunch" [:time])
({:dim :time, :body "after lunch", :value {:type "interval", :from {:value "2016-10-11T13:00:00.000+02:00", :grain :hour}, :to {:value "2016-10-11T17:00:00.000+02:00", :grain :hour}, :values ({:type "interval", :from {:value "2016-10-11T13:00:00.000+02:00", :grain :hour}, :to {:value "2016-10-11T17:00:00.000+02:00", :grain :hour}})}, :start 0, :end 11})

Tomorrow after lunch (error, should be 1pm or 2pm instead of 12pm) KO

myproject.core=> (p/parse :en$core "tomorrow after lunch" [:time])
({:dim :time, :body "tomorrow after lunch", :value {:type "interval", :from {:value "2016-10-12T12:00:00.000+02:00", :grain :hour}, :values ({:type "interval", :from {:value "2016-10-12T12:00:00.000+02:00", :grain :hour}})}, :start 0, :end 20})

I couldn't come with a solution for now. If someone has an idea in where to search, I could try to have a look and fix it.

victorboissiere avatar Oct 11 '16 10:10 victorboissiere