CLI Reference
Basic Build
Build Options
Run
myspellchecker build --help for additional flags including --work-dir, --keep-intermediate, --col, --json-key, and --worker-timeout.Python API
Basic Usage
With Configuration
Building from Multiple Files
POS Tagging
Add POS tags to dictionary entries during build for grammar checking support:POS Inference on Existing Database
Apply rule-based POS inference to an existing database without rebuilding:Curated Lexicons
Curated words are trusted vocabulary inserted directly into the database before corpus processing. They are always recognized as valid regardless of corpus frequency.Create a Lexicon CSV
Build with Curated Words
How Curated Words are Processed
Curated words are inserted first (
is_curated=1, frequency=0), then corpus processing updates frequency while preserving the is_curated flag via MAX().
Incremental Updates
Add new data to an existing dictionary without rebuilding from scratch:processed_files table to avoid reprocessing.
Enrichment
After frequency computation, the pipeline runs an enrichment step that mines additional linguistic data from the corpus. Disable with--no-enrich on the CLI or enrich=False in PipelineConfig.
What Gets Mined
Configuration
Enrichment Thresholds
Fine-tune the mining process viaEnrichmentConfig (passed internally from PipelineConfig):
Confusable Pair Mining
Generates phonetic/orthographic variants for every word above a frequency threshold, then checks which variants are also valid dictionary words. Context overlap (cosine similarity of bigram context vectors) and frequency ratio are computed for each pair. Variant types mined:- Aspiration swaps (က↔ခ, ပ↔ဖ, etc.)
- Medial swaps (ျ↔ြ) and medial insertion/deletion
- Nasal ending confusion (န်↔မ်↔ံ)
- Stop-coda confusion
- Tone mark changes (visarga add/remove)
- Vowel length changes
Compound Confusion Detection
Finds bigrams(w1, w2) where the concatenation w1+w2 is a high-frequency dictionary word. Computes PMI to measure how strongly the parts associate:
Collocation Mining
Extracts statistically significant word pairs using Pointwise Mutual Information. Normalized PMI (NPMI) provides a scale-independent score in [-1, 1].Register Tagging
Classifies words as formal, informal, or neutral based on co-occurrence with register markers. Words appearing predominantly with formal sentence-final particles are taggedformal, and vice versa.
Output Database Schema
Query Examples
Verification
Performance
For large corpora, see Optimization for DuckDB acceleration (3-15x faster frequency counting) and Cython parallelization.See Also
- Corpus Format - Input file specifications
- Optimization - DuckDB, Cython, performance tuning
- Custom Dictionaries - Curated lexicons, domain builds
- Database Schema - Full schema reference
- CLI Reference - All CLI commands