Rakhine - Wikilangs Models
Comprehensive Research Report & Full Ablation Study
This repository contains NLP models trained and evaluated by Wikilangs, specifically on Rakhine Wikipedia data. We analyze tokenizers, n-gram models, Markov chains, vocabulary statistics, and word embeddings.
📋 Repository Contents
Models & Assets
- Tokenizers (8k, 16k, 32k, 64k)
- N-gram models (2, 3, 4, 5-gram)
- Markov chains (context of 1, 2, 3, 4 and 5)
- Subword N-gram and Markov chains
- Embeddings in various sizes and dimensions (aligned and unaligned)
- Language Vocabulary
- Language Statistics
Analysis and Evaluation
- 1. Tokenizer Evaluation
- 2. N-gram Model Evaluation
- 3. Markov Chain Evaluation
- 4. Vocabulary Analysis
- 5. Word Embeddings Evaluation
- 6. Morphological Analysis (Experimental)
- 7. Summary & Recommendations
- Metrics Glossary
- Visualizations Index
1. Tokenizer Evaluation
Results
| Vocab Size | Compression | Avg Token Len | UNK Rate | Total Tokens |
|---|---|---|---|---|
| 8k | 3.940x | 3.94 | 0.1358% | 871,776 |
| 16k | 4.360x | 4.36 | 0.1503% | 787,889 |
| 32k | 4.558x | 4.56 | 0.1571% | 753,628 |
| 64k | 4.868x 🏆 | 4.87 | 0.1678% | 705,565 |
Tokenization Examples
Below are sample sentences tokenized with each vocabulary size:
Sample 1: နို့လက်ဖက်ရည် (အင်္ဂလိပ်: milk tea) ရေ လက်ဖက်ရည်နန့် နွားနို့နန့် ပြုလုပ်ထားရေ ဖ...
| Vocab | Tokens | Count |
|---|---|---|
| 8k | ▁နို့ လက် ဖက်ရည် ▁( အင်္ဂလိပ် : ▁m il k ▁t ... (+16 more) |
26 |
| 16k | ▁နို့ လက်ဖက်ရည် ▁( အင်္ဂလိပ် : ▁m il k ▁t e ... (+12 more) |
22 |
| 32k | ▁နို့လက်ဖက်ရည် ▁( အင်္ဂလိပ် : ▁m il k ▁t e a ... (+10 more) |
20 |
| 64k | ▁နို့လက်ဖက်ရည် ▁( အင်္ဂလိပ် : ▁milk ▁tea ) ▁ရေ ▁လက်ဖက်ရည်နန့် ▁နွားနို့နန့် ... (+3 more) |
13 |
Sample 2: ပုလဲနို့လက်ဖက်ရည် (တရုတ်: 珍珠奶茶) ဆိုရေမှာ ထိုင်ဝမ်တွင် လူကြိုက်များရေ လက်ဖက်ရည်အအ...
| Vocab | Tokens | Count |
|---|---|---|
| 8k | ▁ပုလဲ နို့ လက် ဖက်ရည် ▁( တရုတ် : ▁ 珍珠奶茶 ) ... (+20 more) |
30 |
| 16k | ▁ပုလဲ နို့ လက်ဖက်ရည် ▁( တရုတ် : ▁ 珍珠奶茶 ) ▁ဆိုရေမှာ ... (+14 more) |
24 |
| 32k | ▁ပုလဲ နို့လက်ဖက်ရည် ▁( တရုတ် : ▁ 珍珠奶茶 ) ▁ဆိုရေမှာ ▁ထိုင်ဝ ... (+11 more) |
21 |
| 64k | ▁ပုလဲ နို့လက်ဖက်ရည် ▁( တရုတ် : ▁ 珍珠奶茶 ) ▁ဆိုရေမှာ ▁ထိုင်ဝမ်တွင် ... (+7 more) |
17 |
Sample 3: ကိုယ်ရေးအကျဉ်း အလုပ်အကိုင် ဂီတလမ်းကြောင်း အယ်လ်ဘမ်တိ Single သီချင်းတိ ပါဝင်သီဆို...
| Vocab | Tokens | Count |
|---|---|---|
| 8k | ▁ကိုယ်ရေးအကျဉ်း ▁အလုပ်အကိုင် ▁ဂီတ လမ်းကြောင်း ▁အယ်လ် ဘမ်တိ ▁s ing le ▁သီချင်းတိ ... (+9 more) |
19 |
| 16k | ▁ကိုယ်ရေးအကျဉ်း ▁အလုပ်အကိုင် ▁ဂီတလမ်းကြောင်း ▁အယ်လ်ဘမ်တိ ▁single ▁သီချင်းတိ ▁ပါဝင်သီဆိုဖူးရေ ▁သီချင်းတိ ▁ကိုးကား ▁ပြင်ပလင့် ... (+2 more) |
12 |
| 32k | ▁ကိုယ်ရေးအကျဉ်း ▁အလုပ်အကိုင် ▁ဂီတလမ်းကြောင်း ▁အယ်လ်ဘမ်တိ ▁single ▁သီချင်းတိ ▁ပါဝင်သီဆိုဖူးရေ ▁သီချင်းတိ ▁ကိုးကား ▁ပြင်ပလင့် ... (+1 more) |
11 |
| 64k | ▁ကိုယ်ရေးအကျဉ်း ▁အလုပ်အကိုင် ▁ဂီတလမ်းကြောင်း ▁အယ်လ်ဘမ်တိ ▁single ▁သီချင်းတိ ▁ပါဝင်သီဆိုဖူးရေ ▁သီချင်းတိ ▁ကိုးကား ▁ပြင်ပလင့် ... (+1 more) |
11 |
Key Findings
- Best Compression: 64k achieves 4.868x compression
- Lowest UNK Rate: 8k with 0.1358% unknown tokens
- Trade-off: Larger vocabularies improve compression but increase model size
- Recommendation: 32k vocabulary provides optimal balance for production use
2. N-gram Model Evaluation
Results
| N-gram | Variant | Perplexity | Entropy | Unique N-grams | Top-100 Coverage | Top-1000 Coverage |
|---|---|---|---|---|---|---|
| 2-gram | Word | 2,475 | 11.27 | 3,711 | 18.7% | 59.1% |
| 2-gram | Subword | 1,997 🏆 | 10.96 | 21,097 | 35.0% | 70.8% |
| 3-gram | Word | 3,510 | 11.78 | 5,274 | 15.1% | 51.1% |
| 3-gram | Subword | 16,910 | 14.05 | 105,452 | 13.3% | 36.3% |
| 4-gram | Word | 13,278 | 13.70 | 18,246 | 8.0% | 25.9% |
| 4-gram | Subword | 74,444 | 16.18 | 313,099 | 6.3% | 19.3% |
| 5-gram | Word | 12,446 | 13.60 | 16,164 | 7.7% | 25.0% |
| 5-gram | Subword | 151,855 | 17.21 | 428,759 | 3.6% | 12.6% |
Top 5 N-grams by Size
2-grams (Word):
| Rank | N-gram | Count |
|---|---|---|
| 1 | တွီးတောမှု သံသယကုက္ကုစ္စ |
226 |
| 2 | ဒုက္ကဋ်အာပတ် သင့် |
225 |
| 3 | ပါရာဇိကအာပတ် သင့်ဧ့ |
217 |
| 4 | ပ ရဟန်း |
216 |
| 5 | အယင်ခေါက်ကခါ ရဟန်းတစ်ပါးစွာ |
203 |
3-grams (Word):
| Rank | N-gram | Count |
|---|---|---|
| 1 | ထိုရဟန်းအား တွီးတောမှု သံသယကုက္ကုစ္စ |
178 |
| 2 | သံသယကုက္ကုစ္စ ဖြစ်ဧ့ ပ |
172 |
| 3 | တွီးတောမှု သံသယကုက္ကုစ္စ ဖြစ်ဧ့ |
144 |
| 4 | ဖြစ်ဧ့ ပ ရဟန်း |
142 |
| 5 | မဟုတ်မမှန် ပြောဆိုရေ ရဟန်းအား |
80 |
4-grams (Word):
| Rank | N-gram | Count |
|---|---|---|
| 1 | တွီးတောမှု သံသယကုက္ကုစ္စ ဖြစ်ဧ့ ပ |
135 |
| 2 | သံသယကုက္ကုစ္စ ဖြစ်ဧ့ ပ ရဟန်း |
128 |
| 3 | ထိုရဟန်းအား တွီးတောမှု သံသယကုက္ကုစ္စ ဖြစ်ဧ့ |
113 |
| 4 | သံသယကုက္ကုစ္စ ဖြိုက်ဧ့ ပ ရဟန်း |
67 |
| 5 | ရှေးဟောင်းအဆောက်အဦးများ ရှေးဟောင်းသုတေသနနှင့် အမျိုးသားပြတိုက်ဦးစီးဌာန ယဉ်ကျေးမူဝန်ကြီးဌာန |
66 |
5-grams (Word):
| Rank | N-gram | Count |
|---|---|---|
| 1 | ထိုရဟန်းအား တွီးတောမှု သံသယကုက္ကုစ္စ ဖြစ်ဧ့ ပ |
110 |
| 2 | တွီးတောမှု သံသယကုက္ကုစ္စ ဖြစ်ဧ့ ပ ရဟန်း |
93 |
| 3 | ကိုးကား မြောက်ဦးဒေသ ရှေးဟောင်းအဆောက်အဦးများ ရှေးဟောင်းသုတေသနနှင့် အမျိုးသားပြတိုက်ဦးစီးဌာန |
66 |
| 4 | ရှေးဟောင်းအဆောက်အဦးများ ရှေးဟောင်းသုတေသနနှင့် အမျိုးသားပြတိုက်ဦးစီးဌာန ယဉ်ကျေးမူဝန်ကြီးဌာန ပုထိုးတော်တိ |
66 |
| 5 | မြောက်ဦးဒေသ ရှေးဟောင်းအဆောက်အဦးများ ရှေးဟောင်းသုတေသနနှင့် အမျိုးသားပြတိုက်ဦးစီးဌာန ယဉ်ကျေးမူဝန်ကြီးဌာန |
66 |
2-grams (Subword):
| Rank | N-gram | Count |
|---|---|---|
| 1 | င် း |
70,638 |
| 2 | ာ း |
65,449 |
| 3 | _ အ |
56,551 |
| 4 | ။ _ |
52,197 |
| 5 | း _ |
50,866 |
3-grams (Subword):
| Rank | N-gram | Count |
|---|---|---|
| 1 | ရေ ။ _ |
31,071 |
| 2 | ာ င် း |
18,078 |
| 3 | တွ င် _ |
14,734 |
| 4 | န န့် _ |
14,037 |
| 5 | ာ း _ |
12,271 |
4-grams (Subword):
| Rank | N-gram | Count |
|---|---|---|
| 1 | လ ည် း _ |
6,741 |
| 2 | ရ ဟ န် း |
5,765 |
| 3 | ကေ ာ င် း |
5,150 |
| 4 | ဖြ စ် ရေ ။ |
4,615 |
| 5 | စ် ရေ ။ _ |
4,465 |
5-grams (Subword):
| Rank | N-gram | Count |
|---|---|---|
| 1 | ဖြ စ် ရေ ။ _ |
4,438 |
| 2 | _ ရ ဟ န် း |
3,712 |
| 3 | ပ ါ ရေ ။ _ |
3,105 |
| 4 | က တ် ရေ ။ _ |
2,654 |
| 5 | _ ဖြ စ် ရေ ။ |
2,073 |
Key Findings
- Best Perplexity: 2-gram (subword) with 1,997
- Entropy Trend: Decreases with larger n-grams (more predictable)
- Coverage: Top-1000 patterns cover ~13% of corpus
- Recommendation: 4-gram or 5-gram for best predictive performance
3. Markov Chain Evaluation
Results
| Context | Variant | Avg Entropy | Perplexity | Branching Factor | Unique Contexts | Predictability |
|---|---|---|---|---|---|---|
| 1 | Word | 0.2818 | 1.216 | 1.76 | 243,192 | 71.8% |
| 1 | Subword | 1.4978 | 2.824 | 24.80 | 2,290 | 0.0% |
| 2 | Word | 0.0459 | 1.032 | 1.07 | 427,212 | 95.4% |
| 2 | Subword | 0.7632 | 1.697 | 5.15 | 56,790 | 23.7% |
| 3 | Word | 0.0165 | 1.012 | 1.02 | 454,829 | 98.3% |
| 3 | Subword | 0.4942 | 1.409 | 2.68 | 292,573 | 50.6% |
| 4 | Word | 0.0100 🏆 | 1.007 | 1.01 | 463,846 | 99.0% |
| 4 | Subword | 0.3219 | 1.250 | 1.80 | 783,810 | 67.8% |
Generated Text Samples (Word-based)
Below are text samples generated from each word-based Markov chain model:
Context Size 1:
နန့် ဝဇီရာကိလာယ vajrakilaya ရို့ပါဝင်လီရေ ဒါကီနီတိ dakini ကောင်းကင်သို့ကြွလှမ်းသူ ရေ ဒေဝိဉာဉ်သဘာဝကနေ...ဖြစ်ရေ အာရုံခံကိရိယာတိကို နေ့စဉ်သုံး အရာဝတ္ထုတိတွင် အကန့်အသတ်ဖြင့်သာ အသုံးချနိုင်ရေ ကိုးကား နိုင်ငံတ...ရေ ဖိုင်တိကို ဖလှယ်နိုင်ပြီးကေ ဝီမျှရန် ဝှိုက်ဘုတ် ပေါ်တွင်ရီးဆွဲခြင်း ယပိုင်မဟုတ်ကေ ဘောင်နီရာအကျယ်အ...
Context Size 2:
တွီးတောမှု သံသယကုက္ကုစ္စ ဖြစ်ဧ့ ပ ရဟန်း သင်စွာ ပါရာဇိက ကျယာလို့ မိန့်တော်မှုဧ့ ၁၁၆ ၁၅၆ အယင်ခေါက်ကခါ ...ဒုက္ကဋ်အာပတ် သင့် ပ အကြောင်းသုံးမျိုးရို့နန့် မသိစွာကို ငါစွာ သိလည်း သိ မြင်လည်း မြင်ရေဟု ပ အကြောင်း...ပါရာဇိကအာပတ် သင့်ဧ့ အချိန်းအချက်လုပ်ခြင်း ဆိုစော် စစောပင်ဖြစ်စီ ညနိန်ချမ်းပင်ဖြစ်စီ ညဉ့်ပင်ဖြစ်စီ နိ...
Context Size 3:
ထိုရဟန်းအား တွီးတောမှု သံသယကုက္ကုစ္စ ဖြစ်ဧ့ ပ ရဟန်း ပါရာဇိကအာပတ် မသင့် ဒုက္ကဋ်အာပတ် သင့်ဧ့လို့ မိန့်...သံသယကုက္ကုစ္စ ဖြစ်ဧ့ ပ ရဟန်းရို့ ပါရာဇိကအာပတ် မသင့်လို့ မိန့်တော်မူဧ့ ၆၉ အယင်ခေါက်ကခါ သတ္တရသဝဂ္ဂီရဟန...တွီးတောမှု သံသယကုက္ကုစ္စ ဖြစ်ဧ့ ပ ရဟန်း သင်စွာ ပါရာဇိက ကျယာလို့ မိန့်တော်မူဧ့ ၆၅ အယင်ခေါက်ကခါ ဝမ်းကြ...
Context Size 4:
တွီးတောမှု သံသယကုက္ကုစ္စ ဖြစ်ဧ့ ပ ရဟန်း သင်စွာ ပါရာဇိက ကျယာလို့ မိန့်တော်မူဧ့ ၄၆ အယင်ခေါက်ကခါ ရဟန်းတ...သံသယကုက္ကုစ္စ ဖြစ်ဧ့ ပ ရဟန်း သင်စွာပါရာဇိက ကျယာလို့ မိန့်တော်မူဧ့ ၁၁၅ အယင်ခေါက်ကခါ ရဟန်းတစ်ပါးစွာ မြ...ထိုရဟန်းအား တွီးတောမှု သံသယကုက္ကုစ္စ ဖြစ်ဧ့ ပ ရဟန်း သင်စွာ ပါရာဇိက ကျရာလို့ မိန့်တော်မူဧ့ ၈၆ ဝိနီတဝထ...
Generated Text Samples (Subword-based)
Below are text samples generated from each subword-based Markov chain model:
Context Size 1:
_ဆည်းအတွင်ထက်နန့်_အသျှင်ဒိုးလျှပ်ရို့ဖြစ်ခေါ်ရာင်းကိုအတွဲပားရေ။_ဇာ_သင့်ရန်ကြီးတိန
Context Size 2:
င်းဆောင်း၌_သူဆင်း_ဖြစ်ပြောားရေးနှင့်လှောင်ထူထပ်ကမ်းမှုအ_အလာက_ဟဲ့_မိမိကိုယ်_စေတီ_ဒွ
Context Size 3:
ရေ။_ကူးစက်တိနန့်_ရွိ့လျားလည်းာင်းကို_တိစွာလဲ။_အမှတ်အသစ်တိတွင်_ရှီးကရက်ဒေါက်တာဆွန်ယက်တိ
Context Size 4:
လည်း_နန့်_မျက်နှာလည်း_ကျရုံသာရဟန်းဘောင်ပေါ်သတင်း_(waveကောင်းလေးမျက်နှာပြင်တစ်ခုဖြစ်၍_
Key Findings
- Best Predictability: Context-4 (word) with 99.0% predictability
- Branching Factor: Decreases with context size (more deterministic)
- Memory Trade-off: Larger contexts require more storage (783,810 contexts)
- Recommendation: Context-3 or Context-4 for text generation
4. Vocabulary Analysis
Statistics
| Metric | Value |
|---|---|
| Vocabulary Size | 47,832 |
| Total Tokens | 309,275 |
| Mean Frequency | 6.47 |
| Median Frequency | 3 |
| Frequency Std Dev | 31.95 |
Most Common Words
| Rank | Word | Frequency |
|---|---|---|
| 1 | နန့် | 2,540 |
| 2 | ဖြစ်ရေ | 2,301 |
| 3 | ရေ | 2,228 |
| 4 | ဟု | 1,547 |
| 5 | ပ | 1,498 |
| 6 | ကို | 1,222 |
| 7 | ခုနှစ် | 1,163 |
| 8 | ကိုးကား | 1,147 |
| 9 | ၁ | 1,146 |
| 10 | ဟိရေ | 1,132 |
Least Common Words (from vocabulary)
| Rank | Word | Frequency |
|---|---|---|
| 1 | ရီကူးစွာပါရာဖြစ်ဖြစ် | 2 |
| 2 | asr | 2 |
| 3 | mothers | 2 |
| 4 | pdp | 2 |
| 5 | evans | 2 |
| 6 | မြောက်ဦးမြို့မာပင် | 2 |
| 7 | ၁၉ရ၃ | 2 |
| 8 | ၁၉ရရ | 2 |
| 9 | ၁၉၉ရ | 2 |
| 10 | စာနယ်ဇင်းအဖွဲ့တွင် | 2 |
Zipf's Law Analysis
| Metric | Value |
|---|---|
| Zipf Coefficient | 0.8062 |
| R² (Goodness of Fit) | 0.995656 |
| Adherence Quality | excellent |
Coverage Analysis
| Top N Words | Coverage |
|---|---|
| Top 100 | 15.9% |
| Top 1,000 | 35.9% |
| Top 5,000 | 57.4% |
| Top 10,000 | 68.4% |
Key Findings
- Zipf Compliance: R²=0.9957 indicates excellent adherence to Zipf's law
- High Frequency Dominance: Top 100 words cover 15.9% of corpus
- Long Tail: 37,832 words needed for remaining 31.6% coverage
5. Word Embeddings Evaluation
5.1 Cross-Lingual Alignment
5.2 Model Comparison
| Model | Dimension | Isotropy | Semantic Density | Alignment R@1 | Alignment R@10 |
|---|---|---|---|---|---|
| mono_32d | 32 | 0.8300 🏆 | 0.3077 | N/A | N/A |
| mono_64d | 64 | 0.7613 | 0.2695 | N/A | N/A |
| mono_128d | 128 | 0.3041 | 0.2391 | N/A | N/A |
| aligned_32d | 32 | 0.8300 | 0.3073 | 0.0260 | 0.1900 |
| aligned_64d | 64 | 0.7613 | 0.2529 | 0.0400 | 0.2280 |
| aligned_128d | 128 | 0.3041 | 0.2467 | 0.0940 | 0.3080 |
Key Findings
- Best Isotropy: mono_32d with 0.8300 (more uniform distribution)
- Semantic Density: Average pairwise similarity of 0.2705. Lower values indicate better semantic separation.
- Alignment Quality: Aligned models achieve up to 9.4% R@1 in cross-lingual retrieval.
- Recommendation: 128d aligned for best cross-lingual performance
6. Morphological Analysis (Experimental)
This section presents an automated morphological analysis derived from the statistical divergence between word-level and subword-level models. By analyzing where subword predictability spikes and where word-level coverage fails, we can infer linguistic structures without supervised data.
6.1 Productivity & Complexity
| Metric | Value | Interpretation | Recommendation |
|---|---|---|---|
| Productivity Index | 5.000 | High morphological productivity | Reliable analysis |
| Idiomaticity Gap | 0.985 | High formulaic/idiomatic content | - |
6.2 Affix Inventory (Productive Units)
These are the most productive prefixes and suffixes identified by sampling the vocabulary for global substitutability patterns. A unit is considered an affix if stripping it leaves a valid stem that appears in other contexts.
Productive Prefixes
| Prefix | Examples |
|---|---|
-အ |
အရှေ့ဘက်တွင်, အမြင့်ဆုံးနီရာမှာ, အဆင်း |
-မ |
မတွိ့သည်ကို, မိမမာ, မေထုန်အမှုတဲးလို့ |
-သ |
သီရိဝိဇယဧ, သဗြုတ်သီးကို, သောတာပတ္တိဖိုလ်သို့ |
-ပ |
ပရိုတင်းဓာတ်, ပြင်ရေ, ပြန်လာရေအခါ |
-ရ |
ရီဆိုးရီညစ်တိကို, ရာစုသစ်အလင်္ကာ, ရေပီးဝေရီး |
-က |
ကွန်ယက်ရေ, ကပ်ပနာ, ကွန်ယက်ချိတ်ဆက်မှု |
-တ |
တောင်း, တနင်္ဂနွေသားဖြစ်လျှင်, တိုင်းရင်းသားလူမျိုး |
-လ |
လက္ခဏ, လို့ပြောရာ, လူမှုဆက်ဆံရီး |
Productive Suffixes
| Suffix | Examples |
|---|---|
-ဧ |
သီရိဝိဇယဧ, နိုင်ငံစာချုပ်ဧ, ရခိုင်အမျိုးသားကောင်စီဧ |
-က |
ထိုစဉ်အခါက, ရဟန်းရို့က, ယင်းရို့က |
-s |
indus, forces, patients |
-e |
amplitude, made, initiative |
-n |
radiation, chain, transcription |
-on |
radiation, transcription, sanitation |
-ရ |
ဥပဒေအရ, လေ့လာမှုတိအရ, ပြောပြချက်အရ |
-y |
pty, viceroy, complexity |
6.3 Bound Stems (Lexical Roots)
Bound stems are high-frequency subword units that are semantically cohesive but rarely appear as standalone words. These often correspond to the 'core' of a word that requires inflection or derivation to be valid.
| Stem | Cohesion | Substitutability | Examples |
|---|---|---|---|
atio |
2.95x | 11 contexts | ratio, nation, nations |
tion |
2.92x | 9 contexts | action, nation, motion |
6.4 Affix Compatibility (Co-occurrence)
This table shows which prefixes and suffixes most frequently co-occur on the same stems, revealing the 'stacking' rules of the language's morphology.
| Prefix | Suffix | Frequency | Examples |
|---|---|---|---|
-အ |
-ဧ |
22 words | အမှုန်တိဧ, အုပ်ချုပ်သူရို့ဧ |
-က |
-ဧ |
16 words | ကျယ်ဧ, ကော်မတီဧ |
-မ |
-က |
11 words | မြာဒင်ထက်က, မိဖုရားက |
-အ |
-က |
11 words | အုပ်ချုပ်သူတိက, အာကာသက |
-မ |
-ဧ |
10 words | မည်သည့်ကိန်းနှစ်ခုဧ, မျိုးရိုးဗီဇအင်ဂျင်နီယာဧ |
-ရ |
-က |
8 words | ရသေ့ကြီးက, ရာစုခန့်က |
-အ |
-ရ |
8 words | အနှစ်သာရ, အခြီအနီအရ |
-သ |
-ဧ |
7 words | သဘာဝကိန်းစုဧ, သဘာဝတရားဧ |
-တ |
-က |
7 words | တတိယပဏ္ဏာသက, တောင်အာဖရိက |
-သ |
-က |
6 words | သံသယဟိပါက, သက္က |
6.5 Recursive Morpheme Segmentation
Using Recursive Hierarchical Substitutability, we decompose complex words into their constituent morphemes. This approach handles nested affixes (e.g., prefix-prefix-root-suffix).
| Word | Suggested Split | Confidence | Stem |
|---|---|---|---|
| ဟွန်ရှူးကျွန်းဧ | ဟွန်ရှူးကျွန်း-ဧ |
4.5 | ဟွန်ရှူးကျွန်း |
| ခက်ခဲပြီး | ခ-က-်ခဲပြီး |
4.5 | ်ခဲပြီး |
| စေတီတော်ဧ | စေတီတော်-ဧ |
4.5 | စေတီတော် |
| တရားကိုကေလေ့ | တ-ရ-ားကိုကေလေ့ |
4.5 | ားကိုကေလေ့ |
| ခရီးထွက်ပြန်ရာ | ခ-ရ-ီးထွက်ပြန်ရာ |
4.5 | ီးထွက်ပြန်ရာ |
| ပြည့်နှစ်က | ပြည့်နှစ်-က |
4.5 | ပြည့်နှစ် |
| ဘဒ္ဒကမ္ဘာမှ | ဘ-ဒ-္ဒကမ္ဘာမှ |
3.0 | ္ဒကမ္ဘာမှ |
| နတ်မြစ်ဧ့ | န-တ-်မြစ်ဧ့ |
3.0 | ်မြစ်ဧ့ |
| ရင်ကွဲနာနန့် | ရ-င-်ကွဲနာနန့် |
3.0 | ်ကွဲနာနန့် |
| မလက်ကာအား | မ-လက-်ကာအား |
3.0 | ်ကာအား |
| နတ်ရုပ်တိ | န-တ-်ရုပ်တိ |
3.0 | ်ရုပ်တိ |
| အပေါ်သို့ | အ-ပ-ေါ်သို့ |
3.0 | ေါ်သို့ |
| ဆန္ဒပြမှု | ဆ-န-္ဒပြမှု |
3.0 | ္ဒပြမှု |
| ရဟိသဖြင့် | ရ-ဟ-ိသဖြင့် |
3.0 | ိသဖြင့် |
| ထိုနည်းကို | ထ-ိုနည်းကို |
1.5 | ိုနည်းကို |
6.6 Linguistic Interpretation
Automated Insight: The language Rakhine shows high morphological productivity. The subword models are significantly more efficient than word models, suggesting a rich system of affixation or compounding.
Note on Idiomaticity: The high Idiomaticity Gap suggests a large number of frequent multi-word expressions or formulaic sequences that are statistically distinct from their component parts.
7. Summary & Recommendations
Production Recommendations
| Component | Recommended | Rationale |
|---|---|---|
| Tokenizer | 64k BPE | Best compression (4.87x) |
| N-gram | 2-gram | Lowest perplexity (1,997) |
| Markov | Context-4 | Highest predictability (99.0%) |
| Embeddings | 100d | Balanced semantic capture and isotropy |
Appendix: Metrics Glossary & Interpretation Guide
This section provides definitions, intuitions, and guidance for interpreting the metrics used throughout this report.
Tokenizer Metrics
Compression Ratio
Definition: The ratio of characters to tokens (chars/token). Measures how efficiently the tokenizer represents text.
Intuition: Higher compression means fewer tokens needed to represent the same text, reducing sequence lengths for downstream models. A 3x compression means ~3 characters per token on average.
What to seek: Higher is generally better for efficiency, but extremely high compression may indicate overly aggressive merging that loses morphological information.
Average Token Length (Fertility)
Definition: Mean number of characters per token produced by the tokenizer.
Intuition: Reflects the granularity of tokenization. Longer tokens capture more context but may struggle with rare words; shorter tokens are more flexible but increase sequence length.
What to seek: Balance between 2-5 characters for most languages. Arabic/morphologically-rich languages may benefit from slightly longer tokens.
Unknown Token Rate (OOV Rate)
Definition: Percentage of tokens that map to the unknown/UNK token, indicating words the tokenizer cannot represent.
Intuition: Lower OOV means better vocabulary coverage. High OOV indicates the tokenizer encounters many unseen character sequences.
What to seek: Below 1% is excellent; below 5% is acceptable. BPE tokenizers typically achieve very low OOV due to subword fallback.
N-gram Model Metrics
Perplexity
Definition: Measures how "surprised" the model is by test data. Mathematically: 2^(cross-entropy). Lower values indicate better prediction.
Intuition: If perplexity is 100, the model is as uncertain as if choosing uniformly among 100 options at each step. A perplexity of 10 means effectively choosing among 10 equally likely options.
What to seek: Lower is better. Perplexity decreases with larger n-grams (more context). Values vary widely by language and corpus size.
Entropy
Definition: Average information content (in bits) needed to encode the next token given the context. Related to perplexity: perplexity = 2^entropy.
Intuition: High entropy means high uncertainty/randomness; low entropy means predictable patterns. Natural language typically has entropy between 1-4 bits per character.
What to seek: Lower entropy indicates more predictable text patterns. Entropy should decrease as n-gram size increases.
Coverage (Top-K)
Definition: Percentage of corpus occurrences explained by the top K most frequent n-grams.
Intuition: High coverage with few patterns indicates repetitive/formulaic text; low coverage suggests diverse vocabulary usage.
What to seek: Depends on use case. For language modeling, moderate coverage (40-60% with top-1000) is typical for natural text.
Markov Chain Metrics
Average Entropy
Definition: Mean entropy across all contexts, measuring average uncertainty in next-word prediction.
Intuition: Lower entropy means the model is more confident about what comes next. Context-1 has high entropy (many possible next words); Context-4 has low entropy (few likely continuations).
What to seek: Decreasing entropy with larger context sizes. Very low entropy (<0.1) indicates highly deterministic transitions.
Branching Factor
Definition: Average number of unique next tokens observed for each context.
Intuition: High branching = many possible continuations (flexible but uncertain); low branching = few options (predictable but potentially repetitive).
What to seek: Branching factor should decrease with context size. Values near 1.0 indicate nearly deterministic chains.
Predictability
Definition: Derived metric: (1 - normalized_entropy) × 100%. Indicates how deterministic the model's predictions are.
Intuition: 100% predictability means the next word is always certain; 0% means completely random. Real text falls between these extremes.
What to seek: Higher predictability for text generation quality, but too high (>98%) may produce repetitive output.
Vocabulary & Zipf's Law Metrics
Zipf's Coefficient
Definition: The slope of the log-log plot of word frequency vs. rank. Zipf's law predicts this should be approximately -1.
Intuition: A coefficient near -1 indicates the corpus follows natural language patterns where a few words are very common and most words are rare.
What to seek: Values between -0.8 and -1.2 indicate healthy natural language distribution. Deviations may suggest domain-specific or artificial text.
R² (Coefficient of Determination)
Definition: Measures how well the linear fit explains the frequency-rank relationship. Ranges from 0 to 1.
Intuition: R² near 1.0 means the data closely follows Zipf's law; lower values indicate deviation from expected word frequency patterns.
What to seek: R² > 0.95 is excellent; > 0.99 indicates near-perfect Zipf adherence typical of large natural corpora.
Vocabulary Coverage
Definition: Cumulative percentage of corpus tokens accounted for by the top N words.
Intuition: Shows how concentrated word usage is. If top-100 words cover 50% of text, the corpus relies heavily on common words.
What to seek: Top-100 covering 30-50% is typical. Higher coverage indicates more repetitive text; lower suggests richer vocabulary.
Word Embedding Metrics
Isotropy
Definition: Measures how uniformly distributed vectors are in the embedding space. Computed as the ratio of minimum to maximum singular values.
Intuition: High isotropy (near 1.0) means vectors spread evenly in all directions; low isotropy means vectors cluster in certain directions, reducing expressiveness.
What to seek: Higher isotropy generally indicates better-quality embeddings. Values > 0.1 are reasonable; > 0.3 is good. Lower-dimensional embeddings tend to have higher isotropy.
Average Norm
Definition: Mean magnitude (L2 norm) of word vectors in the embedding space.
Intuition: Indicates the typical "length" of vectors. Consistent norms suggest stable training; high variance may indicate some words are undertrained.
What to seek: Relatively consistent norms across models. The absolute value matters less than consistency (low std deviation).
Cosine Similarity
Definition: Measures angular similarity between vectors, ranging from -1 (opposite) to 1 (identical direction).
Intuition: Words with similar meanings should have high cosine similarity. This is the standard metric for semantic relatedness in embeddings.
What to seek: Semantically related words should score > 0.5; unrelated words should be near 0. Synonyms often score > 0.7.
t-SNE Visualization
Definition: t-Distributed Stochastic Neighbor Embedding - a dimensionality reduction technique that preserves local structure for visualization.
Intuition: Clusters in t-SNE plots indicate groups of semantically related words. Spread indicates vocabulary diversity; tight clusters suggest semantic coherence.
What to seek: Meaningful clusters (e.g., numbers together, verbs together). Avoid over-interpreting distances - t-SNE preserves local, not global, structure.
General Interpretation Guidelines
- Compare within model families: Metrics are most meaningful when comparing models of the same type (e.g., 8k vs 64k tokenizer).
- Consider trade-offs: Better performance on one metric often comes at the cost of another (e.g., compression vs. OOV rate).
- Context matters: Optimal values depend on downstream tasks. Text generation may prioritize different metrics than classification.
- Corpus influence: All metrics are influenced by corpus characteristics. Wikipedia text differs from social media or literature.
- Language-specific patterns: Morphologically rich languages (like Arabic) may show different optimal ranges than analytic languages.
Visualizations Index
| Visualization | Description |
|---|---|
| Tokenizer Compression | Compression ratios by vocabulary size |
| Tokenizer Fertility | Average token length by vocabulary |
| Tokenizer OOV | Unknown token rates |
| Tokenizer Total Tokens | Total tokens by vocabulary |
| N-gram Perplexity | Perplexity by n-gram size |
| N-gram Entropy | Entropy by n-gram size |
| N-gram Coverage | Top pattern coverage |
| N-gram Unique | Unique n-gram counts |
| Markov Entropy | Entropy by context size |
| Markov Branching | Branching factor by context |
| Markov Contexts | Unique context counts |
| Zipf's Law | Frequency-rank distribution with fit |
| Vocab Frequency | Word frequency distribution |
| Top 20 Words | Most frequent words |
| Vocab Coverage | Cumulative coverage curve |
| Embedding Isotropy | Vector space uniformity |
| Embedding Norms | Vector magnitude distribution |
| Embedding Similarity | Word similarity heatmap |
| Nearest Neighbors | Similar words for key terms |
| t-SNE Words | 2D word embedding visualization |
| t-SNE Sentences | 2D sentence embedding visualization |
| Position Encoding | Encoding method comparison |
| Model Sizes | Storage requirements |
| Performance Dashboard | Comprehensive performance overview |
About This Project
Data Source
Models trained on wikipedia-monthly - a monthly snapshot of Wikipedia articles across 300+ languages.
Project
A project by Wikilangs - Open-source NLP models for every Wikipedia language.
Maintainer
Citation
If you use these models in your research, please cite:
@misc{wikilangs2025,
author = {Kamali, Omar},
title = {Wikilangs: Open NLP Models for Wikipedia Languages},
year = {2025},
doi = {10.5281/zenodo.18073153},
publisher = {Zenodo},
url = {https://huggingface.co/wikilangs}
institution = {Omneity Labs}
}
License
MIT License - Free for academic and commercial use.
Links
- 🌐 Website: wikilangs.org
- 🤗 Models: huggingface.co/wikilangs
- 📊 Data: wikipedia-monthly
- 👤 Author: Omar Kamali
- 🤝 Sponsor: Featherless AI
Generated by Wikilangs Models Pipeline
Report Date: 2026-01-10 18:35:21



















