Answers to the most common questions about mySpellChecker, from setup and configuration to performance optimization and web framework integration.Documentation Index
Fetch the complete documentation index at: https://docs.myspellchecker.com/llms.txt
Use this file to discover all available pages before exploring further.
General Questions
What is mySpellChecker?
mySpellChecker is a Myanmar (Burmese) text intelligence library with a 12-strategy checking pipeline, dictionary building tools, and AI model training. It starts by breaking text into syllables (since Myanmar has no spaces between words), validates structure cheaply, then progressively moves through dictionary lookups, grammar rules, confusable detection, N-gram context, and ONNX-powered AI inference for the errors that need deeper analysis.Why was mySpellChecker created?
It all started with an inquisitive mind while I was cleaning one of my legacy pet project’s database, a Burmese poetry site I launched 20 years ago. I started wondering if I could analyze the data to learn how different poets used rhyme patterns, what the most common ones were, and whether I could build a rhyme pattern generator from it. When I went through the data, encoding issues everywhere since we didn’t even have proper Unicode fonts back then, and spelling errors as expected from community-contributed content. Mind being mind, that drifted me away from my original intention and I started wondering why there’s no spellchecker for Burmese. What makes it so difficult that no one pulled their sword, wielded it and made this happen? That’s where my research started and I already sensed how difficult it would be. Turns out, that was just the tip of the iceberg. Lack of clean data, limited linguistic papers online, and the sheer complexity of the language probably drove people away from committing. For this type of project with no guaranteed success, there are only two paths at each phase. Quit early or go crazy. I took the latter and went greedily from one achievement to the next, sweeping away my nights and weekends for about 4 months (all my rest time). Without AI assistance, I would have been a lot lonelier and might have taken double the time. Even though frontier LLMs still have limited Burmese NLP knowledge, I could heavily rely on them for common tasks they already excel at. That’s the biggest win of this AI era, knowing how and where to get assistance from. 33 million people speak Burmese as their first language and another 10 million as their second (per Wikipedia). And yet, not a single proper writing tool exists for the language. Let me proudly put a stop to this. After many hours of trials, errors and validations (just don’t take my word on it, check the benchmark scores), I’m releasing version 1.0 of mySpellChecker under the MIT License. It goes well beyond just spell checking. From rule-based to AI semantic, build your own dictionaries, train your own models. One library that handles it all. If you’re a developer interested in Burmese language or NLP, I’d love for you to check out the library and see what you can build with it. Happy Building!Is mySpellChecker open source?
Yes, mySpellChecker is open source and available under the MIT license.What Python versions are supported?
mySpellChecker supports Python 3.10 and later.Installation
Why does installation take a long time?
mySpellChecker includes Cython extensions that are compiled during installation. This requires a C++ compiler and takes extra time. If you don’t have a compiler, the library will fall back to pure Python implementations (slower but functional).Do I need a C++ compiler?
No, it’s optional but recommended. Without a compiler:- Installation is faster
- Pure Python fallbacks are used
- Performance is lower (but still functional)
- Installation compiles Cython extensions
- Performance is significantly better
- OpenMP parallel processing is available (Linux/macOS)
How do I install on macOS without compiler errors?
Can I install without the optional features?
Yes, install the base package only:Usage
How do I check Myanmar text?
What is the difference between validation levels?
| Level | Coverage | Use Case |
|---|---|---|
syllable | Structural errors | Quick validation |
word | Structural + dictionary errors | Standard checking |
use_context_checker=True parameter, not as a separate validation level.
How do I handle Zawgyi text?
Can I use a custom dictionary?
Yes, you can build a custom dictionary from your own corpus:How do I add words to the dictionary at runtime?
Currently, the dictionary is read-only at runtime. To add words:- Add them to your corpus file
- Rebuild the dictionary
- Restart your application
Performance
How can I make spell checking faster?
-
Use syllable-level validation only (fastest):
-
Disable context checking:
-
Use batch processing:
-
Ensure Cython is compiled:
Why is the first call slow?
The first call initializes the dictionary and loads models into memory. Subsequent calls are much faster. Consider warming up the checker:How much memory does mySpellChecker use?
| Configuration | Memory Usage |
|---|---|
| Basic (SQLite provider) | ~50MB |
| Memory provider | ~200MB |
| With semantic model | ~500MB |
| With transformer POS | ~1GB |
Can I use mySpellChecker in a multi-threaded application?
TheSpellChecker instance is not thread-safe by default. For multi-threaded use:
- Create separate instances per thread
- Or use a connection pool for the SQLite provider
- Or use the Memory provider (which is thread-safe for reads)
Accuracy
How accurate is mySpellChecker?
Accuracy depends on the validation level, corpus quality, and domain. Results vary based on your dictionary and text domain. Run your own benchmarks for production accuracy numbers.Why does it mark valid words as errors?
Common reasons:- Word not in dictionary: Add to custom dictionary
- Rare spelling variant: Check corpus coverage
- Foreign word: Myanmar text with English/Pali words
- Proper noun: Names often flagged as unknown
Why doesn’t it catch obvious errors?
Common reasons:- Real-word error: The misspelling is a valid word (enable
use_context_checker=True) - Validation level too low: Increase to
wordlevel - Missing grammar rules: Some patterns not covered
How can I improve accuracy?
- Build from a larger corpus: More data = better suggestions
- Enable context validation: Catches real-word errors
- Use semantic checking: Requires AI extras
- Report false positives/negatives: Help improve the library
Dictionary Building
How do I build a dictionary?
What format should my corpus be?
Plain text with Myanmar content:How big should my corpus be?
Corpus size directly determines dictionary quality. Myanmar has a large vocabulary with many compound words and domain-specific terms, and small corpora miss too many of them.| Corpus Size | Coverage | Recommendation |
|---|---|---|
| Under 1GB | Minimal | Testing and prototyping only |
| 1GB - 10GB | Moderate | Personal projects, narrow domains |
| 10GB - 50GB | Good | Production use |
| 50GB+ | Comprehensive | Professional, multi-domain coverage |
For reference, the production dictionary (~500MB SQLite database) was built from approximately 50GB of corpus data. Don’t underestimate how much raw text you need, especially for N-gram frequency tables and confusable pair mining.
Can I use multiple corpora?
Yes, use incremental building:Integration
Can I use mySpellChecker in a web application?
Yes. The library is tested with FastAPI and providescheck_async() for non-blocking use in async endpoints. See the Integration Guide for a FastAPI example with connection pooling and proper lifecycle management.
Is there a REST API?
The library doesn’t include a built-in API server, but it’s straightforward to wrap with FastAPI:Can I use it with VS Code?
There is no VS Code extension yet. Currently, you can:- Use the CLI for manual checking
- Create a custom script that integrates with your editor
Troubleshooting
See Also
- Troubleshooting Guide - Common issues and solutions
- Error Codes - Error code reference
- Configuration - Configuration options
Contributing
How can I contribute?
- Report bugs via GitHub issues
- Submit pull requests for fixes
- Improve documentation
- Share your custom dictionaries or corpora
How do I report a bug?
Open a GitHub issue with:- Python version
- mySpellChecker version
- Minimal reproduction code
- Expected vs actual behavior