[R] Loading wordnet in R

Uwe Ligges ligges at statistik.tu-dortmund.de
Thu Jan 20 13:58:51 CET 2011

On 18.01.2011 07:42, fayazvf wrote:
> I ve installed wordnet 2.1  and R 2.11.0 on windows 7.
> Whenver i try to load wordnet in R, i get an error
> initDict()
> cannot find wordnet 'dict' directory, Please set the WNHOME variable to its
> parent.
> I have tried setting WNHOME to "C:\Program Files
> (x86)\WordNet\2.1\dict","C:\\Program Files
> (x86)\\WordNet\\2.1\\dict","C:\\\\Program Files
> (x86)\\\\WordNet\\\\2.1\\\\dict".
> None of them helps.
> Please help me out.
> Thanks in advance.

1. WNHOME is supposed to be the environment variable set in your 
opearting system (not an R variable).
2. You should set it to the parent of "dict" rather than "dict".

If you want to do that from R, use

Sys.setenv(WNHOME = "C:\\Program Files (x86)\\WordNet\\2.1")

Uwe Ligges

More information about the R-help mailing list