mnw / README.md
omarkamali's picture
Upload all models and assets for mnw (latest)
113cc5d verified
---
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*