我无法将wordnet加载到R.我使用R x64 2.14.1.我安装了包wordnet,然后我尝试加载包.
> library(wordnet)
Warning message:
In initDict() :
cannot find WordNet 'dict' directory: please set the environment variable WNHOME to its parent
Run Code Online (Sandbox Code Playgroud)
怎么了?如何以及如何设置目录WNHOME.
您需要设置字典路径.见下面的例子.
setDict("/Users/kasper2304/Desktop/WordNet-3.0/dict")
Run Code Online (Sandbox Code Playgroud)
此外,我在使用R-studio时遇到了问题,所以我被迫使用JGR.
数据必须单独安装。如果你在Linux上,只需安装“wordnet”包(在Windows上,它会更手动)。
sudo apt-get install wordnet # For Debian-based distributions
Run Code Online (Sandbox Code Playgroud)