1997Q2/
<!-- MHonArc v2.4.4 -->
<!--X-Subject: Re: [MUD&#45;Dev]  Re: Prepositions and parsing -->
<!--X-From-R13: pynjerapNphc.uc.pbz -->
<!--X-Date: from fabius.globecomm.net [207.51.48.6] by mx3.ibm.net id 863198068.84126&#45;1 Fri May  9 17:14:28 1997 -->
<!--X-Message-Id: 199705091718.KAA24919#xsvr3,cup.hp.com -->
<!--X-Content-Type: text/plain -->
<!--X-Reference: 01IIL0PA7AVM99FU60#nova,wright.edu -->
<!--X-Head-End-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>MUD-Dev message, Re: [MUD-Dev]  Re: Prepositions and parsing</title>
<!-- meta name="robots" content="noindex,nofollow" -->
<link rev="made" href="mailto:clawrenc#cup,hp.com">
</head>
<body background="/backgrounds/paperback.gif" bgcolor="#ffffff"
      text="#000000" link="#0000FF" alink="#FF0000" vlink="#006000">

  <font size="+4" color="#804040">
    <strong><em>MUD-Dev<br>mailing list archive</em></strong>
  </font>
      
<br>
[&nbsp;<a href="../">Other Periods</a>
&nbsp;|&nbsp;<a href="../../">Other mailing lists</a>
&nbsp;|&nbsp;<a href="/search.php3">Search</a>
&nbsp;]
<br clear=all><hr>
<!--X-Body-Begin-->
<!--X-User-Header-->
<!--X-User-Header-End-->
<!--X-TopPNI-->

Date:&nbsp;
[&nbsp;<a href="msg00344.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00346.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Thread:&nbsp;
[&nbsp;<a href="msg00328.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00325.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Index:&nbsp;
[&nbsp;<A HREF="author.html#00345">Author</A>
&nbsp;|&nbsp;<A HREF="#00345">Date</A>
&nbsp;|&nbsp;<A HREF="thread.html#00345">Thread</A>
&nbsp;]

<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<H1>Re: [MUD-Dev]  Re: Prepositions and parsing</H1>
<HR>
<!--X-Subject-Header-End-->
<!--X-Head-of-Message-->
<UL>
<LI><em>To</em>: <A HREF="mailto:mud-dev#null,net">mud-dev#null,net</A></LI>
<LI><em>Subject</em>: Re: [MUD-Dev]  Re: Prepositions and parsing</LI>
<LI><em>From</em>: <A HREF="mailto:clawrenc#cup,hp.com">clawrenc#cup,hp.com</A></LI>
<LI><em>Date</em>: Thu, 08 May 97 09:59:21 -0700</LI>
<LI><em>Reply-to</em>: <A HREF="mailto:claw#null,net">claw#null,net</A></LI>
</UL>
<!--X-Head-of-Message-End-->
<!--X-Head-Body-Sep-Begin-->
<HR>
<!--X-Head-Body-Sep-End-->
<!--X-Body-of-Message-->
<PRE>
In &lt;<A HREF="msg00328.html">01IIL0PA7AVM99FU60#nova,wright.edu</A>&gt;, on 05/07/97 
   at 07:59 PM, S001GMU#nova,wright.edu said:

&gt;Date: Tue, 06 May 1997 20:45:19 +0000 (PST8PDT)
&gt;From: clawrenc#cup,hp.com

&gt;&gt;What with the recent discussion of parsers and methods of parsing
&gt;&gt;commands, and old entry from my to-do list popped up:
&gt;&gt;
&gt;&gt;  Support for prepositions such as "under", "on top of", "behind" etc.
&gt;&gt;
&gt;&gt;Anyone got any ideas for supporting/parsing a command like:
&gt;&gt;
&gt;&gt;  hide under the desk
&gt;&gt;
&gt;&gt;or
&gt;&gt;
&gt;&gt;  put the rock under the rug behind the pillar

&gt;'On top of' and 'under' are pretty easy to handle.

How about, "beside", "behind", "above", "between", "near", "close to",
"over" etc?  I'm specifically looking for intelligent handling that
will allow the following sequence:

  &gt; put the book on the table
  OK.
  &gt; put the paper under the book
  OK.
  &gt; l
  There is a table here with a book on it.
  &gt; get book
  OK.
  &gt; l
  There is a table here with a paper on it.

or, 
  
  You are flying.
  &gt; hover over bubba
  OK.
  &gt; l d
  Looking straight down you can see Bubba.

and:

  &gt; l
  There is a rock and a hard place here.
  &gt; put XXX between rock and hard place.

I do see that some prepositions are fairly easy to handle as special
cases, but I have a very strong feeling that that's just a gross over
simplification that's going to wind you in trouble later when you try
and handle the rest.  I'm trying to think of a general parser model
which properly handles prepositions.

&gt;  What does 'Behind the pillar' mean?  Is behind relative to the room
&gt;or to the player?  

That was deliberately ambiguous with the ambiguity both on placement
"behind") and selection ("put the rock under (the rug behind the
pillar)" vs "(put the rock under the rug) behind the pillar").  

&gt;The former is easy, the later not so easy, but
&gt;much more realistic. 

My intention would be to always default to the player's POV as the
frame of reference.  Obviously there are cases where that POV is
modified by an external circumstance, usually due to large
spaces/small spaces being juxtaposed, or a directionality of the
object in question (a car for instance has a front and a back, which
as prepositions can override the player's POV of "in front of",
"behind" etc).
 
it is at this exact point that I think the special casing mentioned
above gets really ugly.  Imagine the case of a huge spaceship lieing
upside down.  "Under" and "above" can be argued to be ambiguous terms.

&gt;If you wanted it to be relative to the player
&gt;you would have to know where the player was relative to the object.  

Yup.  Remember -- I've always intended to do a coordinate system.

&gt;'Spose you could also have it be  relative to the object in
&gt;question... a TV has a definite front and back... when you are
&gt;interested in watching it.  If it's just collecting dust in the
&gt;attic, though, then I don't spose it'd make a difference what
&gt;direction it was facing.. :)

Bingo.

&gt;You could have each object type have the possibility of a defined
&gt;orientation. The parser could then look for that first, and failing
&gt;that, go by the  character's position.

Good idea.  I like this.  While an object defines its own size and
shape, it can also surround itself with a field which defines
comparitive placement...  This most all of the placement preopositions
then devolve to picking the approriate offset from the object's field.

  ie:
 
  Object X.

 "Above" is defined as vector (0, 0, -1) from ObjectX's origin.
 "Beside is defined as vestor (1, 0, 0) from ObjectX's origin.
  etc.

&gt;Once you have the orientation of the object in question, you could
&gt;then just have some algorithm that determines what parts of the
&gt;room's coordinate space belong to what preposition.  An easy alg I
&gt;can think of would be to treat  the object as a rectangular solid
&gt;with each face of the solid determining the near boundry of the
&gt;coordinate space belonging to a given preposition (wouldn't work too
&gt;well with oddly shaped objects, though).  The far boundry could be
&gt;determined based on the size of the object in question... beside a
&gt;building and beside an apple are two entirely different things.

Hurm...

-- 
J C Lawrence                           Internet: claw#null,net
(Contractor)                           Internet: coder#ibm,net
---------------(*)               Internet: clawrenc#cup,hp.com
...Honorary Member Clan McFUD -- Teamer's Avenging Monolith...


</PRE>

<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<HR>
<!--X-Follow-Ups-End-->
<!--X-References-->
<UL><LI><STRONG>References</STRONG>:
<UL>
<LI><STRONG><A NAME="00328" HREF="msg00328.html">Re: Prepositions and parsing</A></STRONG>
<UL><LI><EM>From:</EM> S001GMU#nova,wright.edu</LI></UL></LI>
</UL></LI></UL>
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg00344.html">Re: [MUD-Dev]  Re: Client&lt;-&gt;mud compression protocol</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00346.html">Re: [MUD-Dev] (fwd) Re: Issues from the digests and Wout's list</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00328.html">Re: Prepositions and parsing</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00325.html">Comments on the DB layer</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00345"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00345"><STRONG>Thread</STRONG></A></LI>
</UL>
</LI>
</UL>

<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
<ul><li>Thread context:
<BLOCKQUOTE><UL>
<LI><STRONG>Re: [MUD-Dev] Re: Prepositions and parsing</STRONG>, <EM>(continued)</EM>
<ul compact>
<ul compact>
<ul compact>
<ul compact>
<LI><strong><A NAME="00473" HREF="msg00473.html">Re: [MUD-Dev] Re: Prepositions and parsing</A></strong>, 
clawrenc <a href="mailto:clawrenc#cup,hp.com">clawrenc#cup,hp.com</a>, Thu 15 May 1997, 00:34 GMT
</LI>
</ul>
<LI><strong><A NAME="00489" HREF="msg00489.html">Re: [MUD-Dev] Re: Prepositions and parsing</A></strong>, 
Nathan Yospe <a href="mailto:yospe#hawaii,edu">yospe#hawaii,edu</a>, Fri 16 May 1997, 05:41 GMT
<UL>
<LI><strong><A NAME="00509" HREF="msg00509.html">Re: [MUD-Dev] Re: Prepositions and parsing</A></strong>, 
clawrenc <a href="mailto:clawrenc#cup,hp.com">clawrenc#cup,hp.com</a>, Sat 17 May 1997, 00:59 GMT
</LI>
</UL>
</LI>
</ul>
</ul>
<LI><strong><A NAME="00328" HREF="msg00328.html">Re: Prepositions and parsing</A></strong>, 
S001GMU <a href="mailto:S001GMU#nova,wright.edu">S001GMU#nova,wright.edu</a>, Wed 07 May 1997, 20:36 GMT
<UL>
<LI><strong><A NAME="00345" HREF="msg00345.html">Re: [MUD-Dev]  Re: Prepositions and parsing</A></strong>, 
clawrenc <a href="mailto:clawrenc#cup,hp.com">clawrenc#cup,hp.com</a>, Sat 10 May 1997, 00:14 GMT
</LI>
</UL>
</LI>
</ul>
</LI>
<LI><strong><A NAME="00325" HREF="msg00325.html">Comments on the DB layer</A></strong>, 
clawrenc <a href="mailto:clawrenc#cup,hp.com">clawrenc#cup,hp.com</a>, Wed 07 May 1997, 07:43 GMT
<LI><strong><A NAME="00319" HREF="msg00319.html">Last sendmail test (we're up to 8.*)!</A></strong>, 
coder <a href="mailto:coder#ibm,net">coder#ibm,net</a>, Sun 04 May 1997, 08:37 GMT
<LI><strong><A NAME="00317" HREF="msg00317.html">Re: [MUD-Dev]	Re: Multi-threaded mudding (was a flamefest)</A></strong>, 
Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Sat 03 May 1997, 12:57 GMT
<LI><strong><A NAME="00314" HREF="msg00314.html">More sendmail tests...</A></strong>, 
coder <a href="mailto:coder#ibm,net">coder#ibm,net</a>, Sat 03 May 1997, 12:19 GMT
</UL></BLOCKQUOTE>

</ul>
<hr>
<center>
[&nbsp;<a href="../">Other Periods</a>
&nbsp;|&nbsp;<a href="../../">Other mailing lists</a>
&nbsp;|&nbsp;<a href="/search.php3">Search</a>
&nbsp;]
</center>
<hr>
</body>
</html>