You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 30, 2019. It is now read-only.
When people say "in two days" or "three days ago", they typically are referring to the whole day. Currently, duckling.time.prod/duration-ago and /in-duration (typically) change the grain to be one below (finer than) the grain of the duration. I think the semantics are slightly trickier than this.
I would contend most of the time, these two utterances should have equivalent meaning:
duckling.core=> (parse :en$core "the day before yesterday" [:time])
({:dim :time, :body "the day before yesterday", :value {:type "value", :value "2017-02-20T00:00:00.000-08:00", :grain :day, :values ()}, :start 0, :end 24})
duckling.core=> (parse :en$core "two days ago" [:time])
({:dim :time, :body "two days ago", :value {:type "value", :value "2017-02-20T16:00:00.000-08:00", :grain :hour, :values ()}, :start 0, :end 12})
When the duration grain is :hour, I think refining the grain to :minute makes good sense ... Saying "in two hours" at 1:30 usually means 3:30. However, if the duration is :minute, I'm not sure it makes sense to change the grain. If I say "in an hour and a half", I'm not making a to-the-second specification.
Another instance where refining the grain makes sense is "a week ago" and "a month ago", refining to :day (as is currently the case).
Thoughts? I guess my only real qualms are going from :day to :hour and from :minute to :second, and the former is the only one I feel strongly about.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
When people say "in two days" or "three days ago", they typically are referring to the whole day. Currently,
duckling.time.prod/duration-ago
and/in-duration
(typically) change the grain to be one below (finer than) the grain of the duration. I think the semantics are slightly trickier than this.I would contend most of the time, these two utterances should have equivalent meaning:
When the duration grain is
:hour
, I think refining the grain to:minute
makes good sense ... Saying "in two hours" at 1:30 usually means 3:30. However, if the duration is:minute
, I'm not sure it makes sense to change the grain. If I say "in an hour and a half", I'm not making a to-the-second specification.Another instance where refining the grain makes sense is "a week ago" and "a month ago", refining to
:day
(as is currently the case).Thoughts? I guess my only real qualms are going from
:day
to:hour
and from:minute
to:second
, and the former is the only one I feel strongly about.The text was updated successfully, but these errors were encountered: