I am trying to compare if the user's input matches the expected answer in AIML. I found this code that works well when the value is true but, for some reason I can't understand, fails when the match is false (there is no match for the and goes to UDC). If it worked, I could easily replace the second * with my maps result.
From: https://github.com/pandorabots/aiml-utilities/blob/master/lib/aimlstandardlibrary.aiml
<!-- STRING EQUALS-->
<category>
<pattern>XEQ * XS *</pattern>
<template>
<learn>
<category>
<pattern>
<eval>
<uppercase>XFALSE <star/></uppercase>
</eval>
</pattern>
<template>TRUE</template>
</category>
</learn>
<srai>XFALSE <star index="2"/></srai>
<learn>
<category>
<pattern>
<eval>
<uppercase>XFALSE <star/></uppercase>
</eval>
</pattern>
<template>FALSE</template>
</category>
</learn>
</template>
</category>
Does anyone have a better way to do it? Thanks a lot.