Update README.md
Browse files
README.md
CHANGED
|
@@ -17,10 +17,77 @@ tags:
|
|
| 17 |
- unigram
|
| 18 |
- syllable-aware
|
| 19 |
- datarrx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
---
|
| 21 |
# DatarrX - myX-Tokenizer
|
| 22 |
|
| 23 |
-
မြန်မာဘာသာစကားအတွက် အထူးရည်ရွယ်၍ တည်ဆောက်ထားသော Syllable-aware Unigram Tokenizer တစ်ခု ဖြစ်ပါသည်။ ဤ Model ကို [**DatarrX (Open Source NGO)**](https://huggingface.co/DatarrX) မှ ထုတ်ဝေခြင်းဖြစ်ပြီး [**Khant Sint Heinn (Kalix Louis)**](https://huggingface.co/kalixlouiis) မှ အဓိက ဖန်တီးတည်ဆောက်ထားခြင်း ဖြစ်ပါသည်။
|
| 24 |
|
| 25 |
## 🎯 Model ရဲ့ ရည်ရွယ်ချက်နှင့် အဓိက အယူအဆ (Core Concept & Motivation)
|
| 26 |
|
|
@@ -75,7 +142,7 @@ print(f"Pieces: {sp.encode_as_pieces(text)}")
|
|
| 75 |
```
|
| 76 |
|
| 77 |
# ✍️ Project Authors
|
| 78 |
-
-
|
| 79 |
- Organization: [**DatarrX (Myanmar Open Source NGO)**](https://huggingface.co/DatarrX)
|
| 80 |
|
| 81 |
ဤ Model နှင့် ပတ်သက်၍ အကြံပြုချက်များ သို့မဟုတ် မေးမြန်းလိုသည်များရှိပါက Hugging Face Discussion မှတစ်ဆင့် ဆက်သွယ်နိုင်ပါသည်။ ကျွန်တော်တို့သည် မြန်မာစာ NLP ဖွံ့ဖြိုးတိုးတက်ရေးအတွက် အမြဲမပြတ် ကြိုးစားနေပါသည်။
|
|
|
|
| 17 |
- unigram
|
| 18 |
- syllable-aware
|
| 19 |
- datarrx
|
| 20 |
+
---
|
| 21 |
+
# DatarrX / myX-Tokenizer ⚔️
|
| 22 |
+
|
| 23 |
+
**myX-Tokenizer** is a high-performance, syllable-aware **Unigram Tokenizer** specifically engineered for the Burmese language. Developed by [**Khant Sint Heinn (Kalix Louis)**](https://huggingface.co/kalixlouiis) under [**DatarrX (Myanmar Open Source NGO)**](https://huggingface.co/DatarrX), this model is designed to bridge the gap in Myanmar Natural Language Processing (NLP) by providing efficient and linguistically meaningful text segmentation.
|
| 24 |
+
|
| 25 |
+
## 🎯 Core Objectives
|
| 26 |
+
|
| 27 |
+
Current tokenization methods for Burmese often suffer from excessive character-level fragmentation or a lack of understanding of syllabic structures. **myX-Tokenizer** addresses these issues through:
|
| 28 |
+
|
| 29 |
+
* **Syllabic Integrity:** Optimized to preserve the structural meaning of Burmese syllables, preventing meaningless character splits.
|
| 30 |
+
* **Bilingual Optimization:** Expertly handles code-mixed (Burmese + English) contexts, maintaining high efficiency for both languages within a single string.
|
| 31 |
+
* **LLM Compatibility:** Designed to reduce token counts for Large Language Models (LLMs), effectively lowering inference latency and computational costs.
|
| 32 |
+
|
| 33 |
+
---
|
| 34 |
+
|
| 35 |
+
## 🛠️ Technical Specifications
|
| 36 |
+
|
| 37 |
+
This model was trained directly on cleaned raw text without heavy pre-processing to ensure the highest degree of data fidelity.
|
| 38 |
+
|
| 39 |
+
* **Algorithm:** Unigram Language Model (Offers a probabilistic approach superior to standard BPE for morphological richness).
|
| 40 |
+
* **Vocabulary Size:** 64,000.
|
| 41 |
+
* **Normalization:** NFKC (Normalization Form KC).
|
| 42 |
+
* **Key Features:** * **Byte-fallback:** Robust handling of out-of-vocabulary (OOV) characters.
|
| 43 |
+
* **Split Digits:** Separate tokens for numerical values for better mathematical context.
|
| 44 |
+
* **Dummy Prefix:** Automatic handling of word boundaries.
|
| 45 |
+
|
| 46 |
+
### Training Data
|
| 47 |
+
Trained on the [kalixlouiis/myX-Corpus](https://huggingface.co/datasets/kalixlouiis/myX-Corpus), utilizing a high-quality selection of **1.5 million** Burmese-English mixed sentences.
|
| 48 |
+
|
| 49 |
+
|
| 50 |
+
|
| 51 |
+
---
|
| 52 |
+
|
| 53 |
+
## ⚠️ Limitations & Considerations
|
| 54 |
+
|
| 55 |
+
* **Orthographic Sensitivity:** Tokenization quality is highly dependent on the correct spelling of the source text.
|
| 56 |
+
* **English-Only Performance:** While highly efficient for mixed text, token counts may be slightly higher than global tokenizers in purely English contexts.
|
| 57 |
+
* **Domain Variance:** Rare Pali/Sanskrit loanwords or ancient scripts may revert to character-level tokenization.
|
| 58 |
+
|
| 59 |
+
---
|
| 60 |
+
|
| 61 |
+
## 💻 Usage Guide
|
| 62 |
+
|
| 63 |
+
To use this model, you need the `sentencepiece` library. You can load and use the model directly using the following snippet:
|
| 64 |
+
|
| 65 |
+
```python
|
| 66 |
+
import sentencepiece as spm
|
| 67 |
+
from huggingface_hub import hf_hub_download
|
| 68 |
+
|
| 69 |
+
# Download the model from Hugging Face
|
| 70 |
+
model_path = hf_hub_download(repo_id="DatarrX/myX-Tokenizer", filename="myX-Tokenizer.model")
|
| 71 |
+
|
| 72 |
+
# Initialize the processor
|
| 73 |
+
sp = spm.SentencePieceProcessor(model_file=model_path)
|
| 74 |
+
|
| 75 |
+
# Tokenize example text
|
| 76 |
+
text = "မြန်မာစာ NLP နည်းပညာ ဖွံ့ဖြိုးတိုးတက်ရေးအတွက် ကျွန်တော်တို့ ကြိုးစားနေပါသည်။"
|
| 77 |
+
tokens = sp.encode_as_pieces(text)
|
| 78 |
+
|
| 79 |
+
print(f"Tokens: {tokens}")
|
| 80 |
+
```
|
| 81 |
+
# ✍️ Project Authors
|
| 82 |
+
- Developer: [**Khant Sint Heinn (Kalix Louis)**](https://huggingface.co/kalixlouiis)
|
| 83 |
+
- Organization: [**DatarrX (Myanmar Open Source NGO)**](https://huggingface.co/DatarrX)
|
| 84 |
+
|
| 85 |
+
We are committed to advancing the Burmese NLP ecosystem. For feedback or collaboration, please use the Hugging Face Discussion tab.
|
| 86 |
+
|
| 87 |
---
|
| 88 |
# DatarrX - myX-Tokenizer
|
| 89 |
|
| 90 |
+
မြန်မာဘာသာစကားအတွက် အထူးရည်ရွယ်၍ တည်ဆောက်ထားသော Syllable-aware Unigram Tokenizer တစ်ခု ဖြစ်ပါသည်။ ဤ Model ကို [**DatarrX (Myanmar Open Source NGO)**](https://huggingface.co/DatarrX) မှ ထုတ်ဝေခြင်းဖြစ်ပြီး [**Khant Sint Heinn (Kalix Louis)**](https://huggingface.co/kalixlouiis) မှ အဓိက ဖန်တီးတည်ဆောက်ထားခြင်း ဖြစ်ပါသည်။
|
| 91 |
|
| 92 |
## 🎯 Model ရဲ့ ရည်ရွယ်ချက်နှင့် အဓိက အယူအဆ (Core Concept & Motivation)
|
| 93 |
|
|
|
|
| 142 |
```
|
| 143 |
|
| 144 |
# ✍️ Project Authors
|
| 145 |
+
- Developer: [**Khant Sint Heinn (Kalix Louis)**](https://huggingface.co/kalixlouiis)
|
| 146 |
- Organization: [**DatarrX (Myanmar Open Source NGO)**](https://huggingface.co/DatarrX)
|
| 147 |
|
| 148 |
ဤ Model နှင့် ပတ်သက်၍ အကြံပြုချက်များ သို့မဟုတ် မေးမြန်းလိုသည်များရှိပါက Hugging Face Discussion မှတစ်ဆင့် ဆက်သွယ်နိုင်ပါသည်။ ကျွန်တော်တို့သည် မြန်မာစာ NLP ဖွံ့ဖြိုးတိုးတက်ရေးအတွက် အမြဲမပြတ် ကြိုးစားနေပါသည်။
|