[pandorabots-general] How to match in topic

GT40 gt40 at tiscali.fr
Fri Feb 2 07:24:52 PST 2007


Hi Chris!

I'm also a newbie in AIML, but I'm not sure we're allowed to use the if/then
instruction inside template tags (or maybe in an embedded script?).
 
I tried the following lines on a bot of mine and it seems to work.


<category>
<pattern>I WOULD LIKE TO KNOW ABOUT *</pattern>
<template>
Sure, what would like to know about <star />?
<think><set name="topic"><star /></set></think>
</template>
</category>

<topic name="MONEY">

<category>
<pattern>MANY THINGS</pattern>
<template>Are you rich?</template>
</category>

</topic>

<topic name="CARS">

<category>
<pattern>MANY THINGS</pattern>
<template>Do you know the Ford GT40?</template>
</category>

</topic>

<topic name="MADONNA">

<category>
<pattern>MANY THINGS</pattern>
<template>Do you like "Hollywood"?</template>
</category>

</topic>


Maybe you could improve this.
-- 
View this message in context: http://www.nabble.com/How-to-match-in-topic-tf3157243.html#a8768917
Sent from the Pandorabots-general mailing list archive at Nabble.com.



More information about the pandorabots-general mailing list