Dialogflow获取预建日期实体的错误日期 [英] Dialogflow obtaining wrong dates for prebuilt date entities

查看:51
本文介绍了Dialogflow获取预建日期实体的错误日期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以更改Dialogflow如何自动计算日期,该日期由标识为预建实体(例如 sys.date或 sys.date-period)的文本表示?

Is there a way to change how Dialogflow automatically calculates the date meant by a text identified as a pre-built entity like "sys.date" or "sys.date-period"?

或者,有没有一种方法可以为日期创建自己的实体,并指定其确定特定日期的方式?

Or, is there a way to create your own entity for dates, and specify how it determines the specific day?

取决于日期一周内,星期五之类的文字实际上被解释为将来最接近的星期五,而不是已经过去的最近的星期五。

Depending on the day of the week, texts like "on Friday" are actually interpreted as the closest Friday to come in the future, instead of the most recent Friday that has already passed.

推荐答案

如果您使用的是 @ sys.date 实体,则可以将值设置为 date.recent 。它将始终尝试将短语转换为最近的日期。

例如,如果您在星期一说 ,它将为您提供最近星期一的日期。

If you are using @sys.date entity then you can set the value as date.recent. It will always try to convert the phrase into most recent date.
For example, if you say on monday, it will give you date of recent monday.

请注意, date.recent 选项仅适用于 @ sys.date 不适用于 @ sys.date-time @ sys.date-period

Note that the date.recent option is available only for @sys.date not for @sys.date-time or @sys.date-period.

编辑:

您需要从可用选项中选择 $ date.recent < br>


如下面的示例屏幕截图所示,星期二将转换为最近的星期二,而不是即将到来的星期二。


You need to select $date.recent from the options available

As you can see in the example screenshot below, tuesday is converted to most recent tuesday rather than upcoming tuesday.

希望它会有所帮助。

这篇关于Dialogflow获取预建日期实体的错误日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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