Copyright ÂŠ 2000â2019 Kevin Atkinson.

     Permission is granted to copy, distribute and/or modify this
     document under the terms of the GNU Free Documentation License,
     Version 1.1 or any later version published by the Free Software
     Foundation; with no Invariant Sections, no Front-Cover Texts and no
     Back-Cover Texts.  A copy of the license is included in the section
     entitled "GNU Free Documentation License".

GNU Aspell 0.60.8
*****************

This is the userâs manual for Aspell

GNU Aspell is a spell checker designed to eventually replace Ispell.  It
can either be used as a library or as an independent spell checker.

 â The Detailed Node Listing â

Basic Usage

Customizing Aspell

Notes on Various Options

Working With Dictionaries

Writing programs to use Aspell

Adding Support For Other Languages

Implementation Notes

Installing

Copying

1 Introduction
**************

GNU Aspell is a spell checker designed to eventually replace Ispell.  It
can either be used as a library or as an independent spell checker.  Its
main feature is that it does a much better job of suggesting possible
replacements for a misspelled word than just about any other spell
checker out there for the English language.  Unlike Ispell, Aspell can
also easily check documents in UTF-8 without having to use a special
dictionary.  Aspell will also do its best to respect the current locale
setting.  Other advantages over Ispell include support for using
multiple dictionaries at once and intelligently handling personal
dictionaries when more than one Aspell process is open at once.

The latest version of Aspell can always be found at <http://aspell.net>

1.1 Comparison to other spell checker engines
=============================================

                               Aspell   Ispell   Hunspell   Microsoft
                               0.60.8   2.1.20   1.1.12     Word 97
Open Source                    x        x        x
Suggestion Intelligence        70-85    52       76         70
Personal part of Suggestions   x        x        x          x
Alternate Dictionaries         x        x        x          ?
International Support          x        x        x          ?

The Suggestion Intelligence is based on a small test kernel of
misspelled/correct word pairs.  Go to <http://aspell.net/test/cur/> for
more info and how you can help contribuxte to the test kernel.

If you have any other information you would like to add to this chart
please contact me at <kevina@gnu.org>.

1.1.1 Comparison to Ispell
--------------------------

1.1.1.1 Features that only Aspell has
.....................................

   â˘ Is an actual library that other programs can link to instead of
     having to use it through a pipe.

   â˘ Does a much better job of suggesting possible replacements for a
     misspelled word than Ispell does or for that matter many other
     spell checkers I have seen.  If you know a spell checker that does
     a better job please let me know.

   â˘ Can learn from userâs misspellings.

   â˘ Can easily check documents in UTF-8 without having to use a special
     dictionary.

   â˘ Has support for using multiple dictionaries at once.

   â˘ Is multiprocess intelligent.  When a personal dictionary (or
     replacement list) is saved, it will now first update the list
     against the dictionary on disk in case another process modified it.

   â˘ Can share the memory used in the main word list between processes.

   â˘ A better, more complete word list for the English language.  Word
     lists are provided for American, British, and Canadian spelling.
     Special care has been taken to only include one spelling for each
     word in any particular word list.  The word list included in Ispell
     by contrast only included support for American and British and also
     tends to included multiple spellings for a word which can mask some
     spelling errors.

1.1.1.2 Things that, currently, only Ispell has
...............................................

   â˘ Lower memory footprint

   â˘ Ability to deal with arbitrary multi-character letters such as old
     ASCII encodings of accented letters.

   â˘ Perhaps better support for spell checking (La)TeX files.

For a detailed description of how Aspell differs from Ispell, see
Differences From Ispell.

1.1.2 Comparison to Hunspell
----------------------------

Hunspell is based on Myspell.  Myspell was created as a simple spell
checker for use in OpenOffice.  Myspellâs affix support was merged into
Aspell 0.60 so Hunspell and Aspell can use the same affix file to some
extent.

Hunspell has better support for language peculiarities including
compounding and complex morphology.  However the Hunspell (v1.7.0)
utility currently has problems with apostrophe (â'â) in words.

Aspell generally has better suggestions for non-phonetic langauges such
as English and French.  Aspell suggestion speed also tends to be
significantly faster than Hunspell.  For a comparasion of suggestion
quality and speed see <http://aspell.net/test/>.

2 Support
*********

Support for Aspell can be found on the Aspell mailing lists.
Instructions for joining the various mailing lists (and an archive of
them) can be found off the Aspell home page at <http://aspell.net>.

Bug reports can also be submitted via GitHub at
<https://github.com/GNUAspell/aspell/>.

3 Basic Usage
*************

For a quick reference on the Aspell utility use the command âaspell
--helpâ.

3.1 Spellchecking Individual Files
==================================

To use Aspell to spellcheck a file use:

     aspell check [OPTIONS] FILENAME

at the command line where âFILENAMEâ is the file you want to check and
âOPTIONSâ is any number of optional options.  Some of the more useful
ones include:

âmode=MODE
     the mode to use when checking files.  The available modes are
     ânoneâ, âurlâ, âemailâ, âmarkdownâ, âhtmlâ, âtexâ, âtexinfoâ, and
     ânroffâ, among others.  See Filter Options.

âdont-backup
     donât create a backup file.  Normally, if there are any corrections
     the Aspell utility will append â.bakâ to the existing file name and
     then create a new file with corrections made during spell checking.

âsug-mode=MODE
     the suggestion mode to use where mode is one of âultraâ, âfastâ,
     ânormalâ, âslowâ, or âbad-spellersâ.  See Notes on the Different Suggestion Modes.

âlang=NAME/-l NAME
     the language the document is written in.  The default depends on
     the current locale.

âencoding=NAME
     encoding the document is expected to be in.  The default depends on
     the current locale.

âmaster=NAME/-d NAME
     the main dictionary to use.

âkeymapping=NAME
     the keymapping to use.  Either âaspellâ for the default mapping or
     âispellâ to use the same mapping that the Ispell utility uses.

(For more information on the available options, please see
Customizing Aspell.)

For example to check the file âfoo.txtâ:

     aspell check foo.txt

and to check the file âfoo.txtâ using the âbad-spellersâ suggestion mode
and the American English dictionary:

     aspell check --sug-mode=bad-spellers -d en_US foo.txt

If the âmodeâ option is not given, then Aspell will use the extension of
the file to determine the current mode.

If Aspell was compiled with curses support and the âTERMâ environment
variable is set to a capable terminal type then Aspell will use a nice
full screen interface, otherwise it will use a simpler âdumbâ terminal
interface where the misspelled word is surrounded by two â*â.  In either
case the interface should be self explanatory.

If Aspell is compiled with a version of the curses library that support
wide characters then Aspell can also check UTF-8 text.  Furthermore, the
document will be displayed in the encoding defined by the current
locale.  This encoding does not necessarily have to be the same encoding
that the document is in.  This means that is is possible to check an
8-bit encoding such as ISO-8859-1 on an UTF-8 terminal.  To do so simply
set the âencodingâ option to âiso-8859-1â.  Furthermore it is also
possible to check an UTF-8 document on an 8-bit terminal provided that
the document can be successfully converted into that encoding.

3.2 Using Aspell as a Replacement for Ispell
============================================

As of GNU Aspell 0.60.1 Aspell should be able to completely replace
Ispell for most applications.  The Ispell compatibility script should
work for most applications which expect Ispell.  However there are some
differences which you should be aware of.

3.2.1 As a Drop In Replacement
------------------------------

Aspell can be used as a drop in replacement for Ispell for programs that
use Ispell through a pipe such as Emacs and LyX. It can also be used
with programs that simply call the âispellâ command and expect the
original file to be overwritten with the corrected version.

If you do not have Ispell installed on your system and have installed
the Ispell compatibility script then you should not need to do anything
as most applications that expect Ispell will work as expected with
Aspell via the Ispell compatibility script.

Otherwise, the recommended way to use Aspell as a replacement for Ispell
is to change the âispellâ command from within the program being used.
If the program uses âispellâ in pipe mode simply change âispellâ to
âaspellâ.  If the program calls the âispellâ command to check the file,
then change âispellâ to âaspell checkâ.

If that is impossible then the ârun-with-aspellâ script can be used.
This script modifies the path so that programs see the Ispell
compatibility script instead of the actual true âispellâ command.  The
format of the script is:

     run-with-aspell COMMAND

where COMMAND is the name of the program with any optional arguments.

The old method of mapping Ispell to Aspell is discouraged because it can
create compatibility problems with programs that actually require Ispell
such as Ispellâs own scripts.

3.2.2 Differences From Ispell
-----------------------------

Nevertheless, Aspell is not Ispell, nor is it meant to completely
emulate the behavior of Ispell.  The âaspellâ command is not identical
to the âispellâ command when not used in âpipeâ mode.  If an application
expects the âispellâ command, then the Ispell compatibility script
should be used instead.

3.2.2.1 Functionality of the Ispell Compatibility Script
........................................................

The Ispell compatibility script provides the following Ispell
functionally.

   â˘ The ability to check a file when called without any mode
     parameters.

   â˘ The pipe or -a mode.

   â˘ The list or -l mode.

   â˘ The version or -v mode.  A single line is returned which, while not
     being identical to the line Ispell returns, is sufficient to fool
     most programs.

   â˘ The munch or -c mode.

   â˘ The expand or -e mode.

   â˘ The ability to dump the affix file when called with â-Dâ.  However
     the format of the affix file is different.  Furthermore, not all
     languages have an affix file.

However the Ispell script is currently unable to emulate the â-Aâ pipe
mode.  This is different from the normal pipe mode in that the special
â&Include_File&â command is recognized.

3.2.2.2 Recognized Options
..........................

Aspell, and thus the Ispell compatibility script, recognizes most of the
options that Ispell uses except for the â-Sâ, â-wâ and â-Tâ options.
The Aspell command will simply ignore these options if it sees them.

3.2.2.3 Check Mode Compatibility
................................

The interface used by Aspell when checking individual files is slightly
different than Ispellâs.  In particular the default keymappings are not
the same as the ones Ispell uses.  However Aspell supports using the
Ispell keymappings via the âkeymappingâ option.  To use the Ispell
keymappings set the âkepmappingâ option to âispellâ.  This can be done
on the command line by using the command:

     aspell check --keymapping=ispell âŚ
or, when the Ispell compatible script is used:
     ispell --keymapping=ispell âŚ

The Ispell keymapping can always be used when the Ispell compatibly
script is called by uncommenting the indicated line in the âispellâ
script.

3.2.2.4 Pipe Mode Compatibility
...............................

The Aspell pipe mode should be identical to the Ispell pipe mode except
if the line starts with a â$$â as that will trigger special Aspell only
commands or if the line starts with a â~â which is ignored by Aspell.

3.2.2.5 Other Differences
.........................

The compiled dictionary format is completely different than Ispellâs.
Furthermore the format of the language data filesâ are different than
Ispellâs affix file.  However, all known Ispell dictionaries were
converted to Aspell format, except for Albanian (sq) as I was unable to
find the source word list.

The naming and format of the personal dictionary is also different.
However, Ispell personal dictionaries can be imported using the
âaspell-importâ script.  See Using aspell-import.  The Ispell
personal dictionary is simply a list of words while the Aspell one is a
list of words with a header line.  Thus it is also fairly easy to
convert between the two.  See Format of the Personal Dictionary.

3.2.2.6 Missing Functionally
............................

The only major area where Ispell is superior to Aspell is in the
handling of multi character letters such as old ASCII encoding of
accented characters.

However, Aspell can handle UTF-8 documents far better than Ispell can.

3.3 Using Aspell with other Applications
========================================

3.3.1 With Enchant Based Applications
-------------------------------------

Enchant is a generic spell checking library with multiple backends used
by many applications that provide spell checker functionality.  Enchant
is used by AbiWord; LyX; and via gspell and GtkSpell, a number of Gtk
and GNOME applications.

By default enchant is configuired to prefer Hunaspell over Aspell but
this can easily be changed on a per-language basis.  If you wish to use
Aspell for a specific dictionary say, American English, make sure that
the Aspell backend is installed (on Debian and Ubuntu based system it is
included as part of the base package) then create the file
â~/.config/enchant/enchant.orderingâ that contains the single line:

     en_US:aspell

To test it.  Restart the enchant based application and then compare the
suggestion list with an application that used Aspell or by using the
âaspell checkâ or âaspell pipeâ commands.

You can also prefer Aspell in general over Humspell by instead using:

     *:aspell,hunspell

Then if an Aspell dictionary is available Enchant should use it.

3.3.2 With Emacs and XEmacs
---------------------------

Newer versions of emacs should prefer âaspellâ over both âispellâ and
âhunspellâ, if you find this is not the case, then addding the line:

(setq-default ispell-program-name "aspell")

to the end of your â.emacsâ file should convince emacs to use Aspell.

3.3.3 With VIM
--------------

To use Aspell in VIM you simply need to add the following line to your
â.vimrcâ file:

map ^T :w!<CR>:!aspell check %<CR>:e! %<CR>

I use âCtrl-Tâ since thatâs the way you spell check in âpicoâ.  In order
to add a control character to your â.vimrcâ you must type âCtrl-vâ
first.  In this case âCtrl-v Ctrl-tâ.

A more useful way to use Aspell, IMHO, is in combination with Newsbody
(<http://www.image.dk/~byrial/newsbody/>) which is how I use it since
VIM is my editor for my mailer and my news reader.
map ^T\\1\\2<CR>:e! %<CR>
map \\1 :w!<CR>
map \\2 :!newsbody -qs -n % -p aspell check \\%f<CR>

3.3.4 With Pine
---------------

To use Aspell in Pine simply change the option âspellerâ to

     aspell --mode=email check

To change the âspellerâ option go to the main menu.  Type âSâ for
_setup_, âCâ for _config_, then âWâ for _where is_.  Type in âspellerâ
as the word to find.  The speller option should be highlighted now.  Hit
enter, type in the above line, and hit enter again.  Then type âEâ for
_exit setup_ and âYâ to save the change.

If you have a strong desire to check other peopleâs comments change
âspellerâ to

     aspell check

instead which will avoid switching Aspell into email mode.

4 Customizing Aspell
********************

The behavior of Aspell can be changed by any number of options which can
be specified at either the command line, the environment variable
âASPELL_CONFâ, a personal configuration file, or a global configuration
file.  Options specified on the command line override options specified
by the environment variable.  Options specified by the environment
variable override options specified by either of the configuration
files.  Finally options specified by the personal configuration file
override options specified in the global configuration file.  Options
specified in the environment variable âASPELL_CONFâ, a personal
configuration file, or a global configuration file will take effect no
matter how Aspell is used which includes being used by other
applications.

Aspell has three basic types of options: "boolean", "value", and "list".

"Boolean" options are either enabled or disabled, "value" options take a
specific value, and "list" options can either have entries added or
removed from the list.

4.1 Specifying Options
======================

4.1.1 At the Command Line
-------------------------

All options specified at the command line have the following basic
format:

     --OPTION[=VALUE]

where the â=â can be replaced by whitespace.

Some options also have single letter abbreviations of the form:

     LETTER [OPTIONAL_WHITESPACE VALUE]

Any non-ASCII characters are expected to be in the encoding specified by
the current locale.

To reset an option to the default value, prefix the option with a
âreset-â and donât specify a value.

4.1.1.1 Value options
.....................

To specify a value option simply specify the option with its
corresponding value.  For example to set the filter mode to TeX use
â--mode=texâ.

If a value option has a single letter shortcut simply specify the single
letter shortcut with its corresponding value.  For example to use a the
accented version of the American English dictionary use â-d
en_US-w_accentsâ.

4.1.1.2 Boolean options
.......................

To enable a boolean option simply specify the option without any
corresponding value, or prefix it with an âenable-â.  For example to
create a backup file use â--backupâ.  To disable a boolean option prefix
the option name with a âdont-â or âdisable-â.  To avoid creating a
backup file use â--dont-backupâ.  Boolean options can also be set
directly like a value option where the value is either "true" or
"false", for example â--backup=trueâ.

If a boolean option has a single letter abbreviation simply give the
letter corresponding to either enabling or disabling the option without
any corresponding value.  For example, to consider run-together words
valid use â-Câ or to consider them invalid use â-Bâ

4.1.1.3 List options
....................

To add a value to the list, prefix the option name with an âadd-â and
then specify the value to add.  For example, to add the URL filter use
â--add-filter urlâ.  To remove a value from a list option, prefix the
option name with a ârem-â and then specify the value to remove.  For
example, to remove the URL filter use â--rem-filter urlâ.  To remove all
items from a list prefix the option name with a âclear-â without specify
any value.  For example, to remove all filters use â--clear-filterâ.

A list option can also be set directly, in which case it will be set to
a single value.  To directly set a list option to multiple values prefix
the option name with a âlset-â and separate each value with a â:â.  For
example, to use the URL and TeX filter use â--lset-filter url:texâ.

4.1.2 Via a Configuration File
------------------------------

Aspell can also accept options via a personal or global configuration
file.  The exact files to used are specified by the options âper-confâ
and âconfâ respectively but the personal configuration file is normally
â.aspell.confâ located in the âHOMEâ directory and the global one is
normally âaspell.confâ which is located in the âetcâ directory which is
normally â/usr/etcâ or â/usr/local/etcâ.  To find out the particular
values for your particular system use âaspell dump configâ.

Each line of the configuration file has the format:

     OPTION [VALUE]

There may be any number of spaces between the option and the value
however it can only be spaces, i.e.  there is no â=â between the option
name and the value and there are no preceding â--â as used on the
command line.

Comments may also be included by preceding them with a â#â as anything
from a â#â to a newline is ignored.  Blank lines are also allowed.

To include a literal â#â use â\#â.  To include a literal â\â use â\\â.
Any other non-alpha character can also be protected by a â\â if
necessary.

Any non-ASCII characters are expected to be in UTF-8.

To reset an option to the default value prefix the option with a
âreset-â and donât specify a value.

Values set in the personal configuration file override those in the
global file.  Options specified at either the command line or via an
environment variable override those specified by either configuration
file.

     Note: Filters and corresponding options also may be assembled
     inside a special meta filter file named âMETAFILTER.fltâ.  A filter
     has to be loaded via adding a âadd-filter FILTERNAMEâ line to the
     meta filter file before its options may be specified.

4.1.2.1 Value options
.....................

To specify a value option simply include the option followed by the
corresponding value.  For example to set the default language to German
use âlang germanâ.

4.1.2.2 Boolean options
.......................

To specify a boolean option simply include the option followed by a
âtrueâ to enable it or a âfalseâ to disable it.  For example to allow
run-together words use ârun-together trueâ.

4.1.2.3 List options
....................

To add a value to the list, prefix the option name with an âadd-â and
then specify the value to add.  For example to add the URL filter use
âadd-filter urlâ.  To remove a value from a list option prefix the
option name with a ârem-â and then specify the value to remove.  For
example, to remove the URL filter use ârem-filter urlâ.  To remove all
items from a list prefix the option name with a âclear-â without
specifying any value.  For example, to remove all filters use
âclear-filterâ.

A list option can also be set directly, in which case it will be set to
a single value.  To directly set a list option to multiple values prefix
the option name with a âlset-â and separate each value with a â:â.  For
example, to use the URL and TeX filter use âlset-filter url:texâ.  To
include a literal â:â use â\:â.

4.1.3 Via an Environment Variable
---------------------------------

The environment variable âASPELL_CONFâ may also be used and it overrides
any options set in the configuration file.  The format of the string is
exactly the same as the configuration file except that semicolons (â;â)
are used instead of newlines.

4.2 The Options
===============

The following is a list of available options broken down by category.
Each entry has the following format:

     OPTION[,SINGLE-LETTER-ABBREVIATION]
          (TYPE) DESCRIPTION

Where single letter options are specified as they would appear at the
command line, ie with the preceding dash.  Boolean single letter options
are specified in the following format:

     -<abbreviation to enable>|-<abbreviation to disable>

OPTION is one of the following: _boolean_, _string_, _file_, _dir_,
_integer_, or _list_.

_String_, _file_, _dir_, and _integer_ types are all value options which
can only take a specific type of value.

4.2.1 Dictionary Options
------------------------

The following options may be used to control which dictionaries to use
and how they behave (for more information see How Aspell Selects an Appropriate Dictionary):

master,-d
     (string) Base name of the dictionary to use.  If this option is
     specified then Aspell will either use this dictionary or die.

dict-dir
     (dir) Location of the main word list.

lang
     (string) Language to use.  It follows the same format of the âLANGâ
     environment variable on most systems.  It consists of the two
     letter ISO 639 language code and an optional two letter ISO 3166
     country code after a dash or underscore.  The default value is
     based on the value of the âLC_MESSAGESâ locale.

size
     (string) The preferred size of the word list.  This consists of a
     two char digit code describing the size of the list, with typical
     values of: 10=tiny, 20=really small, 30=small, 40=med-small,
     50=med, 60=med-large, 70=large, 80=huge, 90=insane.

variety
     (list) Any extra information to distinguish two different words
     lists that have the same lang and size.

word-list-path
     (list) Search path for word list information files.

personal,-p
     (file) Personal word list file name.

wordlists
     (list)

     UTF-8 files of additional words to accept.  Non-word characters
     will be removed from the start and end of each word and if the word
     is then considered valid for the current language it will be added.
     Otherwise it will be silently ignored.

     The â--dont-clean-wordsâ option can be used to prevent the removal
     of non-word characters.  The â--dont-skip-invalid-wordsâ can be
     used to try harder to accept the word; if a word contains a
     character that the language canât handle it will still be ignored
     (for example a Cyrillic letter in a Latin based language).

     If words are not being added that you expect to, use the âaspell
     cleanâ to find out why.

repl
     (file) Replacements list file name.

extra-dicts
     (list) Extra dictionaries to use.

dict-alias
     (list) create dictionary aliases.  Each entry has the form âFROM
     TOâ.  Will override any system dictionaries that are present.

dont-use-other-dicts
     (boolean)

     Disable use of personal, replacement & session dictionaries.  Any
     dictionaries specified using âextra-dictsâ will still be used.

4.2.2 Encoding Options
----------------------

These options control the encoding the document is expected to be in and
how it is displayed.

encoding
     (string) The encoding the input text is in.  Valid values include,
     but not limited to, âiso-8859-*â, âutf-8â, âucs-2â, âucs-4â.  When
     using the Aspell utility the default encoding is based on the
     current locale.  Thus if your locale currently uses the âutf-8â
     encoding than everything will be in UTF-8.  The âucs-2â and âucs-4â
     encodings are intended to be used by other programs using the
     Aspell library and is not supported by the Aspell utility.

normalize
     (boolean) Perform Unicode normalization.  Enabled by default.

norm-strict
     (boolean) Avoid lossy conversions when normalizing.  Lossy
     conversions includes compatibility mappings such as splitting the
     letter âOEâ (U+152) into âOâ and âEâ (when the combined letter is
     not available), and mappings which will remove accents.  Disabled
     by default except when creating dictionaries.

norm-form
     (string) The normalization form the output should be in.  This
     option primarily effects the normalization form of the suggestions
     as when spell checkering as the actual text is unchanged unless
     there is an error.  Valid values are ânoneâ, ânfdâ for fully
     decomposition (Normalization Form D), ânfcâ for Normalization Form
     C, or âcompâ for fully composed.  âcompâ is like ânfcâ except that
     _full_ composition is used rather than _canonical_ composition.
     The ânormalizeâ option must be enabled for this option to be used.

norm-required
     (boolean) Set to true when the current language requires Unicode
     normalization.  This is generally the case when private use
     characters are used internally by Aspell or when Normalization Form
     C is not the same as full composition.

4.2.3 Checker Options
---------------------

These options control the behavior of Aspell when checking documents.

ignore,-W
     (integer) Ignore words with N characters or less

ignore-repl
     (boolean) Ignore commands to store replacement pairs.

save-repl
     (boolean) Save the replacement word list on save all.

keyboard
     (file) The base name of the keyboard definition file to use (see
     Notes on Typo-Analysis)

sug-mode
     (mode) Suggestion mode = âultraâ | âfastâ | ânormalâ | âslowâ |
     âbad-spellersâ (see Notes on the Different Suggestion Modes)

sug-split-char
     (list) Characters to use when a word into two in the suggestion
     list.  Setting this option to the empty list disables word
     splitting.

ignore-case
     (boolean) Ignore case when checking words.

ignore-accents
     (boolean) Ignore accents when checking words â _currently ignored_.

4.2.4 Filter Options
--------------------

These options control Aspellâs filters that filter out text that should
not be spell checked.

mode
     (string) Sets the filter mode.  A mode is a collection of
     individual filters that work well together.  Possible values
     include, but not limited to, ânoneâ, âurlâ (the normal default),
     âemailâ, âmarkdownâ, âhtmlâ, âtexâ, âtexinfoâ, or ânroffâ (default
     for âaspell pipeâ).  For a complete list use âaspell dump modesâ.

     The shortcut options â-eâ may be used for email, â-Hâ for HTML,
     â-Mâ for Markdown, â-tâ for TeX, or â-nâ for Nroff.

filter
     (list) Individual filters to use, use âaspell dump filtersâ for a
     complete list.

filter-path
     (list) Where to look when loading filter and filter modes.

4.2.4.1 None filter mode
........................

The ânoneâ mode is exactly what it says.  It turns off all filters.

4.2.4.2 URL filter
..................

The âurlâ filter/mode skips over URLs, host names, and email addresses.
Because this filter is almost always useful and rarely does any harm it
is enabled in all modes except ânoneâ.  To turn it off either select the
ânoneâ mode or use ârem-filterâ option _after_ the desired mode is
selected.

4.2.4.3 Email filter
....................

The âemailâ mode skips over quoted text.

email-quote
     (list) Email quote characters.  Defaults to â>â and â|â.

email-margin
     (integer) The number of characters that can appear before the quote
     character.  Defaults to 10.

4.2.4.4 Markdown Filter
.......................

The âmarkdownâ filter/mode skips over code and links in Markdown
documents.  The mode also handles HTML via the âhtmlâ filter which runs
after the Markdown filer.

Properly parsing Markdown requires reading the entire document in at
once, which doesnât fit well into the existing filter framework so the
filter parses the document a line at a time and makes a best guess when
a line ends without enough information to correctly parse a a tag.  For
example in the following:
     `This looks like inline code

     But it's not, becuase the of the blank line.
the first line will be incorrectly skipped.

markdown-multiline-tags
     (boolean) Enables or disables support for HTML tags that might span
     multiple lines (outside of HTML blocks).  Enabled by default (to
     disable from the command line use
     â--dont-markdown-multiline-tagsâ).

markdown-skip-ref-labels
     (boolean) Controls if ref lables are skipped.  For example, when
     this option is enabled â[ref]â will be skipped over in:
          [link][ref]

          [ref]: #c2 "Chapter 2"
     Enabled by default (to disable from the command line use
     â--dont-markdown-skip-ref-labelsâ).

The Markdown filter also supports the âmarkdown-raw-start-tagsâ and
âmarkdown-block-start-tagsâ list options.  These options are a list of
HTML tags that start an HTML block.  If the block starts with a tag
listed in âmarkdown-raw-start-tagsâ then the block ends with the
corresponding closing tag.  If the block starts with a tag listed in
âmarkdown-block-start-tagsâ then the block ends with a blank line.  The
defaults for these two options are taken from the CommonMark spec
(version 0.29, 2019-04-06).

4.2.4.5 SGML filter
...................

The SGML filter allows you to spell check SGML, HTML, XHTML, and XML
files.  In most cases everything within a tag â<tag attrib=value
attrib2="a whole sentence">â will be skipped by the spell checker.  The
SGML/HTML/XML that Aspell supports is a slight superset of most DTDs
(Document Type Definitions) and can spell check the often non-conforming
HTML found on the web.

This filter will also translate SGML characters of the form â&#num;â.
Other SGML characters such as â&amp;â will simply be skipped over so
that the word âampâ, for example, will not be spell checked.  Eventually
full support for properly translating SGML characters will be added.

sgml-skip
     (list) tags whose contents will also be skipped by the spell
     checker.  For example, if you wish to leave a misspelling in a
     document and not have them flagged as misspellings, you could
     surround them with a <nospellcheck> tag:
            <TD><FONT size=2><NOSPELLCHECK>leviosa</NOSPELLCHECK>
            is what Mr. Potter said</FONT></TD>
     And put that word in the skip config directive:
          add-sgml-skip nospellcheck

sgml-check
     (list) attributes whose values you do want spell checked.  By
     default, âaltâ (<img> alternate text) is a member of the check list
     since it is text that is seen by a web page viewer.  You may also
     want âvalueâ to be on the check list since that is the text put on
     buttons:
          add-sgml-check value
     In this case â<input type=button value="Donr">â will be flagged as
     a misspelling.

4.2.4.6 HTML filter
...................

The âhtmlâ filter is like the SGML filter but specialized for HTML.

html-check
     (list) HTML attributes to always check, such as alt= (alternate
     text).

html-skip
     (list) HTML tags to always skip the contents of, such as <script>.
     Defaults to âscriptâ and âstyleâ.

4.2.4.7 TeX/LaTeX Filter
........................

The âtexâ (all lowercase) filter hides TeX/LaTeX commands and
corresponding parameters that are not readable text in the output from
Aspell.  It also skips over TeX comments by default.

tex-command
     (list) Controls which TeX commands should have certain parameters
     and/or options also skipped over.  Commands that are not specified
     will have all their parameters and/or options checked.  The format
     for each item is

          <command> <a list of p,P,o and Os>

     The first item is simply the command name.  The second item
     controls which parameters to skip over.  A âpâ skips over a
     parameter while a âPâ doesnât.  Similarly an âoâ will skip over an
     optional parameter while an âOâ doesnât.  The first letter on the
     list will apply to the first parameter, the second letter will
     apply to the second parameter etc.  If there are more parameters
     than letters Aspell will simply check them as normal.  For example
     the option

          add-tex-command rule pp

     will skip over the first two parameters of the âruleâ command while
     the option

          add-tex-command foo Pop

     will _check_ the first parameter of the âfooâ command, skip over
     the next optional parameter, if it is present, and will skip over
     the second parameter â even if the optional parameter is not
     present â and will check any additional parameters.

     A â*â at the end of the command is simply ignored.  For example the
     option

          add-tex-command enlargethispage p

     will ignore the first parameter in both âenlargethispageâ and
     âenlargethispage*â.

     The defaults are designed to work well with typical LaTeX
     documents.  Use âaspell --reset-tex-command config tex-commandâ for
     the current defaults.

tex-check-comments
     (boolean) Check TeX comments.  Defaults to false.

4.2.4.8 Texinfo Filter
......................

The âtexinfoâ filter allows you to spell check Texinfo files.  It will
skip over Texinfo commands and their parameters when appropriate.  It
will also skip over some Texinfo environments such as âexampleâ.

The Texinfo filter has special code to deal with the â@tableâ and
related commands.  It will apply the formatting command to each of the
â@itemâ or â@itemxâ commands just like Texinfo will.  This means that if
the formatting command is â@codeâ and and the â@codeâ command is a
member of the âtexinfo-ignoreâ option than the Texinfo filter will
ignore the parameter of the â@itemâ command as if the parameter was also
the parameter of the â@codeâ command.

The Texinfo filter will also skip over the â\input texinfoâ line.

texinfo-ignore
     (list) Texinfo command to ignore the parameters of.

texinfo-ignore-env
     (list) Texinfo environments to ignore.

4.2.4.9 Nroff Filter
....................

The ânroffâ filter mode allows you to check the spelling of Nroff
documents.  It is enabled by default when âaspell pipeâ is used.  When
checking documents with âaspell checkâ it is automatically enabled if
the first three characters of the file being checked are â.\"â (a
ânroffâ comment marker) or the file name ends in a one of the following
suffixes:

   â˘ single decimal digit from â0â to â9â
   â˘ letter ânâ
   â˘ âtmacâ

This filter mode skips following ânroffâ language elements:

   â˘ Comments
   â˘ Requests
   â˘ Names of ânroffâ registers (both traditional two-letter names and
     GNU nroff long names)
   â˘ Arguments to the following requests: âdsâ, âdeâ, ânrâ, âdoâ, âsoâ.
   â˘ Arguments to font switch (â\fâ) and size switch (â\sâ) escapes
   â˘ Arguments to extended charset escape in both traditional (â\(â) and
     extended (â\[comp1 comp2 âŚ]â) form.

4.2.4.10 Context Filter
.......................

The âcontextâ filter can be used to spell check source codes, HTML
sources and other texts which consist of different contexts.  Because
this filter is meant to build other filter modes, there is no âcontextâ
mode.

The filter distinguishes between visible and invisible contexts.  The
visible ones will be spell checked and the invisible ones will be
ignored.

context-visible-first
     (boolean) Switches the context which should be visible to Aspell.
     When false (the default) the initial context is hidden and only
     delimited ones are visible.  When true the initial context is
     visible while the delimited ones are hidden.

context-delimiters
     (list) The context delimiters specified as a space separated pairs.
     To indicate that a context is always closed by end of line use â\0â
     sequence as closing delimiter.  For example the defaults (for
     historical reasons) are:
            add-context-delimiters /* */
            add-context-delimiters // \0
            add-context-delimiters " "
     which (when âcontext-visible-firstâ is false) spell check C/C++
     comments and string literals.

4.2.4.11 Ccpp Filter Mode
.........................

The âccppâ filter mode is a context filter that will limit spell
checking to C/C++ comments and string literals.  Any code in between
will be left alone.

4.2.5 Compound Word Options
---------------------------

These may be used to control the behavior of compound words (for more
information Controlling the Behavior of Compound Words):

run-together,-C|-B
     (boolean) consider run-together words valid

run-together-limit
     (integer) maximum number of words that can be strung together

run-together-min
     (integer) minimal length of interior words

camel-case
     (boolean) consider camelCase words valid

4.2.6 Miscellaneous Options
---------------------------

Miscellaneous other options that donât fall under any other category

conf
     (file) Main configuration file.  This file overrides Aspellâs
     global defaults.

conf-dir
     (dir) location of main configuration file

data-dir
     (dir) location of language data files

local-data-dir
     (dir) alternative location of language data files.  This directory
     is searched before âdata-dirâ.  It defaults to the same directory
     the actual main word list is in (which is not necessarily
     âdict-dirâ)

home-dir
     (dir) location for personal files

per-conf
     (file) personal configuration file.  This file overrides options
     found in the global âconfâ file

keyboard
     (file) use this keyboard layout for suggesting possible words.
     These spelling errors happen if a user accidently presses a key
     next to the intended correct key.  The default is keyboard
     standard.  If you are creating documents, you may want to set it
     according to your particular type of keyboard.  If spellchecking
     documents created elsewhere, you might want to set this to the
     keyboard type for that locale.  If you are not sure, just leave
     this as standard

prefix
     (dir) prefix directory

set-prefix
     (boolean) set the prefix based on executable location (only works
     on WIN32 and when compiled with â--enable-win32-relocatableâ)

4.2.7 Aspell Utility Options
----------------------------

backup,-b|-x
     (boolean) Create a backup file by appending â.bakâ to the file
     name.  This applies when the command is âcheckâ and the backup file
     is only created if any spelling modifications take place.

time
     (boolean) Time load time and suggest time in âpipeâ mode.

byte-offsets
     (boolean) Use byte offsets instead of character offsets in âpipeâ
     mode.

reverse
     (boolean) Reverse the order of the suggestions list in âpipeâ mode.

keymapping
     (string) the keymapping to use.  Either âaspellâ for the default
     mapping or âispellâ to use the same mapping that the Ispell utility
     uses.

guess
     (boolean) make possible root/affix combinations not in the
     dictionary in âpipeâ mode.

suggest
     (boolean) Suggest possible replacements in âpipeâ mode.  If false
     Aspell will simply report the misspelling and make no attempt at
     suggestions or possible corrections.

4.3 Dumping Configuration Values
================================

To find out the current value of all the options use the command âaspell
dump configâ.  This will dump the current Aspell configuration to
standard output.  The format of the contents dumped is such that it can
be used as either the global or your personal configuration file.

To find out the current value of a particular option use âaspell config
OPTIONâ.  This will print out the value of OPTION to standard output and
nothing else.

To determine the default setting for a particular option use âaspell
--reset-OPTION config OPTIONâ.

4.4 Notes on Various Options
============================

4.4.1 Notes on Various Filters and Filter Modes
-----------------------------------------------

This section was merged into Filter Options.

4.4.2 Notes on the Prefix Option
--------------------------------

The âprefixâ option is there to allow Aspell to easily be relocated.
Changing âprefixâ will change all directory names relative to the new
prefix that are not explicitly set.  For example if âprefixâ was
â/usr/local/aspellâ and âdict-dirâ has a default value of
â/usr/local/aspell/dictâ than changing âprefixâ to â/opt/aspellâ will
also change the default value of âdict-dirâ to â/opt/aspell/dictâ.  Note
that modifying âprefixâ will only affect the default compiled in values
of directories.  If a directory option is explicitly given a value then
changing the value of âprefixâ has no effect on that directory option.

4.4.3 Notes on Typo-Analysis and the Keyboard Definition File
-------------------------------------------------------------

Aspell .33 and better will, in general, give a higher priority to
certain misspellings which are likely to be due to typos such as âtehâ
instead of âtheâ or âhapoyâ instead of âhappyâ.  However in order to do
this well Aspell needs to know the layout of the keyboard via the
keyboard definition file.  The keyboard definition file simply
identifies the keys on the keyboard and which of them are right next to
each other.  It has an extension of â.kbdâ and all non-ASCII characters
are expected to be in UTF-8.

To identify a key use:

     key BASE OTHER âŚ

where BASE is the base character that the key types, and OTHER are other
keys that the key can produce.  For example

     key a A ĂĄ Ă

It generally is only necessary to list keys which type more than one
distinct letter as Aspell can derive the rest from the language data
file.  For example, it is not necessary to include the previously
mentioned key.

To identify two keys as being right next to each other simply list the
type keys right after each other.  For example the line:

     as

will indicate that âaâ and âsâ are right next to each other.  If âasâ is
listed as an entry it is not necessary to list âsaâ as an entry as that
will be done automatically.  Also by "right next to each other" I mean
two keys that are close enough together that it is easy to type one
instead of the other.

The default for this option is normally âstandardâ.  However the default
can be changed via the language data file.  The normal default,
âstandardâ, should work well for most QWERTY like keyboard layouts.  It
may need minor adjusting for foreign keyboards.  A value of âdvorakâ can
be used for a Dvorak layout and ânoneâ can be used to avoid using an
explicit keyboard layout and only use the information derived from the
language data file.

4.4.4 Notes on the Different Suggestion Modes
---------------------------------------------

In order to understand what these suggestion modes do, a basic
understanding of how Aspell works is required.  For that, see
Aspell Suggestion Strategy.

To get a better idea of which mode you should chose here are some
results based on a small test kernel (see <http://aspell.net/test/cur>)
of misspelled/correct word pairs for GNU Aspell 0.60.8:

Mode           Score   First   1-10    Any     Time
------------------------------------------------------
ultra          70.4    53 %    74 %    75 %    0.49
fast           81.0    58 %    86 %    89 %    0.88
normal         82.6    59 %    88 %    91 %    1.00
slow           84.2    59 %    90 %    94 %    4.76
bad-spellers   82.3    55 %    86 %    98 %    7.46

The "Score" is a weighted average which gives more emphases to words
found earlier in the suggestion list.  "First", "1-10", and "Any" are
the percentage of times the correct word is found in the first, first
10, or anywhere in the suggestion list.  "Time" is the normalized
cpu-time.

The suggestion modes are as follows when soundslikes are used and affix
compression is not:

ultra
     This mode will use the fastest available method to come up with
     decent suggestions for common misspellings.  This currently means
     that it will look for words that are within one edit distance or
     have the same soundslike.  A replacement table will also be used if
     one is available.

fast
     This mode will use the fastest available method to come up with
     decent suggestions for not so common misspellings.  This currently
     means it will also look for soundslikes within one edit distance
     when compared to the âultraâ mode.

normal
     This is the default mode and will use what ever method is necessary
     to return good suggestions, in most cases, and in a reasonable
     amount of time.  This currently means it will looks for soundslikes
     within two edit distance apart.

slow
     Like ânormalâ except that âreasonable amount of timeâ is not a
     consideration.  In most cases it will return the same results as
     ânormalâ.  The biggest difference is that it will try an ngram scan
     if the normal methods of finding a suggestion fail.

bad-spellers
     This method is like âslowâ but is tailored more for the bad
     speller, where as the other modes are tailored more to strike a
     good balance between typos and true misspellings.  This mode never
     performs typo-analysis and returns a _huge_ number of words for the
     really bad spellers who canât seem to get the spelling anything
     close to what it should be.  If the misspelled word looks anything
     like the correct spelling it is bound to be found _somewhere_ on
     the list of 100 or more suggestions.

When there is no soundslike or afffix compression is used then the modes
have sligtly different meanings but, with the exception of
âbad-spellersâ, lower modes are faster and higher modes give better
suggestions.  Some modes may give identical results depending on the
language configuration.

5 Working With Dictionaries
***************************

5.1 Using âaspell-importâ
=========================

The âaspell-importâ Perl script will look for old personal dictionaries
and will import them into GNU Aspell.  It will look for both Ispell and
Aspell ones.  To use it, just run it from the command prompt.  If you
get an error about â/usr/bin/perlâ not being found, then instead try
âperl BINDIR/aspell-importâ.  When running the script if you get a
message like:

Error: No word lists can be found for the language "de".

This means that you have not installed support for the given language,
in this case âdeâ for German.  To rectify the situation download and
install a dictionary designed to work with GNU Aspell 0.50 or better.

5.2 How Aspell Selects an Appropriate Dictionary
================================================

If the âmasterâ option is set in any fashion (via the command line, the
âASPELL_CONFâ environment variable, or a configuration file) Aspell will
look for a dictionary of that name.  If one could not be found, it will
complain.

Otherwise it will use the value of the âlangâ option to search for an
appropriate dictionary.  If more than one dictionary is found for the
given language string then it will look for a dictionary with a matching
variety if the âvarietyâ option is set.  If it is not set it will look
for a dictionary without a variety.  If after matching the âlangâ and
âvarietyâ there is still more than one dictionary available it will find
one with the size closest to the value of the âsizeâ option.  The
default size is 60.  If Aspell cannot find a dictionary based on the
âlangâ option then it will give up and complain.

If the âlangâ option is not explicitly set its value will be based on
the âLC_MESSAGESâ locale.  This locale is generally taken from the
âLC_MESSAGESâ environment variable or the âLANGâ environment variable if
âLC_MESSAGESâ is not set.  However, if Aspell is being used as a library
from within another program which already explicitly set the locale then
it will use the locale of the library rather than the environment
variables.  If Aspell cannot determine the language from the
âLC_MESSAGESâ locale than it will default to âen_USâ.

The list option âdict-aliasâ can be used to influence which dictionary
is selected by creating an alias from one dictionary name to another.
This option is most useful when there is more than one dictionary for a
given language.  For example âadd-dict-alias en_US en_US-w_accentsâ will
cause Aspell to choose the accented version of the American English
dictionary instead of the non-accented version.  To add an alias use:

     add-dict-alias NAME VAL

5.3 Listing Available Dictionaries
==================================

For a list of available dictionaries use the command âaspell dump
dictsâ.  This will form a list of dictionaries that Aspell will search
when a dictionary is not specifically given.

5.4 Dumping the Contents of the Word List
=========================================

The dump command in âaspellâ will simply dump the contents of a word
list to âstdoutâ in a format that can be read back in with âaspell
createâ.

If no word list is specified the command will act on the default one.
For example the command

     aspell dump personal

will simply dump the contents of the current personal word list to
âstdoutâ.

5.5 Creating an Individual Word List
====================================

To create an individual main word list from a list of words use the
command

     aspell --lang=LANG create master ./BASE < WORDLIST

where BASE is the name of the word list and WORDLIST is the list of
words separated by white space.  The name of the word list will
automatically be converted to all lowercase.  The â./â is important
because without it Aspell will create the word list in the normal word
list directory.  If you are trying to create a word list in a language
other than English check the Aspell âdata-dirâ (usually
â/usr/share/aspellâ, use âaspell dump configâ to find out what it is on
your system) to see if a language data file exists for your language.
If not you will need to create one.  For more information on using
Aspell with other languages Adding Support For Other Languages.

This will create the file âBASEâ in the current directory.  To use the
new word list copy the file to the normal word list directory (use
âaspell configâ to find out what it is) and use the option
â--master=BASEâ.

During the creating of the dictionary you may get a number of warnings
or errors about invalid words or affixes.  By default Aspell will skip
any invalid words and remove invalid affixes.  If you rather that Aspell
simply accepts all words given then the option â--dont-validate-wordsâ
can be specified.  To avoid checking if affixes are valid use the option
â--dont-validate-affixesâ.  However, rather than disable checking, it is
preferable to clean the input word list.  This can be done by using the
command

     aspell --local-data-dir=./ --lang=LANG clean < WORDLIST > RESULT

which will clean the word list and output the results to RESULT.  By
default it will remove invalid characters from the beginning and end of
a word before resorting to skipping the word.  If you rather it just
skip the words than add the keyword strict:

     aspell --local-data-dir=./ --lang=LANG clean strict < WORDLIST > RESULT

The option â--clean-wordsâ can be be added when creating a dictionary if
you want Aspell to remove invalid characters from the beginning and end
of a word like the "clean" command does.  In addition the options
â--dont-skip-invalid-wordsâ and â--dont-clean-affixesâ can be specified
to turn the warnings into errors.

The compiled dictionaries are platform dependent.  They depend on the
endian order and (unless compiled with the â--enable-32-bit-hash-funâ
option) the size of the âsize_tâ type as it used in the hash function;
this type is generally different on 32 and 64-bit systems.  When a
dictionary is loaded the endian order and compatibility of the hash
function is checked.  Please do not distribute the compiled dictionaries
unless you are only distributing them for a particular platform such as
you would a binary.

Aspell is now also able to use special âmultiâ dictionaries.  for more
information How Aspell Selects an Appropriate Dictionary.

A personal and replacement word list can be created in a similar
fashion.

5.5.1 Format of the Replacement Word List
-----------------------------------------

The replacement word list has each replacement pair on its own line in
the following format

     misspelled_word correction

5.6 Working With Affix Info in Word Lists
=========================================

5.6.1 The Munch Command
-----------------------

The âmunchâ command takes a list of words from standard input and
outputs a list of possible root words and affixes.  The root may,
however, be invalid as it does not check them against the existing
dictionary.  For example the command:
     echo brother | aspell -l en munch
produces
     brother broth/R brothe/R

5.6.2 The Expand Command
------------------------

The âexpandâ command is the reverse of âmunchâ, it expands affix flags
to produce a list of words.  For example:
     echo both/R | aspell -l en expand
produces
     both bother

The formal usage is:
     aspell expand [LEVEL] [LIMIT]
Where LEVEL is the expansion level.  Valid values are between 1 and 3.
Level 1 is the default if not otherwise specified.  Level 2 causes the
original root/affix to be included, for example:
     both/R both bother
Level 3 causes multiple lines to be printed, one for each generated
word, with the original root/affix combination followed by the word it
creates:
     both/R both
     both/R bother
Levels larger than 3 may also be supported, but should not be used as
they may eventually be removed.

If a LIMIT parameter is given then only expansions which affect the
first LIMIT letters will be expanded.  If a base word is not completely
expanded for a given affix flag that flag will be left on the word.
Note that prefixes are always expanded.

5.6.3 The Munch-list Command
----------------------------

The âmunch-listâ command will reduce the size of word list via affix
compression.  It will reduce a list of words to a minimal (or close to
it) set of roots and affixes that will match the same list of words.
The list of words is read from standard input and the result, the
âmunchedâ list, is written to standard out.  Itâs usage is:

     aspell munch-list [keep] [single|multi] [simple] < INFILE > OUTFILE

where âsimpleâ, âsingleâ, âmultiâ, and âkeepâ are literal values.

The default algorithm used should give near optimum results.  In some
cases the set of words returned is, provably, the minimum number
possible.  In the typical case the number of words returned is within 1%
of the optimum number.

By default Aspell will remove redundant affix flags.  The âkeepâ flag
will avoid removing them, which can be useful if you want to include all
possible expansions for each base word.

When cross products are involved it may be beneficial to list a base
word more than once.  Unfortunately, the current version of Aspell can
not correctly handle multiple base words in a dictionary.  Therefore,
the current default behavior is to only include the one with the most
expansions.  All of them can be included via the âmultiâ flag.  Once
Aspell is able to handle multiple base words the default will be to
include them all.  The âsingleâ flag can be used to only include one of
them.

The âsimpleâ flag will select an alternate faster algorithm.  This
algorithm is very similar to the âmunchâ command distributed with
MySpell (the Open Office spell checker), however, it doesnât give nearly
as good results.  It does okay for the English word list but not for
some other languages such as German; the normal algorithm reduced a list
of 312,002 German words to 79,420 base words while the simple algorithm
only reduced it to 115,927 words.  This algorithm may disappear in a
future version of Aspell.

5.7 Format of the Personal and Replacement Dictionaries
=======================================================

5.7.1 Format of the Personal Dictionary
---------------------------------------

The personal dictionary generally has a filename of the form:

     .aspell.LANG.pws

And the file itself contains two parts.  The first part is a header line
of the form:

     personal_ws-1.1 LANG NUM [ENCODING]

where NUM is the number of words in the list.  This number is only used
as a hint, and thus does not have to be accurate.  When creating a new
dictionary it is perfectly acceptable for NUM to be 0.  The ENCODING is
optional and specifies the encoding of the word list.  If it is left out
the encoding is expected to be in the default encoding for the language
as specified by the âdata-encodingâ option.  See data-encoding.

The second part of simply a word list with one word per line.

5.7.2 Format of the Personal Replacement Dictionary
---------------------------------------------------

The personal replacement dictionary generally has a filename of the
form:

     .aspell.LANG.prepl

And the file itself contains two parts.  The first part is a header line
of the form:

     personal_repl-1.1 LANG NUM [ENCODING]

where NUM is currently unused and thus always 0.  As with the personal
dictionary the ENCODING is optional.

The second part simply a list of replacements with one replacement per
line with each replacement pair has the following format:

     MISSPELLED_WORD CORRECTION

5.8 Using Multi Dictionaries
============================

As with previous versions of Aspell you can specify the main dictionary
to use via the â-dâ or â--masterâ option.  However as of Aspell .32 you
can now also:

  1. Specify more than word list to use with the âextra-dictsâ option.

  2. Specify special _multi_ dictionaries.

The âextra-dictsâ is a list option.  To add a dictionary use
âadd-extra-dictsâ or to remove a dictionary from the list use
ârem-extra-dictsâ.

A _multi_ dictionary is a special file which is basically a list of
dictionary files to use.  A _multi_ dictionary must end in â.multiâ and
has roughly the same format as a configuration file with the only
accepted key being âaddâ.

5.9 Dictionary Naming
=====================

In order for Aspell to be able to correctly recognize a dictionary based
on the setting of the âLANGâ environment variable the dictionaries need
to be located somewhere Aspell can find them and they need to be _multi_
dictionaries.  Where Aspell looks for dictionaries depends on the value
of the âdict-dirâ and âword-list-pathâ option.

âdict-dirâ is generally âPREFIX/lib/aspellâ, and âword-list-pathâ is
generally empty.

Each dictionary that you expect Aspell to be able to find needs to have
a name in the following format:

     LANGUAGE[_REGION][-VARIETY][-SIZE].multi

where LANGUAGE is the two letter language code, REGION is the two letter
region code, VARIETY is any extra information to distinguish the word
list from other ones with the same language and spelling.  Multiple
varieties can be used by separating them with a â-â.  Finally, SIZE is
the size of the dictionary.  If no size is specified then the default
size of 60 will be assumed.

For example:

     en.multi
     en_US.multi
     en-medical.multi
     en-medical-85.multi
     en-85.multi
     de.multi

5.10 AWLI files
===============

In order for Aspell to find dictionaries that are located in odd places
or not named according to Dictionary Naming, an AWLI file needs
to be created for the dictionary and located in some place where Aspell
can find it.

Each AWLI file has a name in the following format:

     LANGUAGE[REGION][-VARIETY][-SIZE]-MODULE.awli

where the names have the same meaning as in Dictionary Naming,
and MODULE is the speller module to use, which should be set to DEFAULT
for now since there is only one speller module.

Each âawliâ file for an Aspell word list should then contain exactly one
line which contains the full path of the main word list.

6 Writing programs to use Aspell
********************************

There are two main ways to use Aspell from within your application.
Through the external C API or through a pipe.  The internal Aspell API
can be used directly but that is not recommended as the actual Aspell
API is constantly changing.

6.1 Through the C API
=====================

The Aspell library contains two main classes and several helper classes.
The two main classes are âAspellConfigâ and âAspellSpellerâ.  The
âAspellConfigâ class is used to set initial defaults and to change spell
checker specific options.  The âAspellSpellerâ class does most of the
real work.  The âC APIâ is responsible for managing the dictionaries,
checking if a word is in the dictionary, and coming up with suggestions
among other things.  There are many helper classes the important ones
are âAspellWordListâ, âAspellMutableWordListâ, âAspell*Enumerationâ.
The âAspellWordListâ classes is used for accessing the suggestion list,
as well as the personal and suggestion word list currently in use.  The
âAspellMutableWordListâ is used to manage the personal, and perhaps
other, word lists.  The âAspell*Enumerationâ classes are used for
iterating through a list.

6.1.1 Usage
-----------

To use Aspell your application should include âaspell.hâ.  In order to
ensure that all the necessary libraries are linked in libtool should be
used to perform the linking.  When using libtool simply linking with
â-laspellâ should be all that is necessary.  When using shared libraries
you might be able to simply link â-laspellâ, but this is not
recommended.  This version of Aspell uses the CVS version of libtool
however released versions of libtool should also work.

When your application first starts you should get a new configuration
class with the command:

     AspellConfig * spell_config = new_aspell_config();

which will create a new âAspellConfigâ class.  It is allocated with
ânewâ and it is your responsibility to delete it with
âdelete_aspell_configâ.  Once you have the config class you should set
some variables.  The most important one is the language variable.  To do
so use the command:

     aspell_config_replace(spell_config, "lang", "en_US");

which will set the default language to use to American English.  The
language is expected to be the standard two letter ISO 639 language
code, with an optional two letter ISO 3166 country code after an
underscore.  You can set the preferred size via the âsizeâ option, any
extra info via the âvarietyâ option, and the encoding via the âencodingâ
option.  Other things you might want to set is the preferred spell
checker to use, the search path for dictionaries, and the like â see
The Options, for a list of all available options.

Whenever a new document is created a new âAspellSpellerâ class should
also be created.  There should be one speller class per document.  To
create a new speller class use the ânew_aspell_spellerâ and then cast it
up using âto_aspell_spellerâ like so:

     AspellCanHaveError * possible_err = new_aspell_speller(spell_config);
     AspellSpeller * spell_checker = 0;
     if (aspell_error_number(possible_err) != 0)
       puts(aspell_error_message(possible_err));
     else
       spell_checker = to_aspell_speller(possible_err);

which will create a new âAspellSpellerâ class using the defaults found
in âspell_configâ.  To find out which dictionary is selected the âlangâ,
âsizeâ, and âvarietyâ options may be examined.  To find out the exact
name of the dictionary the âmasterâ option may be examined as well as
the âmaster-flagsâ options to see if there were any special flags that
were passed on to the module.  The âmoduleâ option way also be examined
to figure out which speller module was selected, but since there is only
one this option will always be the same.

If for some reason you want to use different defaults simply clone
âspell_configâ and change the setting like so:

     AspellConfig * spell_config2 = aspell_config_clone(spell_config);
     aspell_config_replace(spell_config2, "lang","nl");
     possible_err = new_aspell_speller(spell_config2);
     delete_aspell_config(spell_config2);

Once the speller class is created you can use the âcheckâ method to see
if a word in the document is correct like so:

     int correct = aspell_speller_check(spell_checker, WORD, SIZE);

WORD is expected to be a âconst char *â character string.  SIZE is the
length of the string or â-1â if the string is null terminated.
âaspell_speller_checkâ will return â0â if it is not found and non-zero
otherwise.

If you are using the âucs-2â or âucs-4â encoding then the string is
expected to be either a 2 or 4 byte wide integer (respectively) and the
â_wâ macro vesion should be used:

     int correct = aspell_speller_check_w(spell_checker, WORD, SIZE);

The macro will cast the string to to the correct type and convert SIZE
into bytes for you and then a call the special wide version of the
function that will make sure the encoding is correct for the type passed
in.  For compatibility with older versions of Aspell the normal non-wide
functions can still be used provided that the size of the string, in
bytes, is also passed in.  Null terminated âucs-2â or âucs-4â are no
longer supported when using the non-wide functions.

If the word is not correct, then the âsuggestâ method can be used to
come up with likely replacements.

     AspellWordList * suggestions = aspell_speller_suggest(spell_checker,
                                                           WORD, SIZE);
     AspellStringEnumeration * elements = aspell_word_list_elements(suggestions);
     const char * word;
     while ( (word = aspell_string_enumeration_next(aspell_elements)) != NULL )
     {
       // add to suggestion list
     }
     delete_aspell_string_enumeration(elements);

Notice how âelementsâ is deleted but âsuggestionsâ is not.  The value
returned by âsuggestionsâ is only valid to the next call to âsuggestâ.

If you are using the âucs-2â or âucs-4â encoding then, in addition to
using the â_wâ macro for the âsuggestâ method, you should also use the
â_wâ macro with the ânextâ method which will cast the string to the
correct type for you.  For example, if you are using the âucs-2â
encoding and the string is a âconst uint16_t *â then you should use:

     AspellWordList * suggestions = aspell_speller_suggest_w(spell_checker,
                                                             WORD, SIZE);
     AspellStringEnumeration * elements = aspell_word_list_elements(suggestions);
     const uint16_t * word;
     while ( (word = aspell_string_enumeration_next_w(uint16_t, aspell_elements)) != NULL )
     {
       // add to suggestion list
     }
     delete_aspell_string_enumeration(elements);

Once a replacement is made the âstore_replâ method should be used to
communicate the replacement pair back to the spell checker (for the
reason, see Notes on Storing Replacement Pairs).  Its usage is as
follows:

     aspell_speller_store_repl(spell_checker, MISSPELLED_WORD, SIZE,
                               CORRECTLY_SPELLED_WORD, SIZE);

If the user decided to add the word to the session or personal
dictionary the the word can be be added using the âadd_to_sessionâ or
âadd_to_personalâ methods respectively like so:

     aspell_speller_add_to_session|personal(spell_checker, word, size);

It is better to let the spell checker manage these words rather than
doing it yourself so that the words have a chance of appearing in the
suggestion list.

Finally, when the document is closed the âAspellSpellerâ class should be
deleted like so:

     delete_aspell_speller(spell_checker);

6.1.2 API Reference
-------------------

Methods that return a boolean result generally return âfalseâ on error
and âtrueâ otherwise.  To find out what went wrong use the
âerror_numberâ and âerror_messageâ methods.  Unless otherwise stated
methods that return a âconst char *â will return âNULLâ on error.  In
general, the character string returned is only valid until the next
method which returns a âconst char *â is called.

For the details of the various classes please see the header files.  In
the future I will generate class references using some automated tool.

6.1.3 Examples
--------------

Two simple examples are included in the examples directory.  The
âexample-câ program demonstrates most of the Aspell library
functionality and the âlist-dictsâ lists the available dictionaries.

6.1.4 Notes About Thread Safety
-------------------------------

Aspell should be thread safe, when used properly, as long as the
underlying compiler, C and C++ library is thread safe.  Aspell objects,
including the AspellSpeller class, should not be used by multiple
threads unless they are protected by locks or it is only accessed by
read-only methods.  A method is read-only only if a âconstâ object is
passed in.  Many methods that seam to be read-only are not because they
may store state information in the object.

6.2 Through A Pipe
==================

When given the âpipeâ or â-aâ command, Aspell goes into a pipe mode that
is compatible with âispell -aâ.  Aspell also defines its own set of
extensions to Ispell pipe mode.

6.2.1 Format of the Data Stream
-------------------------------

In this mode, Aspell prints a one-line version identification message,
and then begins reading lines of input.  For each input line, a single
line is written to the standard output for each word checked for
spelling on the line.  If the word was found in the main dictionary, or
your personal dictionary, then the line contains only a â*â.

If the word is not in the dictionary, but there are suggestions, then
the line contains an â&â, a space, the misspelled word, a space, the
number of near misses, the number of characters between the beginning of
the line and the beginning of the misspelled word, a colon, another
space, and a list of the suggestions separated by commas and spaces.

If you set the option ârun-togetherâ or âcamel-caseâ and Aspell thinks
this word is a combination of two words in the dictionary, then it
prints a single â-â in one line.

Finally, if the word does not appear in the dictionary, and there are no
suggestions, then the line contains a â#â, a space, the misspelled word,
a space, and the character offset from the beginning of the line.  Each
sentence of text input is terminated with an additional blank line,
indicating that Aspell has completed processing the input line.

These output lines can be summarized as follows:

     *OK*: *
     *Suggestions*: & original count offset: miss, miss, âŚ
     *None*: # original offset

When in the â-aâ mode, Aspell will also accept lines of single words
prefixed with any of â*â, â&â, â@â, â+â, â-â, â~â, â#â, â!â, â%â, or
â^â.  A line starting with â*â tells Aspell to insert the word into the
userâs dictionary.  A line starting with â&â tells Aspell to insert an
all-lowercase version of the word into the userâs dictionary.  A line
starting with â@â causes Aspell to accept this word in the future.  A
line starting with â+â, followed immediately by a valid mode will cause
Aspell to parse future input according the syntax of that formatter.  A
line consisting solely of a â+â will place Aspell in TeX/LaTeX mode
(similar to the â-tâ option) and â-â returns Aspell to its default mode
(which is Nroff unless otherwise specified).  (but these commands are
obsolete).  A line â~â, is ignored for Ispell compatibility.  A line
prefixed with â#â will cause the personal dictionaries to be saved.  A
line prefixed with â!â will turn on terse mode (see below), and a line
prefixed with â%â will return Aspell to normal (non-terse) mode.  Any
input following the prefix characters â+â, â-â, â#â, â!â, â~â, or â%â is
ignored, as is any input following.  To allow spell-checking of lines
beginning with these characters, a line starting with â^â has that
character removed before it is passed to the spell-checking code.  It is
recommended that programmatic interfaces prefix every data line with an
uparrow to protect themselves against future changes in Aspell.

To summarize these:

â*WORDâ Add a word to the personal dictionary
â&WORDâ Insert the all-lowercase version of the word in the personal
        dictionary
â@WORDâ Accept the word, but leave it out of the dictionary
â#â     Save the current personal dictionary
â~â     Ignored for Ispell compatibility.
â+â     Enter TeX mode.
â+MODEâ Enter the mode specified by MODE.
â-â     Enter the default mode.
â!â     Enter terse mode
â%â     Exit terse mode
â^â     Spell-check the rest of the line

In terse mode, Aspell will not print lines beginning with â*â, which
indicate correct words.  This significantly improves running speed when
the driving program is going to ignore correct words anyway.

In addition to the above commands which are designed for Ispell
compatibility Aspell also supports its own extensions.  All Aspell
extensions follow the following format.

     $$COMMAND [DATA]

Where DATA may or may not be required depending on the particular
command.  Aspell currently supports the following commands:

âcs OPTION,VALUEâ        Change a configuration option.
âcr OPTIONâ              Prints the value of a configuration option.
âppâ                     Returns a list of all words in the current
                         personal wordlist.
âpsâ                     Returns a list of all words in the current
                         session dictionary.
âlâ                      Returns the current language name.
âra MIS,CORâ             Add the word pair to the replacement
                         dictionary for later use.  Returns nothing.

Anything returned is returned on its own line.  All lists returned have
the following format

     num of items: item1, item2, etc

_(Part of the preceding section was directly copied out of the Ispell
manual)_

6.3 Notes on Storing Replacement Pairs
======================================

The âstore_replâ method and the â$$raâ should be used because Aspell is
able to learn from users misspellings.  For example on the first pass a
user misspells _beginning_ as _beging_ so Aspell suggests:

     begging, begin, being, Beijing, bagging, âŚ.

However the user then tries _begning_ and Aspell suggests

     beginning, beaning, begging, âŚ

so the user selects _beginning_.  However, later on in the document the
user misspells it as _begng_ (*not* _beging_).  Normally Aspell will
suggest.

     began, begging, begin, begun, âŚ

However because it knows the user misspelled _beginning_ as _beging_ it
will instead suggest:

     beginning, began, begging, begin, begun âŚ

I myself often misspelled beginning (and still do) as something close to
begging and too many times wind up writing sentences such as "begging
with âŚ".

Please also note that replacements commands have a memory.  Which means
if you first store the replacement pair:

     sicolagest -> psycolagest

then store the replacement pair

     psycolagest -> psychologist

The replacement pair

     sicolagest -> psychologist

will also get stored so that you donât have to worry about it.

7 Adding Support For Other Languages
************************************

Before you consider adding support for Aspell, first make sure that
someone else has not already done it.  A good number of dictionaries off
the Aspell home page at <http://aspell.net>.  If your language is not
listed above feel free to send mail to aspell-dict at gnu org for help
in getting started.

Adding a language to Aspell is fairly straightforward.  You basically
need to create the language data file, and compile a new word list.

7.1 The Language Data File
==========================

The basic format of the language data file is the same as it is for the
Aspell configuration file.  It is named âLANG.datâ and is located in the
architecture independent data dir for Aspell (option âdata-dirâ) which
is usually âPREFIX/share/aspellâ.  Use âaspell configâ to find out where
it is in your installation.  By convention the language name should be
the two letter ISO 639 language code if it exists, if not use the three
letter code.

The language data file has several mandatory fields, and several
optional ones.  All fields are case sensitive and should be in all lower
case.

The two mandatory fields are ânameâ and âcharsetâ.

ânameâ is the name of the language and should be the same as the file
name (without the â.datâ).

âcharsetâ is the 8-bit character set Aspell will expect the word lists
to be formatted in.  If possible choose from one of the standard ones
provided with Aspell.  These are âiso-8859-*â, âkoi8-*â, or âvisciiâ.
If your language does not require any non-ascii characters choose
âiso-8859-1â.  If one of these standard character sets is not suitable
for your language then you can create a new one.  See Creating A New Character Set.

The optional fields are as follows:

âdata-encodingâ

     The encoding the language data files are expected to be in as well
     as the default encoding to use when saving the personal
     dictionaries.  It can be either âutf-8â or any of the 8-bit
     encoding that Aspell supports.  If not set, then it defaults to
     âcharsetâ.

âspecialâ

     Non-letter characters that can appear in your language such as the
     â'â and â-â.  The format for the value is a list separated by
     spaces.  Each item of the list has the following format.

          <char> <begin><middle><end>

     CHAR is the non-letter character in question.  BEGIN, MIDDLE, END
     are either a â-â or a â*â.  A star for BEGIN means that the
     character can begin a word, a â-â means it canât.  The same is true
     for MIDDLE and END.  For example, the entry for the â'â in English
     is:

          ' -*-

     To include more than one middle character just list them one after
     another on the same line.  For example, to make both the â'â and
     the â-â a middle character, use the following line in the language
     data file:

          special ' -*- - -*-

     However, please be aware that adding special characters can have
     unintended consequences due to limitations of Aspell.  For example
     if the â-â was accepted as a middle character, then _every_ word
     with a â-â in it would be flagged as a spelling error unless that
     exact word is in the dictionary, even if both parts are in the
     dictionary.  Also, having a â.â as an end character will cause the
     â.â to be part of any misspelled words.  Which can get very
     annoying if you misspell a word at the end of a sentence.

âsoundslikeâ

     The name of the soundslike data for the language.  The data is
     expected to be in the file âNAME_phonet.datâ.

     If NAME is âsimpileâ then a very simple soundslike is used.  This
     is not as powerful as full phonetic soundslike but it can be
     computed a lot faster.  (see The Simple Soundslike)

     If the soundslike name is ânoneâ, or this option is not specified,
     then no soundslike will be used.  The effective soundslike is the
     word converted to all lowercase and possibly with accents stripped
     depending on the âstore-asâ option.  For languages with phonetic
     spelling the difference will not be very noticeable.  However, for
     languages with non-phonetic spelling there will be a noticeable
     difference.  The difference you notice will depend on the quality
     of the soundslike data file.  If you do not notice much of a
     difference for a language with non-phonetic spelling that is a good
     indication that the soundslike data is not rough enoughâor the
     words you are trying are not that badly misspelled.

âinvisible-soundslikeâ

     Avoid storing the soundslike information with the word.  Instead it
     is computed as needed.  This option defaults to true if the
     soundslike is ânoneâ or âsimpileâ, and false when a phonetic
     soundslike is used.

ârepl-tableâ

     See Replacement Tables.

âkeyboardâ

     The base name of the keyboard definition file to use.  For more
     information see Notes on Typo-Analysis.

âsug-split-charâ

     A list of characters which specifies which characters to insert
     between two words when a word is split.  This is a list option.

âaffixâ
âaffix-compressâ
âpartially-expandâ

     See Affix Compression.

âstore-asâ

     How the words are indexed in the dictionary.  If "stripped" then
     the word is indexed in a lower case and de-accented form.  If
     "lower", then the word is indexed in a lower case form but with
     accent info still intact.  This just controls how the word is
     indexed, not how it is stored.  The default is "stripped" unless
     affix compression is used.

ânorm-requiredâ

     Should be set to true if your language makes use of private use
     characters or when Normalization Form C is not the same as full
     composition.

ânormalizeâ

ânorm-formâ

Additional options includes options to control how run-together words
are handled the same way as they are in the normal configuration files.
for more information, please Controlling the Behavior of Compound Words.

7.2 Compiling the Word List
===========================

Once you have a working language data file installed in the right place
you are ready to compile the main word list.  To find out what to do,
see Working With Dictionaries.  This section also includes
instructions for creating the AWLI file.

7.3 Phonetic Code
=================

Aspell is in fact the spell checker that comes up with the best
suggestions if it finds an unknown word.  One reason is that it does not
just compare the word with other words in the dictionary (like Ispell
does) but also uses phonetic comparisons with other words.

The new table driven phonetic code is very flexible and setting up
phonetic transformation rules for other languages is not difficult but
there can be a number of stumbling blocks â thatâs why I wrote this
section.

The main phonetic code is free of any language specific code and should
be powerful enough to allow setting up rules for any language.  Anything
which is language specific is kept in a plain text file and can easily
be edited.  So itâs even possible to write phonetic transformation rules
if you donât have any programming skills.  All you need to know is how
words of the language are written and how they are pronounced.

7.3.1 Syntax of the transformation array
----------------------------------------

In the translation array there are two strings on each line; the first
one is the search string (or switch name) and the second one is the
replacement string (or switch parameter).  The line

     version   VERSION

is also required to appear somewhere in the translation array.  The
version string can be anything but it should be changed whenever a new
version of the translation array is released.  This is important because
it will keep Aspell from using a compiled dictionary with the wrong set
of rules.  For example, if when coming up with suggestion for âhalloâ,
Aspell will use the new rules to come up with the soundslike say âH*L*â,
but if âhelloâ is stored in the dictionary using the old rules as âHLâ
instead of âH*L*â Aspell will never be able to come up with âhelloâ.  So
to solve this problem Aspell checks if the version strings match and
aborts with an error if they donât.  Thus it is important to update it
whenever a new version of the translation array is released.  This is
only a problem with the main word list as the personal word lists are
now stored as simple word lists with a single header line (i.e.  no
soundslike data).

Each non switch line represents one replacement (transformation) rule.
Words beginning with the same letter must be grouped together; the order
inside this group does not depend on alphabetical issues but it gives
priorities; the higher the rule the higher the priority.  Thatâs why the
first rule that matches is applied.  In the following example:

     GH   _
     G    K

âGH -> _â has higher priority than âG -> Kâ

â_â represents the empty string ââ.  If âGH -> _â came after âG -> Kâ,
the second rule would never match because the algorithm would stop
searching for more rules after the first match.  The above rules
transform any âGHâ to an empty string (delete them) and transforms any
other âGâ to âKâ.

At the end of the first string of a line (the search string) there may
optionally stand a number of characters in brackets.  One (only one!)
of these characters must fit.  Itâs comparable with the â[ ]â brackets
in regular expressions.  The rule âDG(EIY) -> Jâ for example would match
any âDGEâ, âDGIâ and âDGYâ and replace them with âJâ.  This way you can
reduce several rules to one.

Before the search string, one or more dashes â-â may be placed.  Those
search strings will be matched totally but only the beginning of the
string will be replaced.  Furthermore, for these rules no follow-up rule
will be searched (what this is will be explained later).  The rule
âTCH-- â-> _ will match any word containing âTCHâ (like âmatchâ) but
will only replace the first character âTâ with an empty string.  The
number of dashes determines how many characters from the end will not be
replaced.  After the replacement, the search for transformation rules
continues with the not replaced âCHâ!

If a â<â is appended to the search string, the search for replacement
rules will continue with the replacement string and not with the next
character of the word.  The rule âPH< -> Fâ for example would replace
âPHâ with âFâ and then again start to search for a replacement rule for
âFâŚâ.  If there would also be rules like âFO â-> âOâ and âF -> _â then
words like âPHOXYZâ would be transformed to âOXYZâ and any occurrences
of âPHâ that are not followed by an âOâ will be deleted like âPHIXYZ ->
IXYZâ.  The second replacement however is not applied if the priority of
this rule is lower than the priority of the first rule.

Priorities are added to a rule by putting a number between 0 and 9 at
the end of the search string, for example âING6 -> Nâ.  The higher the
number the higher is the priority.

Priorities are especially important for the previously mentioned
follow-up rules.  Follow-up rules are searched beginning from the last
string of the first search string.  This is a bit complicated but I hope
this example will make it clearer:

     CHS      X
     CH       G

     HAU--1   H

     SCH      SH

In this example âCHSâ in the word âFUCHSâ would be transformed to âXâ.
If we take the word âDURCHSCHNITTâ then things look a bit different.
Here âCHâ belongs together and âSCHâ belongs together and both are
spoken separately.  The algorithm however first finds the string âCHSâ
which may not be transformed like in the previous word âFUCHSâ.  At this
point the algorithm can find a follow-up rule.  It takes the last
character of the first matching rule (âCHSâ) which is âSâ and looks for
the next match, beginning from this character.  What it finds is clear:
It finds âSCH -> SHâ, which has the same priority (no priority means
standard priority, which is 5).  If the priority is the same or higher
the follow-up rule will be applied.  Letâs take a look at the word
âSCHAUKELâ.  In this word âSCHâ belongs together and may not be taken
apart.  After the algorithm has found âSCH â-> âSHâ it searches for a
follow-up rule for âH+ââAUKELâ.  It finds âHAU--1 -> Hâ, but does not
apply it because its priority is lower than the one of the first rule.
You see that this is a very powerful feature but it also can easily lead
to mistakes.  If you really donât need this feature you can turn it off
by putting the line:

     followup      0

at the beginning of the phonetic table file.  As mentioned, for rules
containing a â-â no follow-up rules are searched but giving such rules a
priority is not totally senseless because they can be follow-up rules
and in that case the priority makes sense again.  Follow-up rules of
follow-up rules are not searched because this is in fact not needed very
often.

The control character â^â says that the search string only matches at
the beginning of words so that the rule âRH -> Râ will only apply to
words like âRHESUSâ but not âPERHAPSâ.  You can append another â^â to
the search string.  In that case the algorithm treats the rest of the
word totally separately from the first matched string at the beginning.
This is useful for prefixes whose pronunciation does not depend on the
rest of the word and vice versa like âOVER^^â in English for example.

The same way as â^â works does â$â only apply to words that end with the
search string.  âGN$ -> Nâ only matches on words like âSIGNâ but not
âSIGNUMâ.  If you use â^â and â$â together, both of them must fit
âENOUGH^$ -> NFâ will only match the word âENOUGHâ and nothing else.

Of course you can combine all of the mentioned control characters but
they must occur in this order: â< - priority ^ $â.  All characters must
be written in CAPITAL letters.

If absolutely no rule can be found â might happen if you use strange
characters for which you donât have any replacement rule â the next
character will simply be skipped and the search for replacement rules
will continue with the rest of the word.

If you want double letters to be reduced to one you must set up a rule
like âLL- -> Lâ.  If double letters in the resulting phonetic word
should be allowed, you must place the line:

     collapse_result     0

at the beginning of your transformation table file; otherwise set the
value to â1â.  The English rules for example strip all vowels from words
and so the word "GOGO" would be transformed to "K" and not to "KK" (as
desired) if âcollapse_resultâ is set to 1.  Thatâs why the English rules
have âcollapse_resultâ set to â0â.

By default, all accents are removed from a word before it is matched to
the soundslike rules.  If you do not want this then add the line

     remove_accents      0

at the beginning of your file.  The exact definition of an accent is
language dependent and is controlled via the character set file.  If you
set remove_accents to â0â then you should also set "store-as" to "lower"
in the language data file (not the phonetic transformation file)
otherwise Aspell will have problems when both the accented and the
de-accented version of a word appearing in the dictionary; it will
consider one of them as incorrectly spelled.

7.3.2 How do I start finally?
-----------------------------

Before you start to write an array of transformation rules, you should
be aware that you have to do some work to make sure that things you do
will result in correct transformation rules.

7.3.2.1 Things that come in handy
.................................

First of all, you need to have a large word list of the language you
want to make phonetics for.  It should contain about as many words as
the dictionary of the spell checker.  If you donât have such a list, you
will probably find an Ispell dictionary at
<http://fmg-www.cs.ucla.edu/geoff/ispell-dictionaries.html> which will
help you.  You can then make affix expansion via âispell -eâ and then
pipe it through âtr " " "\n"â to put one word on each line.  After that
you eventually have to convert special characters like âĂŠâ from Ispellâs
internal representation to latin1 encoding.  âsed s/e'/ĂŠ/gâ for example
would replace all âe'â with âĂŠâ.

The second is that you know how to use regular expressions and know how
to use âgrepâ.  You should for example know that:

     grep ^[^aeiou]qu[io] wordlist | less

will show you all words that begin with any character but âaâ, âeâ, âiâ,
âoâ or âuâ and then continue with âquiâ or âquoâ.  This stuff is
important for example to find out if a phonetic replacement rule you
want to set up is valid for all words which match the expression you
want to replace.  Taking a look at the regex(7) man page is a good idea.

7.3.2.2 What the phonetic code should do
........................................

Normal text comparison works well as long as the typer misspells a word
because he pressed one key he didnât really want to press.  In these
cases, mostly one character differs from the original word.

In cases where the writer didnât know about the correct spelling of the
word, the word may have several characters that differ from the original
word but usually the word would still sound like the original.  Someone
might think that âtoughâ is spelled âtaffâ.  No spell checker without
phonetic code will come to the idea that this might be âtoughâ, but a
spell checker who knows that âtaffâ would be pronounced like âtoughâ
will make good suggestions to the user.  Another example could be
âfunetikâ and âphoneticâ.

From these examples you can see that the phonetic transformation should
not be too fussy and too precise.  If you implement a whole phonetic
dictionary as you can find it in books this will not be very useful
because then there could still be many characters differing from the
misspelled and the desired word.  What you should do if you implement
the phonetic transformation table is to reduce the number of used
letters to the only really necessary ones.

Characters that sound similar should be reduced to one.  In the English
language for example âZâ sounds like âSâ and thatâs why the
transformation rule âZ -> Sâ is present in the replacement table.  âPH
is spoken like âF and so we have a âPH -> Fâ rule.

If you take a closer look you will even see that vowels sound very
similar in the English language: âcontradictionâ, âcuntradictionâ,
âcantradictionâ or âcentradictionâ in fact sound nearly the same, donât
they?  Therefore the English phonetic replacement rules not only reduce
all vowels to one but even remove them all (removing is done by just
setting up no rule for those letters).  The phonetic code of
âcontradictionâ is âKNTRTKXNâ and if you try to read this letter-monster
loud you will hear that it still sound a bit like âcontradictionâ.  You
also see that âDâ is transformed to âTâ because they nearly sound the
same.

If you think you have found a regularity you should _always_ take your
word list and âgrepâ for the corresponding regular expression you want
to make a transformation rule for.  An example: If you come to the idea
that all English words ending on âoughâ sound like âAFâ at the end
because you think of âenoughâ and âtoughâ.  If you then âgrepâ for the
corresponding regular expression by âgrep -i ough$ wordlistâ you will
see that the rule you wanted to set up is not correct because the rule
doesnât fit to words like âalthoughâ or âboughâ.  So you have to define
your rule more precisely or you have to set up exceptions if the number
of words that differ from the desired rule is not too big.

Donât forget about follow-up rules which can help in many cases but
which also can lead to confusion and unwanted side effects.  Itâs also
important to write exceptions in front of the more general rules (âGHâ
before âGâ etc.).

If you think you have set up a number of rules that may produce some
good results try them out!  If you run Aspell as âaspell
--lang=YOUR_LANGUAGE pipeâ you get a prompt at which you can type in
words.  If you just type words Aspell checks them and eventually makes
suggestions if they are misspelled.  If you type in â$$Sw WORDâ you will
see the phonetic transformation and you can test out if your work does
what you want.

Another good way to check that changes you make to your rules donât have
any bad side effects is to create another list from your word list which
contains not only the word of the word list but also the corresponding
phonetic version of this word on the same line.  If you do this once
before the change and once after the change you can make a diff (see
âman diffâ) to see what _really_ changed.  To do this use the command
âaspell --lang=YOUR_LANGUAGE soundslikeâ.  In this mode Aspell will
output the the original word and then its soundslike separated by a tab
character for each word you give it.  If you are interested in seeing
how the algorithm works you can download a set of useful programs from
<http://members.xoom.com/maccy/spell/phonet-utils.tar.gz>.  This
includes a program that produces a list as mentioned above and another
program which illustrates how the algorithm works.  It uses the same
transformation table as Aspell and so it helps a lot during the process
of creating a phonetic transformation table for Aspell.

During your work you should write down your basic ideas so that other
people are able to understand what you did (and you still know about it
after a few weeks).  The English table has a huge documentation appended
as an example.

Now you can start experimenting with all the things you just read and
perhaps set up a nice phonetic transformation table for your language to
help Aspell to come up with the best correction suggestions ever seen
also for your language.  Take a look at the Aspell homepage to see if
there is already a transformation table for your language.  If there is
one you might also take a look at it to see if it could be improved.

If you think that this section helped you or if you think that this is
just a waste of time you can send any feedback to <bjoern.jacke@gmx.de>.

7.4 The Simple Soundslike
=========================

The simple soundslike goes something like this:

     sl0[0] = lookup0(word[0])
     for (i = 1; i < size; i++)
       sl0[i] = lookup(word[i]);
     s = 0;
     for (i = 0; i < size; i++)
       sl.append(al0[i]) unless sl0[i] == 0 || sl0[i] == sl0[i-1];

Basically each character can be converted to another character or
deleted.  A separate lookup table is used for the first character.  If
the same soundslike letter is repeated, the duplicate is removed.

By default all accents are removed, and all vowels are deleted unless
they appear at the start of the word in which case they are converted to
a â*â.  The exact behavior can be customized via the character data
file.

The simplified soundslike has the advantage that it is very fast to
compute and thus does not need to be stored with a word.  Also, when
affix compression is used and the âpartially-expandâ is given the
results will be identical to the results when affix compression is not
used.

Of course it is not nearly as powerful as the phonetic soundslike.

7.5 Replacement Tables
======================

When phonetic code is not used a replacement table can be used instead.
To enable the use of a replacement table add the line ârepl-table LANGâ,
in which case the replacement table is excepted to be in the file
âLANG_repl.datâ.  A complete file name can also be specified in place of
LANG.  For compatibility with MySpell the replacement table can also be
part of the affix file, in which case ârepl-tableâ will be
âLANG_affix.dat"â.

Replacement table syntax:

     REP [number_of_replacement_definitions]
     REP [what] [replacement]
     REP [what] [replacement]

For example a possible English replacement table definition to handle
misspelled consonants:

     REP 8
     REP f ph
     REP ph f
     REP f gh
     REP gh f
     REP j dg
     REP dg j
     REP k ch
     REP ch k

7.6 Affix Compression
=====================

Aspell, as of version 0.60, now has support for affix compression.  The
codebase comes from MySpell found in OpenOffice.

To add support for affix compression add the following lines to the
language data file.

     affix          LANG
     affix-compress true

The line âaffix LANGâ adds support for recognizing affix information,
and the line âaffix-compress trueâ enables affix compression.

The affix file is expected to be named âLANG_affix.datâ.  It is the
exact same format as those used by MySpell.  More information can be
found in the myspell/ directory of the distribution or at
<http://lingucomponent.openoffice.org/dictionary.html>.

Affix compression can also be used with soundslike lookup.  Aspell does
this by only storing the soundslike for the root word.  When a word is
misspelled it will search for a soundslike close to all possible roots
of the misspelled word.

When no soundslike information, or the simple soundslike, is used it may
be beneficial to specify the option âpartially-expandâ which will
partially expand a word with affix information so that the affix flags
do not affect the first 3 letters of the word.  This will allow Aspell
to get more accurate results when scanning the list for near misses
since the full word can be used and not just the root.  Specifying this
option, however, will also effectively expand any prefixes.  Thus this
option should not be used for prefix heavy languages such as Hebrew.

An existing word list, without affix info, can be affix compressed using
using âaspell munch-listâ.

7.6.1 Format of the Affix File
------------------------------

An affix is either a prefix or a suffix attached to root words to make
other words.  For example supply -> supplied by dropping the "y" and
adding an "ied" (the suffix).

Here is an example of how to define one specific suffix borrowed from
the English affix file.

     SFX D Y 4
     SFX D   0     d          e
     SFX D   y     ied        [^aeiou]y
     SFX D   0     ed         [^ey]
     SFX D   0     ed         [aeiou]y

This file is space delimited and case sensitive.  So this information
can be interpreted as follows:

The first line has 4 fields:

1    SFX         indicates this is a suffix
2    D           is the name of the character which represents this
                 suffix
3    Y           indicates it can be combined with prefixes (cross
                 product)
4    4           indicates that sequence of 4 affix entries are needed to
                 properly store the affix information

The remaining lines describe the unique information for the 4 affix
entries that make up this affix.  Each line can be interpreted as
follows: (note fields 1 and 2 are used as a check against line 1 info)

1    SFX         indicates this is a suffix
2    D           is the name of the character which represents this affix
3    y           the string of chars to strip off before adding affix (a
                 0 here indicates the NULL string)
4    ied         the string of affix characters to add (a 0 here
                 indicates the NULL string)
5    [^aeiou]y   the conditions which must be met before the affix can be
                 applied

Field 5 is interesting.  Since this is a suffix, field 5 tells us that
there are 2 conditions that must be met.  The first condition is that
the next to the last character in the word must _not_ be any of the
following "a", "e", "i", "o" or "u".  The second condition is that the
last character of the word must end in "y".

7.6.2 When Compared With Ispell
-------------------------------

Now for comparison purposes, here is the same information from the
Ispell âenglish.affâ compression file which was used as the basis for
the OOo one.

     flag *D:
         E           >       D               # As in create > created
         [^AEIOU]Y   >       -Y,IED          # As in imply > implied
         [^EY]       >       ED              # As in cross > crossed
         [AEIOU]Y    >       ED              # As in convey > conveyed

The Ispell information has exactly the same information but in a
slightly different (case-insensitive) format:

Here are the ways to see the mapping from Ispell .aff format to our OOo
format.

  1. The Ispell english.aff has flag D under the "suffix" section so you
     know it is a suffix.

  2. The D is the character assigned to this suffix

  3. â*â indicates that it can be combined with prefixes

  4. Each line following the : describes the affix entries needed to
     define this suffix

        â˘ The first field is the conditions that must be met.
        â˘ The second field is after the > if a "-" occurs is the string
          to strip off (can be blank).
        â˘ The third field is the string to add (the affix)

In addition all chars in Ispell aff files are in uppercase.

7.6.3 Specifying Affix Flags
----------------------------

Affix flags are specified in the word list by specifying them after the
â/â character:

     WORD/FLAGS

For example:

     create/DG

will associate the âDâ and âGâ flag with the word create.

7.7 Controlling the Behavior of Compound Words
==============================================

Aspell has support for unconditionally accepting run-together words or
accepting camelCase words.

Support for unconditionally accepting run-together words can either be
turned on in the language data file or as a normal option via the
ârun-togetherâ option.  The ârun-together-limitâ options controls the
maximum number of words that can be strung together, the default is
normally 2.  The ârun-together-minâ options controls the minimum length
of the individual components of the run together word, the default is
normally 3.  Both the ârun-together-limitâ and ârun-together-minâ option
may be specified in both the language data file or as a normal option.

Support for accepting camelCase words can be enabled via the
âcamel-caseâ option.  When this option is enabled Aspell will accept
âcamelCaseâ but will reject âcamelcaseâ.  In addition, Aspell will
attempt to provide reasonable suggestions when a camelCase word is
misspelled.  It will correct typos such as âcamelcaseâ or âcamelcAseâ
and suggest âcamelCaseâ.  If a single part of a camelCase word is
misspelled it will attempt to correct that part.  When camelCase mode is
enabled Aspell will not attempt to split a word by default, to change
this simply set âsug-split-charâ.

7.8 Creating A New Character Set
================================

If there is not a standard character set for your language then you can
invent one.  The new charset will only be used by Aspell internally.  If
the option âdata-encodingâ is set to âutf-8â, and your current locale
character type is always set to âutf-8â, then you can use UTF-8 for
everything and not worry yourself that an 8-bit character set is being
used internally.  If your language has no more than 210 distinct
symbols, including different capitalizations and accents, then Aspell
can support it.

The first thing to do is to download the Aspell lang package (see
Creating An Official Dictionary Package) and check if one of the
provided charsets in this package will suite your needs.  Non-standard
character sets are provided for many scripts and languages.  If not,
then see the included âREADMEâ file for instructions on creating a new
one.  Version 0.1, and 0.2 of mkchardata _will not_ work as the format
of the character data file has changed.

7.9 Creating An Official Dictionary Package
===========================================

Once you have a basic dictionary working, you should consider creating
an official package so that it can be distributed with Aspell.  To do so
download the aspell-lang package available at
<ftp://ftp.gnu.org/gnu/aspell/aspell-lang-VERSION.tar.bz2> or in the
âaspell-langâ module in the Aspell CVS repository available at
<https://savannah.gnu.org/cvs/?group=aspell>.  See the included âREADMEâ
file for what to do.  Or, send mail to aspell-dict at gnu org asking for
help on how to get started.

Appendix A Implementation Notes
*******************************

A.1 Aspell Suggestion Strategy
==============================

The magic behind my spell checker comes from merging Lawrence Philips
excellent metaphone algorithm and Ispellâs near miss strategy which is
inserting a space or hyphen, interchanging two adjacent letters,
changing one letter, deleting a letter, or adding a letter.

The process goes something like this.

  1. Convert the misspelled word to its soundslike equivalent (its
     metaphone for English words).

  2. Find all words that have a soundslike within one or two edit
     distances from the original wordâs soundslike.  The edit distance
     is the total number of deletions, insertions, exchanges, or
     adjacent swaps needed to make one string equivalent to the other.
     When set to only look for soundslikes within one edit distance it
     tries all possible soundslike combinations and checks if each one
     is in the dictionary.  When set to find all soundslike within two
     edit distances it scans through the entire dictionary and quickly
     scores each soundslike.  The scoring is quick because it will give
     up if the two soundslikes are more than two edit distances apart.

  3. Find misspelled words that have a correctly spelled replacement by
     the same criteria of step number 2 and 3.  That is the misspelled
     word in the word pair (such as âteh -> theâ) would appear in the
     suggestions list as if it was a correct spelling.

  4. Score the result list and return the words with the lowest score.
     The score is roughly the weighed average of the weighed edit
     distance of the word to the misspelled word and the soundslike
     equivalent of the two words.  The weighted edit distance is like
     the edit distance except that the various edits have weights
     attached to them.

  5. Replace the misspelled words that have correctly spelled
     replacements with their replacements and remove any duplicates that
     might arise because of this.

Please note that the soundslike equivalent is a rough approximation of
how the words sounds.  It is not the phoneme of the word by any means.
For more details about exactly how each step is performed please see the
file âsuggest.ccâ.  For more information on the metaphone algorithm
please see the data file âenglish_phonet.datâ.

A.2 Notes on 8-bit Characters
=============================

There is a very good reason I use 8-bit characters in Aspell.  Speed and
simplicity.  While many parts of my code can fairly easily be converted
to some sort of wide character as my code is clean.  Other parts cannot
be.

One of the reasons why is because in many, many places I use a direct
lookup to find out various information about characters.  With 8-bit
characters this is very feasible because there is only 256 of them.
With 16-bit wide characters this will waste a LOT of space.  With 32-bit
characters this is just plain impossible.  Converting the lookup tables
to another form is certainly possible but degrades performance
significantly.

Furthermore, some of my algorithms rely on words consisting only on a
small number of distinct characters (often around 30 when case and
accents are not considered).  When the possible character can consist of
any Unicode character this number becomes several thousand, if that.  In
order for these algorithms to still be used, some sort of limit will
need to be placed on the possible characters the word can contain.  If I
impose that limit, I might as well use some sort of 8-bit characters set
which will automatically place the limit on what the characters can be.

There is also the issue of how I should store the word lists in memory?
As a string of 32 bit wide characters.  Now that is using up 4 times
more memory than characters would and for languages that can fit within
an 8-bit character that is, in my view, a gross waste of memory.  So
maybe I should store them is some variable width format such as UTF-8.
Unfortunately, way, way too many of the algorithms will simply not work
with variable width characters without significant modification which
will very likely degrade performance.  So the solution is to work with
the characters as 32-bit wide characters and then convert it to a
shorter representation when storing them in the lookup tables.  Now that
can lead to an inefficiency.  I could also use 16 bit wide characters,
however that may not be good enough to hold all future versions of
Unicode and therefore has the same problems.

As a response to the space waste used by storing word lists in some sort
of wide format some one asked:

     Since hard drives are cheaper and cheaper, you could store a
     dictionary in a usable (uncompressed) form and use it directly with
     memory mapping.  Then the efficiency would directly depend on the
     disk caching method, and only the used part of the dictionaries
     would really be loaded into memory.  You would no more have to load
     plain dictionaries into main memory, youâll just want to compute
     some indexes (or something like that) after mapping.

However, the fact of the matter is that most of the dictionary will be
read into memory anyway if it is available.  If it is not available then
there would be a good deal of disk swaps.  Making characters 32-bit wide
will increase the chance that there are more disk swaps.  So the bottom
line is that it is more efficient to convert characters from something
like UTF-8 into some sort of 8-bit character.  I could also use some
sort of disk space lookup table such as the Berkeley Database.  However
this will *definitely* degrade performance.

The bottom line is that keeping Aspell 8-bit internally is a very well
though out decision that is not likely to change any time soon.  Feel
free to challenge me on it, but, donât expect me to change my mind
unless you can bring up some point that I have not thought of before and
quite possibly a patch to solve cleanly convert Aspell to Unicode
internally without a serious performance lost OR serious memory usage
increase.

Appendix B Installing
*********************

Aspell requires gcc 2.95 (or better) as the C++ compiler.  Other C++
compilers should work with some effort.  Other C++ compilers for mostly
POSIX compliant (Unix, Linux, BeOS, Cygwin) systems should work without
any major problems provided that the compile can handle all of the
advanced C++ features Aspell uses.  C++ compilers for non-Unix systems
might work but it will take some work.  Aspell at very least requires a
Unix-like environment (âshâ, âgrepâ, âsedâ, âtrâ, âŚ), and Perl in order
to build.  Aspell also uses a few POSIX functions when necessary.

The latest version can always be found at GNU Aspellâs home page at
<http://aspell.net>.

B.1 Generic Install Instructions
================================

     ./configure && make

For additional âconfigureâ options type â./configure --helpâ.  You can
control what C++ compiler is used by setting the environment variable
âCXXâ before running configure and you can control what flags are passed
to the C++ compile via the environment variable âCXXFLAGSâ.  Static
libraries are disabled by default since static libraries will not work
right due to the mixing of C and C++.  When a C program links with the
static libraries in Aspell it is likely to crash because Aspellâs C++
objects are not getting initialized correctly.  However, if for some
reason you want them, you can enable them via â--enable-staticâ.

Aspell should then compile without any additional user intervention.  If
you run into problems please first check the sections below as that
might solve your problem.

To install the program simply type

     make install

After Aspell is installed at least one dictionary needs to be installed.
You can find them at <http://aspell.net/>.  The âaspellâ program must be
in your path in order for the dictionaries to install correctly.

If you do not have Ispell or the traditional Unix âspellâ utility
installed on your system then you should also copy the compatibility
scripts âispellâ and âspellâ located in the âscripts/â directory into
your binary directory which is usually â/usr/local/binâ so that programs
that expect the âispellâ or âspellâ command will work correctly.

B.2 HTML Manuals and âmake cleanâ
=================================

The Aspell distribution includes HTML versions of the User and
Developerâs manual.  Unfortunately, doing a âmake cleanâ will erase
them.  This is due to a limitation of automake which is not easily
fixed.  If makeinfo is installed they can easily be rebuild with âmake
aspell.html aspell-dev.htmlâ, or you can unpack them from the tarball.

B.3 Curses Notes
================

If you are having problems compiling âcheck_funs.cppâ then the most
likely reason is due to incompatibilities with the curses implementation
on your system.  You should first try disabling the âwideâ curses
library with the â--disable-wide-cursesâ configure option.  By doing so
you will lose support for properly displaying UTF-8 characters but you
may still be able to get the full screen interface.  If this fails then
you can disable curses support altogether with the â--disable-cursesâ
configure option.  By doing this you will lose the nice full screen
interface but hopefully you will be able to at least get Aspell to
compile correctly.

If the curses library is installed in a non-standard location then you
can specify the library and include directory with â--enable-curses=LIBâ
and â--enable-curses-include=DIRâ.

âLIBâ can either be the complete path of the libraryâfor example
     /usr/local/curses/libcurses.a
or the name of the library (for example âncursesâ) or a combined
location and library in the form â-LLIBDIR -lLIBâ (for example
â-L/usr/local/ncurses/lib -lncursesâ).

DIR is the location of the curses header files (for example
â/usr/local/ncurses/includeâ).

B.3.1 Unicode Support
---------------------

In order for Aspell to correctly spell check UTF-8 documents in full
screen mode the âwideâ version of the curses library must be installed.
This is different from the normal version of curses library, and is
normally named âlibcurseswâ (with a âwâ at the end) or âlibncurseswâ.
UTF-8 documents will not display correctly without the right curses
version installed.

In addition your system must also support the âmblenâ function.
Although this function was defined in the ISO C89 standard (ANSI
X3.159-1989), not all systems have it.

B.4 Loadable Filter Notes
=========================

Support for being able to load additional filter modules at run-time has
only been verified to work on Linux platforms.  If you get linker errors
when trying to use a filter, then it is likely that loadable filter
support is not working yet on your platform.  Thus, in order to get
Aspell to work correctly you will need to avoid compiling the filters as
individual modules by using the â--enable-compile-in-filtersâ
âconfigureâ option.

B.5 Using 32-Bit Dictionaries on a 64-Bit System
================================================

Due to an oversight, Aspell compiled dictionaries not only depend on the
endian order, they also depend on the the size of the âsize_tâ type,
which is generally different on 32 and 64-bit systems.  The âsize_tâ
type is used in the hash function of the compiled dictionaries.  To
force the hash function to use a 32-bit integer instead, use the
â--enable-32-bit-hash-funâ configure option.  This option will allow you
to use dictionaries compiled on a 32-bit machine on a 64-bit one as long
as the endian order is the same.  Of course, dictionaries compiled on a
64-bit machine without this option enabled will no longer be usable.  If
Aspell detects that an incompatible hash function is used, it will fail
with:
     Error: The file âSOME-FILEâ is not in the proper format.
     Incompatible hash function.

B.6 Upgrading from Aspell 0.60.7
================================

To prevent a potentially unbounded buffer over-read, Aspell no longer
supports null-terminated UCS-2 and UCS-4 encoded strings with the
original C API. Null-termianted 8-bit or UTF-8 encoded strings are still
supported, as are UCS-2 and UCS-4 encoded strings when the length is
passed in.

As of Aspell 0.60.8 a function from the original API that expects an
encoded string as a parameter will return meaningless results (or an
error code) if string is null terminated and the encoding is set to
âucs-2â or âucs-4â.  In addition, a single:
     ERROR: aspell_speller_check: Null-terminated wide-character strings unsupported when used this way.
will be printed to standard error the first time one of those functions
is called.

Application that use null-terminated UCS-2/4 strings should either (1)
use the interface intended for working with wide-characters (see
Through the C API); or (2) define âASPELL_ENCODE_SETTING_SECUREâ
before including âaspell.hâ.  In the latter case is is important that
the application explicitly sets the encoding to a known value.  Defining
âASPELL_ENCODE_SETTING_SECUREâ and not setting the encoding explicitly
or allowing user of the application to set the encoding could result in
an unbounded buffer over-read.

If it is necessary to preserve binary compatibility with older versions
of Aspell, the easiest thing would be to determine the length of the
UCS-2/4 stringâin bytesâand pass that in.  Due to an implemenation
detail, existing API functions can be made to work with null-terminated
UCS-2/4 strings safely by passing in either â-2â or â-4â (corresponding
to the width of the character type) as the size.  Doing so, however,
will cause a buffer over-read for unpatched version of Aspell.  To avoid
this it will be necessary to parse the version string to determine the
correct value to use.  However, no official support will be provided for
the latter method.

If the application can not be recompiled, then Aspell can be configured
to preserve the old behavior by passing
â--enable-sloppy-null-term-stringsâ to âconfigureâ.  When Aspell is
compiled this way the version string will include the string â SLOPPYâ.

B.7 Upgrading from Aspell 0.50
==============================

The dictionary format has changed so dictionaries will need to be
recompiled.

All data, by default, is now included in âLIBDIR/aspell-0.60â so that
multiple versions of Aspell can more peacefully coexist.  This included
both the dictionaries and the language data files which were stored in
âSHAREDIR/aspellâ before Aspell 0.60.

The format of the character data files has changed.  The new character
data files are installed with Aspell so you should not have to worry
about it unless you made a custom one.

The dictionary option âstrip-accentsâ has been removed.  For this reason
the old English dictionary (up to 0.51) will no longer work.  A new
English dictionary is now available which avoids using this option.  In
addition the âignore-accentsâ option is currently unimplemented.

The flag â-lâ is now a shortcut for â--langâ, instead of â--listâ as it
was with Aspell 0.50.

B.7.1 Binary Compatibility
--------------------------

The Aspell 0.60 library is binary compatible with the Aspell 0.50
library.  For this reason I chose _not_ to increment the major version
number (so-name) of the shared library by default which means programs
that were compiled for Aspell 0.50 will also work for Aspell 0.60.
However, this means that having both Aspell 0.50 and Aspell 0.60
installed at the same time can be pragmatic.  If you wish to allow both
Aspell 0.50 and 0.60 to be installed at the same time then you can use
the configure option â--incremented-sonameâ which will increment
so-name.  You should only use this option if you know what you are
doing.  It is up to you to somehow ensure that both the Aspell 0.50 and
0.60 executables can coexist.

If after incrementing the so-name you wish to allow programs compiled
for Aspell 0.50 to use Aspell 0.60 instead (thus implying that Aspell
0.50 is not installed) then you can use a special compatibility library
which can be found in the âlib5â directory.  This directory will not be
entered when building or installing Aspell so you must manually build
and install this library.  You should build it after the rest of Aspell
is built.  The order in which this library is installed, with relation
to the rest of Aspell, is also important.  If it is installed _after_
the rest of Aspell then new programs will link to the old library (which
will work for Aspell 0.50 or 0.60) when built, if installed _before_,
new programs will link with the new library (Aspell 0.60 only).

B.8 Upgrading from Aspell .33/Pspell .12
========================================

Aspell has undergone an extremely large number of changes since the
previous Aspell/Pspell release.  For one thing Pspell has been merged
with Aspell so there in no longer two separate libraries you have to
worry about.

Because of the massive changes between Aspell/Pspell and Aspell 0.50 you
may want to clean out the old files before installing the the new
Aspell.  To do so do a âmake uninstallâ in the original Aspell and
Pspell source directories.

The way dictionaries are handled has also changed.  This includes a
change in the naming conventions of both language names and
dictionaries.  Due to the language name change, your old personal
dictionaries will not be recognized.  However, you can import the old
dictionaries by running the âaspell-importâ script.  This also means
that dictionaries designed to work with older versions of Aspell are not
likely to function correctly.  Fortunately new dictionary packages are
available for most languages.  You can find them off of the Aspell home
page at <http://aspell.net>.

The Pspell ABI is now part of Aspell except that the name of everything
has changed due to the renaming of Pspell to Aspell.  In particular
please note the following name changes:

     pspell -> aspell
     manager -> speller
     emulation -> enumeration
     master_word_list -> main_word_list

Please also note that the name of the âlanguage-tagâ option has changed
to âlangâ.  However, for backward compatibility the âlanguage-tagâ
option will still work.

However, you should also be able to build applications that require
Pspell with the new Aspell as a backward compatibility header file is
provided.

Due to a change in the way dictionaries are handled, scanning for
â.pwliâ files in order to find out which dictionaries are available will
no longer work.  This means that programs that relied on this technique
may have problems finding dictionaries.  Fortunately, GNU Aspell now
provided a uniform way to list all installed dictionaries via the c API.
See the file âlist-dicts.câ in the âexamples/â directory for an example
of how to do this.  Unfortunately there isnât any simple way to find out
which dictionaries are installed which will work with both the old
Aspell/Pspell and the new GNU Aspell.

B.9 Upgrading from a Pre-0.50 snapshot
======================================

At the last minute I decided to merge the âspeller-utilâ program into
the main âaspellâ program.  You may wish to remove that âspeller-utilâ
program to avoid confusion.  This also means that dictionaries designed
to work with the snapshot will no longer work with the official release.

B.10 WIN32 Notes
================

B.10.1 Getting the WIN32 version
--------------------------------

The native Aspell/WIN32 port is no longer being maintained.  The best
way to get Aspell for Windows is to use the MSYS2 binaries.  MSYS2 is
available at <https://www.msys2.org/>.

Binaries for Aspell 0.50 are still available at
<http://aspell.net/win32/> but they are no longer supported.  If you are
interested in updating them for Aspell 0.60 please let me know.

B.10.2 Building the WIN32 version
---------------------------------

There are two basically different ways of building Aspell using GCC for
WIN32: You can either use the Cygwin compiler, which will produce
binaries that depend on the POSIX layer in âcygwin1.dllâ.  The other way
is using MinGW GCC, those binaries use the native C runtime from
Microsoft (MSVCRT.DLL).

B.10.2.1 Building Aspell using Cygwin
.....................................

This works exactly like on other POSIX compatible systems using the
â./configure && make && make installâ cycle.  Some versions of Cygwin
GCC will fail to link, this is caused by an incorrect âlibstdc++.laâ in
the â/libâ directory.  After removing or renaming this file, the build
progress should work (GCC-2.95 and GCC-3.x should work).

B.10.2.2 Building Aspell using MinGW
....................................

There are several different ways to build Aspell using MinGW. The
easiest way is to use a Cygwin compiler but instruct it to build a
native binary rather than a Cygwin one.  To do this configure with:

     ./configure CFLAGS='-O2 -mno-cygwin' CXXFLAGS='-O2 -mno-cygwin'

You may also want to add the option â--enable-win32-relocatableâ to use
more windows friendly directories.  See Win32-Directories.  In this
case configure with:

     ./configure CFLAGS='-O2 -mno-cygwin' CXXFLAGS='-O2 -mno-cygwin' --enable-win32-relocatable

It should also be possible to build Aspell using the MSYS environment.
But this has not been very well tested.  If building with MSYS _do not_
add âCFLAGS âŚâ to configure.

B.10.2.3 Building Aspell without using Cygwin or MSYS
.....................................................

It is also possible to build Aspell without Cygwin of MinGW by using the
files in the âwin32/â subdirectory.  However, these files have not been
updated to work with Aspell 0.60.  Thus the following instructions will
not work without some effort.  If you do get Aspell to compile this way
please send me the updated files so that I can include them with the
next release.

To compile Aspell with the MinGW compiler, you will need at least
GCC-3.2 (as shipped with MinGW-2.0.3) and some GNU tools like ârmâ and
âcpâ.  The origin of those tools doesnât matter, it has shown to work
with any tools from MinGW/MSys, Cygwin or Linux.  To build Aspell, move
into the âwin32â subdirectory and type âmakeâ.  You can enable some
additional build options by either commenting out the definitions at the
head of the Makefile or passing those values as environment variables or
at the âmakeâ command line.  Following options are supported:

âDEBUGVERSIONâ
     If set to "1", the binaries will include debugging information
     (resulting in a much bigger size).

âCURSESDIRâ
     Enter the path to the pdcurses library here, in order to get a
     nicer console interface (see below).

âMSVCLIBâ
     Enter the filename of MS âlib.exeâ here, if you want to build
     libraries that can be imported from MS Visual C++.

âWIN32_RELOCATABLEâ
     If set to "1", Aspell will detect the prefix from the path where
     the DLL resides (see below for further details).

âTARGETâ
     Sets a prefix to be used for cross compilation (e.g.
     â/usr/local/bin/i586-mingw32msvc-â to cross compile from Linux).

There are also a MinGW compilers available for Cygwin and Linux, both
versions are able to compile Aspell using the prebuilt âMakefileâ.
While the Cygwin port automatically detects the correct compiler, the
Linux version depends on setting the âTARGETâ variable in the âMakefileâ
(or environment) to the correct compiler prefix.

Other compilers may work.  There is a patch for MS Visual C++ 6.0
available at <ftp://ftp.gnu.org/gnu/aspell>, but it needs a lot of
changes to the Aspell sources.  It has also been reported that the Intel
C++ compiler can be used for compilation.

B.10.3 (PD)Curses
-----------------

In order to get the nice full screen interface when spell checking
files, a curses implementation that does not require Cygwin is required.
The PDCurses (<http://pdcurses.sourceforge.net>) implementation is known
to work, other implementations may work however they have not been
tested.  See the previous section for information on specifying the
location of the curses library and include file.

Curses notes:

   â˘ PDcurses built with MinGW needs to be compiled with
     â-DPDC_STATIC_BUILDâ to avoid duplicate declaration of âDllMainâ
     when compiling âaspell.exeâ.

   â˘ The curses enabled version can cause trouble in some shells (MSys
     ârxvtâ, âemacsâ) and will produce errors like âinitscr() LINES=1
     COLS=1: too smallâ.  Use a non-curses version for those purposes.

B.10.4 Directories
------------------

If Aspell is configured with â--enable-win32-relocatableâ or compiled
with âWIN32_RELOCATABLE=1â when using a Makefile, it can be run from any
directory: it will set âPREFIXâ according to its install location
(assuming it resides in âPREFIX\\binâ).  Your personal wordlists will be
saved in the âPREFIXâ directory with their names changed from
â.aspell.LANG.*â to âLANG.*â (you can override the path by setting the
âHOMEâ environment variable).

B.10.5 Installer
----------------

The installer registers the DLLs as shared libraries, you should
increase the reference counter to avoid the libraries being uninstalled
if your application still depends on them (and decrease it again when
uninstalling your program).  The reference counters are located under:
     HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\SharedDLLs

The install location and version numbers are stored under

     HKLM\SOFTWARE\Aspell

B.10.6 WIN32 consoles
---------------------

The console uses a different encoding than GUI applications, changing
this to to a Windows encoding (e.g.  1252) is not supported on Win9x/Me.
On WinNT (and later) those codepages can be set by first changing the
console font to âlucida consoleâ, then changing the codepage using âchcp
1252â.

Some alternative shells (e.g.  MSysâ ârxvtâ or Cygwinâs âbashâ) do a
codepage conversion (if correctly set up), so running Aspell inside
those shells might be a workaround for Win9x.

Appendix C ChangeLog
********************

Changes from 0.60.7 to 0.68.8 (October 7, 2019)
===============================================

   â˘ Prevent a potentially unbounded buffer over-read by no longer
     supporting null-terminated UCS-2 and UCS-4 encoded strings with the
     original C API. See Upgrading from Aspell 0.60.7.
   â˘ Ensure that possible typos are listed before other suggestions when
     typo analysis is used.  Also fix a bug so that suggestions that
     split a word using a space or hyphen are not always first.
   â˘ Add Markdown filter.
   â˘ Add new âwordlistsâ option, which is a list of UTF-8 files that
     contain additional words to accept.
   â˘ Add new âcamel-caseâ option, which enables support for checking
     camelCase words.
   â˘ Sort personal and replacement dictionaries.
   â˘ Change âultraâ suggestion mode to only find words that are within
     one-edit distance or have the same soundslike.
   â˘ Implement the âaspell filterâ command.
   â˘ Fix a bug in âAspellDocumentCheckerâ that prevented it from working
     with UCS-2 and UCS-4 encoded strings.
   â˘ Remove unused âsug-edit-distâ option.
   â˘ âAspellDocumentCheckerâ now expects the document a line at a time
     in order to work with the new Markdown filter.  If the document is
     split on white space characters instead, nothing will break, but
     new filters such as the Markdown filter may give incorrect results.
   â˘ The âcleanâ option and command will no longer split a word.
   â˘ Various documentation improvements.
   â˘ Removal of several outdated appendices that donât really belong in
     the main manual.  Parts that are still relevent may eventually be
     moved elsewhere, but for now they are available online at
     <http://aspell.net/0.60.7/man-html/>.
   â˘ Fix various crashes and other problems found by Googleâs OSS-Fuzz.

Changes from 0.60.6.1 to 0.60.7 (July 29, 2019)
===============================================

   â˘ Add partial support for recognizing the Unicode apostrophe (â) in
     words.  In particular Aspell will accept the Unicode apostrophe
     when the language uses an ISO Latin charset that doesnât already
     have a Unicode apostrophe.  For now, Aspell will still use the
     ASCII version in suggestions.
   â˘ Detect when a dictionary compiled on a 32-bit machine is used on a
     64-bit one (and vise versa), as due to an oversight, compiled
     dictionaries depend on more than the endianness.  Also added a
     compile time option to remove this dependency, but at the cost of
     breaking compatibility with already compiled dictionaries on 64-bit
     systems.
   â˘ Fix a bug which caused Aspell to crash when passing in a null
     string to almost any of the C API functions.  This should not
     happen if the size is also zero as the pointer should never be
     derefrenced.
   â˘ Fix a bug that caused Aspell to crash with a SEGFAULT when built
     with mingw-w64.
   â˘ In addition to outputting a warning when building with NDEBUG
     defined, also include NDEBUG in the version string.
   â˘ Various compile fixes for newer version of Gcc and Clang.
   â˘ Fix VPATH builds.
   â˘ Use utf-8 encoding for manual instead of iso-8859-1.
   â˘ Other minor updates and bug fixes.

Changes from 0.60.6 to 0.60.6.1 (July 4, 2011)
==============================================

   â˘ Update to Automake 1.10.3
   â˘ Fix a bug which caused a race condition (leading to a likely crash)
     when two threads try to update the dictionary cache at the same
     time.
   â˘ Make it very clear that compiling Aspell with NDEBUG is a bad idea
     (see <http://aspell.net/ndebug.html>) by outputting a warning when
     building with NDEBUG defined.
   â˘ Numerous other minor updates and bug fixes.

Changes from 0.60.5 to 0.60.6 (April 16, 2007)
==============================================

   â˘ Compile fixes for Gcc 4.3.
   â˘ Updated to Libtool 2.2.2 and Automake 1.10.1
   â˘ Minor tweak to suggestion code which improved suggestion results in
     certain cases.
   â˘ Always line buffer stdout and stderr in the Aspell utility when
     there is the potential for it to be used interactively through a
     pipe.
   â˘ Removed debug output in âaspell munch-listâ.
   â˘ Other minor updates and bug fixes.

Changes from 0.60.4 to 0.60.5 (December 18, 2006)
=================================================

   â˘ Compile fix for Gcc 4.1
   â˘ Updated to Gettext 0.16.1, Libtool 1.5.22, Automake 1.10, Autoconf
     2.61
   â˘ Documentation improvements, including an updated âmanâ page.
   â˘ Complain if more than one file is specified when checking files
     using the âaspell checkâ command, rather than ignoring the other
     files.
   â˘ Large number of bug fixes.

Changes from 0.60.3 to 0.60.4 (October 19, 2005)
================================================

   â˘ Fixed a bug that caused Aspell to crash when checking certain
     Russian words, this bug likely affected other languages as well.
   â˘ Updated to Gettext 0.14.5 which is required for AMD64, also updated
     to to Libtool 1.5.20.
   â˘ Fixed an alignment bug which caused mmap to always fail when
     reading in dictionaries.
   â˘ Added note about how âmake cleanâ will remove the HTML manuals.
   â˘ Added manual page for prezip-bin and enhanced word-list-compress
     manual page thanks to the work of Jose Da Silva.
   â˘ Other minor updates and bug fixes.

Changes from 0.60.2 to 0.60.3 (June 28, 2005)
=============================================

   â˘ Fixed bugs involving several of the C API functions.
   â˘ Fixed bug where âultraâ or âfastâ mode would not return any
     suggestions when soundslike lookup was not used.
   â˘ Made a minor, yet significant, optimization to the suggestion code.
     This sped things up by an order of magnitude in some cases.
   â˘ Avoid using the slow ngram scan except when the âsug-modeâ is
     âslowâ or âbad-spellerâ.
   â˘ Fixed a bug in curses mode which caused word-wrap to not work
     correctly in some cases.
   â˘ Fixed a bug in pipe mode with a missing newline.
   â˘ Fixed the âspellâ compatibility script.
   â˘ Several other minor bugs fixed.
   â˘ Made note about the change in behavior of the â-lâ command line
     switch.
   â˘ Other manual update/fixes.
   â˘ Updated to Libtool 1.5.18, Automake 1.9.6, and Makeinfo 4.8.

Changes from 0.60.1 to 0.60.2 (December 18, 2004)
=================================================

   â˘ Added the âmunch-listâ command to the Aspell utility.  The âmunchâ
     program in the âmyspell/â directory will disappear in Aspell 0.61.
     The âmunchlistâ script will also likely disappear or be replaced
     when Aspell 0.61 is released since it doesnât work correctly
     anyway.
   â˘ Several important bug fixes some of which rendered some non-English
     languages unusable.
   â˘ Other minor changes.

Changes from 0.60.1 to 0.60.1.1 (November 20, 2004)
===================================================

   â˘ Fix bug involving checking of capitalized word when affix
     compression is used.
   â˘ Compile fixes.
   â˘ Added an option to disable using the âwideâ curses version in case
     it causes compile problems.
   â˘ Minor manual updates
   â˘ Avoided including some unnecessary files in the distribution.

Changes from 0.60 to 0.60.1 (November 7, 2004)
==============================================

   â˘ Lots of compile fixes for various platforms.
   â˘ Miscellaneous bug fixes.
   â˘ Added Nroff filter thanks to Sergey Poznyakoff.
   â˘ The default filter mode when in pipe mode is now nroff for
     compatibility with Ispell.
   â˘ Added Texinfo filter.
   â˘ Added a section detailing the differences between Ispell and
     Aspell.
   â˘ Updated the section on thread safety.
   â˘ Other miscellaneous manual changes such as updating the To Do and
     Authors section.

Changes from 0.50.5 to 0.60 (August 27, 2004)
=============================================

   â˘ Added support for Affix Compression.  Affix compression stores the
     root word and then a list of prefixes and suffixes that the word
     can take, and thus saves a lot of space.  The codebase comes from
     MySpell found in OpenOffice.  It uses the same affix file that
     OpenOffice (and Mozilla) use.  Affix compression will even work
     with soundslike lookup to a limited extent.
   â˘ Added support for accepting all input and printing all output in
     UTF-8 or some other encoding different from the one Aspell uses.
     This includes support for Unicode normalization.  Aspell can now
     support any language with no more than 210 distinct characters,
     including different capitalizations and accents, _even if_ there is
     not an existing 8-bit encoding that supports the language.
   â˘ Added support for loadable filters and customizable filter modes
     thanks to Christoph HintermĂźller.
   â˘ Enhanced SGML filter to also support skipping sgml tags such as
     "script" blocks thanks to Tom Snyder.
   â˘ Added gettext support thanks to Sergey Poznyakoff
   â˘ Reworked the compiled dictionary format.  Compiled dictionaries now
     take up less space (less than 80% for the English language) and
     creating them is significantly faster (over 4 times for the English
     language).
   â˘ Reworked suggestion code.  It is significantly faster when dealing
     with short words (up to 10 times).  Also added support for MySpell
     Replacement Tables and n-gram lookup.  In addition, added basic
     support for compound words.
   â˘ Manual has has been converted to texinfo format thanks to the work
     of Chris Martin.
   â˘ Reworked the build system so that a single Makefile is used for
     most of the code.
   â˘ All data, by default, is now included in âLIBDIR/aspell-0.60â.
     Also added a built time option to increment the major version
     number of the shared library.  This should allow both Aspell
     version 0.50 and 0.60 to coexist.  The major version number is
     _not_ incremented by default as Aspell 0.60 is binary compatible
     with Aspell 0.50.  See Binary Compatibility.
   â˘ The code to handle dictionaries has been rewritten.  Because of
     this support for the dictionary option âstrip-accentsâ has been
     removed.  In addition the âignore-accentsâ option is currently
     unimplemented.
   â˘ Lots of other minor changes due to massive overhaul of the source
     code.

Changes from 0.50.4.1 to 0.50.5 (Feb 10, 2004)
==============================================

   â˘ Reworked url filter which fixed several bugs and now accepts
     "bla.bla/kdkdl" as a url.
   â˘ Fixed bug in which the url filter was coming before all other
     filters when it was supposed to come after.  This solved a number
     of problems where the url filter was interfering with other
     filters.
   â˘ Small bug fix in SGML filter.
   â˘ Added code page charsets, ie cp125?.dat.
   â˘ Added natural (split) keyboard data file as "split.kbd"
   â˘ Compile fixes for the upcoming Gcc 3.4
   â˘ Removed Solaris link hack as it was causing more problems than it
     fixes.
   â˘ Compile fixes for Sun WorkShop 6 compiler, but there may still be
     some problems, especially with linking.
   â˘ Included patch to help compile with Microsoft Visual C++ 6.
   â˘ Minor manual fixes.
   â˘ Updated the TODO section to reflect the current progress with the
     next major version of Aspell (0.51).
   â˘ Updated to Autoconf 2.59, Automake 1.82, and Libtool 1.5.2.

Changes from 0.50.4 to 0.50.4.1 (Oct 11, 2003)
==============================================

   â˘ Fixed major bug in pipe mode which caused the last character to be
     chopped off words before they were stored.
   â˘ Minor formating fixes in the manual.

Changes from 0.50.3 to 0.50.4 (Sep 26, 2003)
============================================

   â˘ Minor changes in URL filter to avoid treating the double quote
     character as part of the URL, and to avoid treating words ending in
     more than one period as a URL.

   â˘ Document fixes in Aspell API

   â˘ Small compile fixes, including one for GCC 3.3

   â˘ Updated Win32 section since a port now exists thanks to Thorsten
     Maerz.

   â˘ Complain instead of doing nothing or aborting for unimplemented
     functions in Aspell utility.

   â˘ Portability bug fixes.

   â˘ Upgraded to Autoconf 2.57, Automake 1.7.7, Libtool 1.5 (no longer
     use CVS version of libtool).

Changes from 0.50.2 to 0.50.3 (Nov 23, 2002)
============================================

   â˘ Hopefully fixed the Ispell alignment error problem when Aspell is
     used with ispell.el.

   â˘ Fixed a problem with personal dictionaries on NFS mounted home
     directories.

   â˘ Compiled libaspell-common directory into libaspell for now to avoid
     forcing applications to relink whenever a new Aspell version is out
     which was due to the use of the libtool â-releaseâ flag.

   â˘ Fixed Makefiles so that Aspell can be built outside the source tree
     (i.e.  with VPATH).

   â˘ Updated the section on compiling with Win32.

   â˘ Updated to Autoconf 2.56.

Changes from 0.50.1 to 0.50.2 (Sep 28, 2002)
============================================

   â˘ Fixed a number of bugs in Ispell compatibility mode

   â˘ Fixed a number of bugs with the handling of replacement pairs

   â˘ Other miscellaneous bug fixes

   â˘ Additional Win32 portability fixes

   â˘ Added the Ukrainian KOI8-U charset.

Changes from 0.50 to 0.50.1 (Aug 28, 2002)
==========================================

   â˘ A rather large number of portability fixes for non GNU/Linux
     platforms.

   â˘ Fixed pkglibdir and pkgdatadir in configure.

   â˘ Reintroduced some configure options from Aspell .33.7 included
     dict-dir, data-dir, curses, curses-include, win32-relocatable.

   â˘ Fixed Aspell so it will now compile with -O3 when using gcc.

   â˘ Updated note on Win32 support.

   â˘ Other minor manual improvements.

   â˘ Portability fixes in dictionary files

   â˘ Official dictionary package for the Slovak language.

Changes from .33.7.1 to 0.50 (Aug 23, 2002)
===========================================

   â˘ A complete overhaul of the source code which included merging
     Pspell into Aspell.

   â˘ Changed the way dictionaries and languages are handled.

   â˘ Added Dvorak keymap.

   â˘ Added the ability to list the available dictionaries

   â˘ Improved the spell checking interface a bit.

   â˘ Added support for using the Ispell keymapping when checking files.

   â˘ Complete rewrite of the filter interface.  It should now be fairly
     easy to add new filters to Aspell.

   â˘ Added some preliminary developer documentation.

   â˘ Lots of other changes due to the massive overhaul of the source
     code.

Changes from .33.7 to .33.7.1 (Aug 20, 2001)
============================================

   â˘ Minor manual fixes.

   â˘ Compile fix for Gcc 3.0 and Solaris.

Changes from .33.6.3 to .33.7 (Aug 2, 2001)
===========================================

   â˘ Updates to Autoconf 2.50 and switched to the HEAD branch of
     libtools.

   â˘ Fixed a bug which caused Aspell to crash when typo-analysis was not
     used such as when sug-mode is *fast* or *bad spellers*.

   â˘ Added support for typo-analysis even when a soundslike was not
     used.

   â˘ Fixed a bug which causes extended charters to display incorrectly
     on some platforms

   â˘ Compile fixes so that it will compile with Gcc 3.0.

   â˘ Compile fixed which should allow Aspell to compile with Egcs 1.1.
     I have not been able to actually test it though.  Please let me
     know at kevina@users.sourceforge.net if you have tried with Egcs
     1.1.

   â˘ Compile and configuration script fixes so that USE_FILE_INO will
     properly be defined and Aspell will compile correctly when it is
     defined.

   â˘ More ANSI C++ compliance fixes.

Changes from .33.6.2 to .33.6.3 (June 3, 2001)
==============================================

   â˘ Fixed a build problem in the manual/ directory by including
     manual-text and manual-html in the distribution.

Changes from .33.6.1 to .33.6.2 (June 3, 2001)
==============================================

   â˘ Compile fix so that Aspell will work correctly when not installed
     in /usr/local.

   â˘ Avoided regenerating the manual unless configured with
     enable-maintainer-mode.

   â˘ Added the missing documentation files in the scowl directory.

Changes from .33.6 to .33.6.1 (May 29, 2001)
============================================

   â˘ Fixed a formating problem with the manual involving <.

   â˘ Added a note about creating pwli files.

   â˘ Removed the space after between the -L and the directory name in
     the pspell-module/Makefile which caused problems on some platforms.

   â˘ Added the configure option AM_MAINTAINER_MODE to avoid enabling
     rules which often causes generated build files to be rebuilt with
     the wrong version of Libtool by default.  I donât know why I didnât
     think to do this a long time ago.

Changes from .33.5 to .33.6 (May 18, 2001)
==========================================

   â˘ Fixed a minor bug where some words would have random compound tags
     attached to them.

   â˘ Fixed a compile problem on many platforms where fileno is defined
     as a macro.

   â˘ Updated the description for a few of Aspellâs options.

   â˘ Removed the note of Aspell not being able to run when compiled with
     the upcoming Gcc 3.0 compiler as things seam to work now.

   â˘ Added a note about Aspell not being able to compile with Egcs 1.1.

   â˘ Added hack to deal with Libtoolâs interdependencies problem.  See
     bug #416981 for Pspell for more info.

Changes from .33 to .33.5 (April 5, 2001)
=========================================

   â˘ *dump master* correctly detects which dictionary and language to
     use based on the âLANGâ environment variable.

   â˘ Fixed a problem on Win32 which involves path names that began with
     <Drive Letter>:.

   â˘ Bug fixes and enhancements so that Aspell can once again run under
     MinGW. You can even use the new full screen interface if Aspell is
     compiled with PDCurses.

   â˘ Some major modifications to make Aspell more C++ compliant in order
     to get Aspell to compile under the upcoming Gcc 3.0 compiler.  This
     included only using STL features found in the standard version of
     C++.  (Which means Aspell will no longer require using the SGI
     version of the STL) This should also make compiling C++ under
     non-gcc compilers a lot simpler.  Please note that Aspell still has
     some problems with the upcoming Gcc 3.0 compiler.

   â˘ Minor changes to remove some -Wall warnings.

   â˘ Added a hack so that Aspell would properly compile as a shared
     library under Solaris.

   â˘ Added a few important missing words to the English word list.

Changes from .32.6 to .33 (January 28, 2001)
============================================

   â˘ Added a new new curses based interface to replace the dumb terminal
     interface everyone has been bitching about.

   â˘ Added the ability to give higher priority to words such as "the"
     instead of "teh" which are likely to be due to typos.

   â˘ Reorganized the manual so that it is hopefully easier to follow.

   â˘ Ability to automatically select the best dictionary to use based on
     the setting of the âLANGâ environment variable.

   â˘ Expanded the medium dictionary size to include more words which
     included the original words found in Ispell and eliminated the
     large size for now.

   â˘ Added three special variant add-on dictionaries.

   â˘ Switched to the multi-language branch of the CVS version of
     libtool.

Changes from .32.5 to .32.6 (Nov 8, 2000)
=========================================

   â˘ Fixed a bug where Aspell would crash when reading-in accented
     characters on some platforms.  This fixed bug # 112435.

   â˘ Fixed some other bugs so that it will run under Win32 under CygWin.
     Unfortunately it still wonât run properly under Mingw.

   â˘ Fixed the mmap test in configure so that it wonât fail on some
     platforms that use munmap(char *, int) instead of munmap(void *,
     int).

   â˘ Upgraded to the latest CVS version of libtool which fixed the
     problem with using GNU Make under Solaris.

   â˘ Added an option to copy files instead of using symbolic links for
     the special *multi* dictionary files.

Changes from .32.1 to .32.5 (August 18, 2000)
=============================================

   â˘ Changed my email from kevinatk at home com to kevina at users
     sourceforge net please make a note of the new email address.

   â˘ Added an option to control if the personal replacement dictionary
     is saved when the save_all_wls method is called.

   â˘ Brought back the ability to dump the master word list even in the
     case of the special *multi* lists.

   â˘ Added a large number of hacker related words and some other slang
     terms to the medium size word list.

   â˘ Added an *ispell* and *spell* compatibility script for systems
     which donât have Ispell installed.  They are located in the
     scripts/ directory and are not installed by default.

   â˘ Manual fixes.

   â˘ Added a note on not using GNU Make on Solaris.

Changes from .32 to .32.1 (August 5, 2000)
==========================================

   â˘ Minor compile fixes for recent gcc snapshot.

   â˘ Fixed naming of pwli files.

   â˘ Fixed a bug when Aspell will crash when used with certain single
     letter flags.  This bug was most noticeable when used with Emacs.

   â˘ Word list changes, see SCOWL Readme.

   â˘ Other miscellaneous changes.

Changes from .31.1 to .32 (July 23, 2000)
=========================================

   â˘ Added support for optionally doing without the soundslike data.

   â˘ Greatly reduced the amount of memory used when creating word lists.

   â˘ Added support for ignoring accents when coming up with suggestions.

   â˘ Added support for local-data-dir which is searched before data-dir.

   â˘ Added support for specifying which words may be used in compounds
     and where they may be used.

   â˘ Added support for having more than one main word list as well as a
     special *multi* word list files which will allow multiple word
     lists to be treated as one.

   â˘ Aspell now uses a completely new word list.

   â˘ The apostrophe (â) is no longer considered part of the word when it
     as at the end of the word such as in âdogs'â.

Changes from .31 to .31.1 (June 18, 2000)
=========================================

   â˘ Fixed a bug where Aspell would not create a complete dictionary
     file on some platforms when the data is 8-bit.

   â˘ Added a workaround so Aspell will work with ispell.el 3.3.

   â˘ Minor compile fixes so it would compile better with the very latest
     gcc (CVS Version).

   â˘ Removed note about compiling in Win32 as I was now able to get it
     to work.

Changes from .30.1 to .31 (June 11, 2000)
=========================================

   â˘ Added support for spell checking run together words.

   â˘ Added an option to produce a list of misspelled words from standard
     input.

   â˘ More robust error reporting when reading in language data files.

   â˘ Fixed a bug that would cause Aspell to crash if the *special* line
     was not defined in the language data file.

   â˘ Updated Pspell Module.

   â˘ Minor bug fixes.

   â˘ Added cross references in âThe Aspell Utility Chapterâ for easier
     use.

Changes from .30 to .30.1 (April 29, 2000)
==========================================

   â˘ Ported Aspell to Win32 platforms.

   â˘ Portability fixes which may help Aspell compile on other platforms.

   â˘ Aspell will no longer fail if for some reason the mmap fails,
     instead it will just read the file in as normal and free the memory
     when done.

   â˘ Minor changes in the format of the main word list as a result of
     the changes, the old format should still work in most cases.

   â˘ Fixed a bug where Aspell was ignoring the extension of file names
     such as .html or .tex when checking files.

   â˘ Fixed a bug where Aspell will go into an infinite loop when
     creating the main word list from a word list which has duplicates
     in it.

   â˘ Minor changes to the manual for better clarity.

Changes from .29.1 to .30 (April 2, 2000)
=========================================

   â˘ Fixed many of the capitalization bugs found in previous versions of
     Aspell.

   â˘ Changed the format of the main word list yet again.

   â˘ Fixed a bug so that âaspell checkâ will work on the PowerPC.

   â˘ Added ability to change configuration options in the middle of a
     session.

   â˘ Added words from /usr/dict/words found on most Linux systems as
     well as a bunch of commonly used abbreviations to the word list.

   â˘ Fixed a bug where Aspell would dump core after reporting certain
     errors when compiled with gcc 2.95 or higher.  This involved
     reworking the Exception heritage to get around a bug in gcc 2.95.

   â˘ Added a few more commands to the list of default commands the TeX
     filter knows about.

   â˘ Aspell will now check if a word only contains valid characters
     before adding it to any dictionaries.  This might mean that you
     have to manually delete a few words from your personal word list.

   â˘ Added option to ignore case when checking a document.

   â˘ Adjusted the parameters of the *normal* suggest mode to so that
     significantly less far fetched results are returned in cases such
     as tomatoe, which went from 100 suggestions down to 32, at the
     expense of getting slightly lower results (less than 1%),

   â˘ Improved the edit distance algorithm for slightly faster results.

   â˘ Removed the â$$mâ command in pipe mode, you should now use â$$cs
     mode,MODEâ to set the mode and *$$cr mode* to find out the current
     mode.

   â˘ Reworked parts of Aspell to use Pspell services to avoid
     duplicating code.

   â˘ Added a module for the newly released Pspell.  It will get
     installed with the rest of Aspell.

   â˘ Miscellaneous other bug fixes.

Changes from .29 to .29.1 (Feb 18, 2000)
========================================

   â˘ Improved the TeX filter so that it will accept â@â at the beginning
     of a command name and ignored trailing â*âs.  It also now has
     better defaults for which parameters to skip.

   â˘ Reworked the main dictionary so that it can be memory mapped in.
     This decreases startup time and allows multiple Aspell processes to
     use the same memory for the main word list.  This also also made
     Aspell 64 bit clean so that it should work on an alpha now.

   â˘ Fix so that Aspell could compile on platforms that gnu is not yet
     available for.

   â˘ Fixed issue with flock so it would compile on FreeBSD.

   â˘ Minor changes in the code to make it more C++ compliant although I
     am sure there will still be problems when using some other compiler
     other than gcc or egcs.

   â˘ Added some comments to the header files to better document a few of
     the classes.

Changes from .28.3 to .29 (Feb 6, 2000)
=======================================

   â˘ Fixed a bug in the pipe mode with lines that start with â^$$â.

   â˘ Added support for ignoring all words less than or equal to a
     specified length

   â˘ New soundslike code based thanks to the contribution of BjĂśrn
     Jacke.  It now gets all of its data from a table making it easier
     for other people to add soundslike code for their native language.
     He also converted the metaphone algorithm to table form,
     eliminating the need for the old metaphone code.

   â˘ Major redesign of the suggestion code for better results.

   â˘ Changed the format of the personal word lists.  In most cases it
     should be converted automatically.

   â˘ Changed the format of the main word list.

   â˘ Name space cleanup for more consistent naming.  I now use name
     spaces which means that gcc 2.8.* and egcs 1.0.* will no longer cut
     it.

   â˘ Used file locks when reading and saving the personal dictionaries
     so that it truly multiprocesses safely.

   â˘ Added rudimentary filter support.

   â˘ Reworked the configuration system once again.  However, the changes
     to the end user who does not directly use my library should be
     minimal.

   â˘ Rewrote my code that handles parsing command line parameters so
     that it no longer used popt as it was causing too many problems and
     didnât integrate well with my new configuration system.

   â˘ Fixed pipe mode so that it will properly ignore lines starting with
     â~â for better Ispell compatibility.

   â˘ Aspell now has a new home page at <http://aspell.sourceforge.net/>.
     Please make note of the new URL.

   â˘ Miscellaneous manual fixes and clarifications.

Changes from .28.2.1 to .28.3 (Nov 20, 1999)
============================================

   â˘ Fixed a bug that caused Aspell to crash when spell checking words
     over 60 characters long.

   â˘ Reworked *aspell check* so that
       1. You no longer have to hit enter when making a choice.

       2. It will now overwrite the original file instead of creating a
          new file.  An optional backup can be made by using the -b
          option.

   â˘ Fixed a few bugs in data.cc.

Changes from .28.2 to .28.2.1 (Aug 25, 1999)
============================================

   â˘ Fixed the version number for the shared library.

   â˘ Fixed a problem with undefined references when linking to the
     shared library.

Changes from .28.1 to .28.2 (Aug 25, 1999)
==========================================

   â˘ Fixed a bunch of bugs in the language and configuration classes.

   â˘ Minor changes in the code so that it could compile with the new gcc
     2.95(.1).

   â˘ Changed the output of âdump configâ so that default values are
     given the value â<default>â.  This means that the output can be
     used to create a configuration file.

   â˘ Added notes on using Aspell with VIM.

Changes from .28 to .28.1 (July 27, 1999)
=========================================

   â˘ Removed some debug output

   â˘ Changed notes on compiling with gcc 2.8.* as I managed to get it to
     compile on my school account

   â˘ Avoided including *stdexcept* in âconst_string.hhâ so that I could
     get Aspell to compile on my school account with gcc 2.8.1.

Changes from .27.2 to .28 (July 25, 1999)
=========================================

     Provided an iterator for the replacement classes.

   â˘ Added support for dumping and creating and merging the personal and
     replacement word lists.

   â˘ Changed the Aspell utility command line a bit, it now used popt.

   â˘ Totally reworked Aspell configuration system.  Now Aspell could get
     configuration from any of 5 sources: the command line, the
     environment variable âASPELL_CONFâ, the personal configuration
     file, the global configuration file, and finally the compiled-in
     defaults.

   â˘ Totally reworked the language class in preparation for my new
     language code.  See <http://aspell.sourceforge.net/international/>
     for more information of what I have in store.

   â˘ Added some options to the configure script: âenable-dict-dir=DIR,
     âenable-doc-dir=DIR, âenable-debug, and âenable-opt

   â˘ Removed some old header files.

   â˘ Reorganized the directory structure a bit

   â˘ Made the text version of the manual pages slightly easier to read

   â˘ Used the â\urlâ command for urls for better formating of the
     printed version.

Changes from .27.1 to .27.2 (Mar 1, 1999)
=========================================

   â˘ Fixed a major bug that caused Aspell to dump core when used without
     any arguments

   â˘ Fixed another major bug that caused Aspell to do nothing when used
     in interactive mode.

   â˘ Added an option to exit in Aspellâs interactive mode.

   â˘ Removed some old documentation files from the distribution.

   â˘ Minor changes to the the section on using Aspell with egcs.

   â˘ Minor changes to remove -Wall warnings.

Changes from .27 to .27.1 (Feb 24, 1999)
========================================

   â˘ Fixed a minor compile problem.

   â˘ Updated the section on using Aspell with egcs to it.  It was now
     more clear why the patch was necessary.

Changes from .26.2 to .27 (Feb 22, 1999)
========================================

   â˘ Totally reworked the C++ library which means you may need to change
     some things in your code.

   â˘ Added support for detachable and multiple personal dictionaries in
     the C++ class library.

   â˘ The C++ class library now throws exceptions.

   â˘ Reworked Aspell ability to learn from users misspellings a bit so
     that it now has a memory.  For more information see Notes on Storing Replacement Pairs.

   â˘ Upgraded autoconf to version 2.13 and automake to version 1.4 for
     better portability.

   â˘ Fixed the configuration so the âmake distâ will work.  From now on
     Aspell will be distributed with âmake distâ.

   â˘ Added support to skip over URLâs, email addresses and host names.

   â˘ Added support for dumping the master and personal word list.  You
     can now also merge a personal word list.  Type aspell -help for
     help on using this feature.

   â˘ Reorganized the source code.

   â˘ Started using proper version numbers for the shared library.

   â˘ Fixed a bug that caused Aspell to crash when adding certain
     replacement pairs.

   â˘ Fixed the problem with duplicate lines when exiting pipe mode for
     good.

Changed from .26.1 to .26.2 (Jan 3, 1998)
=========================================

   â˘ Fixed another compile problem.  Hopefully this time it will really
     compile OK on other peoples machines.

Changed from .26 to .26.1 (Jan 3, 1998)
=======================================

   â˘ Fixed a small compile problem in âas_data.ccâ.

Changed from .25.1 to .26 (Jan 3, 1999)
=======================================

   â˘ Fixed a bug that caused duplicate items to be displayed in the
     suggestion list for good.  (If it still does it please send me
     email.)

   â˘ Added the ability for Aspell to learn form the users misspellings.

   â˘ Library Interface changes.  Still more to come âŚ.

   â˘ Is now multiprocess safe.  When a personal dictionary (or
     replacement list) is saved it will now first update the list
     against the dictionary on disk in case another process modified it.

   â˘ Fixed the bug that caused duplicate output when used non
     interactively in pipe mode.

   â˘ Dropped support for gcc 2.7.2 as the C++ compiler.

   â˘ Updated the How Aspell Works (see Aspell Suggestion Strategy.)

   â˘ Added support for the âASPELL_DATA_DIRâ environment variable.

Changes from .25 to .25.1 (Dec 10, 1998)
========================================

   â˘ Fixed the version number so that Aspell reports the correct version
     number.

   â˘ Changed the note on gcc 2.7.2 compilers to make it clear that only
     the C++ compiler cannot be gcc 2.7.2, it is OK if the C compiler is
     gcc 2.7.2.

   â˘ Updated the TODO list and reorganized it a bit.

   â˘ Fixed the directory so that all the documentation will get
     installed in ${prefix}/doc/aspell instead of half of it in
     ${prefix}/doc/aspell and half of it in ${prefix}/doc/kspell.

Changes from .24 to .25 (Nov 23, 1998)
======================================

   â˘ Total rework of how the main word list is stored.  Start up time
     decreased to about 1/3 of what it was in .24 and memory usage
     decreased to about 2/3.  (When used with the provided word list on
     a Linux system).

     Also the format and default locations of the main word list data
     files changed in the process and the data is now machine dependent.
     The personal word list format, however, stayed the same.

   â˘ Changed the scoring method to produce slightly better results with
     words like the vs.  teh.  And other simpler misspellings where two
     letters are swapped.

   â˘ Fixed the very unpredictable behavior of the â*â, â&â, â@â commands
     in the pipe mode.

   â˘ Added documentations for Aspell pipe mode (also known as âispell
     -aâ compatibility mode)

   â˘ Added a bunch of Aspell specific extensions to the pipe mode and
     documented them.

   â˘ Documented the âto_soundslikeâ and âsoundslikeâ methods for the
     âaspellâ class.

   â˘ Changed the scoring method to produce better results for words like
     _fone_ vs _phone_ and other words that have a spelling that doesnât
     directly relate to how the word sounds by using the phoneme
     equivalent of the word in the scoring of it.

   â˘ Added the âto_phonemeâ and âhave_phonemeâ methods to the
     âSC_Languageâ class.

   â˘ Added the âto_phonemeâ method to the âaspellâ class.

   â˘ Added the framework for being able to learn from the users
     misspelling.  Right now it just keeps a log of replacements.

   â˘ Redid âstl_rope-30.diffâ.  For some reason the version of patch on
     my system refused it.

   â˘ Rewrite of the â_Using as a replacement for Ispell_â section and
     added the ârun-with-aspellâ utility as a replacement of the old
     method of mapping Ispell to Aspell.

   â˘ Fixed a bug that caused duplicate words to appear in the suggestion
     list.

Changes from .23 to .24 (Nov 8, 1998)
=====================================

   â˘ Fixed my code so that it can once again compile with g++ 2.7.2.

   â˘ Rewrote the How It Works chapter.

   â˘ Rewrote the Requirement section and added notes on compiling with
     g++ 2.7.2.

   â˘ Added a To Do chapter.

   â˘ Added a Glossary and References chapter.

   â˘ Other minor documentation improvements.

   â˘ Internal code documentation improvements.

Changes from .22.1 to .23 (Oct 31, 1998)
========================================

   â˘ Minor documentation fixes.

   â˘ Changed the scoring strategy for words with 3 or less letters.
     This cut the number of words returned for these roughly in half.

   â˘ Expanded the word list to also include *american.0* and
     *american.1* from the Ispell distribution.  It now includes
     *english.0*, *english.1*, *american.0* and *american.1* from the
     directory âlanguages/englishâ provided with Ispell 3.1.20.

   â˘ Added a link to the location of the latest Ispell.el in the
     documentation.

   â˘ Started a C interface and added some rough documentation for it.

Changes from .22 to .22.1 (Oct 27, 1998)
========================================

   â˘ Minor bug fixes.  I was deleting arrays with delete rather than
     delete[].  I was suprised that this had not created a problem.

   â˘ Added a simple test program to test for a memory leak present on
     some systems.  (Only debian slink at the moment.)  See the file
     memleak-test.cc for more info.

Changes from .21 to .22 (Oct 26, 1998)
======================================

   â˘ Major redesign of the scoring method.  It now uses absolute
     distances rather than relative scores for more consistent results.
     See âsuggest.ccâ for more info.

   â˘ Suggest code rewritten in several places, however the core process
     stayed the same.

   â˘ The âsuggest_ultraâ method temporarily does nothing.  It should be
     working again by the next release.

Changes from .20 to .21 (Oct 13, 1998)
======================================

   â˘ Added documentation for aspell::Error

   â˘
     Changed the library name from âlibspellâ to âlibaspellâ.  It should
     never have been âlibspellâ in the first place.  Sorry for the
     incompatibility.

   â˘ Added âas_error.hhâ to the list of files copied to the include
     directory so that you can actually use the library outside of the
     source dir.

   â˘ Fixed bug that caused a segmentation fault with words where the
     only suggestions was inserting a space or hyphen such as in
     *ledgerline*.

   â˘ Added the *score* method to âaspellâ.

   â˘ Changed the scoring method to deal with word when the user uses "f"
     in place of "ph" a lot better.

Changes from .11 to .20 (Oct 10, 1998)
======================================

   â˘ _Name change_.  Everything that was Kspell is now Aspell.  Sorry,
     the name Kspell was already used by KDE and I didnât want to cause
     any confusion.

   â˘ Fixed a bug that causes a segmentation fault when the âHOMEâ
     environment variable doesnât exist.

Changes from .10 to .11 (Sep 12, 1998)
======================================

   â˘ Overhaul of the SC_Language class

   â˘ Added documentation for international support

   â˘ Added documentation for the C++ library

   â˘ Other minor bug fixes.

Appendix D Authors
******************

The following people or companies have contributed a non-trival amount
of code to Aspell and thus own the Copyright to part of Aspell.

Jose Da Silva
     Bug fixes and enhancements to âword-list-compressâ.

Sergey Poznyakoff
     Wrote the Nroff filter.

Tom Snyder
     Enhanced the SGML filter to also support skipping sgml tags such as
     "script" blocks.

Kevin B. Hendricks (and Contributers)
     Wrote MySpell which is a simple spell checker library that supports
     affix compression.  Aspell affix compression code is based on his
     code.

Christoph HintermĂźller
     Added support for loadable filters.

Melvin Hadasht
     Wrote a locale independent version of strtol and strtod.  Wrote the
     original loadable filter support however his code has been
     completely rewritten by Christoph HintermĂźller and Kevin Atkinson.

BjĂśrn Jacke
     Wrote the generic soundslike algorithm which gets all of its data
     from a file, thus eliminating almost all need for language specific
     code from Aspell.

Silicon Graphics Computer Systems, Inc.
Hewlett-Packard Company
     Parts of the SGI STL code were used in various places throughout
     the Aspell source.

In addition the authors of some of translated messages did not release
their work into the Public Domain, and thus own the copyright to the
translated text.  See the files â*.poâ in the âpoâ directory for more
details.

The folowing people also contributed to the development of Aspell but do
not own the Copyright to part of Aspell.

Sergey Poznyakoff
     Added gettext support.

Chris Martin
     Converted the manual to texinfo.

Lawrence Philips
     Wrote the original metaphone algorithm; however, he released his
     work into the Public Domain.

Michael Kuhn
     Converted the metaphone algorithm into C code and made some
     enhancements to the original algorithm.  He also released his work
     into the Public Domain.

Geoff Kuenning (and contributers)
     The authors of Ispell.  Many of the ideas used in Aspell,
     especially with the affix code, were taken from Ispell.  However
     none of the original Ispell code is used in Aspell.

Appendix E Copying
******************

Copyright ÂŠ 2000â2019 Kevin Atkinson.

Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.1 or
any later version published by the Free Software Foundation; with no
Invariant Sections, no Front-Cover Texts and no Back-Cover Texts.  A
copy of the license is included in the section entitled "GNU Free
Documentation License".

The library and utility program is copyright ÂŠ 2000â2019 by Kevin
Atkinson.  You can redistribute it and/or modify it under the terms of
the GNU Lesser General Public License as (LGPL) published by the Free
Software Foundation; either version 2.1 of the License, or (at your
option) any later version.

Certain parts of the library, as indicated at the top of the source
file, are under a weaker license.  However, all parts of the library are
LGPL Compatible.

E.1 GNU Free Documentation License
==================================

                      Version 1.2, November 2002

     Copyright ÂŠ 2000,2001,2002 Free Software Foundation, Inc.
     59 Temple Place, Suite 330, Boston, MA  02111-1307, USA

     Everyone is permitted to copy and distribute verbatim copies
     of this license document, but changing it is not allowed.

  0. PREAMBLE

     The purpose of this License is to make a manual, textbook, or other
     functional and useful document "free" in the sense of freedom: to
     assure everyone the effective freedom to copy and redistribute it,
     with or without modifying it, either commercially or
     noncommercially.  Secondarily, this License preserves for the
     author and publisher a way to get credit for their work, while not
     being considered responsible for modifications made by others.

     This License is a kind of âcopyleftâ, which means that derivative
     works of the document must themselves be free in the same sense.
     It complements the GNU General Public License, which is a copyleft
     license designed for free software.

     We have designed this License in order to use it for manuals for
     free software, because free software needs free documentation: a
     free program should come with manuals providing the same freedoms
     that the software does.  But this License is not limited to
     software manuals; it can be used for any textual work, regardless
     of subject matter or whether it is published as a printed book.  We
     recommend this License principally for works whose purpose is
     instruction or reference.

  1. APPLICABILITY AND DEFINITIONS

     This License applies to any manual or other work, in any medium,
     that contains a notice placed by the copyright holder saying it can
     be distributed under the terms of this License.  Such a notice
     grants a world-wide, royalty-free license, unlimited in duration,
     to use that work under the conditions stated herein.  The
     âDocumentâ, below, refers to any such manual or work.  Any member
     of the public is a licensee, and is addressed as âyouâ.  You accept
     the license if you copy, modify or distribute the work in a way
     requiring permission under copyright law.

     A âModified Versionâ of the Document means any work containing the
     Document or a portion of it, either copied verbatim, or with
     modifications and/or translated into another language.

     A âSecondary Sectionâ is a named appendix or a front-matter section
     of the Document that deals exclusively with the relationship of the
     publishers or authors of the Document to the Documentâs overall
     subject (or to related matters) and contains nothing that could
     fall directly within that overall subject.  (Thus, if the Document
     is in part a textbook of mathematics, a Secondary Section may not
     explain any mathematics.)  The relationship could be a matter of
     historical connection with the subject or with related matters, or
     of legal, commercial, philosophical, ethical or political position
     regarding them.

     The âInvariant Sectionsâ are certain Secondary Sections whose
     titles are designated, as being those of Invariant Sections, in the
     notice that says that the Document is released under this License.
     If a section does not fit the above definition of Secondary then it
     is not allowed to be designated as Invariant.  The Document may
     contain zero Invariant Sections.  If the Document does not identify
     any Invariant Sections then there are none.

     The âCover Textsâ are certain short passages of text that are
     listed, as Front-Cover Texts or Back-Cover Texts, in the notice
     that says that the Document is released under this License.  A
     Front-Cover Text may be at most 5 words, and a Back-Cover Text may
     be at most 25 words.

     A âTransparentâ copy of the Document means a machine-readable copy,
     represented in a format whose specification is available to the
     general public, that is suitable for revising the document
     straightforwardly with generic text editors or (for images composed
     of pixels) generic paint programs or (for drawings) some widely
     available drawing editor, and that is suitable for input to text
     formatters or for automatic translation to a variety of formats
     suitable for input to text formatters.  A copy made in an otherwise
     Transparent file format whose markup, or absence of markup, has
     been arranged to thwart or discourage subsequent modification by
     readers is not Transparent.  An image format is not Transparent if
     used for any substantial amount of text.  A copy that is not
     âTransparentâ is called âOpaqueâ.

     Examples of suitable formats for Transparent copies include plain
     ASCII without markup, Texinfo input format, LaTeX input format,
     SGML or XML using a publicly available DTD, and standard-conforming
     simple HTML, PostScript or PDF designed for human modification.
     Examples of transparent image formats include PNG, XCF and JPG.
     Opaque formats include proprietary formats that can be read and
     edited only by proprietary word processors, SGML or XML for which
     the DTD and/or processing tools are not generally available, and
     the machine-generated HTML, PostScript or PDF produced by some word
     processors for output purposes only.

     The âTitle Pageâ means, for a printed book, the title page itself,
     plus such following pages as are needed to hold, legibly, the
     material this License requires to appear in the title page.  For
     works in formats which do not have any title page as such, âTitle
     Pageâ means the text near the most prominent appearance of the
     workâs title, preceding the beginning of the body of the text.

     A section âEntitled XYZâ means a named subunit of the Document
     whose title either is precisely XYZ or contains XYZ in parentheses
     following text that translates XYZ in another language.  (Here XYZ
     stands for a specific section name mentioned below, such as
     âAcknowledgementsâ, âDedicationsâ, âEndorsementsâ, or âHistoryâ.)
     To âPreserve the Titleâ of such a section when you modify the
     Document means that it remains a section âEntitled XYZâ according
     to this definition.

     The Document may include Warranty Disclaimers next to the notice
     which states that this License applies to the Document.  These
     Warranty Disclaimers are considered to be included by reference in
     this License, but only as regards disclaiming warranties: any other
     implication that these Warranty Disclaimers may have is void and
     has no effect on the meaning of this License.

  2. VERBATIM COPYING

     You may copy and distribute the Document in any medium, either
     commercially or noncommercially, provided that this License, the
     copyright notices, and the license notice saying this License
     applies to the Document are reproduced in all copies, and that you
     add no other conditions whatsoever to those of this License.  You
     may not use technical measures to obstruct or control the reading
     or further copying of the copies you make or distribute.  However,
     you may accept compensation in exchange for copies.  If you
     distribute a large enough number of copies you must also follow the
     conditions in section 3.

     You may also lend copies, under the same conditions stated above,
     and you may publicly display copies.

  3. COPYING IN QUANTITY

     If you publish printed copies (or copies in media that commonly
     have printed covers) of the Document, numbering more than 100, and
     the Documentâs license notice requires Cover Texts, you must
     enclose the copies in covers that carry, clearly and legibly, all
     these Cover Texts: Front-Cover Texts on the front cover, and
     Back-Cover Texts on the back cover.  Both covers must also clearly
     and legibly identify you as the publisher of these copies.  The
     front cover must present the full title with all words of the title
     equally prominent and visible.  You may add other material on the
     covers in addition.  Copying with changes limited to the covers, as
     long as they preserve the title of the Document and satisfy these
     conditions, can be treated as verbatim copying in other respects.

     If the required texts for either cover are too voluminous to fit
     legibly, you should put the first ones listed (as many as fit
     reasonably) on the actual cover, and continue the rest onto
     adjacent pages.

     If you publish or distribute Opaque copies of the Document
     numbering more than 100, you must either include a machine-readable
     Transparent copy along with each Opaque copy, or state in or with
     each Opaque copy a computer-network location from which the general
     network-using public has access to download using public-standard
     network protocols a complete Transparent copy of the Document, free
     of added material.  If you use the latter option, you must take
     reasonably prudent steps, when you begin distribution of Opaque
     copies in quantity, to ensure that this Transparent copy will
     remain thus accessible at the stated location until at least one
     year after the last time you distribute an Opaque copy (directly or
     through your agents or retailers) of that edition to the public.

     It is requested, but not required, that you contact the authors of
     the Document well before redistributing any large number of copies,
     to give them a chance to provide you with an updated version of the
     Document.

  4. MODIFICATIONS

     You may copy and distribute a Modified Version of the Document
     under the conditions of sections 2 and 3 above, provided that you
     release the Modified Version under precisely this License, with the
     Modified Version filling the role of the Document, thus licensing
     distribution and modification of the Modified Version to whoever
     possesses a copy of it.  In addition, you must do these things in
     the Modified Version:

       A. Use in the Title Page (and on the covers, if any) a title
          distinct from that of the Document, and from those of previous
          versions (which should, if there were any, be listed in the
          History section of the Document).  You may use the same title
          as a previous version if the original publisher of that
          version gives permission.

       B. List on the Title Page, as authors, one or more persons or
          entities responsible for authorship of the modifications in
          the Modified Version, together with at least five of the
          principal authors of the Document (all of its principal
          authors, if it has fewer than five), unless they release you
          from this requirement.

       C. State on the Title page the name of the publisher of the
          Modified Version, as the publisher.

       D. Preserve all the copyright notices of the Document.

       E. Add an appropriate copyright notice for your modifications
          adjacent to the other copyright notices.

       F. Include, immediately after the copyright notices, a license
          notice giving the public permission to use the Modified
          Version under the terms of this License, in the form shown in
          the Addendum below.

       G. Preserve in that license notice the full lists of Invariant
          Sections and required Cover Texts given in the Documentâs
          license notice.

       H. Include an unaltered copy of this License.

       I. Preserve the section Entitled âHistoryâ, Preserve its Title,
          and add to it an item stating at least the title, year, new
          authors, and publisher of the Modified Version as given on the
          Title Page.  If there is no section Entitled âHistoryâ in the
          Document, create one stating the title, year, authors, and
          publisher of the Document as given on its Title Page, then add
          an item describing the Modified Version as stated in the
          previous sentence.

       J. Preserve the network location, if any, given in the Document
          for public access to a Transparent copy of the Document, and
          likewise the network locations given in the Document for
          previous versions it was based on.  These may be placed in the
          âHistoryâ section.  You may omit a network location for a work
          that was published at least four years before the Document
          itself, or if the original publisher of the version it refers
          to gives permission.

       K. For any section Entitled âAcknowledgementsâ or âDedicationsâ,
          Preserve the Title of the section, and preserve in the section
          all the substance and tone of each of the contributor
          acknowledgements and/or dedications given therein.

       L. Preserve all the Invariant Sections of the Document, unaltered
          in their text and in their titles.  Section numbers or the
          equivalent are not considered part of the section titles.

       M. Delete any section Entitled âEndorsementsâ.  Such a section
          may not be included in the Modified Version.

       N. Do not retitle any existing section to be Entitled
          âEndorsementsâ or to conflict in title with any Invariant
          Section.

       O. Preserve any Warranty Disclaimers.

     If the Modified Version includes new front-matter sections or
     appendices that qualify as Secondary Sections and contain no
     material copied from the Document, you may at your option designate
     some or all of these sections as invariant.  To do this, add their
     titles to the list of Invariant Sections in the Modified Versionâs
     license notice.  These titles must be distinct from any other
     section titles.

     You may add a section Entitled âEndorsementsâ, provided it contains
     nothing but endorsements of your Modified Version by various
     partiesâfor example, statements of peer review or that the text has
     been approved by an organization as the authoritative definition of
     a standard.

     You may add a passage of up to five words as a Front-Cover Text,
     and a passage of up to 25 words as a Back-Cover Text, to the end of
     the list of Cover Texts in the Modified Version.  Only one passage
     of Front-Cover Text and one of Back-Cover Text may be added by (or
     through arrangements made by) any one entity.  If the Document
     already includes a cover text for the same cover, previously added
     by you or by arrangement made by the same entity you are acting on
     behalf of, you may not add another; but you may replace the old
     one, on explicit permission from the previous publisher that added
     the old one.

     The author(s) and publisher(s) of the Document do not by this
     License give permission to use their names for publicity for or to
     assert or imply endorsement of any Modified Version.

  5. COMBINING DOCUMENTS

     You may combine the Document with other documents released under
     this License, under the terms defined in section 4 above for
     modified versions, provided that you include in the combination all
     of the Invariant Sections of all of the original documents,
     unmodified, and list them all as Invariant Sections of your
     combined work in its license notice, and that you preserve all
     their Warranty Disclaimers.

     The combined work need only contain one copy of this License, and
     multiple identical Invariant Sections may be replaced with a single
     copy.  If there are multiple Invariant Sections with the same name
     but different contents, make the title of each such section unique
     by adding at the end of it, in parentheses, the name of the
     original author or publisher of that section if known, or else a
     unique number.  Make the same adjustment to the section titles in
     the list of Invariant Sections in the license notice of the
     combined work.

     In the combination, you must combine any sections Entitled
     âHistoryâ in the various original documents, forming one section
     Entitled âHistoryâ; likewise combine any sections Entitled
     âAcknowledgementsâ, and any sections Entitled âDedicationsâ.  You
     must delete all sections Entitled âEndorsements.â

  6. COLLECTIONS OF DOCUMENTS

     You may make a collection consisting of the Document and other
     documents released under this License, and replace the individual
     copies of this License in the various documents with a single copy
     that is included in the collection, provided that you follow the
     rules of this License for verbatim copying of each of the documents
     in all other respects.

     You may extract a single document from such a collection, and
     distribute it individually under this License, provided you insert
     a copy of this License into the extracted document, and follow this
     License in all other respects regarding verbatim copying of that
     document.

  7. AGGREGATION WITH INDEPENDENT WORKS

     A compilation of the Document or its derivatives with other
     separate and independent documents or works, in or on a volume of a
     storage or distribution medium, is called an âaggregateâ if the
     copyright resulting from the compilation is not used to limit the
     legal rights of the compilationâs users beyond what the individual
     works permit.  When the Document is included in an aggregate, this
     License does not apply to the other works in the aggregate which
     are not themselves derivative works of the Document.

     If the Cover Text requirement of section 3 is applicable to these
     copies of the Document, then if the Document is less than one half
     of the entire aggregate, the Documentâs Cover Texts may be placed
     on covers that bracket the Document within the aggregate, or the
     electronic equivalent of covers if the Document is in electronic
     form.  Otherwise they must appear on printed covers that bracket
     the whole aggregate.

  8. TRANSLATION

     Translation is considered a kind of modification, so you may
     distribute translations of the Document under the terms of section
     4.  Replacing Invariant Sections with translations requires special
     permission from their copyright holders, but you may include
     translations of some or all Invariant Sections in addition to the
     original versions of these Invariant Sections.  You may include a
     translation of this License, and all the license notices in the
     Document, and any Warranty Disclaimers, provided that you also
     include the original English version of this License and the
     original versions of those notices and disclaimers.  In case of a
     disagreement between the translation and the original version of
     this License or a notice or disclaimer, the original version will
     prevail.

     If a section in the Document is Entitled âAcknowledgementsâ,
     âDedicationsâ, or âHistoryâ, the requirement (section 4) to
     Preserve its Title (section 1) will typically require changing the
     actual title.

  9. TERMINATION

     You may not copy, modify, sublicense, or distribute the Document
     except as expressly provided for under this License.  Any other
     attempt to copy, modify, sublicense or distribute the Document is
     void, and will automatically terminate your rights under this
     License.  However, parties who have received copies, or rights,
     from you under this License will not have their licenses terminated
     so long as such parties remain in full compliance.

  10. FUTURE REVISIONS OF THIS LICENSE

     The Free Software Foundation may publish new, revised versions of
     the GNU Free Documentation License from time to time.  Such new
     versions will be similar in spirit to the present version, but may
     differ in detail to address new problems or concerns.  See
     <http://www.gnu.org/copyleft/>.

     Each version of the License is given a distinguishing version
     number.  If the Document specifies that a particular numbered
     version of this License âor any later versionâ applies to it, you
     have the option of following the terms and conditions either of
     that specified version or of any later version that has been
     published (not as a draft) by the Free Software Foundation.  If the
     Document does not specify a version number of this License, you may
     choose any version ever published (not as a draft) by the Free
     Software Foundation.

E.1.1 ADDENDUM: How to use this License for your documents
----------------------------------------------------------

To use this License in a document you have written, include a copy of
the License in the document and put the following copyright and license
notices just after the title page:

       Copyright (C)  YEAR  YOUR NAME.
       Permission is granted to copy, distribute and/or modify this document
       under the terms of the GNU Free Documentation License, Version 1.2
       or any later version published by the Free Software Foundation;
       with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
       Texts.  A copy of the license is included in the section entitled ``GNU
       Free Documentation License''.

If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
replace the âwith...Texts.â line with this:

         with the Invariant Sections being LIST THEIR TITLES, with
         the Front-Cover Texts being LIST, and with the Back-Cover Texts
         being LIST.

If you have Invariant Sections without Cover Texts, or some other
combination of the three, merge those two alternatives to suit the
situation.

If your document contains nontrivial examples of program code, we
recommend releasing these examples in parallel under your choice of free
software license, such as the GNU General Public License, to permit
their use in free software.

E.2 GNU Lesser General Public License
=====================================

                      Version 2.1, February 1999

     Copyright ÂŠ 1991, 1999 Free Software Foundation, Inc.
     59 Temple Place â Suite 330, Boston, MA 02111-1307, USA

     Everyone is permitted to copy and distribute verbatim copies
     of this license document, but changing it is not allowed.

     [This is the first released version of the Lesser GPL.  It also counts
     as the successor of the GNU Library Public License, version 2, hence the
     version number 2.1.]

E.2.1 Preamble
--------------

The licenses for most software are designed to take away your freedom to
share and change it.  By contrast, the GNU General Public Licenses are
intended to guarantee your freedom to share and change free softwareâto
make sure the software is free for all its users.

This license, the Lesser General Public License, applies to some
specially designated softwareâtypically librariesâof the Free Software
Foundation and other authors who decide to use it.  You can use it too,
but we suggest you first think carefully about whether this license or
the ordinary General Public License is the better strategy to use in any
particular case, based on the explanations below.

When we speak of free software, we are referring to freedom of use, not
price.  Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish); that you receive source code or can get it if
you want it; that you can change the software and use pieces of it in
new free programs; and that you are informed that you can do these
things.

To protect your rights, we need to make restrictions that forbid
distributors to deny you these rights or to ask you to surrender these
rights.  These restrictions translate to certain responsibilities for
you if you distribute copies of the library or if you modify it.

For example, if you distribute copies of the library, whether gratis or
for a fee, you must give the recipients all the rights that we gave you.
You must make sure that they, too, receive or can get the source code.
If you link other code with the library, you must provide complete
object files to the recipients, so that they can relink them with the
library after making changes to the library and recompiling it.  And you
must show them these terms so they know their rights.

We protect your rights with a two-step method: (1) we copyright the
library, and (2) we offer you this license, which gives you legal
permission to copy, distribute and/or modify the library.

To protect each distributor, we want to make it very clear that there is
no warranty for the free library.  Also, if the library is modified by
someone else and passed on, the recipients should know that what they
have is not the original version, so that the original authorâs
reputation will not be affected by problems that might be introduced by
others.

Finally, software patents pose a constant threat to the existence of any
free program.  We wish to make sure that a company cannot effectively
restrict the users of a free program by obtaining a restrictive license
from a patent holder.  Therefore, we insist that any patent license
obtained for a version of the library must be consistent with the full
freedom of use specified in this license.

Most GNU software, including some libraries, is covered by the ordinary
GNU General Public License.  This license, the GNU Lesser General Public
License, applies to certain designated libraries, and is quite different
from the ordinary General Public License.  We use this license for
certain libraries in order to permit linking those libraries into
non-free programs.

When a program is linked with a library, whether statically or using a
shared library, the combination of the two is legally speaking a
combined work, a derivative of the original library.  The ordinary
General Public License therefore permits such linking only if the entire
combination fits its criteria of freedom.  The Lesser General Public
License permits more lax criteria for linking other code with the
library.

We call this license the "Lesser" General Public License because it does
_Less_ to protect the userâs freedom than the ordinary General Public
License.  It also provides other free software developers Less of an
advantage over competing non-free programs.  These disadvantages are the
reason we use the ordinary General Public License for many libraries.
However, the Lesser license provides advantages in certain special
circumstances.

For example, on rare occasions, there may be a special need to encourage
the widest possible use of a certain library, so that it becomes a
de-facto standard.  To achieve this, non-free programs must be allowed
to use the library.  A more frequent case is that a free library does
the same job as widely used non-free libraries.  In this case, there is
little to gain by limiting the free library to free software only, so we
use the Lesser General Public License.

In other cases, permission to use a particular library in non-free
programs enables a greater number of people to use a large body of free
software.  For example, permission to use the GNU C Library in non-free
programs enables many more people to use the whole GNU operating system,
as well as its variant, the GNU/Linux operating system.

Although the Lesser General Public License is Less protective of the
usersâ freedom, it does ensure that the user of a program that is linked
with the Library has the freedom and the wherewithal to run that program
using a modified version of the Library.

The precise terms and conditions for copying, distribution and
modification follow.  Pay close attention to the difference between a
âwork based on the libraryâ and a âwork that uses the libraryâ.  The
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.

                   GNU LESSER GENERAL PUBLIC LICENSE
    TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

  0. This License Agreement applies to any software library or other
     program which contains a notice placed by the copyright holder or
     other authorized party saying it may be distributed under the terms
     of this Lesser General Public License (also called âthis Licenseâ).
     Each licensee is addressed as âyouâ.

     A âlibraryâ means a collection of software functions and/or data
     prepared so as to be conveniently linked with application programs
     (which use some of those functions and data) to form executables.

     The âLibraryâ, below, refers to any such software library or work
     which has been distributed under these terms.  A âwork based on the
     Libraryâ means either the Library or any derivative work under
     copyright law: that is to say, a work containing the Library or a
     portion of it, either verbatim or with modifications and/or
     translated straightforwardly into another language.  (Hereinafter,
     translation is included without limitation in the term
     âmodificationâ.)

     âSource codeâ for a work means the preferred form of the work for
     making modifications to it.  For a library, complete source code
     means all the source code for all modules it contains, plus any
     associated interface definition files, plus the scripts used to
     control compilation and installation of the library.

     Activities other than copying, distribution and modification are
     not covered by this License; they are outside its scope.  The act
     of running a program using the Library is not restricted, and
     output from such a program is covered only if its contents
     constitute a work based on the Library (independent of the use of
     the Library in a tool for writing it).  Whether that is true
     depends on what the Library does and what the program that uses the
     Library does.

  1. You may copy and distribute verbatim copies of the Libraryâs
     complete source code as you receive it, in any medium, provided
     that you conspicuously and appropriately publish on each copy an
     appropriate copyright notice and disclaimer of warranty; keep
     intact all the notices that refer to this License and to the
     absence of any warranty; and distribute a copy of this License
     along with the Library.

     You may charge a fee for the physical act of transferring a copy,
     and you may at your option offer warranty protection in exchange
     for a fee.

  2. You may modify your copy or copies of the Library or any portion of
     it, thus forming a work based on the Library, and copy and
     distribute such modifications or work under the terms of Section 1
     above, provided that you also meet all of these conditions:

       a. The modified work must itself be a software library.

       b. You must cause the files modified to carry prominent notices
          stating that you changed the files and the date of any change.

       c. You must cause the whole of the work to be licensed at no
          charge to all third parties under the terms of this License.

       d. If a facility in the modified Library refers to a function or
          a table of data to be supplied by an application program that
          uses the facility, other than as an argument passed when the
          facility is invoked, then you must make a good faith effort to
          ensure that, in the event an application does not supply such
          function or table, the facility still operates, and performs
          whatever part of its purpose remains meaningful.

          (For example, a function in a library to compute square roots
          has a purpose that is entirely well-defined independent of the
          application.  Therefore, Subsection 2d requires that any
          application-supplied function or table used by this function
          must be optional: if the application does not supply it, the
          square root function must still compute square roots.)

     These requirements apply to the modified work as a whole.  If
     identifiable sections of that work are not derived from the
     Library, and can be reasonably considered independent and separate
     works in themselves, then this License, and its terms, do not apply
     to those sections when you distribute them as separate works.  But
     when you distribute the same sections as part of a whole which is a
     work based on the Library, the distribution of the whole must be on
     the terms of this License, whose permissions for other licensees
     extend to the entire whole, and thus to each and every part
     regardless of who wrote it.

     Thus, it is not the intent of this section to claim rights or
     contest your rights to work written entirely by you; rather, the
     intent is to exercise the right to control the distribution of
     derivative or collective works based on the Library.

     In addition, mere aggregation of another work not based on the
     Library with the Library (or with a work based on the Library) on a
     volume of a storage or distribution medium does not bring the other
     work under the scope of this License.

  3. You may opt to apply the terms of the ordinary GNU General Public
     License instead of this License to a given copy of the Library.  To
     do this, you must alter all the notices that refer to this License,
     so that they refer to the ordinary GNU General Public License,
     version 2, instead of to this License.  (If a newer version than
     version 2 of the ordinary GNU General Public License has appeared,
     then you can specify that version instead if you wish.)  Do not
     make any other change in these notices.

     Once this change is made in a given copy, it is irreversible for
     that copy, so the ordinary GNU General Public License applies to
     all subsequent copies and derivative works made from that copy.

     This option is useful when you wish to copy part of the code of the
     Library into a program that is not a library.

  4. You may copy and distribute the Library (or a portion or derivative
     of it, under Section 2) in object code or executable form under the
     terms of Sections 1 and 2 above provided that you accompany it with
     the complete corresponding machine-readable source code, which must
     be distributed under the terms of Sections 1 and 2 above on a
     medium customarily used for software interchange.

     If distribution of object code is made by offering access to copy
     from a designated place, then offering equivalent access to copy
     the source code from the same place satisfies the requirement to
     distribute the source code, even though third parties are not
     compelled to copy the source along with the object code.

  5. A program that contains no derivative of any portion of the
     Library, but is designed to work with the Library by being compiled
     or linked with it, is called a âwork that uses the Libraryâ.  Such
     a work, in isolation, is not a derivative work of the Library, and
     therefore falls outside the scope of this License.

     However, linking a âwork that uses the Libraryâ with the Library
     creates an executable that is a derivative of the Library (because
     it contains portions of the Library), rather than a âwork that uses
     the libraryâ.  The executable is therefore covered by this License.
     Section 6 states terms for distribution of such executables.

     When a âwork that uses the Libraryâ uses material from a header
     file that is part of the Library, the object code for the work may
     be a derivative work of the Library even though the source code is
     not.  Whether this is true is especially significant if the work
     can be linked without the Library, or if the work is itself a
     library.  The threshold for this to be true is not precisely
     defined by law.

     If such an object file uses only numerical parameters, data
     structure layouts and accessors, and small macros and small inline
     functions (ten lines or less in length), then the use of the object
     file is unrestricted, regardless of whether it is legally a
     derivative work.  (Executables containing this object code plus
     portions of the Library will still fall under Section 6.)

     Otherwise, if the work is a derivative of the Library, you may
     distribute the object code for the work under the terms of Section
     6.  Any executables containing that work also fall under Section 6,
     whether or not they are linked directly with the Library itself.

  6. As an exception to the Sections above, you may also combine or link
     a âwork that uses the Libraryâ with the Library to produce a work
     containing portions of the Library, and distribute that work under
     terms of your choice, provided that the terms permit modification
     of the work for the customerâs own use and reverse engineering for
     debugging such modifications.

     You must give prominent notice with each copy of the work that the
     Library is used in it and that the Library and its use are covered
     by this License.  You must supply a copy of this License.  If the
     work during execution displays copyright notices, you must include
     the copyright notice for the Library among them, as well as a
     reference directing the user to the copy of this License.  Also,
     you must do one of these things:

       a. Accompany the work with the complete corresponding
          machine-readable source code for the Library including
          whatever changes were used in the work (which must be
          distributed under Sections 1 and 2 above); and, if the work is
          an executable linked with the Library, with the complete
          machine-readable âwork that uses the Libraryâ, as object code
          and/or source code, so that the user can modify the Library
          and then relink to produce a modified executable containing
          the modified Library.  (It is understood that the user who
          changes the contents of definitions files in the Library will
          not necessarily be able to recompile the application to use
          the modified definitions.)

       b. Use a suitable shared library mechanism for linking with the
          Library.  A suitable mechanism is one that (1) uses at run
          time a copy of the library already present on the userâs
          computer system, rather than copying library functions into
          the executable, and (2) will operate properly with a modified
          version of the library, if the user installs one, as long as
          the modified version is interface-compatible with the version
          that the work was made with.

       c. Accompany the work with a written offer, valid for at least
          three years, to give the same user the materials specified in
          Subsection 6a, above, for a charge no more than the cost of
          performing this distribution.

       d. If distribution of the work is made by offering access to copy
          from a designated place, offer equivalent access to copy the
          above specified materials from the same place.

       e. Verify that the user has already received a copy of these
          materials or that you have already sent this user a copy.

     For an executable, the required form of the âwork that uses the
     Libraryâ must include any data and utility programs needed for
     reproducing the executable from it.  However, as a special
     exception, the materials to be distributed need not include
     anything that is normally distributed (in either source or binary
     form) with the major components (compiler, kernel, and so on) of
     the operating system on which the executable runs, unless that
     component itself accompanies the executable.

     It may happen that this requirement contradicts the license
     restrictions of other proprietary libraries that do not normally
     accompany the operating system.  Such a contradiction means you
     cannot use both them and the Library together in an executable that
     you distribute.

  7. You may place library facilities that are a work based on the
     Library side-by-side in a single library together with other
     library facilities not covered by this License, and distribute such
     a combined library, provided that the separate distribution of the
     work based on the Library and of the other library facilities is
     otherwise permitted, and provided that you do these two things:

       a. Accompany the combined library with a copy of the same work
          based on the Library, uncombined with any other library
          facilities.  This must be distributed under the terms of the
          Sections above.

       b. Give prominent notice with the combined library of the fact
          that part of it is a work based on the Library, and explaining
          where to find the accompanying uncombined form of the same
          work.

  8. You may not copy, modify, sublicense, link with, or distribute the
     Library except as expressly provided under this License.  Any
     attempt otherwise to copy, modify, sublicense, link with, or
     distribute the Library is void, and will automatically terminate
     your rights under this License.  However, parties who have received
     copies, or rights, from you under this License will not have their
     licenses terminated so long as such parties remain in full
     compliance.

  9. You are not required to accept this License, since you have not
     signed it.  However, nothing else grants you permission to modify
     or distribute the Library or its derivative works.  These actions
     are prohibited by law if you do not accept this License.
     Therefore, by modifying or distributing the Library (or any work
     based on the Library), you indicate your acceptance of this License
     to do so, and all its terms and conditions for copying,
     distributing or modifying the Library or works based on it.

  10. Each time you redistribute the Library (or any work based on the
     Library), the recipient automatically receives a license from the
     original licensor to copy, distribute, link with or modify the
     Library subject to these terms and conditions.  You may not impose
     any further restrictions on the recipientsâ exercise of the rights
     granted herein.  You are not responsible for enforcing compliance
     by third parties with this License.

  11. If, as a consequence of a court judgment or allegation of patent
     infringement or for any other reason (not limited to patent
     issues), conditions are imposed on you (whether by court order,
     agreement or otherwise) that contradict the conditions of this
     License, they do not excuse you from the conditions of this
     License.  If you cannot distribute so as to satisfy simultaneously
     your obligations under this License and any other pertinent
     obligations, then as a consequence you may not distribute the
     Library at all.  For example, if a patent license would not permit
     royalty-free redistribution of the Library by all those who receive
     copies directly or indirectly through you, then the only way you
     could satisfy both it and this License would be to refrain entirely
     from distribution of the Library.

     If any portion of this section is held invalid or unenforceable
     under any particular circumstance, the balance of the section is
     intended to apply, and the section as a whole is intended to apply
     in other circumstances.

     It is not the purpose of this section to induce you to infringe any
     patents or other property right claims or to contest validity of
     any such claims; this section has the sole purpose of protecting
     the integrity of the free software distribution system which is
     implemented by public license practices.  Many people have made
     generous contributions to the wide range of software distributed
     through that system in reliance on consistent application of that
     system; it is up to the author/donor to decide if he or she is
     willing to distribute software through any other system and a
     licensee cannot impose that choice.

     This section is intended to make thoroughly clear what is believed
     to be a consequence of the rest of this License.

  12. If the distribution and/or use of the Library is restricted in
     certain countries either by patents or by copyrighted interfaces,
     the original copyright holder who places the Library under this
     License may add an explicit geographical distribution limitation
     excluding those countries, so that distribution is permitted only
     in or among countries not thus excluded.  In such case, this
     License incorporates the limitation as if written in the body of
     this License.

  13. The Free Software Foundation may publish revised and/or new
     versions of the Lesser General Public License from time to time.
     Such new versions will be similar in spirit to the present version,
     but may differ in detail to address new problems or concerns.

     Each version is given a distinguishing version number.  If the
     Library specifies a version number of this License which applies to
     it and âany later versionâ, you have the option of following the
     terms and conditions either of that version or of any later version
     published by the Free Software Foundation.  If the Library does not
     specify a license version number, you may choose any version ever
     published by the Free Software Foundation.

  14. If you wish to incorporate parts of the Library into other free
     programs whose distribution conditions are incompatible with these,
     write to the author to ask for permission.  For software which is
     copyrighted by the Free Software Foundation, write to the Free
     Software Foundation; we sometimes make exceptions for this.  Our
     decision will be guided by the two goals of preserving the free
     status of all derivatives of our free software and of promoting the
     sharing and reuse of software generally.

                              NO WARRANTY

  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
     WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE
     LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS
     AND/OR OTHER PARTIES PROVIDE THE LIBRARY âAS ISâ WITHOUT WARRANTY
     OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT
     LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
     FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
     PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE
     DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR
     OR CORRECTION.

  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
     WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY
     MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE
     LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL,
     INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR
     INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF
     DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU
     OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY
     OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN
     ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

                      END OF TERMS AND CONDITIONS

E.2.2 How to Apply These Terms to Your New Libraries
----------------------------------------------------

If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change.  You can do so by permitting
redistribution under these terms (or, alternatively, under the terms of
the ordinary General Public License).

To apply these terms, attach the following notices to the library.  It
is safest to attach them to the start of each source file to most
effectively convey the exclusion of warranty; and each file should have
at least the âcopyrightâ line and a pointer to where the full notice is
found.

     ONE LINE TO GIVE THE LIBRARY'S NAME AND AN IDEA OF WHAT IT DOES.
     Copyright (C) YEAR  NAME OF AUTHOR

     This library is free software; you can redistribute it and/or modify it
     under the terms of the GNU Lesser General Public License as published by
     the Free Software Foundation; either version 2.1 of the License, or (at
     your option) any later version.

     This library is distributed in the hope that it will be useful, but
     WITHOUT ANY WARRANTY; without even the implied warranty of
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     Lesser General Public License for more details.

     You should have received a copy of the GNU Lesser General Public
     License along with this library; if not, write to the Free Software
     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307,
     USA.

Also add information on how to contact you by electronic and paper mail.

You should also get your employer (if you work as a programmer) or your
school, if any, to sign a âcopyright disclaimerâ for the library, if
necessary.  Here is a sample; alter the names:

     Yoyodyne, Inc., hereby disclaims all copyright interest in the library
     `Frob' (a library for tweaking knobs) written by James Random Hacker.

     SIGNATURE OF TY COON, 1 April 1990
     Ty Coon, President of Vice

Thatâs all there is to it!