thettwe's picture
Upload folder using huggingface_hub
a08433c verified
metadata
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 - 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:

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:

Curated Lexicon Sources

The curated lexicon (curated_lexicon.csv) is derived from the following sources:

We are grateful to all contributors for providing foundational data for Myanmar NLP.

Usage

Resources are downloaded automatically by myspellchecker:

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.