thettwe commited on
Commit
d8d4ee7
·
verified ·
1 Parent(s): 860df74

Upload folder using huggingface_hub

Browse files
.gitattributes CHANGED
@@ -57,3 +57,6 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
57
  # Video files - compressed
58
  *.mp4 filter=lfs diff=lfs merge=lfs -text
59
  *.webm filter=lfs diff=lfs merge=lfs -text
 
 
 
 
57
  # Video files - compressed
58
  *.mp4 filter=lfs diff=lfs merge=lfs -text
59
  *.webm filter=lfs diff=lfs merge=lfs -text
60
+ models/wordseg_c2_crf.crfsuite filter=lfs diff=lfs merge=lfs -text
61
+ pos_data/combined_pos_seed.csv filter=lfs diff=lfs merge=lfs -text
62
+ segmentation/segmentation.mmap filter=lfs diff=lfs merge=lfs -text
README.md CHANGED
@@ -1,3 +1,68 @@
1
- ---
2
- license: mit
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # myspellchecker-resources
2
+
3
+ Build-time resources for [myspellchecker](https://github.com/thettwe/myspellchecker) - Myanmar language spell checker.
4
+
5
+ ## Overview
6
+
7
+ 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.
8
+
9
+ ## Contents
10
+
11
+ ### segmentation/
12
+ - **segmentation.mmap** (100MB) - Memory-mapped dictionary containing unigram and bigram log probabilities for Myanmar word segmentation using Viterbi algorithm.
13
+
14
+ ### models/
15
+ - **wordseg_c2_crf.crfsuite** (3.2MB) - Conditional Random Fields model for syllable-based word tokenization.
16
+
17
+ ### pos_data/
18
+ - **combined_pos_seed.csv** (15MB) - POS-tagged Myanmar words for grammar checking.
19
+
20
+ ## Technical Notes
21
+
22
+ ### .bin to .mmap Conversion
23
+
24
+ The segmentation dictionary has been converted from pickle-based `.bin` files to memory-mapped `.mmap` format for:
25
+
26
+ - **Memory Efficiency** - Lazy loading without loading entire file into RAM
27
+ - **Fork-Safe** - Copy-on-Write (COW) semantics for multiprocessing
28
+ - **Faster Startup** - No pickle deserialization overhead
29
+ - **Security** - Eliminates pickle arbitrary code execution vulnerabilities
30
+ - **Reduced Size** - 100MB consolidated vs 315MB separate .bin files
31
+
32
+ ## Credits & Attribution
33
+
34
+ ### myWord Project
35
+
36
+ The word segmentation dictionary (`segmentation.mmap`) is derived from the **myWord** project:
37
+
38
+ - **Repository**: https://github.com/ye-kyaw-thu/myWord
39
+ - **Author**: Ye Kyaw Thu
40
+ - **Description**: Myanmar word segmentation using statistical methods with Viterbi algorithm
41
+
42
+ We are grateful to the myWord project for providing the foundational word frequency data that powers Myanmar text segmentation.
43
+
44
+ ### myTokenize Project
45
+
46
+ The CRF model and tokenization framework are based on the **myTokenize** library:
47
+
48
+ - **Repository**: https://github.com/ye-kyaw-thu/myTokenize
49
+ - **Author**: Ye Kyaw Thu
50
+
51
+ ## Usage
52
+
53
+ Resources are downloaded automatically by myspellchecker:
54
+
55
+ ```python
56
+ from myspellchecker import SpellChecker
57
+
58
+ # Resources download automatically on first use
59
+ checker = SpellChecker()
60
+ ```
61
+
62
+ ## Cache Location
63
+
64
+ Downloaded resources are cached at: `~/.cache/myspellchecker/resources/`
65
+
66
+ ## License
67
+
68
+ These resources are provided under the same license terms as the original projects. Please refer to the original repositories for specific licensing information.
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
pos_data/combined_pos_seed.csv ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:749089215b7d063338d548915f8b7e3e8415264ff9c3876a7ad81e35408d8c86
3
+ size 15366523
segmentation/segmentation.mmap ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0737e63e4eebdbf0f21f1074a4ab65154c287953388ff646c742ebba34416acc
3
+ size 105078601