[MUD-Dev] Text Parsing
Travis S. Casey
efindel at io.com
Wed Jun 2 10:30:33 CEST 1999
On Tue, 1 Jun 1999, Matthew Mihaly wrote:
> > However, has anyone ever done any study or seen anything that proports
> > to explain what a common (for some value of common) user would like?
> > In other words, usability?
>
> Yes, I agree fully with this sentiment. Reading these endless streams of
> posts dissecting the details of writing parsers is lovely in an academic
> way, but I don't know anyone that would type "get red sword and blue sword
> then walk north" rather than:
> get red sword
> get blue sword
> n
I think that trying to make a full natural language parser is a bit much,
but I'd personally prefer to be able to type:
get red sword and blue sword
n
or, if the red and blue swords are the only swords in the room:
get all swords
n
Personally, I'm interested in parsing not to make the command language be
English, but to make it easier and more flexible to use. That's one
reason that I decided to make my own parser under MudOS instead of using
the MudOS one -- the Lima people had too much of an emphasis on requiring
commands to be grammatically correct for my taste.
(On most LP muds, "get sword 2" is how you'd get the second sword listed
in the room. On Lima, it was "get second sword". I recall someone asking
if understanding of the "get sword 2" syntax could be added, and Beek
replying that he could, but he wouldn't, since "get sword 2" was not
English. That's the kind of thing that I think is excessive.)
> Don't get me wrong, I have nothing against academic discussion, nor
> against the idea of making a mud simply to please yourself. However, if,
> as it seems, the stated goal of this parser discussion is to make things
> easier on players, I think you're going in the wrong direction.
I can't speak for others, but I certainly wouldn't require grammatically
correct input -- as I said above, I just want my parser to be more
flexible and powerful. The parser I was building supported:
get sword 2
get second sword
get 2nd sword (never got around to adding Diku-style)
get all swords
get all sword (it wasn't picky about correct pluralization)
... and a bunch of other stuff besides. Where I thought it was
reasonable, I allowed "sloppy" input -- e.g.,
> get blue sword, book, red sword, and toad
Taken: blue sword, red sword, toad
There is no book here.
would be the result if there were no book around. I found that much
better than:
> get blue sword, book, red sword, and toad
There is no book here.
> get blue sword, red sword, and toad
Taken.
I tried to make error messages as informative as I could (e.g., giving a
brief summary of the correct syntax with the error message), but it still
needed a lot of work in that area.
I also had support for aliases, including aliases with numbered parameters
(so you could rearrange parameters or insert things between them if you
wanted to -- e.g., make an alias "w $1 $2 -> wield $1 in $2 hand").
Aliasing more than just verbs was planned (so you could do things like
alias "sw -> sword" and type "get sw"), but never implemented. This would
have allowed players to define their own abbreviations, and/or to alias
anything they commonly misspelled.
(I know -- a good client will do all of this. It's always been my
feeling, though, that players who can use mud-specific clients shouldn't
have any advantages over those who, for whatever reason, can't. Thus, I
wanted to support client-like features on the mud itself.)
--
|\ _,,,---,,_ Travis S. Casey <efindel at io.com>
ZZzz /,`.-'`' -. ;-;;,_ No one agrees with me. Not even me.
|,4- ) )-,_..;\ ( `'-'
'---''(_/--' `-'\_)
_______________________________________________
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