Reputation: 5553
I have been trying to install the "OpenNLP" packages instructed by link of. However, I got the error messages shown as following
Upvotes: 3
Views: 2725
Reputation: 1129
These steps worked for me (running R version 3.3.1 on RStudio 1.0.136 for Windows 10):
1) install.packages("openNLP")
2) install.packages("openNLPmodels.en", repos = "http://datacube.wu.ac.at")
At this point three warnings were displayed in the console saying "Unable to access index for repository" but eventually the package was downloaded and installed.
3) Select both packages on the package list
Upvotes: 2
Reputation: 71
Provided that you want to the install pre-trained models for English in openNLP.models.en package and not the openNLP itself (they come separate), you need to provide the full path to the file as the first argument and then repos=NULL. The version below worked for me:
install.packages("http://datacube.wu.ac.at/src/contrib/openNLPmodels.en_1.5-1.tar.gz",
repos=NULL, type="source")
openNLP.models.en is needed for openNLP to run annotators. You can download separate models and point to them in the functions itself, like below:
Maxent_Sent_Token_Annotator(language = "en", probs = FALSE, model = "models/en-sent.bin")
You have to have them in your working directory under "models"
However entity annotator never worked for me this way:
Maxent_Entity_Annotator(language = "en", kind = "person",
probs = FALSE,model = model = "models/en-ner-person.bin")
I got a java error saying that the model was not found.
I had to install the openNLP.models.en package.
Upvotes: 2
Reputation: 2136
It is available directly from CRAN (at least for Mac):
install.packages("openNLP")
Upvotes: -2