ropensci / hunspell

High-Performance Stemmer, Tokenizer, and Spell Checker for R
https://docs.ropensci.org/hunspell
Other
109 stars 44 forks source link

new dictionary paths for rstudio #36

Closed nevrome closed 5 years ago

nevrome commented 5 years ago

RStudio seems to store its dictionaries at another place now?

https://support.rstudio.com/hc/en-us/articles/200551916-Spelling-Dictionaries

Didn't test this on windows. So please consider with caution.

nevrome commented 5 years ago

Fail of travis check doesn't seem to be related to #35 and #36.

nevrome commented 5 years ago

Tried to find an intermediate solution. This is more complicated than I though it would be. Here's what seems to work for my linux and windows test machines. Not very elegant. I think the best would be to have an environment variable directly from RStudio with info on where dictionaries are stored on the local machine.

jeroen commented 5 years ago

You cannot set variables like %localappdata% in a string, R does not expand those automatically like bash would do.

Also where did you read about the languages-system directory? I can't find any reference to that.

jeroen commented 5 years ago

I have implemented this in https://github.com/ropensci/hunspell/commit/946202ffcfb369ae3350bd0af6b9c01ea5a4ab9d. Thank you for the suggestion!