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.
Not sure what the questions are... (although that is a pretty accurate description of topic)
Thanks. That is what I want to confirm.
To follow up on this dicussion, can you comment on when to use one of the following approach using topic:
<category><pattern>WHAT IS A BANANA</pattern><template>A banana is an oblong yellow tropical fruit...
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,
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.