[MUD-Dev2] Command Parsing. Lame question!

Jeffrey Kesselman jeffpk at gmail.com
Wed Jul 1 23:06:09 CEST 2009


Ive never seen fuzzy parsing yet, thats pretty cool.

In the past Ive found simple regexp based Mud parsers more useful then hard
syntax ones. YMMV.

On Fri, Jun 12, 2009 at 10:40 PM, Mike Rozak <Mike at mxac.com.au> wrote:

> > I have written a parser with the help Lex/Bison style tools. Thing is, my
> > parser is a bit limited and I'm writing to you all to see if you have
> > suggestions on the best approach to solve this problem. (My compiler
> > skills
> > are a bit rust so the solution may be plain obvious :))
>
> I wrote something like AIML (google it) that would take:
>
> 'look-verb %1 <- look %1 (90%)
> 'left-dir <- left (90%)
> 'right-dir <- right (90%)
> 'left-verb <- left (80%)
>
> I associate probabilities with these rules.
>
> When it parses, there are several possible good partses
> "look left" = 'look-verb 'left-dir (90% x 90% = 81%)
> "look left" = 'look-verb 'left-verb (90% x 80% = 72%)
>
> I then send this to another layer which verifies whether the sentnece makes
> sense, and returns a probability score.
> 'look-verb 'left-dir makes sense and returns 100%
> 'look-verb 'left-verb doesn't make sense, so returns 10%
>
> I multiply the probability scores together to determine which meaning of
> the
> sentence is used.
>
> You can play with it in my game, or using my game engine,.
>
> _______________________________________________
> MUD-Dev2 mailing list
> MUD-Dev2 at mud-dev.com
> http://my.binhost.com/lists/listinfo/mud-dev2
>



-- 
~~ Microsoft help desk says: reply hazy, ask again later. ~~



More information about the mud-dev2-archive mailing list