Here’s a tricky little problem. I have a room with several throw-rugs, one of which is important; the others are by way of creating a little less obvious scenario. The throwrugs object is a Fixture, and has as its vocabulary (or rather, as the item in its vocabulary that’s relevant at the moment) only the word ‘rugs’, not ‘rug’ singular. There is also an individual rug, the important one, that is initially hidden, but I set isHidden to nil on it when the throwrugs are examined. This object has only the word ‘rug’ in its vocabulary, not ‘rugs’.
Okay, that’s the setup. Here’s the problem output:
>x rugs
The throw-rugs are a haphazard lot. Most of them lie flat, but one, a russet-colored monstrosity with a lumpy macramé design that might possibly be a lion, is rather rucked up.
>take rugs
In picking up the rug, you discover that there’s a hole in the floor beneath it — a gap between two of the floorboards. The throw-rugs are fixed in place.
Arrgh! The parser is matching ‘rugs’ against both the individual rug and the throwrugs object. The docs suggest that matchPhrases can be used to correct this kind of misunderstanding, so I tried that on the individual rug:
matchPhrases = ['lion rug', 'rug', 'lumpy rug', 'macrame lion', 'macrame lion rug', 'russet rug']
This should create a situation in which only ‘rug’ should be matched, not ‘rugs’, but it doesn’t work. I still get the output shown above.
I had a look at how the Command object is defined, hoping I could use a Doer to sort this out, but I don’t see a property of Command that lists the single word tokens in the input. There ought to be such a thing somewhere, but I don’t know where it is.
Suggestions would be welcome!