mnw / README.md
omarkamali's picture
Upload all models and assets for mnw (latest)
113cc5d verified
|
Raw
History Blame Contribute Delete
37.7 kB
---
language: mnw
language_name: Mon
language_family: austroasiatic_other
tags:
- wikilangs
- nlp
- tokenizer
- embeddings
- n-gram
- markov
- wikipedia
- feature-extraction
- sentence-similarity
- tokenization
- n-grams
- markov-chain
- text-mining
- fasttext
- babelvec
- vocabulous
- vocabulary
- monolingual
- family-austroasiatic_other
license: mit
library_name: wikilangs
pipeline_tag: text-generation
datasets:
- omarkamali/wikipedia-monthly
dataset_info:
name: wikipedia-monthly
description: Monthly snapshots of Wikipedia articles across 300+ languages
metrics:
- name: best_compression_ratio
type: compression
value: 3.999
- name: best_isotropy
type: isotropy
value: 0.8218
- name: vocabulary_size
type: vocab
value: 0
generated: 2026-01-10
---
# Mon - Wikilangs Models
## Comprehensive Research Report & Full Ablation Study
This repository contains NLP models trained and evaluated by Wikilangs, specifically on **Mon** 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
![Performance Dashboard](visualizations/performance_dashboard.png)
### Analysis and Evaluation
- [1. Tokenizer Evaluation](#1-tokenizer-evaluation)
- [2. N-gram Model Evaluation](#2-n-gram-model-evaluation)
- [3. Markov Chain Evaluation](#3-markov-chain-evaluation)
- [4. Vocabulary Analysis](#4-vocabulary-analysis)
- [5. Word Embeddings Evaluation](#5-word-embeddings-evaluation)
- [6. Morphological Analysis (Experimental)](#6--morphological-analysis-experimental)
- [7. Summary & Recommendations](#7-summary--recommendations)
- [Metrics Glossary](#appendix-metrics-glossary--interpretation-guide)
- [Visualizations Index](#visualizations-index)
---
## 1. Tokenizer Evaluation
![Tokenizer Compression](visualizations/tokenizer_compression.png)
![Tokenizer Fertility](visualizations/tokenizer_fertility.png)
![Tokenizer OOV](visualizations/tokenizer_oov.png)
![Total Tokens](visualizations/tokenizer_total_tokens.png)
### Results
| Vocab Size | Compression | Avg Token Len | UNK Rate | Total Tokens |
|------------|-------------|---------------|----------|--------------|
| **8k** | 3.302x | 3.30 | 0.2012% | 2,126,298 |
| **16k** | 3.648x | 3.65 | 0.2223% | 1,924,951 |
| **32k** | 3.787x | 3.79 | 0.2307% | 1,854,433 |
| **64k** | 3.999x 🏆 | 4.00 | 0.2437% | 1,756,110 |
### Tokenization Examples
Below are sample sentences tokenized with each vocabulary size:
**Sample 1:** `ဆုပလိုဟ်ဂဝိုဟ်(ဂဝိုဟ်)၊ ဍုၚ်ခေမ၊ သၟိၚ်ဇနယန္တ မိမဒုမာ။ နိဿဲ`
| Vocab | Tokens | Count |
|-------|--------|-------|
| 8k | `▁ဆုပလိုဟ် ဂဝ ိုဟ် ( ဂဝ ိုဟ် ) ၊ ▁ဍုၚ် ခေ ... (+10 more)` | 20 |
| 16k | `▁ဆုပလိုဟ် ဂဝိုဟ် ( ဂဝိုဟ် ) ၊ ▁ဍုၚ် ခေမ၊ ▁သၟိၚ် ဇ ... (+6 more)` | 16 |
| 32k | `▁ဆုပလိုဟ် ဂဝိုဟ် ( ဂဝိုဟ် ) ၊ ▁ဍုၚ်ခေမ၊ ▁သၟိၚ် ဇ နယ ... (+3 more)` | 13 |
| 64k | `▁ဆုပလိုဟ်ဂဝိုဟ် ( ဂဝိုဟ် ) ၊ ▁ဍုၚ်ခေမ၊ ▁သၟိၚ်ဇနယန္တ ▁မိမဒုမာ။ ▁နိဿဲ` | 9 |
**Sample 2:** `Biodiversity-diversity among and within plant and animal species in an environme...`
| Vocab | Tokens | Count |
|-------|--------|-------|
| 8k | `▁bi od iversity - d iversity ▁am ong ▁and ▁within ... (+27 more)` | 37 |
| 16k | `▁bi od iversity - d iversity ▁among ▁and ▁within ▁plant ... (+20 more)` | 30 |
| 32k | `▁bi od iversity - d iversity ▁among ▁and ▁within ▁plant ... (+17 more)` | 27 |
| 64k | `▁biodiversity - diversity ▁among ▁and ▁within ▁plant ▁and ▁animal ▁species ... (+10 more)` | 20 |
**Sample 3:** `ပလိုဟ်ကျာ်ဆုကွေဲ၊ ဍုၚ်ဝိပုလ၊ သၟိၚ်သုမၚ်္ဂလ မိယသဝတဳ) ။ နိဿဲ`
| Vocab | Tokens | Count |
|-------|--------|-------|
| 8k | `▁ပလိုဟ် ကျာ် ဆု ကွ ေဲ၊ ▁ဍုၚ် ဝိ ပု လ၊ ▁သၟိၚ်သု ... (+7 more)` | 17 |
| 16k | `▁ပလိုဟ် ကျာ် ဆု ကွေဲ၊ ▁ဍုၚ် ဝိပု လ၊ ▁သၟိၚ်သု မၚ်္ဂလ ▁မိယသ ... (+4 more)` | 14 |
| 32k | `▁ပလိုဟ်ကျာ် ဆုကွေဲ၊ ▁ဍုၚ်ဝိပုလ၊ ▁သၟိၚ်သု မၚ်္ဂလ ▁မိယသဝတဳ ) ▁။ ▁နိဿဲ` | 9 |
| 64k | `▁ပလိုဟ်ကျာ် ဆုကွေဲ၊ ▁ဍုၚ်ဝိပုလ၊ ▁သၟိၚ်သုမၚ်္ဂလ ▁မိယသဝတဳ ) ▁။ ▁နိဿဲ` | 8 |
### Key Findings
- **Best Compression:** 64k achieves 3.999x compression
- **Lowest UNK Rate:** 8k with 0.2012% 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
![N-gram Perplexity](visualizations/ngram_perplexity.png)
![N-gram Unique](visualizations/ngram_unique.png)
![N-gram Coverage](visualizations/ngram_coverage.png)
### Results
| N-gram | Variant | Perplexity | Entropy | Unique N-grams | Top-100 Coverage | Top-1000 Coverage |
|--------|---------|------------|---------|----------------|------------------|-------------------|
| **2-gram** | Word | 6,623 | 12.69 | 14,304 | 18.0% | 41.8% |
| **2-gram** | Subword | 3,528 🏆 | 11.78 | 45,653 | 26.5% | 63.6% |
| **3-gram** | Word | 9,042 | 13.14 | 18,161 | 14.7% | 37.2% |
| **3-gram** | Subword | 32,244 | 14.98 | 237,483 | 9.0% | 28.3% |
| **4-gram** | Word | 30,493 | 14.90 | 53,908 | 8.8% | 22.6% |
| **4-gram** | Subword | 151,443 | 17.21 | 731,255 | 4.2% | 14.6% |
| **5-gram** | Word | 28,414 | 14.79 | 47,099 | 8.1% | 22.2% |
| **5-gram** | Subword | 312,872 | 18.26 | 1,009,008 | 2.7% | 10.0% |
### Top 5 N-grams by Size
**2-grams (Word):**
| Rank | N-gram | Count |
|------|--------|-------|
| 1 | `of the` | 2,370 |
| 2 | `သၞာံ ဂှ်` | 1,376 |
| 3 | `in the` | 1,167 |
| 4 | `သက္ကရာဇ် က္လိဂွံအာယုက်` | 909 |
| 5 | `ဂိုဏ်ရာမညနိကာယဝွံ နွံပ္ဍဲ` | 889 |
**3-grams (Word):**
| Rank | N-gram | Count |
|------|--------|-------|
| 1 | `အတိုင်စရင်လုပ်ဒဂိုန် နူရုင်ရာမညနိကာယမ္ဂး ပ္ဍဲဘာဝွံ` | 536 |
| 2 | `နူရုင်ရာမညနိကာယမ္ဂး ပ္ဍဲဘာဝွံ သင်မလုပ်ဒဂိုန်` | 524 |
| 3 | `ဂှ် နွံ ပ္ဍဲ` | 456 |
| 4 | `နွံ ပ္ဍဲ တွဵုရးဍုင်မန်` | 448 |
| 5 | `အတိုင်စရင်မၞိဟ် ကၟိန်ဍုင်ဗၟာ သၞာံ` | 447 |
**4-grams (Word):**
| Rank | N-gram | Count |
|------|--------|-------|
| 1 | `အတိုင်စရင်လုပ်ဒဂိုန် နူရုင်ရာမညနိကာယမ္ဂး ပ္ဍဲဘာဝွံ သင်မလုပ်ဒဂိုန်` | 523 |
| 2 | `ဂှ် နွံ ပ္ဍဲ တွဵုရးဍုင်မန်` | 448 |
| 3 | `အတိုင်စရင်မၞိဟ် ကၟိန်ဍုင်ဗၟာ သၞာံ မ္ဂး` | 447 |
| 4 | `နွံ ပ္ဍဲ တွဵုရးဍုင်မန် ခရိုင်မတ်မလီု` | 403 |
| 5 | `မၞိဟ်ဗြဴ နွံ တုဲ သီုဖအိုတ်` | 384 |
**5-grams (Word):**
| Rank | N-gram | Count |
|------|--------|-------|
| 1 | `ဂှ် နွံ ပ္ဍဲ တွဵုရးဍုင်မန် ခရိုင်မတ်မလီု` | 403 |
| 2 | `မၞိဟ်ဗြဴ နွံ တုဲ သီုဖအိုတ် မၞိဟ်ပဒတဴဒၟံင်` | 383 |
| 3 | `နွံ မၞိဟ်ဗြဴ နွံ တုဲ သီုဖအိုတ်` | 367 |
| 4 | `မၞိဟ်တြုဟ် နွံ မၞိဟ်ဗြဴ နွံ တုဲ` | 367 |
| 5 | `အတိုင်စရင်လုပ်ဒဂိုန် နူရုင်ရာမညနိကာယမ္ဂး ပ္ဍဲဘာဝွံ သင်မလုပ်ဒဂိုန် သၞာံ` | 257 |
**2-grams (Subword):**
| Rank | N-gram | Count |
|------|--------|-------|
| 1 | `၊ _` | 124,928 |
| 2 | `ာ န်` | 98,526 |
| 3 | `။ _` | 97,968 |
| 4 | `ဂှ် _` | 80,768 |
| 5 | `တုဲ _` | 47,209 |
**3-grams (Subword):**
| Rank | N-gram | Count |
|------|--------|-------|
| 1 | `ရ ။ _` | 42,859 |
| 2 | `ရ ၊ _` | 24,174 |
| 3 | `ကေ ာ န်` | 19,061 |
| 4 | `_ t h` | 18,127 |
| 5 | `_ ည း` | 17,249 |
**4-grams (Subword):**
| Rank | N-gram | Count |
|------|--------|-------|
| 1 | `_ t h e` | 14,919 |
| 2 | `t h e _` | 13,824 |
| 3 | `ရ ၊ ၊ _` | 9,528 |
| 4 | `_ o f _` | 9,316 |
| 5 | `_ ကေ ာ န်` | 7,820 |
**5-grams (Subword):**
| Rank | N-gram | Count |
|------|--------|-------|
| 1 | `_ t h e _` | 13,326 |
| 2 | `_ a n d _` | 6,039 |
| 3 | `_ ကျ ာ် ဇၞေ ာ်` | 4,502 |
| 4 | `အို တ် ရ ။ _` | 3,677 |
| 5 | `a t i o n` | 3,609 |
### Key Findings
- **Best Perplexity:** 2-gram (subword) with 3,528
- **Entropy Trend:** Decreases with larger n-grams (more predictable)
- **Coverage:** Top-1000 patterns cover ~10% of corpus
- **Recommendation:** 4-gram or 5-gram for best predictive performance
---
## 3. Markov Chain Evaluation
![Markov Entropy](visualizations/markov_entropy.png)
![Markov Contexts](visualizations/markov_contexts.png)
![Markov Branching](visualizations/markov_branching.png)
### Results
| Context | Variant | Avg Entropy | Perplexity | Branching Factor | Unique Contexts | Predictability |
|---------|---------|-------------|------------|------------------|-----------------|----------------|
| **1** | Word | 0.2763 | 1.211 | 1.92 | 516,773 | 72.4% |
| **1** | Subword | 1.3249 | 2.505 | 22.54 | 5,742 | 0.0% |
| **2** | Word | 0.0778 | 1.055 | 1.14 | 992,066 | 92.2% |
| **2** | Subword | 0.7605 | 1.694 | 5.38 | 129,421 | 24.0% |
| **3** | Word | 0.0260 | 1.018 | 1.04 | 1,126,317 | 97.4% |
| **3** | Subword | 0.4835 | 1.398 | 2.69 | 696,421 | 51.6% |
| **4** | Word | 0.0116 🏆 | 1.008 | 1.02 | 1,166,450 | 98.8% |
| **4** | Subword | 0.3206 | 1.249 | 1.80 | 1,870,747 | 67.9% |
### Generated Text Samples (Word-based)
Below are text samples generated from each word-based Markov chain model:
**Context Size 1:**
1. `the bible all အိုတ်သီု မင်္ပ္ကရင် ဓဝ်စဟ်ပြကာ မစိုန်ဒဟ်တဴ ထာန် မတနိမ်စိုဟ် အာဂဟ် တ္ငယ် ဝေါအ် ဂဟ် သၟိၚ...`
2. `of nazareth random house burgess james thrall salvador dalí began work gibson ian pp 34 ရမ္သာင်လရိုဟ...`
3. `ဂှ် နကဵု ဂကောံမွဲကုမွဲကီု နကဵု သၞောတ်ကၟိန်ဍုင်ဖေဝ်ဒရေဝ် ဗီုပြင်နာနာ ဂၠိုင်နူကဵု ဂစေံအသိမ် မပြံင်ပဆုဲ...`
**Context Size 2:**
1. `of the worlds countries with the help of brazil portugal and spain should become an absolute monarch...`
2. `သၞာံ ဂှ် ညးတေအ် တိတ်နူ ရုင်ကမၠောန် ဝေရ်ရောစ်ချဳအဝ်တုဲ ညးတေအ်လေဝ် သီုတိတ်အာ နူသ္ၚိအပါညးတေအ်ကီုရ အစာချ...`
3. `in the himalayas redwattled lapwing vanellus indicus indicus bodd journal of rãmaññarattha buddhist ...`
**Context Size 3:**
1. `အတိုင်စရင်လုပ်ဒဂိုန် နူရုင်ရာမညနိကာယမ္ဂး ပ္ဍဲဘာဝွံ သင်မလုပ်ဒဂိုန် သၞာံ နွံ ခမဳ ၈ ဇကု သၞာံ ဂှ် ခမဳ ၃ ...`
2. `နူရုင်ရာမညနိကာယမ္ဂး ပ္ဍဲဘာဝွံ သင်မလုပ်ဒဂိုန် သၞာံ ဂှ် နွံ ခမဳ ၁ ဇကု ထပိုယ် ၂ ဇကု ကျာ်ဇၞော်မနွံပိုန်ဘ...`
3. `ဂှ် နွံ ပ္ဍဲ တွဵုရးဍုင်မန် ခရိုင်ရေဝ် ပွိုင်ဍုင်ရေဝ် ဂကောံကွာန်ဘာ ဂၞန်ကောဒ်ကွာန်ဂှ် လၟိဟ်မၞိဟ် အတိုင...`
**Context Size 4:**
1. `အတိုင်စရင်လုပ်ဒဂိုန် နူရုင်ရာမညနိကာယမ္ဂး ပ္ဍဲဘာဝွံ သင်မလုပ်ဒဂိုန် သၞာံ နွံ ခမဳ ၁ ဇကု ထပိုယ် ၃ ဇကု ကျ...`
2. `ဂှ် နွံ ပ္ဍဲ တွဵုရးဍုင်မန် ခရိုင်မတ်မလီု ပွိုင်ဍုင်မုဟ်ဍုင် ဂကောံကွာန်ခလံက်ညံင်ဝေင် ဂၞန်ကောဒ်ကွာန်ဂှ...`
3. `အတိုင်စရင်မၞိဟ် ကၟိန်ဍုင်ဗၟာ သၞာံ မ္ဂး ပ္ဍဲကွာန်ကြုင်ခဍာ်ဂှ် မၞိဟ်တြုဟ် နွံ မၞိဟ်ဗြဴ နွံ တုဲ သီုဖအို...`
### Generated Text Samples (Subword-based)
Below are text samples generated from each subword-based Markov chain model:
**Context Size 1:**
1. `_ပ္ဍဲသၞာံ_ဗော်အရာၚ်_or_မ`
2. `ာန်သိုက်ဒးဍုၚ်_/_ဝ၊_စၞော`
3. `န်သုတ်လကျာ်_ကၠိုဟ်ကရပ်ဓုပ်ဗော်`
**Context Size 2:**
1. `၊_တအ်_ကျာ်_လေန်မ္ၚးသိက္ခ_က္တဵုဗ`
2. `ာန်ဍုၚ်ဇၞော်ဇၞော်ပရေင်ဇကု_အလဵုသဳ`
3. `။_နိက္ခမ္မ_-_ဇၞးဇော်)_*ဗီုဗေ`
**Context Size 3:**
1. `ရ။_သၞာံ_ဂိတုမေ_မ္ဂး_ထပက်ကဵုပ`
2. `ရ၊_ကာလရ၊_ကုဋုမ္ဗိက-ယွံသမ္ၚေဟ်`
3. `ကောန်မဍိုက်_နူကဵု_သကိုပ်ဝန်ဇၞော်ရ`
**Context Size 4:**
1. `_the_siege_(ကုန်းထိပ်)_`
2. `the_ajanta_such_dar`
3. `ရ၊၊_ဥပမာ_မၞိဟ်_ပ္ဍဲ_ကွာန်ပျဉ်`
### Key Findings
- **Best Predictability:** Context-4 (word) with 98.8% predictability
- **Branching Factor:** Decreases with context size (more deterministic)
- **Memory Trade-off:** Larger contexts require more storage (1,870,747 contexts)
- **Recommendation:** Context-3 or Context-4 for text generation
---
## 4. Vocabulary Analysis
![Zipf's Law](visualizations/zipf_law.png)
![Top Words](visualizations/top20_words.png)
![Coverage Curve](visualizations/vocab_coverage.png)
### Statistics
| Metric | Value |
|--------|-------|
| Vocabulary Size | 106,825 |
| Total Tokens | 891,138 |
| Mean Frequency | 8.34 |
| Median Frequency | 2 |
| Frequency Std Dev | 86.50 |
### Most Common Words
| Rank | Word | Frequency |
|------|------|-----------|
| 1 | the | 13,809 |
| 2 | of | 9,337 |
| 3 | ဂှ် | 8,762 |
| 4 | and | 6,085 |
| 5 | ကေုာံ | 6,077 |
| 6 | သၞာံ | 5,783 |
| 7 | ရဴဝွံ | 5,549 |
| 8 | in | 4,724 |
| 9 | a | 4,220 |
| 10 | ရ | 3,726 |
### 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 | ဂကောံလိက်ပတ်ယေန်သၞာင် | 2 |
| 10 | အခေါင်မအာလ္ၚတ် | 2 |
### Zipf's Law Analysis
| Metric | Value |
|--------|-------|
| Zipf Coefficient | 0.8841 |
| R² (Goodness of Fit) | 0.998662 |
| Adherence Quality | **excellent** |
### Coverage Analysis
| Top N Words | Coverage |
|-------------|----------|
| Top 100 | 21.0% |
| Top 1,000 | 40.0% |
| Top 5,000 | 57.4% |
| Top 10,000 | 65.7% |
### Key Findings
- **Zipf Compliance:** R²=0.9987 indicates excellent adherence to Zipf's law
- **High Frequency Dominance:** Top 100 words cover 21.0% of corpus
- **Long Tail:** 96,825 words needed for remaining 34.3% coverage
---
## 5. Word Embeddings Evaluation
![Embedding Isotropy](visualizations/embedding_isotropy.png)
![Similarity Matrix](visualizations/embedding_similarity.png)
![t-SNE Words](visualizations/tsne_words.png)
![t-SNE Sentences](visualizations/tsne_sentences.png)
### 5.1 Cross-Lingual Alignment
![Alignment Quality](visualizations/embedding_alignment_quality.png)
![Multilingual t-SNE](visualizations/embedding_tsne_multilingual.png)
### 5.2 Model Comparison
| Model | Dimension | Isotropy | Semantic Density | Alignment R@1 | Alignment R@10 |
|-------|-----------|----------|------------------|---------------|----------------|
| **mono_32d** | 32 | 0.8218 | 0.3207 | N/A | N/A |
| **mono_64d** | 64 | 0.7887 | 0.2627 | N/A | N/A |
| **mono_128d** | 128 | 0.4691 | 0.2452 | N/A | N/A |
| **aligned_32d** | 32 | 0.8218 🏆 | 0.3276 | 0.0220 | 0.1560 |
| **aligned_64d** | 64 | 0.7887 | 0.2603 | 0.0540 | 0.2960 |
| **aligned_128d** | 128 | 0.4691 | 0.2332 | 0.0960 | 0.3260 |
### Key Findings
- **Best Isotropy:** aligned_32d with 0.8218 (more uniform distribution)
- **Semantic Density:** Average pairwise similarity of 0.2749. Lower values indicate better semantic separation.
- **Alignment Quality:** Aligned models achieve up to 9.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 | **1.228** | 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` | contains, shelducks, grasslands |
| `-e` | average, mcintyre, cie |
| `-n` | parisian, hoffmann, information |
| `-d` | armed, finished, ward |
| `-ed` | armed, finished, developed |
| `-on` | information, person, babylon |
| `-ng` | paying, fishing, attacking |
### 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 |
|------|----------|------------------|----------|
| `ther` | 2.80x | 40 contexts | there, thera, other |
| `ting` | 2.91x | 34 contexts | citing, biting, voting |
| `tion` | 2.71x | 37 contexts | nation, motion, notion |
| `atio` | 2.82x | 29 contexts | ratio, nation, ratios |
| `ture` | 2.78x | 25 contexts | future, nature, posture |
| `nter` | 2.66x | 26 contexts | enter, inter, hunter |
| `vers` | 2.69x | 25 contexts | covers, versus, verses |
| `ment` | 2.82x | 20 contexts | mental, moment, element |
| `ctio` | 2.82x | 19 contexts | action, fiction, suction |
| `stan` | 2.83x | 18 contexts | stand, sistan, stands |
| `rati` | 2.74x | 17 contexts | ratio, ratios, ratings |
| `inte` | 2.72x | 15 contexts | inter, winter, intend |
### 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 |
|--------|--------|-----------|----------|
| `-က` | `-ရ` | 97 words | ကုအလန်ရ, ကောန်သၟိၚ်သကျဝၚ်ဂမၠိုၚ်ရ |
| `-သ` | `-ရ` | 78 words | သၟိၚ်သၟာန်မဟောဟ်သဓပၠန်ရ, သမိၚ်ဥတ္တရ |
| `-ပ` | `-ရ` | 71 words | ပကာဂစိုတ်အိုတ်ရ, ပိုယ်ဂွံတီကေတ်ရ |
| `-ဒ` | `-ရ` | 48 words | ဒှ်မိသွီုကျာ်တြဲရ, ဒးထောအ်အာရ |
| `-အ` | `-ရ` | 46 words | အ္စာတၠဗမာဂှ်ရ, အဲပ္တုဲဒါန်ရ |
| `-မ` | `-ရ` | 44 words | မကဵုယၟုရ, မပိုင်ပြဳလဝ်ရ |
| `-ဂ` | `-ရ` | 37 words | ဂွံဆဵုကေတ်ဂၠိုၚ်ရ, ဂတပရိသာတ်ဂမၠိုၚ်ရ |
| `-ဗ` | `-ရ` | 30 words | ဗ္စဖျုၚ်က္ဍိုပ်ပုၚ်ကၞုၚ်သွအိုတ်ရ, ဗွဲမဂၠိုင်ဂၠေင်ကီုရ |
| `-န` | `-ရ` | 28 words | နကဵုဘာသာဗၟာရ, နဝလောကုတ္တရ |
| `-တ` | `-ရ` | 24 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 | `နကဵုပၞာန်` |
| ခိုဟ်ဒၟံင်ရ | **`ခိုဟ်ဒၟံင်-ရ`** | 4.5 | `ခိုဟ်ဒၟံင်` |
| ဍုင်အိန္ဒိယရ | **`ဍုင်အိန္ဒိယ-ရ`** | 4.5 | `ဍုင်အိန္ဒိယ` |
| astronomers | **`astronomer-s`** | 4.5 | `astronomer` |
| valgkretser | **`valgkrets-er`** | 4.5 | `valgkrets` |
| စန္ဒဝရတၠဂုဏ်အ္စာ | **`စ-န-္ဒဝရတၠဂုဏ်အ္စာ`** | 4.5 | `္ဒဝရတၠဂုဏ်အ္စာ` |
| နကဵုအခိုက် | **`န-က-ဵုအခိုက်`** | 4.5 | `ဵုအခိုက်` |
| စကတဵုဒှ်လဝ် | **`စ-ကတဵုဒှ်လဝ်`** | 4.5 | `ကတဵုဒှ်လဝ်` |
| မသ္ပကဵုခမဳ | **`မ-သ္ပကဵုခမဳ`** | 4.5 | `သ္ပကဵုခမဳ` |
### 6.6 Linguistic Interpretation
> **Automated Insight:**
The language Mon 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
![Performance Dashboard](visualizations/performance_dashboard.png)
### Production Recommendations
| Component | Recommended | Rationale |
|-----------|-------------|-----------|
| Tokenizer | **64k BPE** | Best compression (4.00x) |
| N-gram | **2-gram** | Lowest perplexity (3,528) |
| Markov | **Context-4** | Highest predictability (98.8%) |
| 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
1. **Compare within model families:** Metrics are most meaningful when comparing models of the same type (e.g., 8k vs 64k tokenizer).
2. **Consider trade-offs:** Better performance on one metric often comes at the cost of another (e.g., compression vs. OOV rate).
3. **Context matters:** Optimal values depend on downstream tasks. Text generation may prioritize different metrics than classification.
4. **Corpus influence:** All metrics are influenced by corpus characteristics. Wikipedia text differs from social media or literature.
5. **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](https://huggingface.co/datasets/omarkamali/wikipedia-monthly) - a monthly snapshot of Wikipedia articles across 300+ languages.
### Project
A project by **[Wikilangs](https://wikilangs.org)** - Open-source NLP models for every Wikipedia language.
### Maintainer
[Omar Kamali](https://omarkamali.com) - [Omneity Labs](https://omneitylabs.com)
### Citation
If you use these models in your research, please cite:
```bibtex
@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](https://wikilangs.org)
- 🤗 Models: [huggingface.co/wikilangs](https://huggingface.co/wikilangs)
- 📊 Data: [wikipedia-monthly](https://huggingface.co/datasets/omarkamali/wikipedia-monthly)
- 👤 Author: [Omar Kamali](https://huggingface.co/omarkamali)
- 🤝 Sponsor: [Featherless AI](https://featherless.ai)
---
*Generated by Wikilangs Models Pipeline*
*Report Date: 2026-01-10 12:29:01*