Datasets:
File size: 3,818 Bytes
a08433c | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 | ---
license: mit
language:
- my
tags:
- myanmar
- burmese
- spell-checker
- nlp
- tokenization
- word-segmentation
pretty_name: myspellchecker Resources
size_categories:
- 100M<n<1B
---
# myspellchecker-resources
Build-time resources for [myspellchecker](https://github.com/thettwe/myspellchecker) - Myanmar language spell checker.
## Overview
This repository hosts large binary files required by myspellchecker that are too large to bundle with the Python package. Files are downloaded automatically on first use.
## Contents
### segmentation/
- **segmentation.mmap** (100MB) - Memory-mapped dictionary containing unigram and bigram log probabilities for Myanmar word segmentation using Viterbi algorithm.
### models/
- **wordseg_c2_crf.crfsuite** (3.2MB) - Conditional Random Fields model for syllable-based word tokenization.
### curated_lexicon/
- **curated_lexicon.csv** - Curated Myanmar word list with POS tags for spell checking (57,566 entries).
This lexicon is built from the Myanmar Words List and the Ornagai dictionary. Data from the Ornagai dictionary was filtered and cleaned to produce a high-quality, consistent word list suitable for spell checking.
#### Lexicon Tag Distribution
| Tag | Description | Count |
|-----|-------------|------:|
| N | Noun | 49,836 |
| ADJ | Adjective | 3,130 |
| V | Verb | 2,630 |
| ADV | Adverb | 997 |
| TN | Temporal Noun | 231 |
| ABB | Abbreviation | 193 |
| PRON | Pronoun | 183 |
| PART | Particle | 122 |
| INT | Interjection | 116 |
| CONJ | Conjunction | 87 |
| PPM | Post-Positional Marker | 37 |
| FW | Foreign Word | 4 |
| **Total** | | **57,566** |
## Technical Notes
### .bin to .mmap Conversion
The segmentation dictionary has been converted from pickle-based `.bin` files to memory-mapped `.mmap` format for:
- **Memory Efficiency** - Lazy loading without loading entire file into RAM
- **Fork-Safe** - Copy-on-Write (COW) semantics for multiprocessing
- **Faster Startup** - No pickle deserialization overhead
- **Security** - Eliminates pickle arbitrary code execution vulnerabilities
- **Reduced Size** - 100MB consolidated vs 315MB separate .bin files
## Credits & Attribution
### myWord Project
The word segmentation dictionary (`segmentation.mmap`) is derived from the **myWord** project:
- **Repository**: https://github.com/ye-kyaw-thu/myWord
- **Author**: Ye Kyaw Thu
- **Description**: Myanmar word segmentation using statistical methods with Viterbi algorithm
We are grateful to the myWord project for providing the foundational word frequency data that powers Myanmar text segmentation.
### myTokenize Project
The CRF model and tokenization framework are based on the **myTokenize** library:
- **Repository**: https://github.com/ye-kyaw-thu/myTokenize
- **Author**: Ye Kyaw Thu
### Curated Lexicon Sources
The curated lexicon (`curated_lexicon.csv`) is derived from the following sources:
- **Ornagai Dictionary**
- **Website**: https://www.ornagai.com
- **Description**: Comprehensive Myanmar-English dictionary. Data was filtered and cleaned to extract a consistent, high-quality word list.
- **Myanmar Words List**
- **Repository**: https://github.com/myanmartools/myanmar-words
- **Description**: Open-source Myanmar word collection.
We are grateful to all contributors for providing foundational data for Myanmar NLP.
## Usage
Resources are downloaded automatically by myspellchecker:
```python
from myspellchecker import SpellChecker
# Resources download automatically on first use
checker = SpellChecker()
```
## Cache Location
Downloaded resources are cached at: `~/.cache/myspellchecker/resources/`
## License
These resources are provided under the same license terms as the original projects. Please refer to the original repositories for specific licensing information.
|