omarkamali commited on
Commit
4000bb7
·
verified ·
1 Parent(s): 52dc390

Upload all models and assets for tig (latest)

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .gitattributes +7 -0
  2. README.md +758 -0
  3. models/embeddings/aligned/tig_128d.bin +3 -0
  4. models/embeddings/aligned/tig_128d.meta.json +1 -0
  5. models/embeddings/aligned/tig_128d.projection.npy +3 -0
  6. models/embeddings/aligned/tig_128d_metadata.json +8 -0
  7. models/embeddings/aligned/tig_32d.bin +3 -0
  8. models/embeddings/aligned/tig_32d.meta.json +1 -0
  9. models/embeddings/aligned/tig_32d.projection.npy +3 -0
  10. models/embeddings/aligned/tig_32d_metadata.json +8 -0
  11. models/embeddings/aligned/tig_64d.bin +3 -0
  12. models/embeddings/aligned/tig_64d.meta.json +1 -0
  13. models/embeddings/aligned/tig_64d.projection.npy +3 -0
  14. models/embeddings/aligned/tig_64d_metadata.json +8 -0
  15. models/embeddings/monolingual/tig_128d.bin +3 -0
  16. models/embeddings/monolingual/tig_128d.meta.json +1 -0
  17. models/embeddings/monolingual/tig_128d_metadata.json +16 -0
  18. models/embeddings/monolingual/tig_32d.bin +3 -0
  19. models/embeddings/monolingual/tig_32d.meta.json +1 -0
  20. models/embeddings/monolingual/tig_32d_metadata.json +16 -0
  21. models/embeddings/monolingual/tig_64d.bin +3 -0
  22. models/embeddings/monolingual/tig_64d.meta.json +1 -0
  23. models/embeddings/monolingual/tig_64d_metadata.json +16 -0
  24. models/subword_markov/tig_markov_ctx1_subword.parquet +3 -0
  25. models/subword_markov/tig_markov_ctx1_subword_metadata.json +7 -0
  26. models/subword_markov/tig_markov_ctx2_subword.parquet +3 -0
  27. models/subword_markov/tig_markov_ctx2_subword_metadata.json +7 -0
  28. models/subword_markov/tig_markov_ctx3_subword.parquet +3 -0
  29. models/subword_markov/tig_markov_ctx3_subword_metadata.json +7 -0
  30. models/subword_markov/tig_markov_ctx4_subword.parquet +3 -0
  31. models/subword_markov/tig_markov_ctx4_subword_metadata.json +7 -0
  32. models/subword_ngram/tig_2gram_subword.parquet +3 -0
  33. models/subword_ngram/tig_2gram_subword_metadata.json +7 -0
  34. models/subword_ngram/tig_3gram_subword.parquet +3 -0
  35. models/subword_ngram/tig_3gram_subword_metadata.json +7 -0
  36. models/subword_ngram/tig_4gram_subword.parquet +3 -0
  37. models/subword_ngram/tig_4gram_subword_metadata.json +7 -0
  38. models/subword_ngram/tig_5gram_subword.parquet +3 -0
  39. models/subword_ngram/tig_5gram_subword_metadata.json +7 -0
  40. models/tokenizer/tig_tokenizer_16k.model +3 -0
  41. models/tokenizer/tig_tokenizer_16k.vocab +0 -0
  42. models/tokenizer/tig_tokenizer_8k.model +3 -0
  43. models/tokenizer/tig_tokenizer_8k.vocab +0 -0
  44. models/vocabulary/tig_vocabulary.parquet +3 -0
  45. models/vocabulary/tig_vocabulary_metadata.json +17 -0
  46. models/word_markov/tig_markov_ctx1_word.parquet +3 -0
  47. models/word_markov/tig_markov_ctx1_word_metadata.json +7 -0
  48. models/word_markov/tig_markov_ctx2_word.parquet +3 -0
  49. models/word_markov/tig_markov_ctx2_word_metadata.json +7 -0
  50. models/word_markov/tig_markov_ctx3_word.parquet +3 -0
.gitattributes CHANGED
@@ -33,3 +33,10 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ visualizations/embedding_similarity.png filter=lfs diff=lfs merge=lfs -text
37
+ visualizations/embedding_tsne_multilingual.png filter=lfs diff=lfs merge=lfs -text
38
+ visualizations/performance_dashboard.png filter=lfs diff=lfs merge=lfs -text
39
+ visualizations/position_encoding_comparison.png filter=lfs diff=lfs merge=lfs -text
40
+ visualizations/tsne_sentences.png filter=lfs diff=lfs merge=lfs -text
41
+ visualizations/tsne_words.png filter=lfs diff=lfs merge=lfs -text
42
+ visualizations/zipf_law.png filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,758 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language: tig
3
+ language_name: Tigre
4
+ language_family: semitic_ethiopic
5
+ tags:
6
+ - wikilangs
7
+ - nlp
8
+ - tokenizer
9
+ - embeddings
10
+ - n-gram
11
+ - markov
12
+ - wikipedia
13
+ - feature-extraction
14
+ - sentence-similarity
15
+ - tokenization
16
+ - n-grams
17
+ - markov-chain
18
+ - text-mining
19
+ - fasttext
20
+ - babelvec
21
+ - vocabulous
22
+ - vocabulary
23
+ - monolingual
24
+ - family-semitic_ethiopic
25
+ license: mit
26
+ library_name: wikilangs
27
+ pipeline_tag: text-generation
28
+ datasets:
29
+ - omarkamali/wikipedia-monthly
30
+ dataset_info:
31
+ name: wikipedia-monthly
32
+ description: Monthly snapshots of Wikipedia articles across 300+ languages
33
+ metrics:
34
+ - name: best_compression_ratio
35
+ type: compression
36
+ value: 2.463
37
+ - name: best_isotropy
38
+ type: isotropy
39
+ value: 0.6615
40
+ - name: vocabulary_size
41
+ type: vocab
42
+ value: 0
43
+ generated: 2026-01-11
44
+ ---
45
+
46
+ # Tigre - Wikilangs Models
47
+ ## Comprehensive Research Report & Full Ablation Study
48
+
49
+ This repository contains NLP models trained and evaluated by Wikilangs, specifically on **Tigre** Wikipedia data.
50
+ We analyze tokenizers, n-gram models, Markov chains, vocabulary statistics, and word embeddings.
51
+
52
+ ## 📋 Repository Contents
53
+
54
+ ### Models & Assets
55
+
56
+ - Tokenizers (8k, 16k, 32k, 64k)
57
+ - N-gram models (2, 3, 4, 5-gram)
58
+ - Markov chains (context of 1, 2, 3, 4 and 5)
59
+ - Subword N-gram and Markov chains
60
+ - Embeddings in various sizes and dimensions (aligned and unaligned)
61
+ - Language Vocabulary
62
+ - Language Statistics
63
+
64
+ ![Performance Dashboard](visualizations/performance_dashboard.png)
65
+
66
+ ### Analysis and Evaluation
67
+
68
+ - [1. Tokenizer Evaluation](#1-tokenizer-evaluation)
69
+ - [2. N-gram Model Evaluation](#2-n-gram-model-evaluation)
70
+ - [3. Markov Chain Evaluation](#3-markov-chain-evaluation)
71
+ - [4. Vocabulary Analysis](#4-vocabulary-analysis)
72
+ - [5. Word Embeddings Evaluation](#5-word-embeddings-evaluation)
73
+ - [6. Morphological Analysis (Experimental)](#6--morphological-analysis-experimental)
74
+ - [7. Summary & Recommendations](#7-summary--recommendations)
75
+ - [Metrics Glossary](#appendix-metrics-glossary--interpretation-guide)
76
+ - [Visualizations Index](#visualizations-index)
77
+
78
+ ---
79
+ ## 1. Tokenizer Evaluation
80
+
81
+ ![Tokenizer Compression](visualizations/tokenizer_compression.png)
82
+
83
+ ![Tokenizer Fertility](visualizations/tokenizer_fertility.png)
84
+
85
+ ![Tokenizer OOV](visualizations/tokenizer_oov.png)
86
+
87
+ ![Total Tokens](visualizations/tokenizer_total_tokens.png)
88
+
89
+ ### Results
90
+
91
+ | Vocab Size | Compression | Avg Token Len | UNK Rate | Total Tokens |
92
+ |------------|-------------|---------------|----------|--------------|
93
+ | **8k** | 2.305x | 2.31 | 0.2982% | 879,983 |
94
+ | **16k** | 2.463x 🏆 | 2.46 | 0.3185% | 823,793 |
95
+
96
+ ### Tokenization Examples
97
+
98
+ Below are sample sentences tokenized with each vocabulary size:
99
+
100
+ **Sample 1:** `አልአሚን ዐብደለጢፍ - ሰር-ዘመ ን እት ፈን እድሪስ መሐመድ ዐሊ ሐጂ ሕላይ - ወድ ባሸቂር፡ ሕላይ ሻም ሕላይ - ወድ ባሸቂር...`
101
+
102
+ | Vocab | Tokens | Count |
103
+ |-------|--------|-------|
104
+ | 8k | `▁አልአሚን ▁ዐብደለጢፍ ▁- ▁ሰር - ዘ መ ▁ን ▁እት ▁ፈን ... (+23 more)` | 33 |
105
+ | 16k | `▁አልአሚን ▁ዐብደለጢፍ ▁- ▁ሰር - ዘመ ▁ን ▁እት ▁ፈን ▁እድሪስ ... (+17 more)` | 27 |
106
+
107
+ **Sample 2:** `ብለዕ ወስታይ መንፈዐት ሐበት-አሰውዳ ምን ቡን አክል አዪ እግል ትስቴ ብከ ሐሊብ እንሰ ቀርፈ እከለት`
108
+
109
+ | Vocab | Tokens | Count |
110
+ |-------|--------|-------|
111
+ | 8k | `▁ብ ለዕ ▁ወ ስታ ይ ▁መንፈዐት ▁ሐበት - አሰውዳ ▁ምን ... (+10 more)` | 20 |
112
+ | 16k | `▁ብለዕ ▁ወስታይ ▁መንፈዐት ▁ሐበት - አሰውዳ ▁ምን ▁ቡን ▁አክል ▁አዪ ... (+7 more)` | 17 |
113
+
114
+ **Sample 3:** `ኣሜሪካ (እብ ኢንግሊዝ፥ United States of America) እት ቅብለት ኣሜሪካ ለትትረከብ ዐድ ተ። እብ ቅብለት ምስል ...`
115
+
116
+ | Vocab | Tokens | Count |
117
+ |-------|--------|-------|
118
+ | 8k | `▁ኣሜሪካ ▁( እብ ▁ኢ ንግሊዝ፥ ▁un ited ▁s t at ... (+42 more)` | 52 |
119
+ | 16k | `▁ኣሜሪካ ▁( እብ ▁ኢንግሊዝ፥ ▁united ▁states ▁of ▁america ) ▁እት ... (+27 more)` | 37 |
120
+
121
+
122
+ ### Key Findings
123
+
124
+ - **Best Compression:** 16k achieves 2.463x compression
125
+ - **Lowest UNK Rate:** 8k with 0.2982% unknown tokens
126
+ - **Trade-off:** Larger vocabularies improve compression but increase model size
127
+ - **Recommendation:** 32k vocabulary provides optimal balance for production use
128
+
129
+ ---
130
+ ## 2. N-gram Model Evaluation
131
+
132
+ ![N-gram Perplexity](visualizations/ngram_perplexity.png)
133
+
134
+ ![N-gram Unique](visualizations/ngram_unique.png)
135
+
136
+ ![N-gram Coverage](visualizations/ngram_coverage.png)
137
+
138
+ ### Results
139
+
140
+ | N-gram | Variant | Perplexity | Entropy | Unique N-grams | Top-100 Coverage | Top-1000 Coverage |
141
+ |--------|---------|------------|---------|----------------|------------------|-------------------|
142
+ | **2-gram** | Word | 5,051 | 12.30 | 7,801 | 13.2% | 43.4% |
143
+ | **2-gram** | Subword | 1,101 🏆 | 10.10 | 11,050 | 45.6% | 78.3% |
144
+ | **3-gram** | Word | 5,036 | 12.30 | 6,311 | 11.0% | 37.6% |
145
+ | **3-gram** | Subword | 8,481 | 13.05 | 53,840 | 19.1% | 46.6% |
146
+ | **4-gram** | Word | 23,464 | 14.52 | 25,105 | 3.3% | 9.9% |
147
+ | **4-gram** | Subword | 38,109 | 15.22 | 169,447 | 10.8% | 26.2% |
148
+ | **5-gram** | Word | 21,344 | 14.38 | 22,370 | 3.0% | 9.1% |
149
+ | **5-gram** | Subword | 76,266 | 16.22 | 232,751 | 6.8% | 19.0% |
150
+
151
+ ### Top 5 N-grams by Size
152
+
153
+ **2-grams (Word):**
154
+
155
+ | Rank | N-gram | Count |
156
+ |------|--------|-------|
157
+ | 1 | `ምን ገብእ` | 530 |
158
+ | 2 | `እት ልብል` | 428 |
159
+ | 3 | `ሰበት ዐለ` | 355 |
160
+ | 4 | `እንዴ ቤለ` | 325 |
161
+ | 5 | `እሊ ህዬ` | 233 |
162
+
163
+ **3-grams (Word):**
164
+
165
+ | Rank | N-gram | Count |
166
+ |------|--------|-------|
167
+ | 1 | `ሓምድ እድሪስ ዓዋተ` | 108 |
168
+ | 2 | `መነዘመት ምጅልስ ቅራን` | 88 |
169
+ | 3 | `ሌጠ እንዴ ኢገብእ` | 87 |
170
+ | 4 | `መቃበለት ምሰል ኬትባይ` | 72 |
171
+ | 5 | `ቅብለት ምፍጋር ጸሓይ` | 70 |
172
+
173
+ **4-grams (Word):**
174
+
175
+ | Rank | N-gram | Count |
176
+ |------|--------|-------|
177
+ | 1 | `ቅብለት ምፍጋር ጸሓይ ሳሕል` | 63 |
178
+ | 2 | `ሜራስ አድጋማት ትግሬ ክምኩም` | 49 |
179
+ | 3 | `ክታብ ሜራስ አድጋማት ትግሬ` | 49 |
180
+ | 4 | `አድጋማት ትግሬ ክምኩም ድግም` | 42 |
181
+ | 5 | `እብ ዶ ር አሕመድ` | 41 |
182
+
183
+ **5-grams (Word):**
184
+
185
+ | Rank | N-gram | Count |
186
+ |------|--------|-------|
187
+ | 1 | `ክታብ ሜራስ አድጋማት ትግሬ ክምኩም` | 49 |
188
+ | 2 | `ሜራስ አድጋማት ትግሬ ክምኩም ድግም` | 42 |
189
+ | 3 | `እብ ዶ ር አሕመድ ሐሰን` | 41 |
190
+ | 4 | `ዶ ር አሕመድ ሐሰን ድሕሊ` | 41 |
191
+ | 5 | `እት ደንጎበ ናይ እሊ ምህሮ` | 31 |
192
+
193
+ **2-grams (Subword):**
194
+
195
+ | Rank | N-gram | Count |
196
+ |------|--------|-------|
197
+ | 1 | `_ እ` | 66,028 |
198
+ | 2 | `ት _` | 57,371 |
199
+ | 3 | `ል _` | 32,446 |
200
+ | 4 | `_ ለ` | 31,481 |
201
+ | 5 | `_ አ` | 28,736 |
202
+
203
+ **3-grams (Subword):**
204
+
205
+ | Rank | N-gram | Count |
206
+ |------|--------|-------|
207
+ | 1 | `_ እ ግ` | 14,781 |
208
+ | 2 | `እ ግ ል` | 12,703 |
209
+ | 3 | `ግ ል _` | 12,617 |
210
+ | 4 | `_ እ ን` | 12,149 |
211
+ | 5 | `_ እ ት` | 10,195 |
212
+
213
+ **4-grams (Subword):**
214
+
215
+ | Rank | N-gram | Count |
216
+ |------|--------|-------|
217
+ | 1 | `እ ግ ል _` | 12,107 |
218
+ | 2 | `_ እ ግ ል` | 12,029 |
219
+ | 3 | `እ ን ዴ _` | 9,201 |
220
+ | 4 | `_ እ ን ዴ` | 9,099 |
221
+ | 5 | `_ እ ት _` | 8,997 |
222
+
223
+ **5-grams (Subword):**
224
+
225
+ | Rank | N-gram | Count |
226
+ |------|--------|-------|
227
+ | 1 | `_ እ ግ ል _` | 11,475 |
228
+ | 2 | `_ እ ን ዴ _` | 9,019 |
229
+ | 3 | `_ ክ ም ሰ ል` | 3,323 |
230
+ | 4 | `እ ግ ል _ ል` | 3,125 |
231
+ | 5 | `ክ ም ሰ ል _` | 3,063 |
232
+
233
+
234
+ ### Key Findings
235
+
236
+ - **Best Perplexity:** 2-gram (subword) with 1,101
237
+ - **Entropy Trend:** Decreases with larger n-grams (more predictable)
238
+ - **Coverage:** Top-1000 patterns cover ~19% of corpus
239
+ - **Recommendation:** 4-gram or 5-gram for best predictive performance
240
+
241
+ ---
242
+ ## 3. Markov Chain Evaluation
243
+
244
+ ![Markov Entropy](visualizations/markov_entropy.png)
245
+
246
+ ![Markov Contexts](visualizations/markov_contexts.png)
247
+
248
+ ![Markov Branching](visualizations/markov_branching.png)
249
+
250
+ ### Results
251
+
252
+ | Context | Variant | Avg Entropy | Perplexity | Branching Factor | Unique Contexts | Predictability |
253
+ |---------|---------|-------------|------------|------------------|-----------------|----------------|
254
+ | **1** | Word | 0.7017 | 1.626 | 4.17 | 72,666 | 29.8% |
255
+ | **1** | Subword | 2.7582 | 6.766 | 44.54 | 494 | 0.0% |
256
+ | **2** | Word | 0.1717 | 1.126 | 1.32 | 302,688 | 82.8% |
257
+ | **2** | Subword | 1.0638 | 2.090 | 6.10 | 21,999 | 0.0% |
258
+ | **3** | Word | 0.0349 | 1.024 | 1.05 | 399,907 | 96.5% |
259
+ | **3** | Subword | 0.6056 | 1.522 | 2.94 | 134,244 | 39.4% |
260
+ | **4** | Word | 0.0091 🏆 | 1.006 | 1.01 | 418,313 | 99.1% |
261
+ | **4** | Subword | 0.4078 | 1.327 | 1.90 | 395,253 | 59.2% |
262
+
263
+ ### Generated Text Samples (Word-based)
264
+
265
+ Below are text samples generated from each word-based Markov chain model:
266
+
267
+ **Context Size 1:**
268
+
269
+ 1. `እግል ሓበሮት ወምስል ገሮቡ እንዴ አግንዐ እሉ ሐንስ ተምነዎ ምሰል ሰብ ዐድ ከአፎ ለአምሩ አማኖም ቱ`
270
+ 2. `እት ሐበት አሰውደ ዲብ ኤስያት ወፓስፊክ 138 ብድሆ ናይ መትከባት ክም ትበጥር ገብአት አተላሌት ለሸሪጥ እሊ`
271
+ 3. `እንዴ ከዐ እቶም አውመ እተ ጽንሖ እብል ትሰአልኩዉ አይወ ገሌ መደት ሰህ ጀነራል ተድለ ዑቅቢት ዐለ`
272
+
273
+ **Context Size 2:**
274
+
275
+ 1. `ምን ገብእ አባይካ እለ ሊበል እላ ሐሊብ ጅሉጥ ኢቲበለ ተ ለትብለከ እሊ ላኪን እተ ለደረርኩም ዲቡ ዐድ`
276
+ 2. `እት ልብል በሊስ ለገብእ እግሉ ሐዲስ አፍካር ምን ከምከሞት ላተ ይዓረፈ እት ደንጎበ ናይ እሊ ክታብ ለወሰከዩ`
277
+ 3. `ሰበት ዐለ መዓርክ እንዴ ��ዕለው ጎይላታት ድራሮም እት ልትበህል ልትህደግ እቡ እብ ምልሃዮም ልትጫፈሮ ወለአጎብሎ ዐለው ሰውረት`
278
+
279
+ **Context Size 3:**
280
+
281
+ 1. `ሓምድ እድሪስ ዓዋተ ዩልዮ 196 ሓምድ እብራሂም መሐመድ ዐሊ ወዑመር ከራይ አብ ሓምድ ለትህየበ ተሕዚር አእንዴ ትቃወመው ሕነ`
282
+ 2. `መነዘመት ምጅልስ ቅራን እተሓድ አፍሪቀ አልጃምዐ አልዐረብየ ወሐምሲተን ዳይማት አንፋር ምጅልስ አምን እግል ልቀስብ ለዐለት ሰእየት ክምሰል ፈሽለት`
283
+ 3. `ሌጠ እንዴ ኢገብእ ዲብለ ዲብ እም ኩሉ ለዐለት መጥበዐት ልትጠበዕ ለዐለ ቱ ነፈዕ ወድ ዕትማን መን ቱ ነፈዕ`
284
+
285
+ **Context Size 4:**
286
+
287
+ 1. `ቅብለት ምፍጋር ጸሓይ ሳሕል እግል ትደውሸሽ ክምቱ በሸረው ክልኢቶም ሜርሐት ወሕዳቶም እንዴ መርሐው ስስ ስዖታት እብ ድማናይ ደንበር እንዴ`
288
+ 2. `ሜራስ አድጋማት ትግሬ ክምኩም ድግም ለትነፈ ሐት ቆሬዕ ክታብ ሜራስ አድጋማት ትግሬ ክምኩም ድግም ባርህ ወጻልም ክታብ ሜራስ አድጋማት`
289
+ 3. `ክታብ ሜራስ አድጋማት ትግሬ ክምኩም ፋል እብ ነሃቅ አድግ ፋልመ ፋላት ለገ ብእ ምን ብዞሕ ሞላድ ለዐቀሙ ቶ ወእቡ`
290
+
291
+
292
+ ### Generated Text Samples (Subword-based)
293
+
294
+ Below are text samples generated from each subword-based Markov chain model:
295
+
296
+ **Context Size 1:**
297
+
298
+ 1. `_መናታክሉሉ_ኣሳደረአግየ_`
299
+ 2. `ት_ካር።_ግለ_ማን_ህቶምል`
300
+ 3. `እ_ሶ_አክ_ብ_ብልብ_ወሐቆ`
301
+
302
+ **Context Size 2:**
303
+
304
+ 1. `_እት_አግማን_ቀርደመ።_ወራ`
305
+ 2. `ት_ዐለት_ልትበሀልየት_እብ_`
306
+ 3. `ል_እቱ_እግለ_አዜመ_እግል_`
307
+
308
+ **Context Size 3:**
309
+
310
+ 1. `_እግል_ትርእዩ፡'_እግል_እን`
311
+ 2. `እግል_ልርእዩ_ከልብ_።_(ለሔ`
312
+ 3. `ግል_“ገለድ_ፈናኔን_ወእብ_በ`
313
+
314
+ **Context Size 4:**
315
+
316
+ 1. `እግል_ልፍገሮ_ልትጸዐነው_ሲኪን`
317
+ 2. `_እግል_ወጠነ።_._._.._ወለ`
318
+ 3. `እንዴ_ትየመመ_ለለአበጽሑ_ለነሐ`
319
+
320
+
321
+ ### Key Findings
322
+
323
+ - **Best Predictability:** Context-4 (word) with 99.1% predictability
324
+ - **Branching Factor:** Decreases with context size (more deterministic)
325
+ - **Memory Trade-off:** Larger contexts require more storage (395,253 contexts)
326
+ - **Recommendation:** Context-3 or Context-4 for text generation
327
+
328
+ ---
329
+ ## 4. Vocabulary Analysis
330
+
331
+ ![Zipf's Law](visualizations/zipf_law.png)
332
+
333
+ ![Top Words](visualizations/top20_words.png)
334
+
335
+ ![Coverage Curve](visualizations/vocab_coverage.png)
336
+
337
+ ### Statistics
338
+
339
+ | Metric | Value |
340
+ |--------|-------|
341
+ | Vocabulary Size | 28,756 |
342
+ | Total Tokens | 406,203 |
343
+ | Mean Frequency | 14.13 |
344
+ | Median Frequency | 3 |
345
+ | Frequency Std Dev | 143.43 |
346
+
347
+ ### Most Common Words
348
+
349
+ | Rank | Word | Frequency |
350
+ |------|------|-----------|
351
+ | 1 | እግል | 11,614 |
352
+ | 2 | እት | 9,133 |
353
+ | 3 | እንዴ | 9,068 |
354
+ | 4 | እብ | 7,587 |
355
+ | 5 | ዲብ | 7,025 |
356
+ | 6 | ምን | 6,293 |
357
+ | 7 | ህዬ | 3,645 |
358
+ | 8 | እሊ | 3,461 |
359
+ | 9 | ቱ | 3,197 |
360
+ | 10 | ክምሰል | 3,001 |
361
+
362
+ ### Least Common Words (from vocabulary)
363
+
364
+ | Rank | Word | Frequency |
365
+ |------|------|-----------|
366
+ | 1 | prayer | 2 |
367
+ | 2 | ነዊሕ | 2 |
368
+ | 3 | ሓውሳ | 2 |
369
+ | 4 | ለይቲ | 2 |
370
+ | 5 | ሩግ | 2 |
371
+ | 6 | ስኩር | 2 |
372
+ | 7 | ይቤ | 2 |
373
+ | 8 | ዋናጋሽ | 2 |
374
+ | 9 | ዘርሲ | 2 |
375
+ | 10 | ትእምርታት | 2 |
376
+
377
+ ### Zipf's Law Analysis
378
+
379
+ | Metric | Value |
380
+ |--------|-------|
381
+ | Zipf Coefficient | 0.9964 |
382
+ | R² (Goodness of Fit) | 0.996594 |
383
+ | Adherence Quality | **excellent** |
384
+
385
+ ### Coverage Analysis
386
+
387
+ | Top N Words | Coverage |
388
+ |-------------|----------|
389
+ | Top 100 | 34.4% |
390
+ | Top 1,000 | 60.7% |
391
+ | Top 5,000 | 80.2% |
392
+ | Top 10,000 | 88.2% |
393
+
394
+ ### Key Findings
395
+
396
+ - **Zipf Compliance:** R²=0.9966 indicates excellent adherence to Zipf's law
397
+ - **High Frequency Dominance:** Top 100 words cover 34.4% of corpus
398
+ - **Long Tail:** 18,756 words needed for remaining 11.8% coverage
399
+
400
+ ---
401
+ ## 5. Word Embeddings Evaluation
402
+
403
+ ![Embedding Isotropy](visualizations/embedding_isotropy.png)
404
+
405
+ ![Similarity Matrix](visualizations/embedding_similarity.png)
406
+
407
+ ![t-SNE Words](visualizations/tsne_words.png)
408
+
409
+ ![t-SNE Sentences](visualizations/tsne_sentences.png)
410
+
411
+
412
+ ### 5.1 Cross-Lingual Alignment
413
+
414
+ ![Alignment Quality](visualizations/embedding_alignment_quality.png)
415
+
416
+ ![Multilingual t-SNE](visualizations/embedding_tsne_multilingual.png)
417
+
418
+
419
+ ### 5.2 Model Comparison
420
+
421
+ | Model | Dimension | Isotropy | Semantic Density | Alignment R@1 | Alignment R@10 |
422
+ |-------|-----------|----------|------------------|---------------|----------------|
423
+ | **mono_32d** | 32 | 0.6615 🏆 | 0.4348 | N/A | N/A |
424
+ | **mono_64d** | 64 | 0.2662 | 0.3804 | N/A | N/A |
425
+ | **mono_128d** | 128 | 0.0675 | 0.3801 | N/A | N/A |
426
+ | **aligned_32d** | 32 | 0.6615 | 0.4156 | 0.0233 | 0.1808 |
427
+ | **aligned_64d** | 64 | 0.2662 | 0.3694 | 0.0379 | 0.2857 |
428
+ | **aligned_128d** | 128 | 0.0675 | 0.3732 | 0.0787 | 0.3294 |
429
+
430
+ ### Key Findings
431
+
432
+ - **Best Isotropy:** mono_32d with 0.6615 (more uniform distribution)
433
+ - **Semantic Density:** Average pairwise similarity of 0.3922. Lower values indicate better semantic separation.
434
+ - **Alignment Quality:** Aligned models achieve up to 7.9% R@1 in cross-lingual retrieval.
435
+ - **Recommendation:** 128d aligned for best cross-lingual performance
436
+
437
+ ---
438
+ ## 6. Morphological Analysis (Experimental)
439
+
440
+ 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.
441
+
442
+ ### 6.1 Productivity & Complexity
443
+
444
+ | Metric | Value | Interpretation | Recommendation |
445
+ |--------|-------|----------------|----------------|
446
+ | Productivity Index | **5.000** | High morphological productivity | Reliable analysis |
447
+ | Idiomaticity Gap | **-0.518** | Low formulaic content | - |
448
+
449
+ ### 6.2 Affix Inventory (Productive Units)
450
+
451
+ 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.
452
+
453
+ #### Productive Prefixes
454
+ | Prefix | Examples |
455
+ |--------|----------|
456
+ | `-ለ` | ለምህነት, ለዐቀብለ, ለደላ |
457
+ | `-ወ` | ወአከይ, ወእግሎም, ወደገልል |
458
+ | `-አ` | አስደረ, አእጅትመዕ, አተጀሀ |
459
+ | `-ት` | ትለብስ, ትደቀበ, ትዋጅህነ |
460
+ | `-መ` | መጃልስ, መልክ, መልህይ |
461
+ | `-ል` | ልትሃጌኒ, ልትሰአሎም, ልትካሬ |
462
+ | `-ልት` | ልትሃጌኒ, ልትሰአሎም, ልትካሬ |
463
+ | `-ኢ` | ኢመጽአው, ኢትረይሐው, ኢረአው |
464
+
465
+ #### Productive Suffixes
466
+ | Suffix | Examples |
467
+ |--------|----------|
468
+ | `-ት` | ለምህነት, ጂፒት, ሸሃደት |
469
+ | `-ም` | ወእግሎም, ሸካም, ለነሰም |
470
+ | `-ን` | ማይረፎን, ሓለፈየን, ድመን |
471
+ | `-ር` | ተዐይር, ሰምሀር, ታእሲር |
472
+ | `-ይ` | ወአከይ, ኔብራይ, መልህይ |
473
+ | `-የት` | ፍሌንየት, ውላየት, ወማህየት |
474
+ | `-ቶም` | ልትከቦቶም, በጽሐቶም, ጅማዐቶም |
475
+ | `-ይት` | ሓምሳይት, ጥይት, ምግበይት |
476
+
477
+ ### 6.3 Bound Stems (Lexical Roots)
478
+
479
+ 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.
480
+
481
+ | Stem | Cohesion | Substitutability | Examples |
482
+ |------|----------|------------------|----------|
483
+ | `መልህያ` | 1.72x | 11 contexts | መልህያም, መልህያመ, መልህያሙ |
484
+ | `ልትአመ` | 1.54x | 11 contexts | ልትአመር, ልትአመን, ልትአመሮ |
485
+ | `እርትር` | 1.65x | 9 contexts | እርትርያ, እርትርየ, እርትርያይ |
486
+ | `አርወሐ` | 1.57x | 10 contexts | አርወሐት, አርወሐቱ, አርወሐቼ |
487
+ | `ለትፈና` | 1.67x | 8 contexts | ለትፈናተ, ለትፈናታ, ወለትፈናተ |
488
+ | `ልትበህ` | 1.64x | 8 contexts | ልትበህሉ, ልትበህሎ, ልትበህል |
489
+ | `ለልትበ` | 1.45x | 11 contexts | ለልትበህለ, ለልትበሀለ, ለልትበሀሎ |
490
+ | `ኤረትር` | 1.53x | 9 contexts | ኤረትርያ, ኤረትርየ, ኤረትርዪን |
491
+ | `ትረከብ` | 1.52x | 8 contexts | ልትረከብ, ትትረከብ, ኢልትረከብ |
492
+ | `ትአመር` | 1.39x | 10 contexts | ትትአመር, ልትአመር, ኢትትአመር |
493
+ | `ብራሂም` | 1.70x | 6 contexts | አብራሂም, እብራሂም, ኢብራሂም |
494
+ | `ልትበሀ` | 1.49x | 8 contexts | ልትበሀል, ልትበሀለ, ልትበሀሎ |
495
+
496
+ ### 6.4 Affix Compatibility (Co-occurrence)
497
+
498
+ This table shows which prefixes and suffixes most frequently co-occur on the same stems, revealing the 'stacking' rules of the language's morphology.
499
+
500
+ | Prefix | Suffix | Frequency | Examples |
501
+ |--------|--------|-----------|----------|
502
+ | `-ለ` | `-ም` | 12 words | ለአገርም, ለአልቃም |
503
+ | `-ወ` | `-ት` | 10 words | ወአእት, ወዝብጠት |
504
+ | `-ለ` | `-ት` | 5 words | ለምዴርየት, ለሔልየት |
505
+ | `-ለ` | `-ዮም` | 5 words | ለትሰመዐዮም, ለሐረዮም |
506
+ | `-ለ` | `-ር` | 5 words | ለሄራር, ለትቀድር |
507
+ | `-ወ` | `-ም` | 5 words | ወጸገም, ወፈሀም |
508
+ | `-ለ` | `-ን` | 4 words | ለአቅርን, ለኢልተመን |
509
+ | `-እ` | `-ት` | 4 words | እቅቡላት, እስባታት |
510
+ | `-እ` | `-የት` | 4 words | እሕሳእየት, እስብዳልየት |
511
+ | `-አ` | `-ት` | 3 words | አውለውያት, አፍዐበት |
512
+
513
+ ### 6.5 Recursive Morpheme Segmentation
514
+
515
+ Using **Recursive Hierarchical Substitutability**, we decompose complex words into their constituent morphemes. This approach handles nested affixes (e.g., `prefix-prefix-root-suffix`).
516
+
517
+ | Word | Suggested Split | Confidence | Stem |
518
+ |------|-----------------|------------|------|
519
+ | ወእተክምሰልሁመ | **`ወ-እተክምሰልሁመ`** | 4.5 | `እተክምሰልሁመ` |
520
+ | ወለልአስተሽህድ | **`ወ-ለ-ልአስተሽህድ`** | 3.0 | `ልአስተሽህድ` |
521
+ | ወለምትከብታይመ | **`ወ-ለ-ምትከብታይመ`** | 3.0 | `ምትከብታይመ` |
522
+ | ተወልዳዴመድህን | **`ተ-ወ-ልዳዴመድህን`** | 3.0 | `ልዳዴመድህን` |
523
+ | ኤለክትሮኒካይት | **`ኤለክትሮኒካይ-ት`** | 1.5 | `ኤለክትሮኒካይ` |
524
+ | ለሐቡሸትወአርዌተኒ | **`ለ-ሐቡሸትወአርዌተኒ`** | 1.5 | `ሐቡሸትወአርዌተኒ` |
525
+ | መሐመድአልአሚን | **`መ-ሐመድአልአሚን`** | 1.5 | `ሐመድአልአሚን` |
526
+ | ብዕራይኢረክበት | **`ብዕራይኢረክበ-ት`** | 1.5 | `ብዕራይኢረክበ` |
527
+
528
+ ### 6.6 Linguistic Interpretation
529
+
530
+ > **Automated Insight:**
531
+ The language Tigre shows high morphological productivity. The subword models are significantly more efficient than word models, suggesting a rich system of affixation or compounding.
532
+
533
+ ---
534
+ ## 7. Summary & Recommendations
535
+
536
+ ![Performance Dashboard](visualizations/performance_dashboard.png)
537
+
538
+ ### Production Recommendations
539
+
540
+ | Component | Recommended | Rationale |
541
+ |-----------|-------------|-----------|
542
+ | Tokenizer | **16k BPE** | Best compression (2.46x) |
543
+ | N-gram | **2-gram** | Lowest perplexity (1,101) |
544
+ | Markov | **Context-4** | Highest predictability (99.1%) |
545
+ | Embeddings | **100d** | Balanced semantic capture and isotropy |
546
+
547
+
548
+ ---
549
+ ## Appendix: Metrics Glossary & Interpretation Guide
550
+
551
+ This section provides definitions, intuitions, and guidance for interpreting the metrics used throughout this report.
552
+
553
+ ### Tokenizer Metrics
554
+
555
+ **Compression Ratio**
556
+ > *Definition:* The ratio of characters to tokens (chars/token). Measures how efficiently the tokenizer represents text.
557
+ >
558
+ > *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.
559
+ >
560
+ > *What to seek:* Higher is generally better for efficiency, but extremely high compression may indicate overly aggressive merging that loses morphological information.
561
+
562
+ **Average Token Length (Fertility)**
563
+ > *Definition:* Mean number of characters per token produced by the tokenizer.
564
+ >
565
+ > *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.
566
+ >
567
+ > *What to seek:* Balance between 2-5 characters for most languages. Arabic/morphologically-rich languages may benefit from slightly longer tokens.
568
+
569
+ **Unknown Token Rate (OOV Rate)**
570
+ > *Definition:* Percentage of tokens that map to the unknown/UNK token, indicating words the tokenizer cannot represent.
571
+ >
572
+ > *Intuition:* Lower OOV means better vocabulary coverage. High OOV indicates the tokenizer encounters many unseen character sequences.
573
+ >
574
+ > *What to seek:* Below 1% is excellent; below 5% is acceptable. BPE tokenizers typically achieve very low OOV due to subword fallback.
575
+
576
+ ### N-gram Model Metrics
577
+
578
+ **Perplexity**
579
+ > *Definition:* Measures how "surprised" the model is by test data. Mathematically: 2^(cross-entropy). Lower values indicate better prediction.
580
+ >
581
+ > *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.
582
+ >
583
+ > *What to seek:* Lower is better. Perplexity decreases with larger n-grams (more context). Values vary widely by language and corpus size.
584
+
585
+ **Entropy**
586
+ > *Definition:* Average information content (in bits) needed to encode the next token given the context. Related to perplexity: perplexity = 2^entropy.
587
+ >
588
+ > *Intuition:* High entropy means high uncertainty/randomness; low entropy means predictable patterns. Natural language typically has entropy between 1-4 bits per character.
589
+ >
590
+ > *What to seek:* Lower entropy indicates more predictable text patterns. Entropy should decrease as n-gram size increases.
591
+
592
+ **Coverage (Top-K)**
593
+ > *Definition:* Percentage of corpus occurrences explained by the top K most frequent n-grams.
594
+ >
595
+ > *Intuition:* High coverage with few patterns indicates repetitive/formulaic text; low coverage suggests diverse vocabulary usage.
596
+ >
597
+ > *What to seek:* Depends on use case. For language modeling, moderate coverage (40-60% with top-1000) is typical for natural text.
598
+
599
+ ### Markov Chain Metrics
600
+
601
+ **Average Entropy**
602
+ > *Definition:* Mean entropy across all contexts, measuring average uncertainty in next-word prediction.
603
+ >
604
+ > *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).
605
+ >
606
+ > *What to seek:* Decreasing entropy with larger context sizes. Very low entropy (<0.1) indicates highly deterministic transitions.
607
+
608
+ **Branching Factor**
609
+ > *Definition:* Average number of unique next tokens observed for each context.
610
+ >
611
+ > *Intuition:* High branching = many possible continuations (flexible but uncertain); low branching = few options (predictable but potentially repetitive).
612
+ >
613
+ > *What to seek:* Branching factor should decrease with context size. Values near 1.0 indicate nearly deterministic chains.
614
+
615
+ **Predictability**
616
+ > *Definition:* Derived metric: (1 - normalized_entropy) × 100%. Indicates how deterministic the model's predictions are.
617
+ >
618
+ > *Intuition:* 100% predictability means the next word is always certain; 0% means completely random. Real text falls between these extremes.
619
+ >
620
+ > *What to seek:* Higher predictability for text generation quality, but too high (>98%) may produce repetitive output.
621
+
622
+ ### Vocabulary & Zipf's Law Metrics
623
+
624
+ **Zipf's Coefficient**
625
+ > *Definition:* The slope of the log-log plot of word frequency vs. rank. Zipf's law predicts this should be approximately -1.
626
+ >
627
+ > *Intuition:* A coefficient near -1 indicates the corpus follows natural language patterns where a few words are very common and most words are rare.
628
+ >
629
+ > *What to seek:* Values between -0.8 and -1.2 indicate healthy natural language distribution. Deviations may suggest domain-specific or artificial text.
630
+
631
+ **R² (Coefficient of Determination)**
632
+ > *Definition:* Measures how well the linear fit explains the frequency-rank relationship. Ranges from 0 to 1.
633
+ >
634
+ > *Intuition:* R² near 1.0 means the data closely follows Zipf's law; lower values indicate deviation from expected word frequency patterns.
635
+ >
636
+ > *What to seek:* R² > 0.95 is excellent; > 0.99 indicates near-perfect Zipf adherence typical of large natural corpora.
637
+
638
+ **Vocabulary Coverage**
639
+ > *Definition:* Cumulative percentage of corpus tokens accounted for by the top N words.
640
+ >
641
+ > *Intuition:* Shows how concentrated word usage is. If top-100 words cover 50% of text, the corpus relies heavily on common words.
642
+ >
643
+ > *What to seek:* Top-100 covering 30-50% is typical. Higher coverage indicates more repetitive text; lower suggests richer vocabulary.
644
+
645
+ ### Word Embedding Metrics
646
+
647
+ **Isotropy**
648
+ > *Definition:* Measures how uniformly distributed vectors are in the embedding space. Computed as the ratio of minimum to maximum singular values.
649
+ >
650
+ > *Intuition:* High isotropy (near 1.0) means vectors spread evenly in all directions; low isotropy means vectors cluster in certain directions, reducing expressiveness.
651
+ >
652
+ > *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.
653
+
654
+ **Average Norm**
655
+ > *Definition:* Mean magnitude (L2 norm) of word vectors in the embedding space.
656
+ >
657
+ > *Intuition:* Indicates the typical "length" of vectors. Consistent norms suggest stable training; high variance may indicate some words are undertrained.
658
+ >
659
+ > *What to seek:* Relatively consistent norms across models. The absolute value matters less than consistency (low std deviation).
660
+
661
+ **Cosine Similarity**
662
+ > *Definition:* Measures angular similarity between vectors, ranging from -1 (opposite) to 1 (identical direction).
663
+ >
664
+ > *Intuition:* Words with similar meanings should have high cosine similarity. This is the standard metric for semantic relatedness in embeddings.
665
+ >
666
+ > *What to seek:* Semantically related words should score > 0.5; unrelated words should be near 0. Synonyms often score > 0.7.
667
+
668
+ **t-SNE Visualization**
669
+ > *Definition:* t-Distributed Stochastic Neighbor Embedding - a dimensionality reduction technique that preserves local structure for visualization.
670
+ >
671
+ > *Intuition:* Clusters in t-SNE plots indicate groups of semantically related words. Spread indicates vocabulary diversity; tight clusters suggest semantic coherence.
672
+ >
673
+ > *What to seek:* Meaningful clusters (e.g., numbers together, verbs together). Avoid over-interpreting distances - t-SNE preserves local, not global, structure.
674
+
675
+ ### General Interpretation Guidelines
676
+
677
+ 1. **Compare within model families:** Metrics are most meaningful when comparing models of the same type (e.g., 8k vs 64k tokenizer).
678
+ 2. **Consider trade-offs:** Better performance on one metric often comes at the cost of another (e.g., compression vs. OOV rate).
679
+ 3. **Context matters:** Optimal values depend on downstream tasks. Text generation may prioritize different metrics than classification.
680
+ 4. **Corpus influence:** All metrics are influenced by corpus characteristics. Wikipedia text differs from social media or literature.
681
+ 5. **Language-specific patterns:** Morphologically rich languages (like Arabic) may show different optimal ranges than analytic languages.
682
+
683
+
684
+ ### Visualizations Index
685
+
686
+ | Visualization | Description |
687
+ |---------------|-------------|
688
+ | Tokenizer Compression | Compression ratios by vocabulary size |
689
+ | Tokenizer Fertility | Average token length by vocabulary |
690
+ | Tokenizer OOV | Unknown token rates |
691
+ | Tokenizer Total Tokens | Total tokens by vocabulary |
692
+ | N-gram Perplexity | Perplexity by n-gram size |
693
+ | N-gram Entropy | Entropy by n-gram size |
694
+ | N-gram Coverage | Top pattern coverage |
695
+ | N-gram Unique | Unique n-gram counts |
696
+ | Markov Entropy | Entropy by context size |
697
+ | Markov Branching | Branching factor by context |
698
+ | Markov Contexts | Unique context counts |
699
+ | Zipf's Law | Frequency-rank distribution with fit |
700
+ | Vocab Frequency | Word frequency distribution |
701
+ | Top 20 Words | Most frequent words |
702
+ | Vocab Coverage | Cumulative coverage curve |
703
+ | Embedding Isotropy | Vector space uniformity |
704
+ | Embedding Norms | Vector magnitude distribution |
705
+ | Embedding Similarity | Word similarity heatmap |
706
+ | Nearest Neighbors | Similar words for key terms |
707
+ | t-SNE Words | 2D word embedding visualization |
708
+ | t-SNE Sentences | 2D sentence embedding visualization |
709
+ | Position Encoding | Encoding method comparison |
710
+ | Model Sizes | Storage requirements |
711
+ | Performance Dashboard | Comprehensive performance overview |
712
+
713
+ ---
714
+ ## About This Project
715
+
716
+ ### Data Source
717
+
718
+ Models trained on [wikipedia-monthly](https://huggingface.co/datasets/omarkamali/wikipedia-monthly) - a monthly snapshot of Wikipedia articles across 300+ languages.
719
+
720
+ ### Project
721
+
722
+ A project by **[Wikilangs](https://wikilangs.org)** - Open-source NLP models for every Wikipedia language.
723
+
724
+ ### Maintainer
725
+
726
+ [Omar Kamali](https://omarkamali.com) - [Omneity Labs](https://omneitylabs.com)
727
+
728
+ ### Citation
729
+
730
+ If you use these models in your research, please cite:
731
+
732
+ ```bibtex
733
+ @misc{wikilangs2025,
734
+ author = {Kamali, Omar},
735
+ title = {Wikilangs: Open NLP Models for Wikipedia Languages},
736
+ year = {2025},
737
+ doi = {10.5281/zenodo.18073153},
738
+ publisher = {Zenodo},
739
+ url = {https://huggingface.co/wikilangs}
740
+ institution = {Omneity Labs}
741
+ }
742
+ ```
743
+
744
+ ### License
745
+
746
+ MIT License - Free for academic and commercial use.
747
+
748
+ ### Links
749
+
750
+ - 🌐 Website: [wikilangs.org](https://wikilangs.org)
751
+ - 🤗 Models: [huggingface.co/wikilangs](https://huggingface.co/wikilangs)
752
+ - 📊 Data: [wikipedia-monthly](https://huggingface.co/datasets/omarkamali/wikipedia-monthly)
753
+ - 👤 Author: [Omar Kamali](https://huggingface.co/omarkamali)
754
+ - 🤝 Sponsor: [Featherless AI](https://featherless.ai)
755
+ ---
756
+ *Generated by Wikilangs Models Pipeline*
757
+
758
+ *Report Date: 2026-01-11 00:55:27*
models/embeddings/aligned/tig_128d.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2c85e74dc99926b9ab01946a97fe094143f4aae7170e429b14b3759f6ec3acbd
3
+ size 1034284977
models/embeddings/aligned/tig_128d.meta.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"lang": "tig", "dim": 128, "max_seq_len": 512, "is_aligned": true}
models/embeddings/aligned/tig_128d.projection.npy ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:26feadb32cf2ea6346462acf96259f389b499017b2be17473909700936a5e92e
3
+ size 65664
models/embeddings/aligned/tig_128d_metadata.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "language": "tig",
3
+ "dimension": 128,
4
+ "version": "aligned",
5
+ "hub_language": "en",
6
+ "seed_vocab_size": 343,
7
+ "vocab_size": 9841
8
+ }
models/embeddings/aligned/tig_32d.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:80fff0ed468992e944a62da863e8b18904a912a145b57ab58b8f9cb6dd00d72e
3
+ size 258727089
models/embeddings/aligned/tig_32d.meta.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"lang": "tig", "dim": 32, "max_seq_len": 512, "is_aligned": true}
models/embeddings/aligned/tig_32d.projection.npy ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f403e7606466e8c741384e8e93615fe593689250ee57afc6ebed699665781771
3
+ size 4224
models/embeddings/aligned/tig_32d_metadata.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "language": "tig",
3
+ "dimension": 32,
4
+ "version": "aligned",
5
+ "hub_language": "en",
6
+ "seed_vocab_size": 343,
7
+ "vocab_size": 9841
8
+ }
models/embeddings/aligned/tig_64d.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:603abd3f0b77fd64eb9ebfd5a63e24011fbbfc1f599bcaa198688918a3946093
3
+ size 517246385
models/embeddings/aligned/tig_64d.meta.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"lang": "tig", "dim": 64, "max_seq_len": 512, "is_aligned": true}
models/embeddings/aligned/tig_64d.projection.npy ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:78d6047ae7b2c4e7008121c2667f875e93b3912831f9ccebbb923fc4e80d4044
3
+ size 16512
models/embeddings/aligned/tig_64d_metadata.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "language": "tig",
3
+ "dimension": 64,
4
+ "version": "aligned",
5
+ "hub_language": "en",
6
+ "seed_vocab_size": 343,
7
+ "vocab_size": 9841
8
+ }
models/embeddings/monolingual/tig_128d.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2c85e74dc99926b9ab01946a97fe094143f4aae7170e429b14b3759f6ec3acbd
3
+ size 1034284977
models/embeddings/monolingual/tig_128d.meta.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"lang": "tig", "dim": 128, "max_seq_len": 512, "is_aligned": false}
models/embeddings/monolingual/tig_128d_metadata.json ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "language": "tig",
3
+ "dimension": 128,
4
+ "version": "monolingual",
5
+ "training_params": {
6
+ "algorithm": "skipgram",
7
+ "min_count": 5,
8
+ "window": 5,
9
+ "negative": 5,
10
+ "epochs": 5,
11
+ "encoding_method": "rope",
12
+ "dim": 128,
13
+ "threads": 5
14
+ },
15
+ "vocab_size": 9841
16
+ }
models/embeddings/monolingual/tig_32d.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:80fff0ed468992e944a62da863e8b18904a912a145b57ab58b8f9cb6dd00d72e
3
+ size 258727089
models/embeddings/monolingual/tig_32d.meta.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"lang": "tig", "dim": 32, "max_seq_len": 512, "is_aligned": false}
models/embeddings/monolingual/tig_32d_metadata.json ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "language": "tig",
3
+ "dimension": 32,
4
+ "version": "monolingual",
5
+ "training_params": {
6
+ "algorithm": "skipgram",
7
+ "min_count": 5,
8
+ "window": 5,
9
+ "negative": 5,
10
+ "epochs": 5,
11
+ "encoding_method": "rope",
12
+ "dim": 32,
13
+ "threads": 5
14
+ },
15
+ "vocab_size": 9841
16
+ }
models/embeddings/monolingual/tig_64d.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:603abd3f0b77fd64eb9ebfd5a63e24011fbbfc1f599bcaa198688918a3946093
3
+ size 517246385
models/embeddings/monolingual/tig_64d.meta.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"lang": "tig", "dim": 64, "max_seq_len": 512, "is_aligned": false}
models/embeddings/monolingual/tig_64d_metadata.json ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "language": "tig",
3
+ "dimension": 64,
4
+ "version": "monolingual",
5
+ "training_params": {
6
+ "algorithm": "skipgram",
7
+ "min_count": 5,
8
+ "window": 5,
9
+ "negative": 5,
10
+ "epochs": 5,
11
+ "encoding_method": "rope",
12
+ "dim": 64,
13
+ "threads": 5
14
+ },
15
+ "vocab_size": 9841
16
+ }
models/subword_markov/tig_markov_ctx1_subword.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d8d115dc4df23672cb65cb6a8f33c306541bba6088d5d71728dfe8374dc3a384
3
+ size 138774
models/subword_markov/tig_markov_ctx1_subword_metadata.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "context_size": 1,
3
+ "variant": "subword",
4
+ "language": "tig",
5
+ "unique_contexts": 494,
6
+ "total_transitions": 2028264
7
+ }
models/subword_markov/tig_markov_ctx2_subword.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d607d43bb0f0eb20ebe131756ed948bf6b155c05a97d082113a0aa783894d9ae
3
+ size 825091
models/subword_markov/tig_markov_ctx2_subword_metadata.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "context_size": 2,
3
+ "variant": "subword",
4
+ "language": "tig",
5
+ "unique_contexts": 21999,
6
+ "total_transitions": 2027903
7
+ }
models/subword_markov/tig_markov_ctx3_subword.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a5fb40d9a5c0bee683b6f22c9e175474e58d2aef074326328815928735eb3efe
3
+ size 2777903
models/subword_markov/tig_markov_ctx3_subword_metadata.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "context_size": 3,
3
+ "variant": "subword",
4
+ "language": "tig",
5
+ "unique_contexts": 134244,
6
+ "total_transitions": 2027542
7
+ }
models/subword_markov/tig_markov_ctx4_subword.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3b0c0e0d8a5acddbfa15f6d1e86dc15c64d8282a3be59a5f6bdd2ce968250a18
3
+ size 7056876
models/subword_markov/tig_markov_ctx4_subword_metadata.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "context_size": 4,
3
+ "variant": "subword",
4
+ "language": "tig",
5
+ "unique_contexts": 395253,
6
+ "total_transitions": 2027181
7
+ }
models/subword_ngram/tig_2gram_subword.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f93116a9fe6fc115e9907ae9ed91db98363b736b5d08ba92ecc24a84a88642e8
3
+ size 125533
models/subword_ngram/tig_2gram_subword_metadata.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "n": 2,
3
+ "variant": "subword",
4
+ "language": "tig",
5
+ "unique_ngrams": 11050,
6
+ "total_ngrams": 2028264
7
+ }
models/subword_ngram/tig_3gram_subword.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:274ae5357caa02bd1c5b3d984087b11ba0eef5237c02044cfdf27af23e77bde6
3
+ size 685486
models/subword_ngram/tig_3gram_subword_metadata.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "n": 3,
3
+ "variant": "subword",
4
+ "language": "tig",
5
+ "unique_ngrams": 53840,
6
+ "total_ngrams": 2027903
7
+ }
models/subword_ngram/tig_4gram_subword.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e05c00c7e209ff7af76bb609851720209874c42097d6b9a853e06f2d610e4afb
3
+ size 2130527
models/subword_ngram/tig_4gram_subword_metadata.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "n": 4,
3
+ "variant": "subword",
4
+ "language": "tig",
5
+ "unique_ngrams": 169447,
6
+ "total_ngrams": 2027542
7
+ }
models/subword_ngram/tig_5gram_subword.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9cfe516a56e3bef358361f3f9819ce82a8428376d0e9e3c3a9ee8cff41b3c29d
3
+ size 3129240
models/subword_ngram/tig_5gram_subword_metadata.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "n": 5,
3
+ "variant": "subword",
4
+ "language": "tig",
5
+ "unique_ngrams": 232751,
6
+ "total_ngrams": 2027181
7
+ }
models/tokenizer/tig_tokenizer_16k.model ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:76debfb581a071f7ebbf69ece3b6397705653ed6cc92c53490117c4da08f257e
3
+ size 577701
models/tokenizer/tig_tokenizer_16k.vocab ADDED
The diff for this file is too large to render. See raw diff
 
models/tokenizer/tig_tokenizer_8k.model ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:47dd1d363e5127b704cf5f2e5fb3da208dce9dabd45e51ec9a3cf303ee4d5815
3
+ size 398079
models/tokenizer/tig_tokenizer_8k.vocab ADDED
The diff for this file is too large to render. See raw diff
 
models/vocabulary/tig_vocabulary.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d895ebbe9ba1b8ed2326077f3a200da91fdd2d2fe4a6312b5d205cee1d37b622
3
+ size 485294
models/vocabulary/tig_vocabulary_metadata.json ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "language": "tig",
3
+ "vocabulary_size": 28756,
4
+ "variant": "full",
5
+ "statistics": {
6
+ "type_token_ratio": 0.1615083860935244,
7
+ "coverage": {
8
+ "top_100": 0.3100477618571587,
9
+ "top_1000": 0.5477218704876152,
10
+ "top_5000": 0.7236654448517161,
11
+ "top_10000": 0.7956570032211485
12
+ },
13
+ "hapax_count": 43947,
14
+ "hapax_ratio": 0.6044729928613675,
15
+ "total_documents": 361
16
+ }
17
+ }
models/word_markov/tig_markov_ctx1_word.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:eff9b1b4d496487cf3a7d03cdb6ca5451300076d4a1b7de3afd6208dd6fe1a1d
3
+ size 2686523
models/word_markov/tig_markov_ctx1_word_metadata.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "context_size": 1,
3
+ "variant": "word",
4
+ "language": "tig",
5
+ "unique_contexts": 72666,
6
+ "total_transitions": 449789
7
+ }
models/word_markov/tig_markov_ctx2_word.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2a5e6fb3e322c2f59f08ff9dc415daa54a0ab6eb25832ce38397e77f35693df8
3
+ size 6599977
models/word_markov/tig_markov_ctx2_word_metadata.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "context_size": 2,
3
+ "variant": "word",
4
+ "language": "tig",
5
+ "unique_contexts": 302688,
6
+ "total_transitions": 449428
7
+ }
models/word_markov/tig_markov_ctx3_word.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5339a0627f56aa38f6a90ce1f41e5887e1d2b43892231c55cfc8c61826ca461a
3
+ size 8811894