[alicebot-archcomm] multiple patterns in a category
Sandro Golinelli
alicebot-archcomm@list.alicebot.org
Mon, 24 Mar 2003 13:15:46 +0100
please state your concerns about something like :
<category>
<pattern>*</pattern>
<pattern>IT IS *</pattern>
<pattern>THEY ARE *</pattern>
<that>WHAT</that>
<template>
i don't know more about <star/>
</template>
</category>
it can handle a chat like:
user: i-ching
bot: what?
user: the book of changes
bot: i don't know more about the book of changes
or
user: i-ching
bot: what?
user: they are the fundamental books of Confucianism
bot: i don't know more about the the fundamental books of Confucianism
or
user: i-ching
bot: what?
user: it's the book of changes
bot: i don't know more about the book of changes
in this example, we have a category, the template is activated by any input
and where the previous bot sentence is "what"
This template will also be activated by any input starting with "it is" or
"they are" followed by at least another word, and where the bot previous
sentence is "what"
this example is pretty simple but instead to write a 7 line category, using
current standard aiml, i should write something like:
<category>
<pattern>*</pattern>
<that>WHAT</that>
<template>
i don't know more about <star/>
</template>
</category>
<category>
<pattern>IT IS *</pattern>
<that>WHAT</that>
<template>
i don't know more about <star/>
</template>
</category>
<category>
<pattern>THEY ARE *</pattern>
<that>WHAT</that>
<template>
i don't know more about <star/>
</template>
</category>
21 lies of code, or many more, where just a line is different among these
categories.
what do you think ?
--
sandro