问题
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