[MUD-Dev] Re: Prepositions and parsing
gryphon at iaehv.nl
Mon May 26 22:43:14 New Zealand Standard Time 1997
On Tue 20 May, clawrenc at cup.hp.com wrote:
> Not quite. There are simple sides to the problem here:
> 1) Statements which are not ambiguous
> 2) Statements which are grammatically ambiguous
> 3) Statements which are ambiguous in the current MUD context
> #3 is of course a subset of #2.
Not quite. Imagine a room with a ball and two boxes.
The statement 'Put the ball in the box' is syntactically unambiguous,
but it is ambiguous in the current context (it is semantically ambiguous ?)
And it is neither if one of the boxes is obviously too small to hold the
ball in the first place.
I would expect that most statement will be semantically ambiguous, when
it is not clear which object is identified by a noun.
> What I need to be able to do is to distinguish between #3 and #2, such
> that I process #3 type statements as if they were unambiguous (which
> they are contextually if not gramatically), and abort processing on
> what is left of #2 type statements.
You start out by analysing the statement. Break it down in verbs,
prepositions, passive and active objectives and so on. When that
doesn't fail you have a syntactically correct statement. Next you
need to match each (prepositioned) noun to an object that will match
the requirements for the noun. I.e. if you're asking for a 'seat' you
may also accept a crate as such. If there's one candidate for each
noun you have interpreted the statement and should, theoretically
know what to do, or rather the verb will tell you that.
If not you have the choice of picking the 'best match' or asking the
user which match to make. I.e. if the statement mentioned a seat and
there's a crate and a chair, both of which will match the requirements
for a 'seat' then you can either choose chair, as the best match, or
ask the player if she means the chair or the crate.
Of course this also requires that you know about seats, and what makes
a valid seat, but that's something quite different :)
Yes - at last - You. I Choose you. Out of all the world,
out of all the seeking, I have found you, young sister of
my heart! You are mine and I am yours - and never again
will there be loneliness ...
Rolan Choosing Talia,
Arrows of the Queen, by Mercedes Lackey
More information about the MUD-Dev