statsmaths / cleanNLP

R package providing annotators and a normalized data model for natural language processing
GNU Lesser General Public License v2.1
209 stars 36 forks source link

coreNLP backend: why the need for properties.rds? #54

Closed jefshe closed 4 years ago

jefshe commented 4 years ago

Hi, Im on a system where I do not have write access to this package directory. When trying to initialize core nlp i get the following error:

cannot open the connection

stacktrace:

cnlp_init_corenlp(language = "en", anno_level = 2, mem = "4g", lib_location = "/home/jeff/corenlp")
setup_corenlp_backend_raw("annotators", string, clear = TRUE)
saveRDS(prop, file.path(system.file("extdata", package = "cleanNLP"), "properties.rds"))
gzfile(file, mode)

It seems the backend functions is hardcoded to write a properties file whenever setup_corenlp_backend_raw is called. Could this just be stored in memory instead?

If not, would you accept a PR where the properties.rds is writted to lib_location instead?