[alicebot-developer] Conditional problem
Gary Dubuque
alicebot-developer@list.alicebot.org
Mon, 8 Aug 2005 10:47:36 -0700
Hi Ioannis,
There is no tag as <set_gender> in the AIML standards, but when AIMLpad
learns the category it will convert that one into <set name="gender"> for
you. You could have also used <set_male> or <set_female> and the same
conversion would have happened.
So for your last conditional to say "attractive" or "handsome" you need to
compare the predicate named "gender" to the values "male" and "female", not
the predicate named "complement". Then everything will work as you hoped.
Also note that AIMLpad is sensitive to where the equal sign is after an
attribute. The attribute "name =" is not the same as "name=", even though
it should be. Sorry about that. Use "name=" if you want it to properly
find an attribute called "name".
HTH,
Gary Dubuque, on vacation and still thinking about aiml
-----Original Message-----
From: alicebot-developer-admin@list.alicebot.org
[mailto:alicebot-developer-admin@list.alicebot.org]On Behalf Of Ioannis
Sent: Monday, August 08, 2005 12:11 AM
To: alicebot-developer@list.alicebot.org
Subject: [alicebot-developer] Conditional problem
Hello all,
I am a bit new in AIML and so my problems. I have the following script which
refuses to execute correctly. What the script should do is the following:
User: Hi; Robot What is your name?; User: Giannis; Robot: Nice to meet you
giannis; User: I am blond ; Robot: you sound very handsome. This means that
once the robot match the users name with the one in the list, it should set
the gender of the user accordingly and when the user states I am blond to
respond appropriately. Wit the script below the dialogue progresses
correctly until "Giannis". From there and after the bot replies correctly
"Nice to meet you giannis" but also add are you a man or woman (something
which is not suppose to happen). Also when the user states "I am blond" the
bot replies "You sound very" without the appropriate "attractive or
handsome". Any ideas what is wrong? Please help! I am using the AIMLPad
<aiml>
<category>
<pattern>Hi</pattern>
<template>What is your name</template>
</category>
<category>
<pattern>*</pattern>
<that>What is your name</that>
<template>
<think><setname/></think>
Nice to meet you <getname/>.
<srai>GET NAME GENDER</srai>
</template>
</category>
<category>
<pattern>GET NAME GENDER</pattern>
<template>
<condition name ="name">
<li value="Giannis"><think><set_gender>male</set_gender></think></li>
<li value="nick"><think><set_gender>male</set_gender></think></li>
<li value="adreas"><think><set_gender>male</set_gender></think></li>
<li value="maria"><think><set_gender>female</set_gender></think></li>
<li value="elena"><think><set_gender>female</set_gender></think></li>
<li>Are you a man or a woman?</li>
</condition>
</template>
</category>
<category>
<pattern>I am blond</pattern>
<template>You sound very
<condition name="complement">
<li value="female"> attractive.</li>
<li value="male"> handsome.</li>
</condition>
</template> </category> </aiml>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
_______________________________________________
alicebot-developer mailing list
alicebot-developer@list.alicebot.org
http://list.alicebot.org/mailman/listinfo/alicebot-developer