[MUD-Dev] Text Parsing

Katrina McClelan kitkat at marcus.pants.nu
Wed Jun 2 01:00:17 CEST 1999


On Wed, 2 Jun 1999, Chris Gray wrote:

> > > take off coat
> >
> > seems simple enough. Thing is, do you first check for an object that can
> > be described as an "off coat", or first check through the list of possible
> > arguments to "take" for a match? The first options starts adding reserved
> > words ("off button" anyone?), the second one has problems with other
> > syntaxes:
> >
> > > take small box from wooden table
> 
> Ah, but the save here is that in your first case, 'off' is only a special
> word when used with the 'take' verb. Similarly, 'from' is special for
> this use of 'take'. The way I do it is to have, for each verb, a list
> of the syntax forms for that verb. Only a simple no-indirect-object
> form of a verb is allowed to not specify a preposition. Only one use
> of a given preposition is allowed for a given verb. So, the prepositions
> allow the parser to decide which verb form it is. The form says whether
> or not it allows an indirect object, and if not, the preposition can be
> either before or after the direct object. So:
> 

I like the very inovative idea of "special arguments" to a verb, but the
killer is that English can be massively confusing:

a huge hoard of orcs spot you and reach for their weapons with a snarl.
-> take off running away from the orcs.

-> put on cloak.
you put on the white cloak.
-> look around.
an off white cloak lies on the ground here.
-> take off white cloak.

(If you have a parser that will not blarf all over any of these, I'm
_much_ impressed)

worse, when you throw in the tendency for experienced players to perfer
lazy typing to english, you get problems:

the lizardmen have left an offering to their gods on the alter.
-> take off alt
(shorthand for take offering from alter that most mud processors allow,
and that veteran players will expect to have work)

An English parser would be neat, but there are a lot of problems
associated with it... especially since as Ben pointed out, most players
beyond newbiehood are going to type the shortest amount possible to get
the desired result.  I hate to be a cynic, but alas it's my nature:  I'm
not entirely sure that such a thing is feasible for a mud, unless you're
either willing to accept some strangeness in it, or to restrict the
sentence structure some (force the active verb to be the first word for
example).  At the very least I don't think anyone would argue with me
saying that at the very least this is a very large and ugly problem. The
discussion is certainly interesting though, and of course, people told the
Wright brothers that they were nuts to be trying to build a plane too,
until they managed to do it.

Regards,
-Kat




_______________________________________________
MUD-Dev maillist  -  MUD-Dev at kanga.nu
http://www.kanga.nu/lists/listinfo/mud-dev




More information about the mud-dev-archive mailing list