ispell-autobuildhash
Create ispell hash tables automatically
SYNOPSIS
ispell-autobuildhash [-d] [-i enc] [-o enc] [-v] [-3] [-S] [-s] [-n] [-H name] [-I name] dictname wordlist [affixfile]
PARAMETERS
-d
Debug mode, prints detailed processing info.
-i enc
Input encoding (default: ISO8859-1).
-o enc
Output encoding (default: ISO8859-1).
-v
Verbose output during build.
-3
Build only 3-letter preliminary hash file.
-S
Skip .sfx (suffix) file creation.
-s
Skip squeeze file for run-together words.
-n
Disable word sorting.
-H name
Custom hash filename (default: dictname.hash).
-I name
Custom info filename (default: dictname.i.*).
dictname
Base name for output dictionary files.
wordlist
Path to input plain-text word list.
affixfile (optional)
Path to affix rules file.
DESCRIPTION
ispell-autobuildhash is a Perl script that simplifies building hash files for the ispell spell-checker from plain text word lists. It automates the traditionally manual process using buildhash, handling word sorting, contractions, affix rules, n-grams, keep lists, and encoding conversions.
Primarily used by package maintainers to create language-specific dictionaries (e.g., for English, French), it generates essential files like dictname.hash (primary hash), dictname.aff (affixes), dictname.i.* (info), optional .sfx (suffixes), and squeeze files for run-together words.
The tool detects input format, supports ISO8859-1 and UTF-8, and optimizes for ispell's indexing. It's invoked with a dictionary name, wordlist path, and optional affix file, producing files in the current directory. Ideal for Unix-like systems, it ensures compatibility with ispell and older spellers, though large dictionaries require ample RAM and time.
CAVEATS
Requires Perl 5; large wordlists need significant CPU/RAM/disk. Output specific to ispell (not hunspell). Run as non-root; test with ispell -vv -d dictname.
GENERATED FILES
dictname.hash (main), dictname.aff (affixes if provided), dictname.i.[lang] (info), optional .sfx/.squeeze/.k.* (keep/contraction).
USAGE EXAMPLE
ispell-autobuildhash -v en_US /usr/share/dict/words en_US.aff
Builds en_US.hash etc. from words file with affixes.
HISTORY
Introduced in ispell 3.1.x (late 1990s) to streamline dictionary packaging. Maintained in GNU ispell and distros like Debian/Ubuntu; evolved for better Unicode support in later versions.


