在IBM Watson Conversation中将上下文变量与实体进行比较 [英] Comparing context variable with entity in IBM Watson Conversation

查看:80
本文介绍了在IBM Watson Conversation中将上下文变量与实体进行比较的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Watson对话对话框中,我创建了一个条件;像

In watson conversation dialog I have created a condition; something like

if $stored_state == @states:(Florida) AND $preferred_joint == @joint:(KFC)
then some response

其中 $ stored_state 是一个上下文变量,该变量存储在用户输入的上一个节点上. $ preferred_joint 也是如此. @states @joint 只是两个具有模糊匹配的实体.但是这样的条件永远行不通.在将 @states :(佛罗里达)实体转换为上下文变量后,我也尝试使用它.但是仍然不起作用.

where $stored_state is a context variable, which was stored at a previous node from user input. Same goes for $preferred_joint. @states and @joint are just two entities with fuzzy matching. But condition like this never works. I also tried to use @states:(Florida) entity after converting it to a context variable. But still doesn't work.

现在,我在那里做错了什么?有什么方法可以将上下文变量与实体进行比较?

Now, what do I do wrong there? Is there any way to compare context variable with entity?

推荐答案

仅需确认一下,您想检查用户在最后一次输入时刚刚说过的实体是否与您在上下文中存储的实体匹配?

Just to confirm, you want to check if the entity that the user just said at the last input matches what you had stored in your context?

您可以为此使用AND条件吗?@states:佛罗里达"&&$ stored_state =='佛罗里达'

You can use an AND condition for this right? @states: 'Florida' && $stored_state == 'Florida'

这是在声明用户只是说出了佛罗里达州,而存储的上下文变量也是佛罗里达州.

This is declaring that the user just said the state florida, and the stored context variable is also florida.

这篇关于在IBM Watson Conversation中将上下文变量与实体进行比较的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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