A little bit more on the disambiguation issue.
[rant=test program][code]
Test Chamber is a room.
Understand “her” as a thing when the item described is part of a woman (called W) and W is the antecedent of her.
To decide which thing is the antecedent of her:
(- LanguagePronouns–>9 -)
A nose is a kind of thing. A nose is part of every person.
[A head is a kind of thing. A head is part of every person.]
Alice and Darya are women in Test Chamber.
Alice carries a red pen.
[Darya carries a blue pen.]
[Alice wears a red hat.]
[Darya wears a blue hat.]
Test me with “x alice / x her nose / x her / x darya / x her nose / x her”.
[/code][/rant]
The parser deals with “x her” by performing two parsing passes.
The first pass looks for a match in “indefinite mode” with owner = the antecedent of “her”. This pass treats “her” as a possessive and looks for stuff that belongs to the woman. Unfortunately, the parser’s notion of ownership is solely based on containment. So, if a person is carrying or wearing an object, they own it. However, if the object is part of them, the parser doesn’t consider this to be ownership and fails to make a match. (You can read a lengthy message that I posted about this issue in the context of parsing “my arms” here.) So, in our example, pens are matched during this pass, but noses are not.
The second pass looks for a match in “definite mode”. This pass treats “her” as an object rather than a possessive and, in our example, matches both the woman and her nose. (The nose is matched because of the understand statement that we wrote.)
In the end, the woman edges out the nose and the pen in the parser’s scoring routine because she’s in the player’s location while the other objects aren’t.
So we have:
Case 1: woman with pen
indefinite matches: pen
definite matches: woman (best match), nose
The parser decides on woman and no parenthetical msg is printed.
Case 2: woman without pen
indefinite matches: nothing
definite matches: woman (best match), nose
The parser decides on woman and does print a parenthetical msg.
I’ve run some other tests (giving women various combos of component parts and carried possessions), and it seems that we only avoid the disambiguation msg for “x her” if exactly one of multiple matches is an indefinite match.
Conclusions:
- The one indefinite match case is special. Why?
- The parser’s notion of ownership should include parts of people.