A couple of general AIML questions

tiger
2007-03-02
2013-04-22
  • tiger

    tiger - 2007-03-02

    Can someone answer these questions?  I saw someone asked these on the general AIML mailing list but no good answers:

    "
    First, i want to show my understanding on the functionalities of topic tag:

    1. <topic> allows ALICE to prefer responses that deal with the topic currently being discussed. This creates topical
    conversation, yet still has the ability to move from one subject to another.

    To do this, after the topic has been setted, ALICE will search a response within the categories defined within the <topic> tags matching the
    current topic will be searched first... before any of the non-topic categories, or the default categories. If there is not a matching category defined in the
    current topic, then any categories that are not defined in topic tags are searched.

    2. <topic> allows ALICE to have duplicate patterns in different
    contexts (topics) allowing ALICE to have different responses to
    the same input patterns depending on the topic. For example,
    "overriding" the same pattern for different topics.
    "

    Thanks.
    jw

     
    • Nicholas Tollervey

      Jimmy,

      Not sure what the questions are... (although that is a pretty accurate description of topic)

      Nicholas

       
    • tiger

      tiger - 2007-03-02

      Nicholas,

      Thanks. That is what I want to confirm.

      Best,
      JW

       
    • tiger

      tiger - 2007-03-03

      To follow up on this dicussion, can you comment on when to use one of the following approach using topic:

      Example 1:
      <category><pattern>WHAT IS A BANANA</pattern><template>A banana is an oblong yellow tropical fruit...
      <think>    
      <set name="it">     
      <set name="topic">banana</set>
      </set>   
      </think>  
      </template></category>     

      Example 2:
      <topic name="banana">
      <category><pattern>..</pattern><template>...</template></pattern></category>
      ...
      <category><pattern>..</pattern><template>...</template></pattern></category>
      </topic>

       
    • Nicholas Tollervey

      Jimmy,

      As far as I can tell, that is the correct way to set a topic (in example 1) and example 2 will contain categories that will match first if the topic is "banana". Remember that the _ and * wild-cards can be used in the topic and that there is a topicstar tag that tells the AIML interpreter that it should substitute the contents of wildcards from the current topic (if the topic contains any wildcards).

      Hope this helps,

      Nicholas

       

Log in to post a comment.

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

Sign up for the SourceForge newsletter:





No, thanks