Distinguishing HER-personal from HER-possessive

Once thing remains to be fixed before I release 6.12.5 of the Standard Library. This is an annoying problem of the Library being unable to clearly distinguish between HER being used as a personal pronoun versus a possessive pronoun. For instance,

Joe gives the book to her.


Mary picks up her book.

This has been going on for about two years and I’ve yet to conclusively and completely fix this. Does anyone have any fresh thoughts? Please see https://gitlab.com/DavidGriffith/inform6lib/-/issues/104

1 Like

Some clarification: If you do SHOW HER WATCH, the game will respond with a useless disambiguation that is not displayed when SHOW HIM WATCH is done. Like this:

>show her watch
(to the witch)
That's it!  Where did you find it?



>show him watch
That's it!  Where did you find it?


my take is checking first if there’s two female actors (her-personal) and if there’s only one fem actor, suppress the disambiguity, then the same for the objects owned by fem actors in scope (her-possessive).

but, I ask, how should behave the parser when there’s multiple fem actors in scope, everyone having a personal single item(s), also in scope ? let’s say, there’s Anne and Barbara, and both own Anne’s watch and Barbara’s watch, respectively. How should the parser handle this limit case ?

Best regards from Italy,
dott. Piergiorgio.

I’ll investigate your suggestion tonight.

For your question, the correct response would be asking which watch is intended.

I think it depends on the parser, and this is just my opinion, instead of knowing how your parser works.

can be parsed as SHOW HIM the WATCH, which is an uncommon sentence construct in IF, albeit still legal. Commonly, it would be SHOW THE WATCH TO HIM.

is implied to be SHOW the WATCH [TO PERSON], which absent a person will either assume the present actor (the witch) or if more than one will ask:

Clearing the ambiguity one way or the other means that you want to assign priority in interpretation, and that means you want to modify the parser to your liking.

Edit: clarified ambiguities.

Looks to me like “show her watch” matches the pattern “* creature held” perfectly, while it doesn’t match the entire pattern “* held ‘to’ creature”, leading to the parser having to guess the creature-part in the latter case. Shouldn’t the first case get a higher score then?

I traced through the library to where it looks through the LanguageDescriptors table for a hit. It’s near the top of Descriptors() in parser.h. I’ve added some test code there to detect a collision between an entry in LanguageDescriptors (which contains possessive pronouns) and LanguagePronouns (which contains only personal pronouns: it, him, her, them and nothing else). Once this is detected, I can do a break out of this and the code seems to work, but it seems very wrong because I’m not explicitly telling the library to process her as a personal pronoun and am having trouble identifying where that is done.