* guile-aspell : spellchecking wth Guile
@ 2009-12-06 2:40 Mike Gran
2009-12-07 9:42 ` Ludovic Courtès
0 siblings, 1 reply; 2+ messages in thread
From: Mike Gran @ 2009-12-06 2:40 UTC (permalink / raw)
To: Guile User
Hi-
I wrote a bit of glue code for Guile and Gnu Aspell, a spellchecking library.
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:
-----------
$ LTDL_LIBRARY_PATH=/usr/local/lib guile -L /usr/local/share/guile/site
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: guile-aspell : spellchecking wth Guile
2009-12-06 2:40 guile-aspell : spellchecking wth Guile Mike Gran
@ 2009-12-07 9:42 ` Ludovic Courtès
0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2009-12-07 9:42 UTC (permalink / raw)
To: guile-user
Hi Mike,
Mike Gran <spk121@yahoo.com> writes:
> I wrote a bit of glue code for Guile and Gnu Aspell, a spellchecking library.
> I packaged it as a Guile library and saved it at
> http://www.lonelycactus.com/aspell.html
Looks fun!
One nitpick: I’d prefer ‘(aspell)’ instead of ‘(aspell aspell)’ as the
module name. :-)
IMO it’d a nice addition to submit upstream when you feel like it.
Thanks,
Ludo’.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-12-07 9:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-06 2:40 guile-aspell : spellchecking wth Guile Mike Gran
2009-12-07 9:42 ` Ludovic Courtès
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).