Expand description
Core engine for ayame-spell: a fast, low-noise spell checker for code and prose, for English and Japanese.
The engine has two English checking modes:
- corrections (default): only known misspellings are flagged, using a curated typo → fix table. Near-zero false positives; safe for CI.
- dictionary: additionally flags words missing from configured wordlists (project words, global words, registry dictionaries).
Japanese checks are independent of the mode: katakana notation variants (表記ゆれ), fullwidth alphanumerics, halfwidth katakana, and fullwidth spaces.
Re-exports§
pub use checker::Checker;pub use config::Config;pub use config::LoadedConfig;pub use config::Mode;pub use issue::Issue;pub use issue::IssueKind;
Modules§
- checker
- The orchestrating checker: applies configuration, runs the tokenizer,
correction tables, wordlist dictionaries, and Japanese checks over a
text, and returns
Issues. - config
- Configuration:
ayame-spell.tomlat the project root, merged over the per-user global config (~/.config/ayame-spell/config.toml). - corrections
- Known-misspelling correction tables (typos-style checking).
- dictionary
- Wordlist dictionaries for unknown-word (“dictionary mode”) checking.
- issue
- japanese
- Japanese notation checks: katakana variants (表記ゆれ), fullwidth alphanumerics, halfwidth katakana, and fullwidth spaces.
- registry_
lock - Reproducible dictionary registry resolution.
- tokenizer
- Identifier-aware word extraction.
Functions§
- cache_
dir - Application cache directory (
~/.cache/ayame-spell). - completion_
words_ cache_ path - Cached output from
words collect, used by dynamic completion. - global_
config_ dir - Directory for global (per-user) configuration
(
~/.config/ayame-spell). - global_
words_ path - Path of the global word list (
~/.config/ayame-spell/words.txt). - registry_
cache_ dir - Directory where registry dictionaries are cached
(
~/.cache/ayame-spell/dicts). - registry_
cache_ path - Path of the cached registry dictionary
name, if the cache directory is known. The file may or may not exist yet. - registry_
index_ cache_ path - Cached registry index used by offline and dynamic completion.
- scan_
cache_ dir - Directory for incremental per-file scan results.