thettwe's picture
Upload folder using huggingface_hub
0d6b1eb verified
---
license: apache-2.0
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.
### pos_data/
- **myspellcheck_pos.csv** - POS-tagged Myanmar words for grammar checking (49,681 entries).
#### POS Tag Distribution
| Tag | Description | Count |
|-----|-------------|------:|
| N | Noun | 26,871 |
| V | Verb | 11,770 |
| ADJ | Adjective | 7,157 |
| ADV | Adverb | 3,013 |
| P | Particle | 195 |
| NUM | Number | 165 |
| CONJ | Conjunction | 163 |
| PRO | Pronoun | 137 |
| P_MOD | Modifier Particle | 73 |
| ABB | Abbreviation | 56 |
| INT | Interjection | 50 |
| P_SENT | Sentence-ending Particle | 19 |
| P_LOC | Location Particle | 7 |
| P_SUBJ | Subject Particle | 3 |
| P_OBJ | Object Particle | 2 |
| **Total** | | **49,681** |
## 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
### POS Data Sources
The POS-tagged word list (`myspellcheck_pos.csv`) is a combination of multiple sources:
- **Ornagai Dictionary**
- **Website**: https://www.ornagai.com
- **Description**: Comprehensive Myanmar-English dictionary with POS annotations
- **Myanmar Words List**
- **Repository**: https://github.com/myanmartools/myanmar-words
- **Description**: Open-source Myanmar word collection
- **myPOS Corpus**
- **Repository**: https://github.com/ye-kyaw-thu/myPOS
- **Author**: Ye Kyaw Thu
- **Description**: Myanmar Part-of-Speech tagged corpus (version 3.0)
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.