How can I use Aspell with R with a specific language?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-12 20:23:58

问题


I have installed Aspell from the full installer here http://aspell.net/win32/, and I also installed the french extention.

Everything is now in D:\Aspell, and the french extention is here D:\Aspell\dict, I added these paths and also D:\Aspell\bin and D:\Aspell\doc to my environment path so when I use the aspell function in R, R now recognizes the function. But it seems that it is looking for some US dictionary that I haven't, but that I don't want to use anyway. How can I tell him to use the french dictionary I specifically installed ?

aspell(as.factor("amourr"))

returns the error :

Error: No word lists can be found for the language "en_US".
De plus : Message d'avis :
l'exécution de la commande '"D:\Aspell\bin\aspell.exe" -a' renvoie un statut 1

and the following doesn't work either :

aspell(as.factor("amourr"),dictionaries="D:/Aspell/dict/francais.alias")

My session info

> sessionInfo()
R version 3.1.1 (2014-07-10)
Platform: i386-w64-mingw32/i386 (32-bit)

locale:
[1] LC_COLLATE=French_France.1252  LC_CTYPE=French_France.1252   
[3] LC_MONETARY=French_France.1252 LC_NUMERIC=C                  
[5] LC_TIME=French_France.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] tools_3.1.1 

来源:https://stackoverflow.com/questions/34210346/how-can-i-use-aspell-with-r-with-a-specific-language

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!