30 Jun 2012 22:03
Using Pers. Dictionary with Aspell in R
Ribbis <rballantyne <at> comcast.net>
2012-06-30 20:03:42 GMT
2012-06-30 20:03:42 GMT
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)
(Continue reading)
RSS Feed