您可以强制Dialogflow提取日期时间实体而不是单独的日期和时间实体吗? [英] Can you force Dialogflow to extract the date-time entity instead of separate date and time entities?

查看:96
本文介绍了您可以强制Dialogflow提取日期时间实体而不是单独的日期和时间实体吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Dialogflow建立Google Home技能。我希望用户能够说出日期时间,例如今天下午3点,星期三上午11点或 8月10日下午5点。



Dialogflow有几个

解决方案

您可以使用 @ sys.date-time 或可以使用复合自定义实体并将其用于意图。您可以在其中放置实体的任何组合。提取后,可以使用正则表达式提取Webhook中的日期和时间。



实体






意图



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?

解决方案

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

这篇关于您可以强制Dialogflow提取日期时间实体而不是单独的日期和时间实体吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆