Hi so I'm new to AIML and basically, I want to reuse the answer from "WHAT IS A" to similar patterns e.g. "TELL ME A", I've tried doing it the way below but it doesn't seem to be working. Also sorry if the title doesn't really describe this I'm not sure what to title this.
<category>
<pattern> WHAT IS A * </pattern>
<template>
<think><set name = "state"><star /></set></think>
<condition name = "state">
<li value = "cat fact">Cats purr? idk</li>
<li value = "dog fact">Woof woof </li>
</condition>
</template>
</category>
<category>
<pattern> TELL ME A * </pattern>
<template>
<think><set name = "state"><star /></set></think>
<condition name = "state">
<li value = "cat fact"><srai>WHAT IS A CAT FACT</srai></li>
<li value = "dog fact"><srai>WHAT IS A DOG FACT</srai></li>
</condition>
</template>
</category>
You need to use the <srai> tag like below:
<category>
<pattern>TELL ME A *</pattern>
<template>
<srai>WHAT IS A <star/></srai>
</template>
</category>
Using this method, you can also handle crazy inputs like:
<category>
<pattern>WOULD YOU BE SO KIND AS TO SHARE WITH ME A * THAT YOU KNOW</pattern>
<template>
<srai>WHAT IS A <star/></srai>
</template>
</category>