Parsing nominative pronouns

So, current work-in-progress includes a command that refers to a person. That command is in the form (fake example for secrecy reasons) SUSPECT THAT/– (person) USED (weapon), as in SUSPECT COLONEL MUSTARD USED THE LEAD PIPE. This is paired with a second command, eg SUSPECT THAT COLONEL MUSTARD WAS IN THE PARLOR.

Now, this works, except: I7’s pronoun parsing only includes accusative pronouns. This means that if you do SUSPECT COLONEL MUSTARD USED THE LEAD PIPE and then SUSPECT HE WAS IN THE PARLOR, you get the rather unhelpful “that noun did not make sense in this context” message (as this is also another fun edge case of I7 parsing, a verb that targets unseen things). SUSPECT HIM WAS IN THE PARLOR, of course, works.

I strongly suspect that fixing this is as simple as The understand token he translates into i6 as (some i6 token name), but I’m failing to find the appropriate tokens looking through the i6 designer’s manual. Any ideas?

Also, for bonus points, is there a way to do this so the nominative is only accepted in this specific set of commands, and not generally?

2 Likes

Unfortunately, pronoun-handling is baked quite deeply into the I6 of the parser, so there’s no good I7 way to fix this. It’ll require some I6 inclusions and replacements.

1 Like

This is hacky, but after a successful suspecting action, could you set a person that varies to the noun, and then have a grammar line like “understand “he/she” as “[variable name]” when suspecting”? I am away from the IDE so can’t test, and again, it’s hacky, but figured it might be worth tossing out the idea depending on your appetite for I6 wrangling!

1 Like

Oh, there’s actually a relatively simple pure i7 solution, although it may have unintended consequences, so I’d love to have those pointed out to me now before I introduce bugs for the sake of an edge-case parsing nicety.

After reading a command:
    if the player's command includes "he":
        replace the matched text with "him";
    if the player's command includes "she":
        replace the matched text with "her".
2 Likes

> EXAMINE SHEEP
You can’t see any herep here!

But if you add some checks to make sure you’re replacing whole words instead of parts of words, that should be fine. I can’t think of any common situations where HE and SHE should parse differently from HIM and HER. (Basically just conversation topics like TELL ALICE THAT SHE IS A FOOL would need extra synonyms.)

3 Likes

if the player’s command includes matches word-wise, AFAIK. This, in fact, works:

You can also see a sheep here. 

>x sheep
Fluffy!

>x she
Fluffy!

>x her
Fluffy!
1 Like

Oops, you’re right—I mixed up the kinds of value involved here! When comparing a snippet against a topic, it acts on words, not on characters.

So this should be safe, yes!

If you just want to link to the meaning of existing pronouns, the amount of I6 involved is trivial:

To decide which thing is he:
	(- (PronounValue('him')) -).

Understand "he" as a thing when he is the item described.

To decide which thing is she:
	(- (PronounValue('her')) -).

Understand "she" as a thing when she is the item described.
4 Likes