aspell-autobuildhash
Create Aspell hashing data for wordlists
SYNOPSIS
aspell-autobuildhash [--help] [--version] dict-name
PARAMETERS
--help, -h
Display help message and exit.
--version, -v
Print version information and exit.
DESCRIPTION
The aspell-autobuildhash command is a utility from the Aspell spell-checking package that automates the creation of hash files (.hash) essential for fast dictionary lookups. Given a dictionary name (e.g., en for English), it searches standard directories like /usr/share/aspell or /usr/lib/aspell for source files.
It prioritizes existing raw word lists (.rws). If absent, it decompresses compressed word lists (.cwl.<encoding>) using prezip or compiles special precompiled lists (.prepl). The resulting sorted, unique word list is then converted into a compact hash file optimized for Aspell's use.
This tool simplifies dictionary maintenance, especially when installing new languages or custom dictionaries from source packages. It's typically invoked during package post-install scripts but can be run manually to rebuild or update dictionaries. Success depends on source files being present and write permissions to Aspell's data directories.
CAVEATS
Requires dictionary source files (.rws, .cwl.encoding, or .prepl) in Aspell data directories. Needs write permissions (often root) to output directories like /usr/lib/aspell. Fails silently if sources missing; check logs or run with verbose Aspell config.
BUILD PROCESS
1. Locate/build dict.rws (sorted unique words).
2. Generate dict.hash for binary search.
Encoding/mode-specific files like dict.{encoding}.{mode}.hash created if needed.
USAGE EXAMPLE
sudo aspell-autobuildhash en_US
Builds English (US) dictionary hashes.
HISTORY
Developed by Kevin Atkinson as part of Aspell 0.50 (2003); evolved in 0.60 series for improved automation. Remains standard in modern distributions like Ubuntu/Debian for Aspell 0.60.12+.
SEE ALSO
aspell(1), aspell-import(1), prezip(1), aspell-dump(1)


