[MUD-Dev] Prepositions and parsing

Chris Gray cg at ami-cg.GraySage.Edmonton.AB.CA
Wed May 7 08:26:46 New Zealand Standard Time 1997


:What with the recent discussion of parsers and methods of parsing
:commands, and old entry from my to-do list popped up:
:
:  Support for prepositions such as "under", "on top of", "behind" etc.
:
:Anyone got any ideas for supporting/parsing a command like:
:
:  hide under the desk

Well, currently I would fake it by having an object in the room with
internal name "desk;under,the". The command would then work, but my
stomach would hurt.

:  put the rock under the rug behind the pillar

Well, unlike in English, it probably isn't ambiguous in most MUDs, since
'put' always takes things from your inventory and puts them somewhere
else, so it is the rug that is behind the pillar.

I think, in general, you would have to add prepositional phrases to your
parser, and somehow convert them to an internal form that the semantic
components could use to guide the search for the objects. (Arm waving!)
*Then* you have to decide how to handle situations where a preposition
could start a prepositional phrase for the direct object, or whether it
is the preposition associated with the verb which separates the direct
object from the indirect object for that verb. Fun, fun!

--
Chris Gray   cg at ami-cg.GraySage.Edmonton.AB.CA



More information about the MUD-Dev mailing list