Comparing context variable with entity in IBM Watson Conversation

喜夏-厌秋 提交于 2021-02-10 06:58:50

问题


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

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

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?


回答1:


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?

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.



来源:https://stackoverflow.com/questions/44516000/comparing-context-variable-with-entity-in-ibm-watson-conversation

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