[MUD-Dev] Parser engines

Robert Zubek rob at cs.northwestern.edu
Fri Apr 2 15:16:47 CEST 2004


From: Brian Hook

> Also, handling group w/ exceptions was proving cumbersome when
> trying to hack into my simplistic parser, i.e.

>   > get all swords except the rusty sword from the backpack

> So I'm writing a parser that lies somewhere between the full on
> complexity and robustness of an IF-level parser, and the
> simplicity of a typical MUD parser.

> I still require most sentences to decompose into verb, direct
> object, preposition and indirect object, but I don't use a grammar
> to dispatch, I just have a high level parser for each verb type.

I just though, you may want to check out the Link Grammar by
Temperley et al. (www.link.cs.cmu.edu - you can try it online at
their web page).  I've been using it for about a year now for a
conversational NPC system, and been very happy with the
performance. While imperative voice commands are slightly different
from conversations, the grammar is quite robust and might be able to
handle them as well.

When I fed your sample sentence through, I got the following
constituent tree (sans links or parts of speech):

  (S (VP get
         (NP all swords)
         (PP except
             (NP the rusty sword))
         (PP from
             (NP the backpack))))

which strikes me as a very good parse - it groups the object as the
main noun phrase, the exception into one prepositional clause, the
source into the other.

Then you can assign semantic roles by following the parse
tree. Agent performing the action comes from following S->NP, action
is S->VP, patient of the action from S->VP->NP, the method from
S->VP->PP, location from S->VP->PP for some particular prepositions,
and so on.  This gives a set of bound roles such as:

  Action:   get
  Agent:    <null> [ imperative voice! ;) ]
  Patient:  all swords
  Method:   except the rusty sword
  Location: from the backpack

And that makes entity disambiguation must easier. :)

Rob

PS. By the way, the link parser also picked up the ambiguity in that
statement. One of the valid parses was:

  (S (VP get
         (NP all swords)
         (PP except
             (NP (NP the rusty sword)
                 (PP from
                     (NP the backpack))))))

:)

--
Robert Zubek
http://www.cs.northwestern.edu/~rob
_______________________________________________
MUD-Dev mailing list
MUD-Dev at kanga.nu
https://www.kanga.nu/lists/listinfo/mud-dev



More information about the mud-dev-archive mailing list