[prev in list] [next in list] [prev in thread] [next in thread] 

List:       aspell-user
Subject:    [Aspell-user] using GNU Guile with Aspell
From:       Mike Gran <spk121 () yahoo ! com>
Date:       2009-12-07 15:24:28
Message-ID: 780285.52781.qm () web37903 ! mail ! mud ! yahoo ! com
[Download RAW message or body]

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



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic