[alicebot-archcomm] [discuss] (2) sets and lists in AIML
Manos Batsis
alicebot-archcomm@list.alicebot.org
Wed, 20 Mar 2002 10:46:05 +0200
> From: Dr. Richard S. Wallace [mailto:drwallace@alicebot.org]
> The counterpoint is that the AIML spec defines "equals" for
> <condition> and
> <topic> as "matches with AIML pattern rules.
Which, IMHO, is bad semantics; every PL uses 'match' to evaluate
whatever comes close to regular expressions.
> For example <topic name="DOG *"/> matches DOG SHOW, DOG HOUSE, and DOG
> MAULING.
> <condition name="xxx" value="YYY *"/> is true wen xxx matches
> YYY * by AIML
> matching rules. If we made the definition of "equals"
> differently for set
> membership, then at the very least it would be inconsistent with the
> definitions for <condition> and <topic>
Actually, the above examples also evaluate sets and their members
(String containing chars), but 'match' is a somewhat higher level way of
doing it using expressions such as "DOG *" :-)
Anyway, I suggest two things:
1) Replace the keyword 'equals' with 'match' for use on <topic> and
<condition>. You cannot say equals("foo *") because this is an
expression of a set where not all members are shown.
2) Use the widely accepted definition of 'equals' on sets. For a set to
be equal with another, it must have an identical sequence of members
(unless the order of elements is not applicable; for example attributes
in XML have no particular order, not even the one presented in the
document).
Regards,
Manos