Duckling
tip
The platform extracts
duckling.<name> system entities via the Duckling service.Versions
The platform supports two versions of Duckling service integration: 1.0 and 2.0. By default, version 2.0 is used in new projects.
As compared to version 1.0, Duckling 2.0 features enhanced capabilities and optimized entity recognition behavior.
Date&Time
Let us have a look at the @duckling.time, @duckling.date and @duckling.time-of-day entities.
Expected behavior:
@duckling.timeextracts the date and time together; only the date; only the time.@duckling.dateextracts the date and time together; only the date; only the time.@duckling.time-of-dayextracts the date and time together; only the time.
Suppose we talk to the bot on June 19, 2020, and the bot uses all the three entities in its script:
| Client phrase | @duckling.time | @duckling.date | @duckling.time-of-day |
|---|---|---|---|
| tomorrow at 15 | 2020-06-20T15:00:00 | 2020-06-20T15:00:00 | 2020-06-20T15:00:00 |
| on Tuesday | 2020-06-23T00:00:00 | 2020-06-23T00:00:00 | entity not found |
| at noon | 2020-06-19T12:00:00 | 2020-06-19T12:00:00 | 020-06-19T12:00:00 |
Please note that the behavior of the entities is identical when you need to extract both date and time.