Burmese - Wikilangs Models
Comprehensive Research Report & Full Ablation Study
This repository contains NLP models trained and evaluated by Wikilangs, specifically on Burmese 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 | 4.094x | 4.09 | 0.0581% | 1,838,036 |
| 16k | 4.637x | 4.64 | 0.0658% | 1,622,639 |
| 32k | 5.147x | 5.15 | 0.0731% | 1,461,988 |
| 64k | 5.618x 🏆 | 5.62 | 0.0797% | 1,339,281 |
Tokenization Examples
Below are sample sentences tokenized with each vocabulary size:
Sample 1: လက်ပန်ကွင်းရွာ၊ လက်ပန်ကွင်း ကိုးကား ရွာများ ရွာများ
| Vocab | Tokens | Count |
|---|---|---|
| 8k | ▁လက်ပန် ကွင်းရွာ၊ ▁လက်ပန် ကွင်း ▁ကိုးကား ▁ရွာများ ▁ရွာများ |
7 |
| 16k | ▁လက်ပန် ကွင်းရွာ၊ ▁လက်ပန် ကွင်း ▁ကိုးကား ▁ရွာများ ▁ရွာများ |
7 |
| 32k | ▁လက်ပန် ကွင်းရွာ၊ ▁လက်ပန် ကွင်း ▁ကိုးကား ▁ရွာများ ▁ရွာများ |
7 |
| 64k | ▁လက်ပန် ကွင်းရွာ၊ ▁လက်ပန် ကွင်း ▁ကိုးကား ▁ရွာများ ▁ရွာများ |
7 |
Sample 2: ကွင်းယားကုန်းရွာ၊ ဇငြွ်ပန်းကုန်း ကိုးကား ရွာများ ရွာများ
| Vocab | Tokens | Count |
|---|---|---|
| 8k | ▁ကွင်း ယား ကုန်းရွာ၊ ▁ဇ ငြ ွ ် ပန်း ကုန်း ▁ကိုးကား ... (+2 more) |
12 |
| 16k | ▁ကွင်းယား ကုန်းရွာ၊ ▁ဇ ငြ ွ ် ပန်းကုန်း ▁ကိုးကား ▁ရွာများ ▁ရွာများ |
10 |
| 32k | ▁ကွင်းယား ကုန်းရွာ၊ ▁ဇငြွ်ပန်းကုန်း ▁ကိုးကား ▁ရွာများ ▁ရွာများ |
6 |
| 64k | ▁ကွင်းယား ကုန်းရွာ၊ ▁ဇငြွ်ပန်းကုန်း ▁ကိုးကား ▁ရွာများ ▁ရွာများ |
6 |
Sample 3: ထီတိုလိုအဖျားရွာ၊ ထီတိုလို ကိုးကား ရွာများ ရွာများ
| Vocab | Tokens | Count |
|---|---|---|
| 8k | ▁ထ ီတ ိုလို အ ဖျား ရွာ၊ ▁ထ ီတ ိုလို ▁ကိုးကား ... (+2 more) |
12 |
| 16k | ▁ထ ီတ ိုလို အဖျား ရွာ၊ ▁ထ ီတ ိုလို ▁ကိုးကား ▁ရွာများ ... (+1 more) |
11 |
| 32k | ▁ထီတ ိုလို အဖျား ရွာ၊ ▁ထီတ ိုလို ▁ကိုးကား ▁ရွာများ ▁ရွာများ |
9 |
| 64k | ▁ထီတ ိုလို အဖျား ရွာ၊ ▁ထီတ ိုလို ▁ကိုးကား ▁ရွာများ ▁ရွာများ |
9 |
Key Findings
- Best Compression: 64k achieves 5.618x compression
- Lowest UNK Rate: 8k with 0.0581% 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 | 8,831 | 13.11 | 97,119 | 30.8% | 47.6% |
| 2-gram | Subword | 1,887 🏆 | 10.88 | 72,847 | 36.4% | 73.5% |
| 3-gram | Word | 9,813 | 13.26 | 126,512 | 31.4% | 48.2% |
| 3-gram | Subword | 17,172 | 14.07 | 481,303 | 16.6% | 40.4% |
| 4-gram | Word | 30,676 | 14.90 | 264,000 | 23.6% | 36.4% |
| 4-gram | Subword | 90,180 | 16.46 | 1,884,383 | 10.1% | 25.4% |
| 5-gram | Word | 39,876 | 15.28 | 238,225 | 20.9% | 31.1% |
| 5-gram | Subword | 269,959 | 18.04 | 3,576,330 | 8.2% | 18.7% |
Top 5 N-grams by Size
2-grams (Word):
| Rank | N-gram | Count |
|---|---|---|
| 1 | ကိုးကား ရွာများ |
58,566 |
| 2 | ရွာနေရာကုတ်မှာ ဖြစ်သည် |
51,588 |
| 3 | တည်ရှိသည် ရွာနေရာကုတ်မှာ |
51,568 |
| 4 | ဖြစ်သည် သန်းခေါင်စာရင်းအရ |
37,043 |
| 5 | ဦး မ |
36,542 |
3-grams (Word):
| Rank | N-gram | Count |
|---|---|---|
| 1 | တည်ရှိသည် ရွာနေရာကုတ်မှာ ဖြစ်သည် |
51,563 |
| 2 | ရွာနေရာကုတ်မှာ ဖြစ်သည် သန်းခေါင်စာရင်းအရ |
36,945 |
| 3 | ဦး လူဦးရေ စုစုပေါင်း |
34,572 |
| 4 | လူဦးရေ စုစုပေါင်း ဦးနေထိုင်သည် |
28,628 |
| 5 | ဦးနေထိုင်သည် ကိုးကား ရွာများ |
27,771 |
4-grams (Word):
| Rank | N-gram | Count |
|---|---|---|
| 1 | တည်ရှိသည် ရွာနေရာကုတ်မှာ ဖြစ်သည် သန်းခေါင်စာရင်းအရ |
36,927 |
| 2 | ဦး လူဦးရေ စုစုပေါင်း ဦးနေထိုင်သည် |
28,628 |
| 3 | လူဦးရေ စုစုပေါင်း ဦးနေထိုင်သည် ကိုးကား |
25,411 |
| 4 | စုစုပေါင်း ဦးနေထိုင်သည် ကိုးကား ရွာများ |
25,261 |
| 5 | မ ဦး လူဦးရေ စုစုပေါင်း |
22,994 |
5-grams (Word):
| Rank | N-gram | Count |
|---|---|---|
| 1 | ဦး လူဦးရေ စုစုပေါင်း ဦးနေထိုင်သည် ကိုးကား |
25,411 |
| 2 | လူဦးရေ စုစုပေါင်း ဦးနေထိုင်သည် ကိုးကား ရွာများ |
25,261 |
| 3 | ဦး မ ဦး လူဦးရေ စုစုပေါင်း |
22,994 |
| 4 | မ ဦး လူဦးရေ စုစုပေါင်း ဦးနေထိုင်သည် |
21,852 |
| 5 | ကျား ဦး မ ဦး လူဦးရေ |
21,303 |
2-grams (Subword):
| Rank | N-gram | Count |
|---|---|---|
| 1 | ာ း |
1,540,592 |
| 2 | င် း |
1,127,081 |
| 3 | သ ည် |
1,053,771 |
| 4 | း _ |
1,020,236 |
| 5 | ။ _ |
832,045 |
3-grams (Subword):
| Rank | N-gram | Count |
|---|---|---|
| 1 | သ ည် ။ |
647,008 |
| 2 | ည် ။ _ |
635,498 |
| 3 | မျ ာ း |
557,792 |
| 4 | ာ း _ |
379,277 |
| 5 | သ ည် _ |
308,511 |
4-grams (Subword):
| Rank | N-gram | Count |
|---|---|---|
| 1 | သ ည် ။ _ |
626,895 |
| 2 | ဖြ စ် သ ည် |
152,777 |
| 3 | စ် သ ည် ။ |
146,842 |
| 4 | း မျ ာ း |
134,710 |
| 5 | မျ ာ း _ |
123,549 |
5-grams (Subword):
| Rank | N-gram | Count |
|---|---|---|
| 1 | ဖြ စ် သ ည် ။ |
146,362 |
| 2 | စ် သ ည် ။ _ |
143,004 |
| 3 | _ ဖြ စ် သ ည် |
102,596 |
| 4 | ခဲ့ သ ည် ။ _ |
101,218 |
| 5 | း ရွ ာ အု ပ် |
99,853 |
Key Findings
- Best Perplexity: 2-gram (subword) with 1,887
- Entropy Trend: Decreases with larger n-grams (more predictable)
- Coverage: Top-1000 patterns cover ~19% 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.3898 | 1.310 | 2.70 | 2,269,123 | 61.0% |
| 1 | Subword | 1.1880 | 2.278 | 16.40 | 12,091 | 0.0% |
| 2 | Word | 0.0846 | 1.060 | 1.16 | 6,111,017 | 91.5% |
| 2 | Subword | 0.7455 | 1.677 | 6.00 | 198,292 | 25.5% |
| 3 | Word | 0.0245 | 1.017 | 1.04 | 7,076,304 | 97.5% |
| 3 | Subword | 0.5456 | 1.460 | 3.39 | 1,190,344 | 45.4% |
| 4 | Word | 0.0104 🏆 | 1.007 | 1.02 | 7,324,998 | 99.0% |
| 4 | Subword | 0.4066 | 1.326 | 2.29 | 4,039,178 | 59.3% |
Generated Text Samples (Word-based)
Below are text samples generated from each word-based Markov chain model:
Context Size 1:
ဖြစ်သည် ဒါဘန်မြို့ကြီးဒေသသည် တောင်အာဖရိကတွင် နယ်လ်ဆင်မင်ဒဲလားနှင့် တွေ့ဆုံခဲ့ပြီး ကောင်းကင်တမန်များန...သည် မကွေးတိုင်းဒေသကြီး မင်းဘူးခရိုင် ကုန်ကူးသန်းရောင်းဝယ်ရေးအတွက် အရေးပါသောဆိပ်ကမ်းမြို့ဖြစ်လေသည် သင...ဦး လူဦးရေ စုစုပေါင်း ဦးနေထိုင်သည် ကိုးကား ရွာများ ရွာများ ရွာများ ရွာများ ရွာများ ရွာများ ရွာများ ရွ...
Context Size 2:
ရွာနေရာကုတ်မှာ ဖြစ်သည် ၁၄ ဂိုး mohammad al sahlawi မန်နေဂျာ juan antonio gk 1 igor akinfeev c rb 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:
သည်။_6|39|_စင်စစ်_ဖြစ်ပြီးဖြစ်သည်။_ဒွတ္တပေါင်မင်းကြီးကျေးရွစ်သည်။_ယနေ့ခေတ်၏_အိပ်ရာခင်းပြီ
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 (4,039,178 contexts)
- Recommendation: Context-3 or Context-4 for text generation
4. Vocabulary Analysis
Statistics
| Metric | Value |
|---|---|
| Vocabulary Size | 535,794 |
| Total Tokens | 7,184,049 |
| Mean Frequency | 13.41 |
| Median Frequency | 3 |
| Frequency Std Dev | 366.75 |
Most Common Words
| Rank | Word | Frequency |
|---|---|---|
| 1 | ဖြစ်သည် | 101,666 |
| 2 | သည် | 96,325 |
| 3 | ကိုးကား | 92,437 |
| 4 | ဦး | 83,872 |
| 5 | ရွာများ | 67,205 |
| 6 | ရက် | 60,957 |
| 7 | တည်ရှိသည် | 57,556 |
| 8 | ရွာနေရာကုတ်မှာ | 51,593 |
| 9 | နှင့် | 40,151 |
| 10 | မ | 38,196 |
Least Common Words (from vocabulary)
| Rank | Word | Frequency |
|---|---|---|
| 1 | ကျောက်ကြီးမြို့နယ်အတွင်းရှိ | 2 |
| 2 | ယမတိုခဆွတ်ရဂိတောင် | 2 |
| 3 | ခအိနတောင် | 2 |
| 4 | ခမိုတောင် | 2 |
| 5 | တန်းရှင်းတောင် | 2 |
| 6 | ရှိနိုဂတောင်ထိပ် | 2 |
| 7 | ယောဆွတ်ဘတို | 2 |
| 8 | ယောဆွတ်ဘ | 2 |
| 9 | 1xbet | 2 |
| 10 | seppiko | 2 |
Zipf's Law Analysis
| Metric | Value |
|---|---|
| Zipf Coefficient | 0.8889 |
| R² (Goodness of Fit) | 0.998993 |
| Adherence Quality | excellent |
Coverage Analysis
| Top N Words | Coverage |
|---|---|
| Top 100 | 22.8% |
| Top 1,000 | 38.0% |
| Top 5,000 | 52.0% |
| Top 10,000 | 58.7% |
Key Findings
- Zipf Compliance: R²=0.9990 indicates excellent adherence to Zipf's law
- High Frequency Dominance: Top 100 words cover 22.8% of corpus
- Long Tail: 525,794 words needed for remaining 41.3% 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.6749 | 0.3233 | N/A | N/A |
| mono_64d | 64 | 0.6458 | 0.2438 | N/A | N/A |
| mono_128d | 128 | 0.6934 | 0.1709 | N/A | N/A |
| aligned_32d | 32 | 0.6749 | 0.3433 | 0.0640 | 0.3360 |
| aligned_64d | 64 | 0.6458 | 0.2465 | 0.1420 | 0.4260 |
| aligned_128d | 128 | 0.6934 🏆 | 0.1662 | 0.2060 | 0.5080 |
Key Findings
- Best Isotropy: aligned_128d with 0.6934 (more uniform distribution)
- Semantic Density: Average pairwise similarity of 0.2490. Lower values indicate better semantic separation.
- Alignment Quality: Aligned models achieve up to 20.6% 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.664 | 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 |
investments, watsons, hispidissimus |
-e |
capacitance, stéphane, awardsfavorite |
-n |
balujun, maccabean, မိုဘိုင်းvpn |
-ရ |
နိဗ္ဗာန်ရ, ဘဒ္ဒန္တဉာဏိဿရ, ာက်ရ |
-a |
ghulja, kinema, ida |
-ng |
retracing, chantanayingyong, luang |
-on |
relation, washinton, baryon |
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 |
|---|---|---|---|
ment |
3.58x | 41 contexts | ament, ement, mental |
tion |
3.31x | 50 contexts | tiong, notion, option |
nter |
3.41x | 44 contexts | inter, enter, center |
atio |
3.41x | 39 contexts | ratio, nation, cations |
inte |
3.45x | 34 contexts | inter, intel, intent |
vers |
3.09x | 50 contexts | versa, verse, versed |
iona |
3.50x | 15 contexts | fiona, dionaea, nasional |
onal |
3.46x | 9 contexts | tonal, donald, ronald |
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 |
|---|---|---|---|
-အ |
-က |
26 words | အချို့ကတည်းက, အင်အားကြီးသူများက |
-ပ |
-က |
18 words | ပေါထုဇ္ဇနိက, ပဒေသရာဇ်ခေတ်က |
-မ |
-က |
17 words | မန္ဒာယုက, မြန်မာကလေးများက |
-ရ |
-က |
17 words | ရှူမိပါက, ရေနံကုမ္ပဏီများက |
-အ |
-ရ |
9 words | အဋ္ဌင်္ဂိကဝါရ, အဘိဓမ္မာဝတာရ |
-က |
-က |
8 words | ကလိဗ်လန်းက, ကိုဘဟိန်းက |
-စ |
-က |
8 words | စကြာမင်းဖြစ်စဉ်က, စာရေးသူများက |
-တ |
-က |
8 words | တတိယပါရာဇိက, တက္ကသိုလ်ဆရာတစ်ဦးက |
-သ |
-ရ |
7 words | သတ္တင်္ဂုတ္တရ, သတ္တန္တရ |
-လ |
-က |
7 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 | ်နာရသည် |
| မအောင်မြင်ခဲ့ | မ-အောင်မြင်ခဲ့ |
4.5 | အောင်မြင်ခဲ့ |
| cardinals | cardinal-s |
4.5 | cardinal |
| နဂါးမောက် | န-ဂ-ါးမောက် |
4.5 | ါးမောက် |
| လက်ဝှေ့ပညာ | လ-က-်ဝှေ့ပညာ |
4.5 | ်ဝှေ့ပညာ |
| ကျိုက်လတ်မြို့က | ကျိုက်လတ်မြို့-က |
4.5 | ကျိုက်လတ်မြို့ |
| အစာတို့တွင် | အ-စာတို့တွင် |
4.5 | စာတို့တွင် |
| စကားတော်များကို | စ-က-ားတော်များကို |
4.5 | ားတော်များကို |
| တယ်လီဖပ်စ်က | တယ်လီဖပ်စ်-က |
4.5 | တယ်လီဖပ်စ် |
| ဆယ်ယူပြီး | ဆ-ယ-်ယူပြီး |
4.5 | ်ယူပြီး |
6.6 Linguistic Interpretation
Automated Insight: The language Burmese 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 (5.62x) |
| N-gram | 2-gram | Lowest perplexity (1,887) |
| 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 15:48:31



















