duckling icon indicating copy to clipboard operation
duckling copied to clipboard

Feature Request: Support for series of consecutive dates

Open tarung-ml opened this issue 7 years ago • 2 comments

If the query contains a series of day/dates an interval maybe a more reasonable result. For example, "for next Thursday and Friday night" should return interval interval(June 29, June 30). Currently, the return value is one of the dates and a bit ambiguous. Another example is a query "18th, 19th and 20th Dec" which currently returns December 20th and "18th Dec, 19th Dec and 20th Dec" currently returns December 19th. A better result would be an interval(December 18, December 20) in both cases.

tarung-ml avatar Jun 23 '17 19:06 tarung-ml

Hi @tarung-ml,

Consider these examples: "I'm available next Thursday and Friday night" "I'm available 18th Dec, 19th Dec and 20th Dec"

Returning an interval would be wrong here. As an alternative, you should be able to convert the returned entities to one interval based on start/end, the grain and the normalized time.

The "18th, 19th and 20th Dec" is not supported today. Given the examples above, it could return three different entities for the same text span.

patapizza avatar Jun 25 '17 08:06 patapizza

I'm also not sure it should return an interval in general. I do think it may make sense to have a dimension for series of times like this

chessai avatar Jan 12 '21 06:01 chessai