Can you force Dialogflow to extract the date-time entity instead of separate date and time entities?

允我心安 提交于 2020-01-14 03:34:07

问题


I'm building a Google Home skill using Dialogflow. I want the user to be able to say a date time such as "today at 3pm", "Wednesday at 11am", or "August 10 at 5pm."

Dialogflow has several prebuilt entities including: date, time, and date-time. For some reason the system seems to always parse date and time separately instead of just as date-time. I've tried putting in several examples and manually setting the entity type to date-time but whenever I add another one it always parses them separately.

Any ideas how I could force it to extract date-time as one entity?


回答1:


You can use @sys.date-time or can have a composite custom entity and use it for the intents. There could be any combination of the entity that you can put there. Once you extract it, you can use regex to extract date and time in your webhook.

Entity


Intent



来源:https://stackoverflow.com/questions/51659597/can-you-force-dialogflow-to-extract-the-date-time-entity-instead-of-separate-dat

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!