Problem with <if> tag

View: New views
4 Messages — Rating Filter:   Alert me  

Problem with <if> tag

by Chhawsaria, Deepti :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



Hi!

I am using PogramD 4.5.
I tried using <if> tag as in example:

<category>
<pattern> HI </pattern>
<template>
<if name="user_name" value="ANONYMOUS">
      <random>
      <li> Hello, Dear Visitor! </li>
      <li> Hi, Dear Visitor! </li>
      <li> Welcome, Dear Visitor! </li>
      <li> Hiya, Dear Visitor! </li>
      </random>
<else/>
<random>
<li> Hello, <get name="user_name"/>! </li>
<li> Hi, <get name="user_name"/>! </li>
<li> Welcome, <get name="user_name"/>! </li>
<li> Hiya, <get name="user_name"/>! </li>
</random>
</if>
</template>
</category>



But I am getting the following error:

[10:06:58] Error parsing
"file:/C:/ProgramD_new/aiml/standard/std_personality.ai
ml": cvc-complex-type.2.4.a: Invalid content was found starting with
element 'if
'. One of '{"http://alicebot.org/2001/AIML-1.0.1":star,
"http://alicebot.org/200
1/AIML-1.0.1":that, "http://alicebot.org/2001/AIML-1.0.1":input,
"http://alicebo
t.org/2001/AIML-1.0.1":thatstar,
"http://alicebot.org/2001/AIML-1.0.1":topicstar
, "http://alicebot.org/2001/AIML-1.0.1":get,
"http://alicebot.org/2001/AIML-1.0.
1":bot, "http://alicebot.org/2001/AIML-1.0.1":sr,
"http://alicebot.org/2001/AIML
-1.0.1":date, "http://alicebot.org/2001/AIML-1.0.1":id,
"http://alicebot.org/200
1/AIML-1.0.1":size, "http://alicebot.org/2001/AIML-1.0.1":version,
"http://alice
bot.org/2001/AIML-1.0.1":uppercase,
"http://alicebot.org/2001/AIML-1.0.1":lowerc
ase, "http://alicebot.org/2001/AIML-1.0.1":formal,
"http://alicebot.org/2001/AIM
L-1.0.1":sentence, "http://alicebot.org/2001/AIML-1.0.1":condition,
"http://alic
ebot.org/2001/AIML-1.0.1":random,
"http://alicebot.org/2001/AIML-1.0.1":set, "ht
tp://alicebot.org/2001/AIML-1.0.1":gossip,
"http://alicebot.org/2001/AIML-1.0.1"
:srai, "http://alicebot.org/2001/AIML-1.0.1":person,
"http://alicebot.org/2001/A
IML-1.0.1":person2, "http://alicebot.org/2001/AIML-1.0.1":gender,
"http://aliceb
ot.org/2001/AIML-1.0.1":think,
"http://alicebot.org/2001/AIML-1.0.1":learn, "htt
p://alicebot.org/2001/AIML-1.0.1":system,
"http://alicebot.org/2001/AIML-1.0.1":
javascript, WC[##other:"http://alicebot.org/2001/AIML-1.0.1"]}' is
expected.
[10:06:59] 842 unique categories loaded in 2.078 seconds.

Can you please help me?

Regards,____________________________________________________________

Deepti Chhawsaria | Capgemini | Mumbai
Associate Consultant | Oracle Service Line
Direct: +91 22 5642 6173 | Mob. +91 9820136918 |
mail: deepti.chhawsaria@...
____________________________________________________________

This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient,  you are not authorized to read, print, retain, copy, disseminate,  distribute, or use this message or any part thereof. If you receive this  message in error, please notify the sender immediately and delete all  copies of this message.

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

RE: Problem with <if> tag

by Kootstra :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

The If/Else structure has been depreciated and subsequent been substituted
for the <condition> tag in AIML.

<condition name="user_name">
        <li value="ANONYMOUS">Foobar</li>
        <li> foo bar </li>
</condition>

The above example should yield the same results as the if else AIML script
in your post.

As ever,

Anne


-----Oorspronkelijk bericht-----
Van: Chhawsaria, Deepti [mailto:deepti.chhawsaria@...]
Verzonden: woensdag 24 augustus 2005 6:55
Aan: alicebot-developer@...
Onderwerp: [alicebot-developer] Problem with <if> tag



Hi!

I am using PogramD 4.5.
I tried using <if> tag as in example:

<category>
<pattern> HI </pattern>
<template>
<if name="user_name" value="ANONYMOUS">
      <random>
      <li> Hello, Dear Visitor! </li>
      <li> Hi, Dear Visitor! </li>
      <li> Welcome, Dear Visitor! </li>
      <li> Hiya, Dear Visitor! </li>
      </random>
<else/>
<random>
<li> Hello, <get name="user_name"/>! </li>
<li> Hi, <get name="user_name"/>! </li>
<li> Welcome, <get name="user_name"/>! </li>
<li> Hiya, <get name="user_name"/>! </li>
</random>
</if>
</template>
</category>



But I am getting the following error:

[10:06:58] Error parsing
"file:/C:/ProgramD_new/aiml/standard/std_personality.ai
ml": cvc-complex-type.2.4.a: Invalid content was found starting with
element 'if
'. One of '{"http://alicebot.org/2001/AIML-1.0.1":star,
"http://alicebot.org/200
1/AIML-1.0.1":that, "http://alicebot.org/2001/AIML-1.0.1":input,
"http://alicebo
t.org/2001/AIML-1.0.1":thatstar,
"http://alicebot.org/2001/AIML-1.0.1":topicstar
, "http://alicebot.org/2001/AIML-1.0.1":get,
"http://alicebot.org/2001/AIML-1.0.
1":bot, "http://alicebot.org/2001/AIML-1.0.1":sr,
"http://alicebot.org/2001/AIML
-1.0.1":date, "http://alicebot.org/2001/AIML-1.0.1":id,
"http://alicebot.org/200
1/AIML-1.0.1":size, "http://alicebot.org/2001/AIML-1.0.1":version,
"http://alice
bot.org/2001/AIML-1.0.1":uppercase,
"http://alicebot.org/2001/AIML-1.0.1":lowerc
ase, "http://alicebot.org/2001/AIML-1.0.1":formal,
"http://alicebot.org/2001/AIM
L-1.0.1":sentence, "http://alicebot.org/2001/AIML-1.0.1":condition,
"http://alic
ebot.org/2001/AIML-1.0.1":random,
"http://alicebot.org/2001/AIML-1.0.1":set, "ht
tp://alicebot.org/2001/AIML-1.0.1":gossip,
"http://alicebot.org/2001/AIML-1.0.1"
:srai, "http://alicebot.org/2001/AIML-1.0.1":person,
"http://alicebot.org/2001/A
IML-1.0.1":person2, "http://alicebot.org/2001/AIML-1.0.1":gender,
"http://aliceb
ot.org/2001/AIML-1.0.1":think,
"http://alicebot.org/2001/AIML-1.0.1":learn, "htt
p://alicebot.org/2001/AIML-1.0.1":system,
"http://alicebot.org/2001/AIML-1.0.1":
javascript, WC[##other:"http://alicebot.org/2001/AIML-1.0.1"]}' is
expected.
[10:06:59] 842 unique categories loaded in 2.078 seconds.

Can you please help me?

Regards,____________________________________________________________

Deepti Chhawsaria | Capgemini | Mumbai
Associate Consultant | Oracle Service Line
Direct: +91 22 5642 6173 | Mob. +91 9820136918 |
mail: deepti.chhawsaria@...
____________________________________________________________

This message contains information that may be privileged or confidential and
is the property of the Capgemini Group. It is intended only for the person
to whom it is addressed. If you are not the intended recipient,  you are not
authorized to read, print, retain, copy, disseminate,  distribute, or use
this message or any part thereof. If you receive this  message in error,
please notify the sender immediately and delete all  copies of this message.

_______________________________________________
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

Condition problem

by Ioannis Doumanis :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Dear all,

Although my aiml code below compiles correctly in the AIML Pad, it does not
work. I believe that the problem is in the white spaces that I am using.
However I do not have any idea on how to fix it. Any help will be greatly
appreciated.


<category>
<pattern>* icon of crucified Christ</pattern>
<template>Would you like me to provide you with a detailed description of
its elements?</template>
</category>

<category>
<pattern>* </pattern>
<that>Would you like me to provide you with a more detailed description of
its elements</that>
<template><think><set name="answer"><star/> </set></think>
OK,<srai>ANS</srai>
</template>
</category>

<category>
<pattern>ANS</pattern>
<template>
<condition name="answer">
<li value="YES
PLEASE"><think><set_apadisi>POSITIVE</set_apadisi></think><srai>DES</srai></
li>
<li value="NO
THANKS"><think><set_apadisi>NEGATIVE</set_apadisi></think><srai>DES</srai></
li>
</condition>
</template>
</category>

<category>
<pattern>DES</pattern>
<template>
<condition name="apadisi" value="POSITIVE">Just take a close look of the
icon, while I provide you with a description. Even at its present form (a
mere copy of the original one), we can clearly distinguish the elements of
the icon. In front, the figure of Christ, with sorrowful, lowered head, is
remarkable both in each conception and execution. In the group to the right
there is a man wearing a golden garment beneath his blue cloak, and looking
very much like a Venetian doge. Thus the icon reflects the Venetian
character of the whole church. The blessed virgin, is on the left wearing a
blue cloak. Her sorrowful appearance is totally derived from the artistic
style of the Eastern Church. The icon is a remarkable piece of art and
certainly a valuable part of the heritage of Monemvasia. I truly hope that
the authorities will decide to return it to its rightful owners.
</condition>
<condition name="apadisi" value="NEGATIVE">please, let me know what would
you like to learn about this icon</condition>
</template>
</category>



__________________________________________________
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

RE: Problem with <if> tag

by Ioannis Doumanis :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

RE: [alicebot-developer] Problem with <if> tag

Hi again

Well, I have the following code. What I want to do with it is in comments: 

<topic name="Intro">

<category>

<pattern>My name is *</pattern>

<template><srai><star/> </srai></template>

</category>


<category>

<pattern>* </pattern>      ---- what ever the user replies in the above question the bot will reply one of the following. However the problem is when the user replies "I am John" for example, which conflicts with the pattern below.--

<template>

<random>

<li>Nice to meet you <star/><think><set name="name"><star/></set></think>. May I also ask your age?</li>

<li>Hi there <star/><think><set name="name"><star/></set></think>. May I also ask what your age is</li>

<li>Its is good to see you <star/><think><set name="name"><star/></set></think>. Would you mind if I 'll also ask your age</li>

</random>

</template>

</category>

<category>

<pattern>I am *</pattern>

-- I need a <that> tag here to distinguish this pattern with the case where the user types "I am john" in the previous question. However the problem is what kind of previous utterance to use in the <that> tag since the robot previous utterances are generated randomly. Any ideas please help!!!!!!!!---

<template>

<random>

<li>Great <get name="name"/>, would you like me to explain you how the system works</li>

<li>OK <get name="name"/>, would you like me to tell you how the system work</li>

<li>Great <get name="name"/>, would you like to know how the system works</li>

</random>

</template>

</category>