aspell-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Aspell-user] using GNU Guile with Aspell


From: Mike Gran
Subject: [Aspell-user] using GNU Guile with Aspell
Date: Mon, 7 Dec 2009 07:24:28 -0800 (PST)

Hi- 


I wrote a bit of glue code for GNU Guile (an interpreter for the Scheme
language, which is a LISP-like language) and Gnu Aspell.  
I packaged it as a Guile library and saved it at 
http://www.lonelycactus.com/aspell.html
 
I've only tried to build it on Guile 1.8.x on i686-pc-linux-gnu and
i686-pc-cygwin.
 
For the small amount of effort, it actually came out pretty useful.
Here it is in action:  

-----------

guile> (use-modules (aspell aspell))

guile> (aspell-set-lang "en_US")
#t

guile> (aspell-correct? "recieve")    ; check if it is a word
#f

guile> (aspell-word "recieve")        ; get some possibilities
("receive" "receiver" "Recife" "relieve" "received" "receives" "revive" "reeve"
"reserve" "deceive" "reliever" "recede" "recipe" "recite" "relive")

guile> (aspell-add-word "recieve")    ; add the word to the dictionary
#t

guile> (aspell-word "flem")
("Flem" "fl em" "fl-em" "Lem" "fem" "flam" "flea" "flee" "flew" "Clem" "elem" "f
led" "Flem's")

guile> (aspell-store-replacement "flem" "phlegm")  ; add a preferred replacement
#t

guile> (aspell-word "flem")
("Flem" "phlegm" "fl em" "fl-em" "Lem" "fem" "flam" "flea" "flee" "flew" "Clem"
"elem" "fled" "Flem's")
 
-----------
 
Thanks,
 
Mike Gran




reply via email to

[Prev in Thread] Current Thread [Next in Thread]