[MUD-Dev] Text Parsing

Mik Clarke mikclrk at ibm.net
Sat May 29 20:36:44 CEST 1999


Albert wrote:

> Delurking :)
> ParsedCommand that looks like this:
>
> class ParsedCommand { public:
>         string verb;
>         string direct_object; // Noun being manipulated
>         string indirect_object; // Noun that receives the action
>         string direct_object_adj; // Adjectives describing direct object
>         string indirect_object_adj; // Adjectives describing the indirect object
>         bool IsNewClause;
> }
>
> Then say the player enter a command like: buy the biggest ball from the 3rd shopkeeper

Hmmm. At first glance you are missing a count paramter, which promptly
leeds to the need to recognize bth singular and plurar nouns:

> buy two knives from the shady dealer

Note the possible reverses though:

> give the shady dealer both knives
> give the shadow dealer two knives
> give two knives to the shady dealer

In the events I use for CthulhuMud I have the following for an event:

Actor - the person who is doing
Victim - the victim who is being done to
Observer - the one who is watching the action (I, may also be actor and/or victim)
primary object
secondary object
text (for say and the like)
count

Agruably this is to restrictive, as I should be able to attach counts to almost all of the fields -
the 300 green samurai attack the 75 black ninjas with thier razor sharp swords.

Mik




_______________________________________________
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