[alicebot-archcomm] [proposal] <get pattern=

Dr. Richard S. Wallace alicebot-archcomm@list.alicebot.org
Sat, 03 Nov 2001 08:44:04 -0800


Noel Bush wrote:

> This is a simple proposal for an extension to AIML.
>
> 1. Allow the use of any combination of {pattern, that, topic} attributes
> on the get element.
>
> 2. Interpret any combination of {pattern, that, topic} attributes as a
> reference to a category.  If any of these three attributes appears but
> the others do not, the others are interpreted as having value "*".
>
> 3. If the category so referenced has been activated (in this user
> context), allow use the use of any template-side elements, including
> template itself, within this get.  The template-side elements used
> should return their values at the time of activation.
>
> 4. A combination of name and any of these three attributes would be an
> invalid get (e.g., <get name="foo" pattern="BAR"> would not be valid).
>
> 5. One shorthand can be used: <get pattern="*" that="*" topic="*"/> is
> the same as <get pattern="*" that="*" topic="*"><template/></get>.
>
> I think we should discuss this proposal without regard to implementation
> difficulties, to start.  Clearly implementing it might have enormous
> memory requirements.
>
> It is clear that uses of this could often (most of the time) point to
> categories that haven't been activated.  It may be that some
> augmentation of condition or something else would help ease this
> problem.  But I would ask that we consider such proposals separately.
>
> Here are examples of how this proposal could be used:
>
> <!--Example 1-->
> <category>
>   <pattern>I LIKE *</pattern>
>   <template>
>     I'll remember that.
>   </template>
> </category>
>
> <category>
>   <pattern>WHAT DO I LIKE</pattern>
>   <template>
>     You told me you like <get pattern="I LIKE *"><star/></get>.
>   </template>
> </category>
>
> <!--Example 2-->
> <category>
>   <pattern>TELL ME SOME GOSSIP</pattern>
>   <template>
>     <random>
>       <li>I heard that the rain in Spain falls mainly in the plain.</li>
>       <li>Eliza lives.</li>
>       <li>Elvis has left the building, but not the Internet.</li>
>       <li>To live outside the law you must be honest.</li>
>     </random>
>   </template>
> </category>
>
> <category>
>   <pattern>TELL ME THAT GOSSIP AGAIN</pattern>
>   <template>
>     Last time I said <get pattern="TELL ME SOME
> GOSSIP"><template/></get>.
>   </template>
> </category>
>
> <!--Example 3-->
> <category>
>   <pattern>I TOLD YOU MY NAME IS *</pattern>
>   <template>
>     You said, and I quote, <get pattern="MY NAME IS *"><input/></get>.
>   </template>
> </category>
>

It took me a minute to understand this proposal, so I'm not sure it
qualifies under the rule
from the Working Draft that AIML should be easy to understand.

The general idea of making the activations and other Graphmaster data
available to the
runtime AIML is an interesting one however.

One minor technical point: when you say "activated", you mean "activated by
the same client",
right?  In a server situation, each category can be activated by multiple
clients, so care needs to
be taken so that WHAT DO I LIKE refers to my activation of I LIKE *, not
someone else's.

Rich