« Return to Thread: Problems with forum ai mod based on alice

RE: Conditionl problem

by Gary Dubuque :: Rate this Message:

Reply to Author | View in Thread

Hi Ioannis,

This is a bug in AIMLpad when it trys to patch up the whitespace around
tags.  It has been fixed and can be downloaded at www.aimlpad.com or you can
use the workaround to turn off the "Respect whitespace insertion around XML
tags" option.  It actually appended a space to the end of the star's value
so it would not match to the peron's name.  Sorry for your inconvience.  No,
the AIML you have is fine.

Thanks for putting up with me,
  - Gary Dubuque, adapting to all forms of AIML (I hope)


-----Original Message-----
From: alicebot-developer-admin@...
[mailto:alicebot-developer-admin@...]On Behalf Of Ioannis
Sent: Tuesday, August 09, 2005 2:25 AM
To: alicebot-developer@...
Subject: RE: [alicebot-developer] Conditionl problem


Hi all,

I still do not get what I am doing wrong! Although the dialogue proceeds
till the second category ("Nice to meet you..") when I say to the bot "I
blond" it refuses to answer correctly based on the gender of the user (e.g.
You sound very attractive for female names). Any ideas why? Please help!!! I
am using the AIMLPad

<aiml>

<category>
<pattern>Hi</pattern>
<template>WHAT CAN I CALL YOU</template>
</category>

<category>
<pattern>*</pattern>
<that>WHAT CAN I CALL YOU</that>
<!-- first, we save the value of the * (star) - which, we suppose, returns
the client´s name as its value - into a predicate with name="onoma" -->
<think>
<set name="onoma"><star/></set> <!-- it is the same as <setname/> -->
</think>
<!-- now we can use <get name="onoma"/> to make the text output of the
<template/> return the contents of name="name" -->
Nice to meet you <get name="onoma"/>
<template>
<srai>GET NAME GENDER</srai>
</template>
</category>

<category>
<pattern>GET NAME GENDER</pattern>
<template>
<condition name="onoma">
<li value="GIANNIS"><think><set name="gend">male</set></think></li>
<li value="GARY"><think><set name="gend">male</set></think></li>
<li value="MARY"><think><set name="gend">female</set></think></li>
<li value="ALICE"><think><set name="gend">female</set></think></li>
</condition>
</template>
</category>

<category>
<pattern>I am blond</pattern>
<template>You sound very
<condition name="gend">
<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@...
http://list.alicebot.org/mailman/listinfo/alicebot-developer


_______________________________________________
alicebot-developer mailing list
alicebot-developer@...
http://list.alicebot.org/mailman/listinfo/alicebot-developer

 « Return to Thread: Problems with forum ai mod based on alice