From an article I read that It is possible to find whether a word has attributes or not by using WordNet. For example the word size has attributes – big, small similarly the word quality has attributes: inferior, superior etc. Can anyone please tell me how to do it in java(java or R)? . Thanks in Advance.
2 Answers
I believe you can achieve much of what you want using Tyler Rinker's very useful qdap
package. More specifically, the synonyms
function.
require(qdap)
synonyms(c("size", "quality"))
$size.def_1
[1] "amount" "bigness" "bulk" "dimensions" "extent" "greatness" "hugeness"
[8] "immensity" "largeness" "magnitude" "mass" "measurement (s)" "proportions" "range"
[15] "vastness" "volume"
$size.def_2
[1] "diminutive" "little" "midget" "miniature" "pocket" "pygmy or pigmy" "small"
[8] "teensy-weensy" "teeny-weeny" "tiny" "wee"
$size.def_3
[1] "appraise" "assess" "evaluate" "eye up" "get (something) taped"
$quality.def_1
[1] "aspect" "attribute" "characteristic" "condition" "feature" "mark" "peculiarity"
[8] "property" "trait"
$quality.def_2
[1] "character" "constitution" "description" "essence" "kind" "make" "nature" "sort"
$quality.def_3
[1] "calibre" "distinction" "excellence" "grade" "merit" "position" "pre-eminence" "rank"
[9] "standing" "status" "superiority" "value" "worth"
$quality.def_4
[1] "aristocracy" "gentry" "nobility" "ruling class" "upper class"
Assign the synonyms to a list object and extract what you want.
attributes <- synonyms(c("size", "quality"))
Also, here is a related Stack Overflow question: Identifying near duplicate entries using synonyms in R
-
Thanks for the reply lawyeR...But my requirement is, for screen, it has to return 1, because it has some attributes like small, medium and for word "good" it has return 0, because this word doesn't has any properties. – Gokulram Oct 18 '14 at 10:21
-
2Can you explain more, using "size" and "quality" what you want? You don't want synonyms of those words, it appears. What do you mean by "attributes" and "properties"? – lawyeR Oct 18 '14 at 10:34
In Wordnet there are links between words (well, to be precise, between synsets). One of those possible links is the "attribute" link. So you can see here how the first meaning of the word size has two attribute links, one to the adjective large, and another to the adjective small:
To get this information with the Java API, you use the getAttributes() function of a noun synset. So first use search to get the noun synset for the first meaning of the word "size", then call getAttributes()
on it, and iterate through those. (The R wordnet API appears to be a wrapper around the java API, so it should be the same idea.)

- 27,837
- 13
- 117
- 217