[R] Using Pers. Dictionary with Aspell in R

Ribbis rballantyne at comcast.net
Sat Jun 30 22:03:42 CEST 2012


My goal is to use Aspell 0.60 with a personal dictionary within R.  Running
WinXP, R 2.15.1, and Cygwin's install of Aspell 0.60.  Using a test file
with 2/5 words misspelled:
SpellTest.txt
test
text
txxt
endeavour
mytzlplk

and dictionary files (aspell.en.pws, and spell.en.prepl respectively) of: 
personal_ws-1.1 en 0
mytzlplk

personal_repl-1.1 en 0
mytzlplk superman

and R expression of:
SpellOut<- aspell(SpellTest,
                  program=SpellProg,
                  control=c("--master='en_US.multi'
--add-extra-dicts='en_GB.multi' ' -p ./aspell.en.pws'"))

makes no suggestion for "mytzlplk" but finds "txxt" and allows "endeavour."  
As seen in:
> print(SpellOut$Suggestions)
[[1]]
 [1] "text"  "TWX"   "TeX"   "Tex"   "tax"   "tux"   "taxi"  "xxxi" 
 [9] "xxxv"  "tax's" "tux's"
> summary(SpellOut)
Possibly mis-spelled words:
[1] "mytzlplk" "txxt" 

Directly using aspell in the line command within Cygwin terminal finds the
personal dictionary just fine:
echo "mytzlplk" | aspell -a --master='en_US.multi' -p ./aspell.en.pws

Not sure how to get R to recognize the personal dictionary file.  Any
assistance would be appreciated.  Thanks.

--
View this message in context: http://r.789695.n4.nabble.com/Using-Pers-Dictionary-with-Aspell-in-R-tp4634996.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list