I have trouble loading wordnet into R. I use R x64 2.14.1. I installed the package wordnet and then I tried to load the package.
> library(wordnet)
Warning message:
In initDict() :
cannot find WordNet 'dict' directory: please set the environment variable WNHOME to its parent
What is wrong? How and to what should I set the directory WNHOME.
I had this problem and solved it by downloading and installing wordnet from http://wordnetcode.princeton.edu/2.1/WordNet-2.1.exe and then rerunning
library(wordnet)
setDict("C:/Program Files (x86)/WordNet/2.1/dict")
This works fine. We need to set WNHOME to dict's parent directory which is ./WordNet/2.1 from R using Sys.setenv()
library(wordnet)
setDict("C:/Program Files (x86)/WordNet/2.1/dict")
Sys.setenv(WNHOME = "C:/Program Files (x86)/WordNet/2.1")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With