Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

I7 - A three nouns implementation

5 views
Skip to first unread message

JDC

unread,
May 11, 2006, 7:11:19 AM5/11/06
to
If anyone is still interested in implementing three nouns in I7, I
think I have a relatively clean way to do this. The following should
probably have better check rules, etc., but anyway:

<code>

"The Third Noun, Take Two"

The Sewer is a room. Harry Lime is a person in the Sewer. Harry carries
information.

The player carries a gun and a typewriter.

The third noun is a thing which varies.

Understand "get [something] [text]" as extorting it from. Extorting it
from is an action applying to one thing and one topic.

Blank is a thing.

Before extorting:
let temp be the noun;
change the third noun to blank;
if the topic understood includes "from [person]", change the second
noun to the noun;
if the topic understood includes "with [thing]", change the third noun
to the noun;
change the noun to temp.

Check extorting:
if the third noun is blank and the second noun is a thing, try
removing the noun from the second noun instead;
if the third noun is blank, try taking the noun instead;
if the second noun is not a thing, say "I didn't understand from whom
you want to get [the noun]." instead.

Carry out extorting:
Say "You'll need to find another way to get [the noun] from [the
second noun]."

Instead of extorting information from when the second noun is Harry and
the third noun is the gun:
say "You force Harry to reveal his secret.";
end the game in victory.

Instead of extorting information from when the second noun is Harry and
the third noun is the typewriter:
say "You type away while Harry escapes.";
end the game saying "You should have learned touch-typing."

Test loss with "get information from harry with typewriter ".

Test win with "get information from harry with gun".

</code>

-JDC

Erik Wennstrom

unread,
May 16, 2006, 2:41:03 PM5/16/06
to
JDC wrote:
> If anyone is still interested in implementing three nouns in I7, I
> think I have a relatively clean way to do this. The following should
> probably have better check rules, etc., but anyway:
>
[snip]

Ooh, this is very nice. It allows you to take advantage of the rest of
the parser's capabilities. I was worried that I would be stuck doing
all the interpreting myself, but the fact that you can talk about
whether a bit of text "includes" a description of a thing is very
useful. Maybe my dream isn't dead.

Thanks for taking me seriously, and for being very helpful.

Erik

JDC

unread,
May 16, 2006, 7:31:20 PM5/16/06
to
Thanks. The fact that the match to a token after an "include" test is
stored in "noun" does't seem to be in the documentation (or at least I
didn't find it there; I discovered this as the explanation to what I
thought was otherwise strange behaviour).

One wekness to this is that you seem to only be able to use one token
at a time, so I'm not sure how you would enforce ordering of the
phrases (like "put the ball in the box on the table") or recognize
extraneous text. Also I found problems if I tried to use "[text]" in an
"include" test. You might be able to improve this using "cut the
matched text"; I was having trouble with this before because of a
compiler bug (I haven't looked to see if this has been fixed yet).

-JDC

Erik Wennstrom

unread,
May 16, 2006, 10:11:12 PM5/16/06
to

I think that commands like "put the ball in the box on the table" are of
a different caliber. It's not so much a command with three objects as
it is a command with two ocjects, one of which is described in terms of
its relation to another object. So there are technically three nouns in
the sentence, but there are only two objects that the command has to
deal with. Dealing with "the box on the table" is a job of figuring out
which box. Why does this distinction matter? Adding this sort of
functionality needs to be managed on the level of recognizing noun
phrases, and not at the level of recognizing predicate phrases (commands).

A friend and I were working on a never-to-be-finished IF dream engine
product, and the one success we had with it was in creating a very
robust and complex noun phrase parser that could handle this sort of
problem. Objects had more complex positioning and size than they do in
most engines, which was a headache, but it allowed us to generate
spacial relationship information on the fly. Thus our parser was able
to recognize commands like "look at the table under the chandelier in
the room with the green sofa". It was robust because it could also
recognize commands like "look at the mug on the table with the blue
handle". Of course, this created the potential for some odd
disambiguation problems, but nothing worse than actual conversation in
real English might cause.

Ah, dreams.

Erik

JDC

unread,
May 17, 2006, 5:42:55 AM5/17/06
to

Erik Wennstrom wrote:

> I think that commands like "put the ball in the box on the table" are of
> a different caliber. It's not so much a command with three objects as
> it is a command with two ocjects, one of which is described in terms of
> its relation to another object. So there are technically three nouns in
> the sentence, but there are only two objects that the command has to
> deal with. Dealing with "the box on the table" is a job of figuring out
> which box. Why does this distinction matter? Adding this sort of
> functionality needs to be managed on the level of recognizing noun
> phrases, and not at the level of recognizing predicate phrases (commands).

True, true (I should have looked back at the original thread for a
better example). My main point was that I don't see a way of finding
the order of the three nouns, but for the example I used or something
like "write something on the paper with the pen" this shouldn't matter
(glossing over the possibility that there is a piece of paper called
the "paper with the pen", or a pen called "the pen on the paper"...).

-JDC

Erik Wennstrom

unread,
May 17, 2006, 11:29:29 AM5/17/06
to

I'm not sure the order _can_ matter in the standard English grammar.
English takes at most two objects of a predicate, the direct and
indirect objects. And if it does take those two, then the indirect
object must come first. If there are more modifications to the
predicate, then they must have prepositions with them, identifying what
their purpose is. Maybe I'm overlooking something.

Erik

0 new messages