intfiction.org

The Interactive Fiction Community Forum
It is currently Tue Aug 14, 2018 5:42 am

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 11 posts ]  Go to page Previous  1, 2
Author Message
PostPosted: Sat Jul 07, 2018 12:41 am 
Offline

Joined: Tue Mar 09, 2010 2:34 pm
Posts: 5319
Location: Burlington, VT
The command isn't parsed as well as we'd like, unfortunately! If you answer the question it'll still say "I only understood you as far as wanting to put the green tin can in the box."

I think what's going on here is that in both cases the parser hits "tin can" and tries to figure out what it might mean before processing the rest of the command. In the original example, there's a somewhat obscure algorithm that decides that we're more likely to mean the green tin can than the blue tin can. (The parser usually prefers things directly in the room to things on supporters or in containers.) Then, having picked the green tin can, it processes as much of the rest of the command as it can--but the grammar line it's working on is "put [something] in [something]," and that only fits "put tin can in box." Since there are leftover words in the command, it gives you the "I only understood you as far as..." error.

In the second example, it tries to process "tin can" again--but now it's unable to choose a can for itself, since there are two cans directly in the room. So it asks a disambiguation question. (The disambiguation process is called directly from the internal routine that tries to figure out what thing matches a string of words at a given part of the grammar line.) But the disambiguation isn't restricted to the things directly in the room--when it's actively asking a disambiguation question, it lists every noun that the words in question could refer too. So it asks about all three cans.

But then, when it's got its answer, it still has to process the rest of the command... and it still uses up the grammar line and has words left over in the command. So you get the "only understood you as far as..." error again. (In fact, what the disambiguation does is insert the answer you give into the original command and process it again, so the result of answering "green" to the disambiguation question is basically what you'd get if you typed "put green tin can in box on garbage heap"... or it might be "put tin can green in box on garbage heap," I'm not sure.)

...if the terminology I'm using is unclear, btw, "grammar lines" are those Understand statements.


Top
 Profile Send private message  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ]  Go to page Previous  1, 2

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 12 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group