The Aspell library provides spell checking functionality.
To use this library, first the module must be imported, like this:
Then, before any attempt to use it for spell checking, a dictionary
must be chosen. If the
aspell command line tool was installed
when the Aspell library was installed, the available dictionaries can
be listed from the command line by using the
aspell dump dicts
To set the library, use the
Sets the dictionary for this aspell session to lang, where
lang is a string containing a the standard two letter ISO 639
language code, with an optional two letter ISO 3166 country code after
an underscore. For example, lang could be
"en_GB" or perhaps simply
"es". The lang string
must match the name one of aspell’s installed dictionaries, as
You may call this function at any time, but, each time the language is
changed, it will cause any words added to the
default speller using
aspell-add-word to be forgotten.
On success, the procedure will return
#t. On failure, it will
throw an error.
A program may have one or more spellers. A speller holds a
list of words temporarily added to the dictionary using
aspell-add-word as well as a list of suggested replacements
aspell-store-replacement. A default speller is
created when the library is loaded, and extra spellers can be made
aspell-new-speller. The rest of the procedures will take
an optional speller argument. If the optional speller argument is not
supplied, the default speller is used instead.
This procedure returns a new speller of the type
#<AspellSpeller>. A speller stores words temporarily added to
the dictionary for this session, as well as suggested word replacement
#t if x is a
With that out of the way, we can get down to business.
#t if word appears in the current dictionary, or
#f otherwise. If speller is supplied, its list of added
words is used.
This procedure returns a list of words that are possible spelling corrections to word. If speller is supplied, that speller’s list of added words and suggested replacements is used.
This procedure adds the word word to the dictionary for this session. If speller is supplied, it adds it to the dictionary for that speller, otherwise it adds it to the default dictionary.
This makes the correctly spelled word the preferred replacement for a
given mispelled word. In a list of suggested corrections supplied by
aspell-word, correct will appear with high priority when
aspell-word is called with mistake. If a speller is
supplied, it adds this suggestion to that speller, otherwise it adds
it to the default list.
The return value is unspecified.