Skip to content
Prev 247446 / 398503 Next

Getting Synonyms using wordnet

Hi All,

I am trying to use the synonyms function of wordnet. If I try for example

synonyms("happy"), it returns character(0). 

But if i start up the program wordnet, "happy" is part of the database.

And if I try for example:

synonyms("company") it returns:

c(\"caller\", \"company\")"                                    
[2] "c(\"company\", \"companionship\", \"fellowship\", \"society\")"
[3] "c(\"company\", \"troupe\")"                                    
[4] "c(\"party\", \"company\")"                                     
[5] "c(\"ship's company\", \"company\")"                            
[6] "company"     

Instead of (like the example in the pdf file of the wordnet package):

R> synonyms("company")
[1] "caller" "companionship" "company" "fellowship"
[5] "party" "ship's company" "society" "troupe"

Any suggestions?