[alicebot-archcomm] Conditional wildcards
Jonathan Roewen
alicebot-archcomm@list.alicebot.org
Sat, 1 Mar 2003 23:25:38 +1300
> This version of AIML would work if you wanted to record every number
> possible. Already we have many categories for just entering someone's
age.
> The idea is that these are classes of items to match. Classes that don't
> fit into the realm of just natural language. Surely you're not saying that
> entering all those dates would simplify the processing of them. I would
> image the minimalist would say no, no, no, we want it simple. Just let us
> call a date a date. Don't make us list all the possible dates there are.
Who says you have to? You don't have to do that, just to make use of a
class. There are ways to find out what kind of class (if any) that a word is
after it has been matched to a wildcard when being processed in the
template.
> So how are we going to know when someone is going to use a date as an
> answer? One has to ask deliberately for a date or expect that only a date
> is appropriate from the context of the inputted phrase. This leaves alot
of
> wiggle room.
Only if you let there be wiggle room.
Such things as conditional wildcards have been attempted before. There was
the typeof tag Jon Baer experimented with, and maybe not quite as known was
creating sets, and specifying a set (a restricted wildcard, using @ syntax).
There are problems with both.
Typeof has the problems of how to expand the tag .. does it occur while
processing the template, or does it get expanded into multiple categories at
load time? Also, what happens with two or more instances of the same typeof
in both the template and pattern? Such as:
<pattern><typeof_a/> * IS <typeof_a/> *</pattern>
<template>I didn't know <typeof_a/> <star/> is <typeof_a/> <star
index="2"/></template>
And <typeof_a/> is defined to be "a" and "an". How do you know which is
which in the template? Do you instead treat matching to a typeof as an
additional wildcard, so it'd instead be:
<template>I don't know <star/> <star index="2"/> is <star index="3"/> <star
index="4"/></template>
If you do, this would imply the category doesn't get expanded at load time.
And the @ syntax has the same problem as your conditional wildcard idea. How
do you decide among two plausible matches?
What if you have @NUMBER and @PHONE? @PHONE would just be a more restricted
form of @NUMBER but the interpreter doesn't know that.
I do believe that <typeof> could become a possible solution .. it would just
require a bit of work to establish exactly how it would work. But it is
still susceptible to the same problem as these others.
So I guess the real question is: is the possibility for ambiguity such as
this acceptable?
Jon =)