Seductive Shortcuts
Last week, I fixed a problem. After the fix, I stumbled on a note from a couple of years ago. It indicated that I had already thought this through, and that the problem wasn't actually a problem. And if that's true then my fix is wrong. Here is the issue; consider an explicit inference template like this:
>> if an animal eats then an animal is not hungry
if a animal eats then a animal is not hungry.
>> the dog eats
the dog eats. the dog is not hungry.
>> the cat eats tuna
the cat eats tuna.
The dog isn't hungry. Why isn't the cat not hungry?
One might have expected "the cat eats tuna" to satisfy the inference and cause Brainhat to declare that the cat is not hungry. Mechanically, the issue is that the two kinds of statements--"the dog eats" and "the cat eats tuna--are intransitive and transitive ideas, respectively. When it is time to consider them as candidates for an inference, Brainhat hashes their contents according to their formats. Intransitive ideas hash differently than transitive ideas. Ergo, the inference doesn't apply to both cases and some of the time the inference doesn't fire.
Here's how I fixed it in the past. This is a good fix, but it requires a little extra code in the form of an extra inference in the first line:
>> if an animal eats something then an animal eats.
if a animal eats thing then a animal eats.
>> if an animal eats then an animal is not hungry.
if a animal eats then a animal is not hungry.
>> the dog eats.
the dog eats. the dog is not hungry.
>> the cat eats tuna.
the cat eats tuna. the cat eats. the cat is not hungry.
Last week, I "fixed" the problem in another way, ignoring the difference between transitive and intransitive forms. That made "cat eats tuna" be just as good as "cat eats" when it came to exercising the inference. Here's an example with that "fix":
>> if animal eats then animal is happy
if animal eats then animal is happy.
>> dog eats
dog eats. dog is happy.
>> cat eats bird
cat eats bird. cat is happy.
So, what's the problem? I don't know! It works. However, I know it is wrong. It is a shortcut with potentially bad consquences. But, I can't come up with an example to demonstrate that it is wrong. Can you think of a case where the intransitive form of a verb like ("eat", "see", "know", etc.) isn't a more general case of the transitive verb? Please, let me know.
For now, I put things back as they were a week ago.
If you want to re-enable the (ambiguous) "fix", edit cc-patterns.txt in the data directory and swap the commented and uncommented rules in the grammar definition "hash3-2".