Skip to main content

Crate ayame_spell_core

Crate ayame_spell_core 

Source
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.toml at 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.