I am working on a
text adventure engine, and there are little grammar things that come up all the time, where having some sort of english dictionary with some metadata would be really handy. For instance say a user creates some objects: "sword, apple, heirloom"
During the game I want to output things like:
- "There is a sword here" (a if it starts with a consonant)
- "There is an apple here" (an if it starts with a vowel)
- "There is an heirloom here" (well, sometimes!)
To get the a/an correct, I either need to encode the bizarre rules of english, or if I had a lookup table of all nouns and their appropriate article, I could do it that way.
Anyone know of data files like this? Or maybe some C/C++ grammar libraries?