thettwe commited on
Commit
a08433c
·
verified ·
1 Parent(s): f72fb91

Upload folder using huggingface_hub

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