Is there a Ruby library out there that can give me the possible grammatical variations for a word?
For example, take the word "engineer". I want to get back: "engineering" as a possible variation.
Is there a Ruby library out there that can give me the possible grammatical variations for a word?
For example, take the word "engineer". I want to get back: "engineering" as a possible variation.
You may want the derivationally related forms from WordNet. There are multiple WordNet APIs that can help you achieve that (in Python, Java and Perl ... I don't know about other languages).
What you are actually searching for are inflections of words. English happens to be a pretty notorious natural language for systematically inferring inflections. The derivationally related forms in WordNet are not going to be exhaustive. I think you are better off looking at digital (online or offline) English dictionaries, and extracting the inflections from the gloss. The semi-structured nature of dictionary glosses will make this quite simple. For example, you can look at the definition of 'engineer' at the Free Online Dictionary.
You may also want to try AGID on Kevin's Word List Page. I have never used it myself (because I ended up using a dictionary as explained above), but it seems to be doing what you want.
Finally, as far as a Ruby library is concerned, I would recommend the Linguistics project. I think what you want is in their Conjugation module. I had stopped visiting their page a while ago because the project appeared to be dormant. But it seems those guys have picked it up again.