-
Notifications
You must be signed in to change notification settings - Fork 217
Add a "context time" #208
Comments
How would Duckling figure out which one to use? |
I still can't grasp all the details of this change, but what I envision is that there are a number of rules that need to follow the "context time", if present, and many other would always follow the reference time. For example "yesterday", "today", "tomorrow", "this I think there could be some rules that are ambiguous under this description of the problem: these could be solved with your probabilistic approach and some always fallback to the context time, since that feature can be left unused by not populating the field in the call/request. This also answers your solution that uses the reference time: what I propose here is not solvable by the reference time alone, since it influences constructs that need to always look at the present time (reference time) like "today". |
Ok I think I understand better. It looks like that providing a "context time" would only solve an instance of a more general problem. Thanks for bringing this, it seems like an interesting problem to solve. cc @ar7hur |
Yes, by solving this you would have a starting point for solving #90, or the converse. As you put them, the two issues are one and the same. |
Yes, this would be great to include this in duckling! I had a similar requirement requirement and roughly solved it outside duckling the following way:
Another approach I tried was to call duckling twice (once with the reference time and once with the context time) but the context time is not an absolute lower bound like the reference time. For example (reference time is Saturday the 4th of February) :
The first approach works (if duckling returns enough Friday candidates). The second does not. In all cases, this is quite ugly to treat these ambiguities outside ducking because we write and maintain the ambiguous rules twice. |
This could be related to #90, but more "static".
Now there's the "reference time", the time where the user lives in the present, so "today" is the day of the reference time. What would be very useful to have is a "context time", a time referenced earlier in the conversation so that some expressions could be added to it.
For example:
(I wanted to add the
enhancement
label, but maybe I'm not allowed to)The text was updated successfully, but these errors were encountered: