[alicebot-archcomm] [proposal] <get pattern=
Kim Sullivan
alicebot-archcomm@list.alicebot.org
Mon, 5 Nov 2001 23:02:58 +0100
I see our discussion about 'why predicate' has got you thinking :-)
> <!--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>
What's wrong with using the current variables mechanism for this? I
personally don't think that referring to the actual pattern is more
abstract, more 'devoid of meaning' than inventing an identifier for the
value we just got. 'Assigning a name for...' is biased towards the meaning,
you're right with that,that's why I'm talking about 'identifiers'. That this
identifier carries a meaning, is just a coincidence (since, so does 'I LIKE
*', no matter how you try to put it).
You could explicitly set this value in every category, and call it according
to the pattern (using a naming scheme):
<category>
<pattern>I LIKE *</pattern>
<template>
<think><set name='I_LIKE__STAR|_STAR|_STAR'/><star/></set></think>
I'll remember that.
</template>
</category>
Spaces are substituted with underscores, wildcard are preceded by an
underscore and pattern|that|topic are separated by | (what's it called, the
or-sign?).
If this mechanism would be enforced, or provided by a good editor (see
reasoning about multiple patterns), you would get roughly the same
behaviour. (If I got your proposal correctly). The gossip example could be
solved the same, placing the entire random inside the <set> tag (very nice
AIML technique I think, this should be sent to the style list).
The name example would be an example where both the MY_NAME_IS__STAR
variable and the 'name' variable could be used - for example if the name was
set in a different category than MY NAME IS * (My name is Kim Sullivan, but
you can call me your majesty).
<category>
<pattern>I TOLD YOU MY NAME IS *</pattern>
<template>
You said your name was, and I quote, <get
name='MY_NAME_IS__STAR'>nothing</get>, <get name="name">user</get>.
</template>
</category>
You said your name was, and I quote, Kim Sullivan, your majesty.
After reading your proposal more closely, I think I completely missed your
point. I'll try again in the next post.
Kim