Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

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

2009-05-18
2013-04-22
  • 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?

    regards
    roberto

    dialobot
    http://www.dialobot.com

     
    • Hi Roberto,

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

      http://aimlbot.svn.sourceforge.net/viewvc/aimlbot/tags/2.5/AIMLbot/AIMLbot/AIMLTagHandlers/star.cs?revision=27&view=markup

      And associated unit tests in this file:

      http://aimlbot.svn.sourceforge.net/viewvc/aimlbot/tags/2.5/Tests/Tests/AIMLTagHandlers/starTagTests.cs?view=markup

      Especially at around line 47.

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

      Best wishes,

      Nicholas.

       
    • 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>

      <category><pattern>*</pattern><template>What?</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
      roberto

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

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

            </template>
        </category>

        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.

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

      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?

      ciao
      roberto

       
    • :-)

      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,

      Nicholas.

       
    • 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
      ciao
      roberto