Frage

I'm looking for an API or Ruby Gem that can do two things. The first is look up each word and see if it is a noun or not. The second thing I want to be able to do is look up adjectives (and maybe nouns) and find the word that is most identical to it. What is the best way to do this?

War es hilfreich?

Lösung

I don't know about Ruby, but to determine the part of speech of a word (like whether it's a noun) you need what's called a "part of speech tagger". For the second part, it sounds like WordNet will help you. WordNet is a database of English words (you didn't say what language you're interested in) with relationships like "similar in meaning", "more specific" (like "cat" is more specific than "animal"), "opposite in meaning", etc.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top