maelle / geolocart

https://docs.ropensci.org/geolocart
2 stars 1 forks source link

Error on trying to load openNLP #9

Open sckott opened 8 years ago

sckott commented 8 years ago

I can install openNLP package, but I get error on load

library(openNLP)
#> JavaVM: requested Java version ((null)) not available. Using Java at "" instead.
#> JavaVM: Failed to load JVM: /bundle/Libraries/libserver.dylib
#> JavaVM FATAL: Failed to load the jvm library.
#> Error : .onLoad failed in loadNamespace() for 'openNLPdata', details:
#>   call: .jinit()
#>   error: JNI_GetCreatedJavaVMs returned -1
#> 
#> Error: package or namespace load failed for ‘openNLP’

@masalmon do you have a trick for getting this to work? I'm on a mac . im on java version "1.8.0_40"

juliasilge commented 8 years ago

I'm very interested in this because I haven't been able to get the openNLP or coreNLP R packages to work on my Mac.

maelle commented 8 years ago

I use windows but had an issue months ago and did not take notes which i now bitterly regret! I think i had to set JAVA_HOME or it was a path thing, as in http://stackoverflow.com/questions/17376939/problems-when-trying-to-load-a-package-in-r-due-to-rjava i will look at my work pc on monday where i had the rjava issue. Sorry!

cengel commented 8 years ago

I have the same issue. java version "1.8.0_60" Mac 10.11, R version 3.2.4 I also ran R CMD javareconf to no avail.

maelle commented 8 years ago

If this is a Mac-specific issue I cannot help (however it makes me even more convinced that ditching the OpenNLP dependency will be crucial). @sckott do you know any Mac user who can use openNLP?

sckott commented 8 years ago

@masalmon ill have another try again soon...

maelle commented 8 years ago

alternative to OpenNLP for named entity recognition -> https://github.com/masalmon/monkeylearn

sckott commented 7 years ago

@masalmon do you think we can switch out opennlp for something else? you mentioned monkeylearn above? or something else that doesn't have installation issues

maelle commented 7 years ago

True, I could revive this with (monkeylearn + opencage) and / or geoparser. Or with quanteda/spacyr. But it seems like this project would be more a doc or an use case than a package?

sckott commented 7 years ago

perhaps it wouldn't be a pkg, maybe we can explore as you say with monkeylearn/etc. and at least do a blog post or soemthing, and perhaps we learn that we need a pkg, or not

maelle commented 7 years ago

Ok, I'll try to look at that this month or next. Sorry I let it unattended for so long!

sckott commented 7 years ago

no rush, just thought i'd check back in on this because I saw this in my twitter feed https://twitter.com/SiobhanLeachman/status/806557225258913792

GBIF mining location data from texts

kensinzl commented 6 years ago

I also have done that one, I find a way I can fix this problem. Firstly, I give my environment setting.

  1. R -version WARNING: unknown option '-version' R version 3.3.3 (2017-03-06) -- "Another Canoe" Copyright (C) 2017 The R Foundation for Statistical Computing Platform: x86_64-apple-darwin13.4.0 (64-bit)

java -version java version "1.8.0_91" Java(TM) SE Runtime Environment (build 1.8.0_91-b14) Java HotSpot(TM) 64-Bit Server VM (build 25.91-b14, mixed mode)

  1. please install install.packages("rJava", type = "source") for R if you see the message that let you install one package and of course console will give you the link. https://support.apple.com/kb/DL1572?locale=en_US just download and install

  2. run the install.packages("rJava", type = "source") again

  3. run the install.packages("openNLP", type="source") library('openNLP')