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?

有帮助吗?

解决方案

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top