Newsgroups: rec.arts.int-fiction
Path: gmd.de!xlink.net!news.dfn.de!news.belwue.de!zib-berlin.de!netmbx.de!Germany.EU.net!EU.net!howland.reston.ans.net!vixen.cso.uiuc.edu!sdd.hp.com!col.hp.com!fc.hp.com!cunniff
From: cunniff@fc.hp.com (Ross Cunniff)
Subject: Re: Parsers
Sender: news@fc.hp.com (news daemon)
Message-ID: <CMCu2u.AGD@fc.hp.com>
Date: Tue, 8 Mar 1994 16:35:18 GMT
References: <CM2o4I.AB3@world.std.com> <ZP3qic3w165w@alcyone.darkside.com> <jdrukman.763068008@dlsun87>
Nntp-Posting-Host: hpross.fc.hp.com
Organization: Hewlett-Packard Fort Collins Site
X-Newsreader: TIN [version 1.2 PL1.4]
Lines: 81

>on Drukman (jdrukman%dlsun87@oracle.com) wrote:
> max@alcyone.darkside.com (Erik Max Francis) writes:
> >This is something that I've wondered about on and off for some time 
> >now.  Should the cursor change when the computer is asking you a 
> >question (to confirm, or to clarify)?  I think it should:

> >    >unlock the door
> >    Which door do you mean, the big door or the little door?

> >    :the big one
> >    Unlocked.

> i don't like this model because a good parser should let you change
> your mind.

> 	>unlock door
> 	which door do you mean, the big one or the little one?

> 	>east
> 	(new room description)

> the other way doesn't give you an out.

Well, I hate to boast, but ADL handles this correctly; here's an example:

	Museum entrance You are standing outside the north entrance of a
	large brick building.  Inscribed above the doorway, appear the
	text:  'AARDVARK'S MUSEUM -- GATEWAY TO ADVENTURELAND'.
	There is a coil of rope here.
	There is a shovel here.
	There is a carbide-flame lamp here.
	There is a copy of a newspaper here.
	> take
	You must tell me what to take.
	> south
	Museum rotunda
	You are in a large rotunda of an old museum.  Doors lead to the
	north, south, east, and west, and a narrow stairway in the
	north-east corner of the room leads down.
	There is a ball-point pen here.
	There is a slip of paper here.
	> north
	Museum entrance
	You can see:
	a rope
	a shovel
	a lamp
	a newspaper
	> take
	You must tell me what to take.
	> rope
  	  rope - taken

Note that the player initially decided not to take anything, and leave
the room.  Later, they do take the rope.  The mechanism for this
involves a partial parsing of the sentence, and recognizing that no verb
is present.  If no verb is present, then the system verb NOVERB is used
instead.  NOVERB knows, in this case, that the previous verb was 'take',
so it uses 'take' as the verb.  The exact same thing can be done in
reverse; e.g.:

	Museum entrance You are standing outside the north entrance of a
	large brick building.  Inscribed above the doorway, appear the
	text:  'AARDVARK'S MUSEUM -- GATEWAY TO ADVENTURELAND'.
	There is a coil of rope here.
	There is a shovel here.
	There is a carbide-flame lamp here.
	There is a copy of a newspaper here.
	> rope
	What do you want to do with the rope?
	> take
	  rope - taken

It's all mostly built into ADL, with a little help in the standard.adl
file.  Sigh.  Someday I'll get around to improving ADL to make it more
competitive with TADS...  Too many projects, too little time...

Ross Cunniff
Hewlett-Packard Graphics Software Lab
cunniff@fc.hp.com
Memo to myself: do the dumb things I gotta do.  Touch the puppet head.
