<star index="2"/> not present?

  • roberto gilli

    roberto gilli - 2009-05-18

    Hi All,

    As far as I tested, AIMLbot doesn't understand the standard code <star index="2"/> .

    Do you agree? Do you think there is a simple way to put it in?



    • Nicholas Tollervey

      Hi Roberto,

      Yes it is implemented. See the following file that implements the <star> tag:


      And associated unit tests in this file:


      Especially at around line 47.

      What exactly is the problem...? Expected vs actual behaviour would be helpful.

      Best wishes,


    • roberto gilli

      roberto gilli - 2009-05-19

      hi nicholas thank you for your quick response. Finally i undertand what is going on.

      take this AIML code

      <category><pattern>_ MAILS _</pattern><template><star index="1"/> email <star index="2"/></template></category>


      and you will have this conversation:
      You: ciao
      Bot: What?
      You: can you help me with mails please?
      Bot: please email can you help me with.

      the AIMLbot works like the AIML would be:
      <category><pattern>_ MAILS _</pattern><template><star index="2"/> email <star index="1"/></template></category>
      changing the star2 with star1!

      Am i wrong?

      best regards

      • Douglas R. Miles

        I just got this behavour .. is this what you meant?

            <pattern>ABC * IS THE * OF *</pattern>
                   ABC <star index="1"/> IS THE <star index="2"/> OF <star index="3"/>


        textform> aiml ABC 1 IS THE 2 OF 3
        My Bot : ABC 3 IS THE 2 OF 1.

    • roberto gilli

      roberto gilli - 2009-05-21

      yes, it seems turned.

      <pattern>* is * is *</pattern>
      should be 1 is 2 is 3. <star index="1"/> is <star index="2"/> is <star index="3"/>.

      You: 1 is 2 is 3
      Bot: should be 1 is 2 is 3. 3 is 2 is 1.

      AIMLbot starts from right and goes left?


    • Nicholas Tollervey


      So, I seem to have interpreted the AIML standard differently to others. I seem to remember going through this with another guy who implemented AIML on another platform (Java I think) and we agreed to differ in our interpretation but agreed to agree that it was definitely open to interpretation.

      You can easily change the direction AIMLBot for the star, thatstar and and topicstar by looking in the utils/node.cs file. Look at lines 183, 188 and 191. Instead of calling the .Add method replace it with something like this:

      query.WHATEVERStar.Insert(0, newWildcard.ToString());

      (Make sure you replace WHATEVER with the appropriate list name).

      Hope this helps,


    • roberto gilli

      roberto gilli - 2009-05-21

      well for me your code is taboo.

      it is simpler for me to invert che AIML :-)

      thank you


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks