[MUD-Dev] string parsing

Jon A. Lambert jlsysinc at ix.netcom.com
Wed Nov 12 23:26:21 CET 1997


On 12 Nov 97 at 19:09, coder at ibm.net wrote:
> Subject:       [MUD-Dev] string parsing
> On 12/11/97 at 08:14 AM, cg at ami-cg.GraySage.Edmonton.AB.CA (Chris Gray)
> said: >[JC:]
> 
> >:Okay, lets reduce this to a diagram:
> >:
> >:
> >:		   Far side of the street
> >:   ----------------------<wall>------------------------------------
> >:
> >:			 <Boffo>
> >:
> >:		 HHHHHHHHHH WWWWWWWWWWW
> >:	<Bubba>  H horses H WW wagon WW  <Bluto>
> >:		 HHHHHHHHHH WWWWWWWWWWW
> >:
> >:			  <you> 
> 
> >Boy, do I feel dumb - I truly hadn't noticed the second meaning of
> >'behind' here, and only clicked on it while reading your reply. I guess
> >I'd better not take a side job as a parser for a MUD!
> 
There would seen to be two distinct cases here (or maybe there is 
more gray area).

1) The object being described has a direct relationship or attachment
to another object.  That is the object only exists in a position 
because of the presence of another object.

Examples: Man on horse, Sword wielded by Bubba, Book on table, 
Bookmark inside book, etc.

2) The object being described has only a casual
positional relationship to other objects in the viewing area. 

Your wagon example appears to be of this type.

> Don't worry, I'm still trying to figure out a system that will handle
> multiple recursion of prepositional spaces.  Consider the worse case of a
> man sitting backwards on a horse which it standing sideways on a wagon
> which is parked facing the rear of a barge which is coming from the rear
> of a much larger vessel, which is in turn at the front of a fleet of such
> vessels.  Now drop the proverbial Bubba in there and get the text right.
>

The man, the horse and the wagon and the barge could be described 
using case 1 above since they are all "attached" to each other.  The 
relationship of the towing ship to the fleet and other 
possible landmarks appears to be of case 2.  Describing the 
relationship of the wagon within the barge is a somewhat murky case 
though since the barge is a object of sufficient size that case 2 
may be applied also.

> A lot of it appears to be able to be handled be looking for other objects
> of comparable and larger (within a scoping) magnitude within a reasonable
> distance.  Thus you refer to a man as being in front of a wall, despite
> the fact that he is also on the far side of a small pebble.  However, the
> same man is not in front of a massive mountain on the horizon, but is at
> the head of the wagon on the road, as that is the next available suitably
> sized relational object...
> 
> This revents placing the flea on the horse's nose in the first example as
> relative to the fleet.  The next ranged comparable object is the horse.
>

Assuming the observer is your average human, would it be appropriate 
to define a minimum-size and maximum-size thresholds for scenic 
descriptives? 

A thought for a general scene (that is when one first walks into a 
room or area).  Start a description with the closest objects within 
the vision range that meet the mininum size threshold.  Describe them 
in relation to objects that meet case 1, above.  If the larger object 
in a case 1 relationship exceeds a maximum size threshold (ie. the 
barge) describe it using case 2.  If there is no case 1 relationship, 
a case 2 description is used using the nearest and next largest 
object.  As objects are described from closer to farther away the the 
minimum-size becomes a function of range.  That way 5 people directly 
in front of you would be described but a person 60 yards away would 
not?  Perhaps there is a maximum threshold of objects that could be 
included in the description?  There are only so many objects a human 
will notice at once when coming upon a scene.  For example, imagine 
one stumbling into the Katmandu town square.  There may be so many 
persons, buildings objects before them that the surrounding 
mountians, immense and near as they are, would not even be noticed.

--
Jon A. Lambert

If I'd known it was harmless, I would have killed it myself.



More information about the mud-dev-archive mailing list