omarkamali commited on
Commit
e240c58
·
verified ·
1 Parent(s): 38e662b

Upload all models and assets for ar (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. README.md +129 -661
  2. RESEARCH_REPORT.md +686 -0
  3. ar_morph_tokenizer.json +0 -0
  4. models/embeddings/aligned/ar_128d.bin +2 -2
  5. models/embeddings/aligned/ar_128d.projection.npy +1 -1
  6. models/embeddings/aligned/ar_128d_metadata.json +2 -2
  7. models/embeddings/aligned/ar_32d.bin +2 -2
  8. models/embeddings/aligned/ar_32d.projection.npy +1 -1
  9. models/embeddings/aligned/ar_32d_metadata.json +2 -2
  10. models/embeddings/aligned/ar_64d.bin +2 -2
  11. models/embeddings/aligned/ar_64d.projection.npy +1 -1
  12. models/embeddings/aligned/ar_64d_metadata.json +2 -2
  13. models/embeddings/monolingual/ar_128d.bin +2 -2
  14. models/embeddings/monolingual/ar_128d_metadata.json +3 -2
  15. models/embeddings/monolingual/ar_32d.bin +2 -2
  16. models/embeddings/monolingual/ar_32d_metadata.json +3 -2
  17. models/embeddings/monolingual/ar_64d.bin +2 -2
  18. models/embeddings/monolingual/ar_64d_metadata.json +3 -2
  19. models/subword_markov/ar_markov_ctx1_subword.parquet +2 -2
  20. models/subword_markov/ar_markov_ctx1_subword_metadata.json +2 -2
  21. models/subword_markov/ar_markov_ctx2_subword.parquet +2 -2
  22. models/subword_markov/ar_markov_ctx2_subword_metadata.json +2 -2
  23. models/subword_markov/ar_markov_ctx3_subword.parquet +2 -2
  24. models/subword_markov/ar_markov_ctx3_subword_metadata.json +2 -2
  25. models/subword_markov/ar_markov_ctx4_subword.parquet +2 -2
  26. models/subword_markov/ar_markov_ctx4_subword_metadata.json +2 -2
  27. models/subword_ngram/ar_2gram_subword.parquet +2 -2
  28. models/subword_ngram/ar_2gram_subword_metadata.json +2 -2
  29. models/subword_ngram/ar_3gram_subword.parquet +2 -2
  30. models/subword_ngram/ar_3gram_subword_metadata.json +2 -2
  31. models/subword_ngram/ar_4gram_subword.parquet +2 -2
  32. models/subword_ngram/ar_4gram_subword_metadata.json +2 -2
  33. models/subword_ngram/ar_5gram_subword.parquet +2 -2
  34. models/subword_ngram/ar_5gram_subword_metadata.json +2 -2
  35. models/tokenizer/ar_tokenizer_16k.model +2 -2
  36. models/tokenizer/ar_tokenizer_16k.vocab +0 -0
  37. models/tokenizer/ar_tokenizer_32k.model +2 -2
  38. models/tokenizer/ar_tokenizer_32k.vocab +0 -0
  39. models/tokenizer/ar_tokenizer_64k.model +2 -2
  40. models/tokenizer/ar_tokenizer_64k.vocab +0 -0
  41. models/tokenizer/ar_tokenizer_8k.model +2 -2
  42. models/tokenizer/ar_tokenizer_8k.vocab +0 -0
  43. models/vocabulary/ar_vocabulary.parquet +2 -2
  44. models/vocabulary/ar_vocabulary_metadata.json +9 -9
  45. models/word_markov/ar_markov_ctx1_word.parquet +2 -2
  46. models/word_markov/ar_markov_ctx1_word_metadata.json +2 -2
  47. models/word_markov/ar_markov_ctx2_word.parquet +2 -2
  48. models/word_markov/ar_markov_ctx2_word_metadata.json +2 -2
  49. models/word_markov/ar_markov_ctx3_word.parquet +2 -2
  50. models/word_markov/ar_markov_ctx3_word_metadata.json +2 -2
README.md CHANGED
@@ -36,727 +36,195 @@ metrics:
36
  value: 4.347
37
  - name: best_isotropy
38
  type: isotropy
39
- value: 0.7394
 
 
 
40
  - name: vocabulary_size
41
  type: vocab
42
- value: 0
43
- generated: 2026-01-07
44
  ---
45
 
46
- # Arabic - Wikilangs Models
47
- ## Comprehensive Research Report & Full Ablation Study
48
 
49
- This repository contains NLP models trained and evaluated by Wikilangs, specifically on **Arabic** 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** | 3.252x | 3.25 | 0.0704% | 5,499,500 |
94
- | **16k** | 3.655x | 3.65 | 0.0791% | 4,893,689 |
95
- | **32k** | 4.034x | 4.03 | 0.0873% | 4,433,903 |
96
- | **64k** | 4.347x 🏆 | 4.35 | 0.0941% | 4,114,555 |
97
 
98
- ### Tokenization Examples
 
99
 
100
- Below are sample sentences tokenized with each vocabulary size:
 
 
101
 
102
- **Sample 1:** `بيغجة خاتون هي قرية في مقاطعة شبستر، إيران. يقدر عدد سكانها بـ 635 نسمة بحسب إحص...`
 
 
 
103
 
104
  | Vocab | Tokens | Count |
105
  |-------|--------|-------|
106
- | 8k | `▁بي غ جةخ ات ون هي ▁قرية ▁في ▁مقاطعة ... (+26 more)` | 36 |
107
- | 16k | `▁بي غ جة خ ات ون ▁هيقريةفي ▁مق��طعة ... (+23 more)` | 33 |
108
- | 32k | `▁بيغ جةخاتونهي ▁قرية ▁في ▁مقاطعةشب ستر ، ... (+20 more)` | 30 |
109
- | 64k | `▁بيغ جةخاتونهي ▁قرية ▁في ▁مقاطعةشب ستر ، ... (+20 more)` | 30 |
110
 
111
- **Sample 2:** `IL18BP (Interleukin 18 binding protein) هوَ بروتين يُشَفر بواسطة جين IL18BP في ا...`
112
 
113
  | Vocab | Tokens | Count |
114
  |-------|--------|-------|
115
- | 8k | `▁ il 1 8 b p( in ter le ... (+51 more)` | 61 |
116
- | 16k | `▁il 1 8 b p ( in ter le uk ... (+44 more)` | 54 |
117
- | 32k | `▁il 1 8 b p ( inter le uk in ... (+39 more)` | 49 |
118
- | 64k | `▁il 1 8 b p ( inter le uk in ... (+36 more)` | 46 |
119
 
120
- **Sample 3:** `هي مقاطعة في ولاية قشقداريا في أوزبكستان، ومركزها مدينة شهرسبز. المصادر مأهولة ف...`
121
 
122
  | Vocab | Tokens | Count |
123
  |-------|--------|-------|
124
- | 8k | `▁هي ▁مقاطعة ▁فيولاية ▁ق ش قد اريا ▁في ▁أوزب ... (+18 more)` | 28 |
125
- | 16k | `▁هي ▁مقاطعة ▁فيولاية ▁ق ش قد اريا ▁فيأوزبكستان ... (+16 more)` | 26 |
126
- | 32k | `▁هي ▁مقاطعة ▁فيولاية ▁قش قد اريا ▁في ▁أوزبكستان ، ... (+13 more)` | 23 |
127
- | 64k | `▁هي ▁مقاطعة ▁فيولاية ▁قش قد اريا ▁في ▁أوزبكستان ، ... (+13 more)` | 23 |
128
-
129
-
130
- ### Key Findings
131
-
132
- - **Best Compression:** 64k achieves 4.347x compression
133
- - **Lowest UNK Rate:** 8k with 0.0704% unknown tokens
134
- - **Trade-off:** Larger vocabularies improve compression but increase model size
135
- - **Recommendation:** 32k vocabulary provides optimal balance for production use
136
-
137
- ---
138
- ## 2. N-gram Model Evaluation
139
-
140
- ![N-gram Perplexity](visualizations/ngram_perplexity.png)
141
-
142
- ![N-gram Unique](visualizations/ngram_unique.png)
143
-
144
- ![N-gram Coverage](visualizations/ngram_coverage.png)
145
-
146
- ### Results
147
-
148
- | N-gram | Variant | Perplexity | Entropy | Unique N-grams | Top-100 Coverage | Top-1000 Coverage |
149
- |--------|---------|------------|---------|----------------|------------------|-------------------|
150
- | **2-gram** | Word | 452,226 | 18.79 | 5,760,373 | 5.7% | 16.3% |
151
- | **2-gram** | Subword | 436 🏆 | 8.77 | 70,700 | 55.9% | 96.1% |
152
- | **3-gram** | Word | 1,074,568 | 20.04 | 10,101,258 | 4.3% | 14.7% |
153
- | **3-gram** | Subword | 4,203 | 12.04 | 528,264 | 23.7% | 56.2% |
154
- | **4-gram** | Word | 1,869,871 | 20.83 | 16,693,684 | 3.8% | 14.3% |
155
- | **4-gram** | Subword | 26,613 | 14.70 | 2,851,427 | 13.2% | 31.9% |
156
- | **5-gram** | Word | 1,422,629 | 20.44 | 12,591,346 | 4.2% | 15.4% |
157
- | **5-gram** | Subword | 126,300 | 16.95 | 9,618,770 | 6.2% | 19.5% |
158
-
159
- ### Top 5 N-grams by Size
160
-
161
- **2-grams (Word):**
162
-
163
- | Rank | N-gram | Count |
164
- |------|--------|-------|
165
- | 1 | `كرة قدم` | 754,062 |
166
- | 2 | `في القرن` | 693,987 |
167
- | 3 | `في عام` | 580,274 |
168
- | 4 | `الولايات المتحدة` | 468,192 |
169
- | 5 | `وصلات خارجية` | 357,388 |
170
-
171
- **3-grams (Word):**
172
-
173
- | Rank | N-gram | Count |
174
- |------|--------|-------|
175
- | 1 | `في القرن 20` | 274,915 |
176
- | 2 | `مراجع وصلات خارجية` | 255,117 |
177
- | 3 | `في الولايات المتحدة` | 245,241 |
178
- | 4 | `في القرن 21` | 238,844 |
179
- | 5 | `أمريكيون في القرن` | 166,269 |
180
-
181
- **4-grams (Word):**
182
-
183
- | Rank | N-gram | Count |
184
- |------|--------|-------|
185
- | 1 | `كرة قدم مغتربون في` | 94,639 |
186
- | 2 | `تحت سن الثامنة عشر` | 93,897 |
187
- | 3 | `هو لاعب كرة قدم` | 93,478 |
188
- | 4 | `أمريكيون في ��لقرن 20` | 87,276 |
189
- | 5 | `في الألعاب الأولمبية الصيفية` | 66,167 |
190
-
191
- **5-grams (Word):**
192
-
193
- | Rank | N-gram | Count |
194
- |------|--------|-------|
195
- | 1 | `تعداد عام بلغ عدد سكان` | 38,914 |
196
- | 2 | `بحسب تعداد عام وبلغ عدد` | 38,787 |
197
- | 3 | `تعداد عام وبلغ عدد الأسر` | 38,786 |
198
- | 4 | `نسمة بحسب تعداد عام وبلغ` | 38,783 |
199
- | 5 | `في الفئة العمرية ما بين` | 38,744 |
200
-
201
- **2-grams (Subword):**
202
-
203
- | Rank | N-gram | Count |
204
- |------|--------|-------|
205
- | 1 | `ا ل` | 88,022,277 |
206
- | 2 | `_ ا` | 75,496,816 |
207
- | 3 | `ة _` | 45,404,729 |
208
- | 4 | `ي _` | 32,155,198 |
209
- | 5 | `ن _` | 31,357,117 |
210
-
211
- **3-grams (Subword):**
212
-
213
- | Rank | N-gram | Count |
214
- |------|--------|-------|
215
- | 1 | `_ ا ل` | 71,328,243 |
216
- | 2 | `_ ف ي` | 15,404,541 |
217
- | 3 | `ف ي _` | 15,103,296 |
218
- | 4 | `ي ة _` | 14,752,185 |
219
- | 5 | `ا ل م` | 13,544,149 |
220
-
221
- **4-grams (Subword):**
222
-
223
- | Rank | N-gram | Count |
224
- |------|--------|-------|
225
- | 1 | `_ ف ي _` | 14,189,454 |
226
- | 2 | `ة _ ا ل` | 12,269,528 |
227
- | 3 | `_ ا ل م` | 11,772,138 |
228
- | 4 | `_ م ن _` | 8,237,350 |
229
- | 5 | `ي _ ا ل` | 7,703,248 |
230
-
231
- **5-grams (Subword):**
232
-
233
- | Rank | N-gram | Count |
234
- |------|--------|-------|
235
- | 1 | `ف ي _ ا ل` | 4,810,645 |
236
- | 2 | `_ ف ي _ ا` | 4,774,417 |
237
- | 3 | `ا ت _ ا ل` | 3,857,996 |
238
- | 4 | `ي ة _ ا ل` | 3,696,976 |
239
- | 5 | `_ ع ل ى _` | 3,259,756 |
240
-
241
-
242
- ### Key Findings
243
-
244
- - **Best Perplexity:** 2-gram (subword) with 436
245
- - **Entropy Trend:** Decreases with larger n-grams (more predictable)
246
- - **Coverage:** Top-1000 patterns cover ~19% of corpus
247
- - **Recommendation:** 4-gram or 5-gram for best predictive performance
248
-
249
- ---
250
- ## 3. Markov Chain Evaluation
251
-
252
- ![Markov Entropy](visualizations/markov_entropy.png)
253
-
254
- ![Markov Contexts](visualizations/markov_contexts.png)
255
-
256
- ![Markov Branching](visualizations/markov_branching.png)
257
-
258
- ### Results
259
-
260
- | Context | Variant | Avg Entropy | Perplexity | Branching Factor | Unique Contexts | Predictability |
261
- |---------|---------|-------------|------------|------------------|-----------------|----------------|
262
- | **1** | Word | 0.9908 | 1.987 | 17.58 | 4,471,621 | 0.9% |
263
- | **1** | Subword | 1.3702 | 2.585 | 13.33 | 18,570 | 0.0% |
264
- | **2** | Word | 0.3659 | 1.289 | 2.31 | 78,540,786 | 63.4% |
265
- | **2** | Subword | 0.7295 | 1.658 | 5.21 | 247,596 | 27.1% |
266
- | **3** | Word | 0.1310 | 1.095 | 1.29 | 181,002,468 | 86.9% |
267
- | **3** | Subword | 0.6782 | 1.600 | 4.14 | 1,290,623 | 32.2% |
268
- | **4** | Word | 0.0499 🏆 | 1.035 | 1.09 | 233,679,791 | 95.0% |
269
- | **4** | Subword | 0.6490 | 1.568 | 3.51 | 5,343,485 | 35.1% |
270
-
271
- ### Generated Text Samples (Word-based)
272
-
273
- Below are text samples generated from each word-based Markov chain model:
274
-
275
- **Context Size 1:**
276
-
277
- 1. `في المدائن وهي منتزه نيقولا الصايغ أميناً عاماً ونسبة 22 مايو حين سجلت في مجال تعليم`
278
- 2. `من مونتريال اسمه إلى الساحل في الإصدار الرابع قبل الرابطة مع نادي ثون نادي سيون ببطولة`
279
- 3. `على الصيد فلا يطالب بتنفيذها أو وجود منافسة ألعاب البحر في حين احتفظت بهويتها الجديدة بقيمة`
280
-
281
- **Context Size 2:**
282
-
283
- 1. `كرة قدم من قصرش مقاطعة إسبان من كتالونيا إسبانيات في القرن 20 استمر التعليم التطوري أو التنموي`
284
- 2. `في القرن 11 في وقتٍ واحد غابرييلا قرنفل وقرفة ترجمة عوض أحمد بن عبد الله الأميرة منيرة`
285
- 3. `في عام أن تكلفة الوجبة البسيطة في نسج الظهارية ثخانة الجلد وتصلبه المترافقين مع المشكلات التي تنشأ`
286
-
287
- **Context Size 3:**
288
-
289
- 1. `في القرن 20 أمريكيون أفارقة في القرن 21 كرة قدم رجالية أحياء دوري الدرجة الأولى الأرجنتيني فيليز سار...`
290
- 2. `مراجع وصلات خارجية كرة قدم رجالية مغتربون في روسيا على أنها قوة بحرية صغيرة إلى مدينة تشهد حركة`
291
- 3. `في الولايات المتحدة مراجع وصلات خارجية تلفزيونية مصرية بدأ عرضها في كوميديا سوداء تلفزيونية بريطانية...`
292
-
293
- **Context Size 4:**
294
-
295
- 1. `كرة قدم مغتربون في السلفادور كرة قدم هندوراسيون كرة قدم هندوراسيون مغتربون كوبا سينتروأمريكانا منتخب...`
296
- 2. `تحت سن الثامنة عشر تعيش معهم وبلغت نسبة الأزواج القاطنين مع بعضهم البعض 46 3 من أصل المجموع الكلي`
297
- 3. `هو لاعب كرة قدم بريطاني في مركز لعب مع برادفورد سيتي وريث روفرز ونادي بارتيك ثيسل ونادي رينجرز ونادي`
298
-
299
-
300
- ### Generated Text Samples (Subword-based)
301
-
302
- Below are text samples generated from each subword-based Markov chain model:
303
-
304
- **Context Size 1:**
305
-
306
- 1. `_فيا،_دارب_ي_أمر`
307
- 2. `اقصالمعب_ع_حمالم`
308
- 3. `لبطة_قالمندواب_ا`
309
-
310
- **Context Size 2:**
311
-
312
- 1. `الأخرها_تشت_علية_`
313
- 2. `_الممثل_أصدققه_حا`
314
- 3. `ة_لدعار_الة)_جوزي`
315
-
316
- **Context Size 3:**
317
 
318
- 1. `_الذين_حليلار_رُزِق_`
319
- 2. `_في_إحصاءات_الله)،`
320
- 3. `في_الوالصحيحًا_كرة_`
321
 
322
- **Context Size 4:**
323
 
324
- 1. `_في_جمهور._جسدت_ديك`
325
- 2. `ة_البلدي_في_اخترعه_`
326
- 3. `_المتحدة._يقدمه_في_`
327
 
 
 
328
 
329
- ### Key Findings
330
-
331
- - **Best Predictability:** Context-4 (word) with 95.0% predictability
332
- - **Branching Factor:** Decreases with context size (more deterministic)
333
- - **Memory Trade-off:** Larger contexts require more storage (5,343,485 contexts)
334
- - **Recommendation:** Context-3 or Context-4 for text generation
335
-
336
- ---
337
- ## 4. Vocabulary Analysis
338
-
339
- ![Zipf's Law](visualizations/zipf_law.png)
340
-
341
- ![Top Words](visualizations/top20_words.png)
342
-
343
- ![Coverage Curve](visualizations/vocab_coverage.png)
344
-
345
- ### Statistics
346
-
347
- | Metric | Value |
348
- |--------|-------|
349
- | Vocabulary Size | 1,950,572 |
350
- | Total Tokens | 322,254,287 |
351
- | Mean Frequency | 165.21 |
352
- | Median Frequency | 4 |
353
- | Frequency Std Dev | 12979.56 |
354
-
355
- ### Most Common Words
356
-
357
- | Rank | Word | Frequency |
358
- |------|------|-----------|
359
- | 1 | في | 14,286,084 |
360
- | 2 | من | 8,287,878 |
361
- | 3 | على | 3,284,746 |
362
- | 4 | إلى | 2,443,493 |
363
- | 5 | عام | 1,621,280 |
364
- | 6 | أن | 1,387,527 |
365
- | 7 | مع | 1,153,439 |
366
- | 8 | عن | 1,144,208 |
367
- | 9 | أو | 1,098,905 |
368
- | 10 | التي | 1,084,821 |
369
-
370
- ### Least Common Words (from vocabulary)
371
-
372
- | Rank | Word | Frequency |
373
- |------|------|-----------|
374
- | 1 | dekréty | 2 |
375
- | 2 | تادينا | 2 |
376
- | 3 | بوكسوري | 2 |
377
- | 4 | نموذجاالأدب | 2 |
378
- | 5 | كنونالأدب | 2 |
379
- | 6 | وليتاز | 2 |
380
- | 7 | حكمٌّ | 2 |
381
- | 8 | أسديراكي | 2 |
382
- | 9 | إنتركوليجيت | 2 |
383
- | 10 | للفيزيولوجية | 2 |
384
-
385
- ### Zipf's Law Analysis
386
-
387
- | Metric | Value |
388
- |--------|-------|
389
- | Zipf Coefficient | 0.9488 |
390
- | R² (Goodness of Fit) | 0.991144 |
391
- | Adherence Quality | **excellent** |
392
-
393
- ### Coverage Analysis
394
-
395
- | Top N Words | Coverage |
396
- |-------------|----------|
397
- | Top 100 | 23.1% |
398
- | Top 1,000 | 45.9% |
399
- | Top 5,000 | 66.1% |
400
- | Top 10,000 | 74.2% |
401
-
402
- ### Key Findings
403
-
404
- - **Zipf Compliance:** R²=0.9911 indicates excellent adherence to Zipf's law
405
- - **High Frequency Dominance:** Top 100 words cover 23.1% of corpus
406
- - **Long Tail:** 1,940,572 words needed for remaining 25.8% coverage
407
-
408
- ---
409
- ## 5. Word Embeddings Evaluation
410
-
411
- ![Embedding Isotropy](visualizations/embedding_isotropy.png)
412
-
413
- ![Similarity Matrix](visualizations/embedding_similarity.png)
414
-
415
- ![t-SNE Words](visualizations/tsne_words.png)
416
-
417
- ![t-SNE Sentences](visualizations/tsne_sentences.png)
418
-
419
-
420
- ### 5.1 Cross-Lingual Alignment
421
-
422
- ![Alignment Quality](visualizations/embedding_alignment_quality.png)
423
-
424
- ![Multilingual t-SNE](visualizations/embedding_tsne_multilingual.png)
425
-
426
-
427
- ### 5.2 Model Comparison
428
-
429
- | Model | Dimension | Isotropy | Semantic Density | Alignment R@1 | Alignment R@10 |
430
- |-------|-----------|----------|------------------|---------------|----------------|
431
- | **mono_32d** | 32 | 0.7379 | 0.3519 | N/A | N/A |
432
- | **mono_64d** | 64 | 0.7394 🏆 | 0.2816 | N/A | N/A |
433
- | **mono_128d** | 128 | 0.7002 | 0.2259 | N/A | N/A |
434
- | **aligned_32d** | 32 | 0.7379 | 0.3528 | 0.2700 | 0.6440 |
435
- | **aligned_64d** | 64 | 0.7394 | 0.2881 | 0.4140 | 0.8200 |
436
- | **aligned_128d** | 128 | 0.7002 | 0.2283 | 0.6000 | 0.8940 |
437
 
438
- ### Key Findings
439
 
440
- - **Best Isotropy:** mono_64d with 0.7394 (more uniform distribution)
441
- - **Semantic Density:** Average pairwise similarity of 0.2881. Lower values indicate better semantic separation.
442
- - **Alignment Quality:** Aligned models achieve up to 60.0% R@1 in cross-lingual retrieval.
443
- - **Recommendation:** 128d aligned for best cross-lingual performance
444
 
445
- ---
446
- ## 6. Morphological Analysis (Experimental)
447
-
448
- 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.
449
-
450
- ### 6.1 Productivity & Complexity
451
-
452
- | Metric | Value | Interpretation | Recommendation |
453
- |--------|-------|----------------|----------------|
454
- | Productivity Index | **5.000** | High morphological productivity | Reliable analysis |
455
- | Idiomaticity Gap | **-0.210** | Low formulaic content | - |
456
-
457
- ### 6.2 Affix Inventory (Productive Units)
458
-
459
- 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.
460
-
461
- #### Productive Prefixes
462
- | Prefix | Examples |
463
- |--------|----------|
464
- | `-ال` | الألمانينصف, الاعتياديّ, الباكترية |
465
- | `-وا` | والشجرية, والكاحِل, والميلانين |
466
- | `-وال` | والشجرية, والكاحِل, والميلانين |
467
- | `-الم` | المُحاضرة, المورينو, الممنوعة |
468
-
469
- #### Productive Suffixes
470
- | Suffix | Examples |
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
- | `تخدا` | 2.86x | 173 contexts | متخدا, كتخدا, متخداً |
484
- | `ستخد` | 2.18x | 623 contexts | مستخد, استخد, تستخد |
485
- | `ألعا` | 2.68x | 82 contexts | ألعاد, ألعاب, ألعالم |
486
- | `والع` | 1.74x | 629 contexts | والعز, والعي, والعى |
487
- | `اطعة` | 3.13x | 28 contexts | قاطعة, ساطعة, ساطعةً |
488
- | `التع` | 1.63x | 578 contexts | التعة, التعس, التعب |
489
- | `رنسي` | 1.82x | 179 contexts | درنسي, رنسيس, فرنسي |
490
- | `استخ` | 1.79x | 192 contexts | استخم, استخد, استخر |
491
- | `ريطا` | 2.08x | 85 contexts | غريطا, شريطا, وشريطا |
492
- | `لمنا` | 1.37x | 729 contexts | تلمنا, ظلمنا, ألمنا |
493
- | `غترب` | 2.44x | 39 contexts | اغترب, مغترب, يغترب |
494
- | `الحا` | 1.34x | 693 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
- | `-ال` | `-ية` | 95 words | الائتمانية, الويبرية |
503
- | `-ال` | `-ات` | 76 words | الهباءات, الكوميديات |
504
- | `-ال` | `-ين` | 68 words | البحـرين, المتوارثين |
505
- | `-وا` | `-ية` | 35 words | والعضدية, والهانرية |
506
- | `-وا` | `-ات` | 24 words | والمطرزات, والسلوريات |
507
- | `-وا` | `-ين` | 17 words | والمُغنين, والميكرونيزيين |
508
- | `-وا` | `-ها` | 4 words | واعترضتها, واستبعدتها |
509
-
510
- ### 6.5 Recursive Morpheme Segmentation
511
-
512
- Using **Recursive Hierarchical Substitutability**, we decompose complex words into their constituent morphemes. This approach handles nested affixes (e.g., `prefix-prefix-root-suffix`).
513
-
514
- | Word | Suggested Split | Confidence | Stem |
515
- |------|-----------------|------------|------|
516
- | البروتينين | **`ال-بروت-ين-ين`** | 7.5 | `بروت` |
517
- | والكاظمية | **`وال-كاظم-ية`** | 6.0 | `كاظم` |
518
- | والسرورية | **`وال-سرور-ية`** | 6.0 | `سرور` |
519
- | الغيلوغية | **`ال-غيلوغ-ية`** | 6.0 | `غيلوغ` |
520
- | والحطابين | **`وال-حطاب-ين`** | 6.0 | `حطاب` |
521
- | والمقدسيين | **`وال-مقدسي-ين`** | 6.0 | `مقدسي` |
522
- | والنجومية | **`وال-نجوم-ية`** | 6.0 | `نجوم` |
523
- | والرباعيات | **`وال-رباعي-ات`** | 6.0 | `رباعي` |
524
- | الكلابشات | **`ال-كلابش-ات`** | 6.0 | `كلابش` |
525
- | السبعينات | **`ال-سبعين-ات`** | 6.0 | `سبعين` |
526
- | لاحتجاجاتها | **`لاحتجاج-ات-ها`** | 6.0 | `لاحتجاج` |
527
- | والمكسّرات | **`وال-مكسّر-ات`** | 6.0 | `مكسّر` |
528
- | والسكيريين | **`وال-سكيري-ين`** | 6.0 | `سكيري` |
529
- | إسقاطاتها | **`إسقاط-ات-ها`** | 6.0 | `إسقاط` |
530
- | واستثمارها | **`وا-ستثمار-ها`** | 6.0 | `ستثمار` |
531
-
532
- ### 6.6 Linguistic Interpretation
533
-
534
- > **Automated Insight:**
535
- The language Arabic shows high morphological productivity. The subword models are significantly more efficient than word models, suggesting a rich system of affixation or compounding.
536
 
537
- ---
538
- ## 7. Summary & Recommendations
539
 
540
  ![Performance Dashboard](visualizations/performance_dashboard.png)
541
 
542
- ### Production Recommendations
543
-
544
- | Component | Recommended | Rationale |
545
- |-----------|-------------|-----------|
546
- | Tokenizer | **64k BPE** | Best compression (4.35x) |
547
- | N-gram | **2-gram** | Lowest perplexity (436) |
548
- | Markov | **Context-4** | Highest predictability (95.0%) |
549
- | Embeddings | **100d** | Balanced semantic capture and isotropy |
550
-
551
-
552
- ---
553
- ## Appendix: Metrics Glossary & Interpretation Guide
554
-
555
- This section provides definitions, intuitions, and guidance for interpreting the metrics used throughout this report.
556
-
557
- ### Tokenizer Metrics
558
-
559
- **Compression Ratio**
560
- > *Definition:* The ratio of characters to tokens (chars/token). Measures how efficiently the tokenizer represents text.
561
- >
562
- > *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.
563
- >
564
- > *What to seek:* Higher is generally better for efficiency, but extremely high compression may indicate overly aggressive merging that loses morphological information.
565
-
566
- **Average Token Length (Fertility)**
567
- > *Definition:* Mean number of characters per token produced by the tokenizer.
568
- >
569
- > *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.
570
- >
571
- > *What to seek:* Balance between 2-5 characters for most languages. Arabic/morphologically-rich languages may benefit from slightly longer tokens.
572
-
573
- **Unknown Token Rate (OOV Rate)**
574
- > *Definition:* Percentage of tokens that map to the unknown/UNK token, indicating words the tokenizer cannot represent.
575
- >
576
- > *Intuition:* Lower OOV means better vocabulary coverage. High OOV indicates the tokenizer encounters many unseen character sequences.
577
- >
578
- > *What to seek:* Below 1% is excellent; below 5% is acceptable. BPE tokenizers typically achieve very low OOV due to subword fallback.
579
-
580
- ### N-gram Model Metrics
581
-
582
- **Perplexity**
583
- > *Definition:* Measures how "surprised" the model is by test data. Mathematically: 2^(cross-entropy). Lower values indicate better prediction.
584
- >
585
- > *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.
586
- >
587
- > *What to seek:* Lower is better. Perplexity decreases with larger n-grams (more context). Values vary widely by language and corpus size.
588
-
589
- **Entropy**
590
- > *Definition:* Average information content (in bits) needed to encode the next token given the context. Related to perplexity: perplexity = 2^entropy.
591
- >
592
- > *Intuition:* High entropy means high uncertainty/randomness; low entropy means predictable patterns. Natural language typically has entropy between 1-4 bits per character.
593
- >
594
- > *What to seek:* Lower entropy indicates more predictable text patterns. Entropy should decrease as n-gram size increases.
595
-
596
- **Coverage (Top-K)**
597
- > *Definition:* Percentage of corpus occurrences explained by the top K most frequent n-grams.
598
- >
599
- > *Intuition:* High coverage with few patterns indicates repetitive/formulaic text; low coverage suggests diverse vocabulary usage.
600
- >
601
- > *What to seek:* Depends on use case. For language modeling, moderate coverage (40-60% with top-1000) is typical for natural text.
602
-
603
- ### Markov Chain Metrics
604
-
605
- **Average Entropy**
606
- > *Definition:* Mean entropy across all contexts, measuring average uncertainty in next-word prediction.
607
- >
608
- > *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).
609
- >
610
- > *What to seek:* Decreasing entropy with larger context sizes. Very low entropy (<0.1) indicates highly deterministic transitions.
611
-
612
- **Branching Factor**
613
- > *Definition:* Average number of unique next tokens observed for each context.
614
- >
615
- > *Intuition:* High branching = many possible continuations (flexible but uncertain); low branching = few options (predictable but potentially repetitive).
616
- >
617
- > *What to seek:* Branching factor should decrease with context size. Values near 1.0 indicate nearly deterministic chains.
618
-
619
- **Predictability**
620
- > *Definition:* Derived metric: (1 - normalized_entropy) × 100%. Indicates how deterministic the model's predictions are.
621
- >
622
- > *Intuition:* 100% predictability means the next word is always certain; 0% means completely random. Real text falls between these extremes.
623
- >
624
- > *What to seek:* Higher predictability for text generation quality, but too high (>98%) may produce repetitive output.
625
-
626
- ### Vocabulary & Zipf's Law Metrics
627
-
628
- **Zipf's Coefficient**
629
- > *Definition:* The slope of the log-log plot of word frequency vs. rank. Zipf's law predicts this should be approximately -1.
630
- >
631
- > *Intuition:* A coefficient near -1 indicates the corpus follows natural language patterns where a few words are very common and most words are rare.
632
- >
633
- > *What to seek:* Values between -0.8 and -1.2 indicate healthy natural language distribution. Deviations may suggest domain-specific or artificial text.
634
-
635
- **R² (Coefficient of Determination)**
636
- > *Definition:* Measures how well the linear fit explains the frequency-rank relationship. Ranges from 0 to 1.
637
- >
638
- > *Intuition:* R² near 1.0 means the data closely follows Zipf's law; lower values indicate deviation from expected word frequency patterns.
639
- >
640
- > *What to seek:* R² > 0.95 is excellent; > 0.99 indicates near-perfect Zipf adherence typical of large natural corpora.
641
-
642
- **Vocabulary Coverage**
643
- > *Definition:* Cumulative percentage of corpus tokens accounted for by the top N words.
644
- >
645
- > *Intuition:* Shows how concentrated word usage is. If top-100 words cover 50% of text, the corpus relies heavily on common words.
646
- >
647
- > *What to seek:* Top-100 covering 30-50% is typical. Higher coverage indicates more repetitive text; lower suggests richer vocabulary.
648
-
649
- ### Word Embedding Metrics
650
-
651
- **Isotropy**
652
- > *Definition:* Measures how uniformly distributed vectors are in the embedding space. Computed as the ratio of minimum to maximum singular values.
653
- >
654
- > *Intuition:* High isotropy (near 1.0) means vectors spread evenly in all directions; low isotropy means vectors cluster in certain directions, reducing expressiveness.
655
- >
656
- > *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.
657
-
658
- **Average Norm**
659
- > *Definition:* Mean magnitude (L2 norm) of word vectors in the embedding space.
660
- >
661
- > *Intuition:* Indicates the typical "length" of vectors. Consistent norms suggest stable training; high variance may indicate some words are undertrained.
662
- >
663
- > *What to seek:* Relatively consistent norms across models. The absolute value matters less than consistency (low std deviation).
664
-
665
- **Cosine Similarity**
666
- > *Definition:* Measures angular similarity between vectors, ranging from -1 (opposite) to 1 (identical direction).
667
- >
668
- > *Intuition:* Words with similar meanings should have high cosine similarity. This is the standard metric for semantic relatedness in embeddings.
669
- >
670
- > *What to seek:* Semantically related words should score > 0.5; unrelated words should be near 0. Synonyms often score > 0.7.
671
-
672
- **t-SNE Visualization**
673
- > *Definition:* t-Distributed Stochastic Neighbor Embedding - a dimensionality reduction technique that preserves local structure for visualization.
674
- >
675
- > *Intuition:* Clusters in t-SNE plots indicate groups of semantically related words. Spread indicates vocabulary diversity; tight clusters suggest semantic coherence.
676
- >
677
- > *What to seek:* Meaningful clusters (e.g., numbers together, verbs together). Avoid over-interpreting distances - t-SNE preserves local, not global, structure.
678
-
679
- ### General Interpretation Guidelines
680
-
681
- 1. **Compare within model families:** Metrics are most meaningful when comparing models of the same type (e.g., 8k vs 64k tokenizer).
682
- 2. **Consider trade-offs:** Better performance on one metric often comes at the cost of another (e.g., compression vs. OOV rate).
683
- 3. **Context matters:** Optimal values depend on downstream tasks. Text generation may prioritize different metrics than classification.
684
- 4. **Corpus influence:** All metrics are influenced by corpus characteristics. Wikipedia text differs from social media or literature.
685
- 5. **Language-specific patterns:** Morphologically rich languages (like Arabic) may show different optimal ranges than analytic languages.
686
-
687
-
688
- ### Visualizations Index
689
-
690
- | Visualization | Description |
691
- |---------------|-------------|
692
- | Tokenizer Compression | Compression ratios by vocabulary size |
693
- | Tokenizer Fertility | Average token length by vocabulary |
694
- | Tokenizer OOV | Unknown token rates |
695
- | Tokenizer Total Tokens | Total tokens by vocabulary |
696
- | N-gram Perplexity | Perplexity by n-gram size |
697
- | N-gram Entropy | Entropy by n-gram size |
698
- | N-gram Coverage | Top pattern coverage |
699
- | N-gram Unique | Unique n-gram counts |
700
- | Markov Entropy | Entropy by context size |
701
- | Markov Branching | Branching factor by context |
702
- | Markov Contexts | Unique context counts |
703
- | Zipf's Law | Frequency-rank distribution with fit |
704
- | Vocab Frequency | Word frequency distribution |
705
- | Top 20 Words | Most frequent words |
706
- | Vocab Coverage | Cumulative coverage curve |
707
- | Embedding Isotropy | Vector space uniformity |
708
- | Embedding Norms | Vector magnitude distribution |
709
- | Embedding Similarity | Word similarity heatmap |
710
- | Nearest Neighbors | Similar words for key terms |
711
- | t-SNE Words | 2D word embedding visualization |
712
- | t-SNE Sentences | 2D sentence embedding visualization |
713
- | Position Encoding | Encoding method comparison |
714
- | Model Sizes | Storage requirements |
715
- | Performance Dashboard | Comprehensive performance overview |
716
 
717
  ---
718
- ## About This Project
719
-
720
- ### Data Source
721
 
722
- Models trained on [wikipedia-monthly](https://huggingface.co/datasets/omarkamali/wikipedia-monthly) - a monthly snapshot of Wikipedia articles across 300+ languages.
723
 
724
- ### Project
725
 
726
- A project by **[Wikilangs](https://wikilangs.org)** - Open-source NLP models for every Wikipedia language.
727
-
728
- ### Maintainer
729
-
730
- [Omar Kamali](https://omarkamali.com) - [Omneity Labs](https://omneitylabs.com)
731
 
732
  ### Citation
733
 
734
- If you use these models in your research, please cite:
735
-
736
  ```bibtex
737
  @misc{wikilangs2025,
738
- author = {Kamali, Omar},
739
- title = {Wikilangs: Open NLP Models for Wikipedia Languages},
740
- year = {2025},
741
- doi = {10.5281/zenodo.18073153},
742
  publisher = {Zenodo},
743
- url = {https://huggingface.co/wikilangs}
744
  institution = {Omneity Labs}
745
  }
746
  ```
747
 
748
- ### License
749
-
750
- MIT License - Free for academic and commercial use.
751
-
752
  ### Links
753
 
754
- - 🌐 Website: [wikilangs.org](https://wikilangs.org)
755
- - 🤗 Models: [huggingface.co/wikilangs](https://huggingface.co/wikilangs)
756
- - 📊 Data: [wikipedia-monthly](https://huggingface.co/datasets/omarkamali/wikipedia-monthly)
757
- - 👤 Author: [Omar Kamali](https://huggingface.co/omarkamali)
 
 
758
  - 🤝 Sponsor: [Featherless AI](https://featherless.ai)
759
- ---
760
- *Generated by Wikilangs Models Pipeline*
761
 
762
- *Report Date: 2026-01-07 13:14:53*
 
 
 
 
36
  value: 4.347
37
  - name: best_isotropy
38
  type: isotropy
39
+ value: 0.8111
40
+ - name: best_alignment_r10
41
+ type: alignment
42
+ value: 0.7660
43
  - name: vocabulary_size
44
  type: vocab
45
+ value: 986324
46
+ generated: 2026-03-04
47
  ---
48
 
49
+ # Arabic Wikilangs Models
 
50
 
51
+ Open-source tokenizers, n-gram & Markov language models, vocabulary stats, and word embeddings trained on **Arabic** Wikipedia by [Wikilangs](https://wikilangs.org).
 
52
 
53
+ 🌐 [Language Page](https://wikilangs.org/languages/ar/) · 🎮 [Playground](https://wikilangs.org/playground/?lang=ar) · 📊 [Full Research Report](RESEARCH_REPORT.md)
54
 
55
+ ## Language Samples
56
 
57
+ Example sentences drawn from the Arabic Wikipedia corpus:
 
 
 
 
 
 
58
 
59
+ > تصغير K \ كي \ هو الحرف الحادي العشر في الأبجدية The Oxford English Dictionary, 2nd ed., online ويمثل هذا الحرف الصوت الطبقي الوقفي المهموس في الكيمياء، يرمز K لعنصر البوتاسيوم مراجع لاتينية
60
 
61
+ > : إحدى ولايات الولايات المتحدة الأمريكية. مدينة نيويورك: أكبر مدن الولايات المتحدة الأمريكية وإحدى أكبرها في العالم. مقاطعة نيويورك: إحدى مقاطعات ولاية نيويورك. توضيح أسماء أماكن
62
 
63
+ > أبو إبراهيم الفارابي أديب نحوي لغوي أبو نصر محمد الفارابي فيلسوف مشائي مسلم وطبيب
 
 
 
 
 
 
 
 
64
 
65
+ > إسحاق نيوتن عالم إنجليزي نيوتن وحدة قياس القوة. ذكور إنجليزية توضيح أسماء أماكن
 
66
 
67
+ > بوتان (مملكة) بوتان مملكة في جبال الهمالايا بين الهند والصين. بوتان (كيمياء) أحد الألكانات، يتكون من أربع ذرات كربون.
68
 
69
+ ## Quick Start
70
 
71
+ ### Load the Tokenizer
72
 
73
+ ```python
74
+ import sentencepiece as spm
75
 
76
+ sp = spm.SentencePieceProcessor()
77
+ sp.Load("ar_tokenizer_32k.model")
78
 
79
+ text = "استوديوهات أفلام والت ديزني أفلام والت ديزني منتجع والت ديزني العالمي ديزني لاند"
80
+ tokens = sp.EncodeAsPieces(text)
81
+ ids = sp.EncodeAsIds(text)
 
 
 
82
 
83
+ print(tokens) # subword pieces
84
+ print(ids) # integer ids
85
 
86
+ # Decode back
87
+ print(sp.DecodeIds(ids))
88
+ ```
89
 
90
+ <details>
91
+ <summary><b>Tokenization examples (click to expand)</b></summary>
92
+
93
+ **Sample 1:** `استوديوهات أفلام والت ديزني أفلام والت ديزني منتجع والت ديزني العالمي ديزني لاند…`
94
 
95
  | Vocab | Tokens | Count |
96
  |-------|--------|-------|
97
+ | 8k | `▁است ودي وه اتأفلام ▁والت ▁دي ز ني ▁أفلام (+22 more)` | 32 |
98
+ | 16k | `▁است ودي وهاتأفلام ▁والت ▁ديزنيأفلاموالتديزني ▁منت (+10 more)` | 20 |
99
+ | 32k | `▁استوديوهات ▁أفلاموالت ▁ديزني ▁أفلام ▁والت ▁ديزني ▁منتجع ▁والت ▁ديزني (+7 more)` | 17 |
100
+ | 64k | `▁استوديوهات ▁أفلاموالت ▁ديزني ▁أفلام ▁والت ▁ديزني ▁منتجع ▁والت ▁ديزني (+7 more)` | 17 |
101
 
102
+ **Sample 2:** `باسكال قد تعني: الباسكال، وحدة قياس الضغط لغة باسكال، لغة برمجة الفيلسوف باسكال،…`
103
 
104
  | Vocab | Tokens | Count |
105
  |-------|--------|-------|
106
+ | 8k | `▁با سك ال ▁قد ▁تعني :البا سك ال ، (+29 more)` | 39 |
107
+ | 16k | `▁باسكال ▁قد ▁تعني :الباسك ال ، ▁وحدة ▁قياس ▁الضغط (+18 more)` | 28 |
108
+ | 32k | `▁باسكال ▁قد ▁تعني :الباسك ال ، ▁وحدة ▁قياس ▁الضغط (+15 more)` | 25 |
109
+ | 64k | `▁باسكال ▁قد ▁تعني :الباسك ال ، ▁وحدة ▁قياس ▁الضغط (+15 more)` | 25 |
110
 
111
+ **Sample 3:** `جمهورية الكونغو الديمقراطية، زائير سابقًا، عاصمتها كينشاسا. جمهورية الكونغو، عاص…`
112
 
113
  | Vocab | Tokens | Count |
114
  |-------|--------|-------|
115
+ | 8k | `▁جمهورية ▁الكون غوالديمقراطية ، ز ائ يرسابق ًا (+21 more)` | 31 |
116
+ | 16k | `▁جمهوريةالكونغو ▁الديمقراطية ،ز ائ يرسابقًا ،عاصمتها (+16 more)` | 26 |
117
+ | 32k | `▁جمهوريةالكونغو ▁الديمقراطية ،زائ يرسابقًا ، ▁عاصمتها ▁كينشاسا (+12 more)` | 22 |
118
+ | 64k | `▁جمهوريةالكونغو ▁الديمقراطية ،زائيرسابقًا ، ▁عاصمتها ▁كينشاسا . (+10 more)` | 20 |
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
119
 
120
+ </details>
 
 
121
 
122
+ ### Load Word Embeddings
123
 
124
+ ```python
125
+ from gensim.models import KeyedVectors
 
126
 
127
+ # Aligned embeddings (cross-lingual, mapped to English vector space)
128
+ wv = KeyedVectors.load("ar_embeddings_128d_aligned.kv")
129
 
130
+ similar = wv.most_similar("word", topn=5)
131
+ for word, score in similar:
132
+ print(f" {word}: {score:.3f}")
133
+ ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
134
 
135
+ ### Load N-gram Model
136
 
137
+ ```python
138
+ import pyarrow.parquet as pq
 
 
139
 
140
+ df = pq.read_table("ar_3gram_word.parquet").to_pandas()
141
+ print(df.head())
142
+ ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
143
 
144
+ ## Models Overview
 
145
 
146
  ![Performance Dashboard](visualizations/performance_dashboard.png)
147
 
148
+ | Category | Assets |
149
+ |----------|--------|
150
+ | Tokenizers | BPE at 8k, 16k, 32k, 64k vocab sizes |
151
+ | N-gram models | 2 / 3 / 4 / 5-gram (word & subword) |
152
+ | Markov chains | Context 1–5 (word & subword) |
153
+ | Embeddings | 32d, 64d, 128d mono & aligned |
154
+ | Vocabulary | Full frequency list + Zipf analysis |
155
+ | Statistics | Corpus & model statistics JSON |
156
+
157
+ ## Metrics Summary
158
+
159
+ | Component | Model | Key Metric | Value |
160
+ |-----------|-------|------------|-------|
161
+ | Tokenizer | 8k BPE | Compression | 3.25x |
162
+ | Tokenizer | 16k BPE | Compression | 3.65x |
163
+ | Tokenizer | 32k BPE | Compression | 4.03x |
164
+ | Tokenizer | 64k BPE | Compression | 4.35x 🏆 |
165
+ | N-gram | 2-gram (subword) | Perplexity | 426 🏆 |
166
+ | N-gram | 2-gram (word) | Perplexity | 359,826 |
167
+ | N-gram | 3-gram (subword) | Perplexity | 4,163 |
168
+ | N-gram | 3-gram (word) | Perplexity | 775,988 |
169
+ | N-gram | 4-gram (subword) | Perplexity | 27,277 |
170
+ | N-gram | 4-gram (word) | Perplexity | 1,494,234 |
171
+ | N-gram | 5-gram (subword) | Perplexity | 133,736 |
172
+ | N-gram | 5-gram (word) | Perplexity | 1,059,510 |
173
+ | Markov | ctx-1 (subword) | Predictability | 0.0% |
174
+ | Markov | ctx-1 (word) | Predictability | 0.0% |
175
+ | Markov | ctx-2 (subword) | Predictability | 17.3% |
176
+ | Markov | ctx-2 (word) | Predictability | 67.4% |
177
+ | Markov | ctx-3 (subword) | Predictability | 29.5% |
178
+ | Markov | ctx-3 (word) | Predictability | 89.5% |
179
+ | Markov | ctx-4 (subword) | Predictability | 35.2% |
180
+ | Markov | ctx-4 (word) | Predictability | 96.5% 🏆 |
181
+ | Vocabulary | full | Size | 986,324 |
182
+ | Vocabulary | full | Zipf | 0.9920 |
183
+ | Embeddings | mono_32d | Isotropy | 0.8111 |
184
+ | Embeddings | mono_64d | Isotropy | 0.7841 |
185
+ | Embeddings | mono_128d | Isotropy | 0.7556 |
186
+ | Embeddings | aligned_32d | Isotropy | 0.8111 🏆 |
187
+ | Embeddings | aligned_64d | Isotropy | 0.7841 |
188
+ | Embeddings | aligned_128d | Isotropy | 0.7556 |
189
+ | Alignment | aligned_32d | R@1 / R@5 / R@10 | 13.4% / 35.0% / 48.6% |
190
+ | Alignment | aligned_64d | R@1 / R@5 / R@10 | 28.6% / 54.0% / 65.6% |
191
+ | Alignment | aligned_128d | R@1 / R@5 / R@10 | 37.2% / 65.0% / 76.6% 🏆 |
192
+
193
+ 📊 **[Full ablation study, per-model breakdowns, and interpretation guide →](RESEARCH_REPORT.md)**
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
194
 
195
  ---
 
 
 
196
 
197
+ ## About
198
 
199
+ Trained on [wikipedia-monthly](https://huggingface.co/datasets/omarkamali/wikipedia-monthly) — monthly snapshots of 300+ Wikipedia languages.
200
 
201
+ A project by **[Wikilangs](https://wikilangs.org)** · Maintainer: [Omar Kamali](https://omarkamali.com) · [Omneity Labs](https://omneitylabs.com)
 
 
 
 
202
 
203
  ### Citation
204
 
 
 
205
  ```bibtex
206
  @misc{wikilangs2025,
207
+ author = {Kamali, Omar},
208
+ title = {Wikilangs: Open NLP Models for Wikipedia Languages},
209
+ year = {2025},
210
+ doi = {10.5281/zenodo.18073153},
211
  publisher = {Zenodo},
212
+ url = {https://huggingface.co/wikilangs},
213
  institution = {Omneity Labs}
214
  }
215
  ```
216
 
 
 
 
 
217
  ### Links
218
 
219
+ - 🌐 [wikilangs.org](https://wikilangs.org)
220
+ - 🌍 [Language page](https://wikilangs.org/languages/ar/)
221
+ - 🎮 [Playground](https://wikilangs.org/playground/?lang=ar)
222
+ - 🤗 [HuggingFace models](https://huggingface.co/wikilangs)
223
+ - 📊 [wikipedia-monthly dataset](https://huggingface.co/datasets/omarkamali/wikipedia-monthly)
224
+ - 👤 [Omar Kamali](https://huggingface.co/omarkamali)
225
  - 🤝 Sponsor: [Featherless AI](https://featherless.ai)
 
 
226
 
227
+ **License:** MIT — free for academic and commercial use.
228
+
229
+ ---
230
+ *Generated by Wikilangs Pipeline · 2026-03-04 13:56:39*
RESEARCH_REPORT.md ADDED
@@ -0,0 +1,686 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Arabic — Full Ablation Study & Research Report
2
+
3
+ Detailed evaluation of all model variants trained on **Arabic** Wikipedia data by [Wikilangs](https://wikilangs.org).
4
+
5
+ 👈 [Back to README](README.md)
6
+
7
+ ## 📋 Repository Contents
8
+
9
+ ### Models & Assets
10
+
11
+ - Tokenizers (8k, 16k, 32k, 64k)
12
+ - N-gram models (2, 3, 4, 5-gram)
13
+ - Markov chains (context of 1, 2, 3, 4 and 5)
14
+ - Subword N-gram and Markov chains
15
+ - Embeddings in various sizes and dimensions (aligned and unaligned)
16
+ - Language Vocabulary
17
+ - Language Statistics
18
+
19
+ ![Performance Dashboard](visualizations/performance_dashboard.png)
20
+
21
+ ### Analysis and Evaluation
22
+
23
+ - [1. Tokenizer Evaluation](#1-tokenizer-evaluation)
24
+ - [2. N-gram Model Evaluation](#2-n-gram-model-evaluation)
25
+ - [3. Markov Chain Evaluation](#3-markov-chain-evaluation)
26
+ - [4. Vocabulary Analysis](#4-vocabulary-analysis)
27
+ - [5. Word Embeddings Evaluation](#5-word-embeddings-evaluation)
28
+ - [6. Morphological Analysis (Experimental)](#6--morphological-analysis-experimental)
29
+ - [7. Summary & Recommendations](#7-summary--recommendations)
30
+ - [Metrics Glossary](#appendix-metrics-glossary--interpretation-guide)
31
+ - [Visualizations Index](#visualizations-index)
32
+
33
+ ---
34
+ ## 1. Tokenizer Evaluation
35
+
36
+ ![Tokenizer Compression](visualizations/tokenizer_compression.png)
37
+
38
+ ![Tokenizer Fertility](visualizations/tokenizer_fertility.png)
39
+
40
+ ![Tokenizer OOV](visualizations/tokenizer_oov.png)
41
+
42
+ ![Total Tokens](visualizations/tokenizer_total_tokens.png)
43
+
44
+ ### Results
45
+
46
+ | Vocab Size | Compression | Avg Token Len | UNK Rate | Total Tokens |
47
+ |------------|-------------|---------------|----------|--------------|
48
+ | **8k** | 3.251x | 3.25 | 0.0702% | 5,509,050 |
49
+ | **16k** | 3.654x | 3.65 | 0.0788% | 4,901,830 |
50
+ | **32k** | 4.033x | 4.03 | 0.0870% | 4,440,712 |
51
+ | **64k** | 4.347x 🏆 | 4.35 | 0.0938% | 4,120,770 |
52
+
53
+ ### Tokenization Examples
54
+
55
+ Below are sample sentences tokenized with each vocabulary size:
56
+
57
+ **Sample 1:** `استوديوهات أفلام والت ديزني أفلام والت ديزني منتجع والت ديزني العالمي ديزني لاند...`
58
+
59
+ | Vocab | Tokens | Count |
60
+ |-------|--------|-------|
61
+ | 8k | `▁است ودي وه ات ▁أفلام ▁والت ▁دي ز ني ▁أفلام ... (+22 more)` | 32 |
62
+ | 16k | `▁است ودي وهات ▁أفلام ▁والت ▁ديزني ▁أفلام ▁والت ▁ديزني ▁منت ... (+10 more)` | 20 |
63
+ | 32k | `▁استوديوهات ▁أفلام ▁والت ▁ديزني ▁أفلام ▁والت ▁ديزني ▁منتجع ▁والت ▁ديزني ... (+7 more)` | 17 |
64
+ | 64k | `▁استوديوهات ▁أفلام ▁والت ▁ديزني ▁أفلام ▁والت ▁ديزني ▁منتجع ▁والت ▁ديزني ... (+7 more)` | 17 |
65
+
66
+ **Sample 2:** `باسكال قد تعني: الباسكال، وحدة قياس الضغط لغة باسكال، لغة برمجة الفيلسوف باسكال،...`
67
+
68
+ | Vocab | Tokens | Count |
69
+ |-------|--------|-------|
70
+ | 8k | `▁با سك ال ▁قد ▁تعني : ▁البا سك ال ، ... (+29 more)` | 39 |
71
+ | 16k | `▁باسكال ▁قد ▁تعني : ▁الباسك ال ، ▁وحدة ▁قياس ▁الضغط ... (+18 more)` | 28 |
72
+ | 32k | `▁باسكال ▁قد ▁تعني : ▁الباسك ال ، ▁وحدة ▁قياس ▁الضغط ... (+15 more)` | 25 |
73
+ | 64k | `▁باسكال ▁قد ▁تعني : ▁الباسك ال ، ▁وحدة ▁قياس ▁الضغط ... (+15 more)` | 25 |
74
+
75
+ **Sample 3:** `جمهورية الكونغو الديمقراطية، زائير سابقًا، عاصمتها كينشاسا. جمهورية الكونغو، عاص...`
76
+
77
+ | Vocab | Tokens | Count |
78
+ |-------|--------|-------|
79
+ | 8k | `▁جمهورية ▁الكون غو ▁الديمقراطية ، ▁ز ائ ير ▁سابق ًا ... (+21 more)` | 31 |
80
+ | 16k | `▁جمهورية ▁الكونغو ▁الديمقراطية ، ▁ز ائ ير ▁سابقًا ، ▁عاصمتها ... (+16 more)` | 26 |
81
+ | 32k | `▁جمهورية ▁الكونغو ▁الديمقراطية ، ▁زائ ير ▁سابقًا ، ▁عاصمتها ▁كينشاسا ... (+12 more)` | 22 |
82
+ | 64k | `▁جمهورية ▁الكونغو ▁الديمقراطية ، ▁زائير ▁سابقًا ، ▁عاصمتها ▁كينشاسا . ... (+10 more)` | 20 |
83
+
84
+
85
+ ### Key Findings
86
+
87
+ - **Best Compression:** 64k achieves 4.347x compression
88
+ - **Lowest UNK Rate:** 8k with 0.0702% unknown tokens
89
+ - **Trade-off:** Larger vocabularies improve compression but increase model size
90
+ - **Recommendation:** 32k vocabulary provides optimal balance for production use
91
+
92
+ ---
93
+ ## 2. N-gram Model Evaluation
94
+
95
+ ![N-gram Perplexity](visualizations/ngram_perplexity.png)
96
+
97
+ ![N-gram Unique](visualizations/ngram_unique.png)
98
+
99
+ ![N-gram Coverage](visualizations/ngram_coverage.png)
100
+
101
+ ### Results
102
+
103
+ | N-gram | Variant | Perplexity | Entropy | Unique N-grams | Top-100 Coverage | Top-1000 Coverage |
104
+ |--------|---------|------------|---------|----------------|------------------|-------------------|
105
+ | **2-gram** | Word | 359,826 | 18.46 | 2,030,200 | 4.4% | 13.3% |
106
+ | **2-gram** | Subword | 426 🏆 | 8.73 | 44,225 | 56.3% | 96.2% |
107
+ | **3-gram** | Word | 775,988 | 19.57 | 2,900,317 | 3.0% | 10.9% |
108
+ | **3-gram** | Subword | 4,163 | 12.02 | 321,654 | 24.3% | 56.3% |
109
+ | **4-gram** | Word | 1,494,234 | 20.51 | 4,693,107 | 2.8% | 10.2% |
110
+ | **4-gram** | Subword | 27,277 | 14.74 | 1,666,030 | 13.3% | 31.5% |
111
+ | **5-gram** | Word | 1,059,510 | 20.01 | 3,368,028 | 3.6% | 11.9% |
112
+ | **5-gram** | Subword | 133,736 | 17.03 | 5,324,551 | 5.8% | 18.5% |
113
+
114
+ ### Top 5 N-grams by Size
115
+
116
+ **2-grams (Word):**
117
+
118
+ | Rank | N-gram | Count |
119
+ |------|--------|-------|
120
+ | 1 | `في عام` | 137,432 |
121
+ | 2 | `في القرن` | 92,611 |
122
+ | 3 | `كرة قدم` | 88,053 |
123
+ | 4 | `العديد من` | 65,695 |
124
+ | 5 | `الولايات المتحدة` | 63,417 |
125
+
126
+ **3-grams (Word):**
127
+
128
+ | Rank | N-gram | Count |
129
+ |------|--------|-------|
130
+ | 1 | `في القرن 20` | 27,502 |
131
+ | 2 | `في الولايات المتحدة` | 25,188 |
132
+ | 3 | `على الرغم من` | 25,111 |
133
+ | 4 | `في القرن 21` | 20,515 |
134
+ | 5 | `بما في ذلك` | 18,931 |
135
+
136
+ **4-grams (Word):**
137
+
138
+ | Rank | N-gram | Count |
139
+ |------|--------|-------|
140
+ | 1 | `كرة قدم مغتربون في` | 15,717 |
141
+ | 2 | `تحت سن الثامنة عشر` | 13,585 |
142
+ | 3 | `على الرغم من أن` | 8,756 |
143
+ | 4 | `في الألعاب الأولمبية الصيفية` | 5,980 |
144
+ | 5 | `عام بلغ عدد سكان` | 5,886 |
145
+
146
+ **5-grams (Word):**
147
+
148
+ | Rank | N-gram | Count |
149
+ |------|--------|-------|
150
+ | 1 | `تعداد عام بلغ عدد سكان` | 5,588 |
151
+ | 2 | `بحسب تعداد عام وبلغ عدد` | 5,569 |
152
+ | 3 | `تعداد عام وبلغ عدد الأسر` | 5,569 |
153
+ | 4 | `نسمة بحسب تعداد عام وبلغ` | 5,566 |
154
+ | 5 | `في الفئة العمرية ما بين` | 5,561 |
155
+
156
+ **2-grams (Subword):**
157
+
158
+ | Rank | N-gram | Count |
159
+ |------|--------|-------|
160
+ | 1 | `ا ل` | 27,516,669 |
161
+ | 2 | `_ ا` | 23,616,110 |
162
+ | 3 | `ة _` | 13,152,069 |
163
+ | 4 | `ن _` | 9,255,735 |
164
+ | 5 | `ي _` | 9,009,959 |
165
+
166
+ **3-grams (Subword):**
167
+
168
+ | Rank | N-gram | Count |
169
+ |------|--------|-------|
170
+ | 1 | `_ ا ل` | 22,248,047 |
171
+ | 2 | `ا ل م` | 4,149,844 |
172
+ | 3 | `ي ة _` | 4,126,642 |
173
+ | 4 | `_ ف ي` | 4,065,816 |
174
+ | 5 | `ف ي _` | 3,976,227 |
175
+
176
+ **4-grams (Subword):**
177
+
178
+ | Rank | N-gram | Count |
179
+ |------|--------|-------|
180
+ | 1 | `_ ف ي _` | 3,688,677 |
181
+ | 2 | `ة _ ا ل` | 3,625,657 |
182
+ | 3 | `_ ا ل م` | 3,573,633 |
183
+ | 4 | `ن _ ا ل` | 2,468,103 |
184
+ | 5 | `_ م ن _` | 2,362,149 |
185
+
186
+ **5-grams (Subword):**
187
+
188
+ | Rank | N-gram | Count |
189
+ |------|--------|-------|
190
+ | 1 | `ف ي _ ا ل` | 1,266,206 |
191
+ | 2 | `_ ف ي _ ا` | 1,245,053 |
192
+ | 3 | `ا ت _ ا ل` | 1,085,180 |
193
+ | 4 | `_ ع ل ى _` | 1,078,435 |
194
+ | 5 | `ي ة _ ا ل` | 1,036,752 |
195
+
196
+
197
+ ### Key Findings
198
+
199
+ - **Best Perplexity:** 2-gram (subword) with 426
200
+ - **Entropy Trend:** Decreases with larger n-grams (more predictable)
201
+ - **Coverage:** Top-1000 patterns cover ~18% of corpus
202
+ - **Recommendation:** 4-gram or 5-gram for best predictive performance
203
+
204
+ ---
205
+ ## 3. Markov Chain Evaluation
206
+
207
+ ![Markov Entropy](visualizations/markov_entropy.png)
208
+
209
+ ![Markov Contexts](visualizations/markov_contexts.png)
210
+
211
+ ![Markov Branching](visualizations/markov_branching.png)
212
+
213
+ ### Results
214
+
215
+ | Context | Variant | Avg Entropy | Perplexity | Branching Factor | Unique Contexts | Predictability |
216
+ |---------|---------|-------------|------------|------------------|-----------------|----------------|
217
+ | **1** | Word | 1.0468 | 2.066 | 15.08 | 2,190,668 | 0.0% |
218
+ | **1** | Subword | 1.2063 | 2.307 | 11.28 | 11,477 | 0.0% |
219
+ | **2** | Word | 0.3256 | 1.253 | 2.03 | 33,010,787 | 67.4% |
220
+ | **2** | Subword | 0.8269 | 1.774 | 5.80 | 129,485 | 17.3% |
221
+ | **3** | Word | 0.1052 | 1.076 | 1.21 | 67,054,969 | 89.5% |
222
+ | **3** | Subword | 0.7049 | 1.630 | 4.15 | 751,177 | 29.5% |
223
+ | **4** | Word | 0.0350 🏆 | 1.025 | 1.06 | 81,123,579 | 96.5% |
224
+ | **4** | Subword | 0.6481 | 1.567 | 3.38 | 3,113,652 | 35.2% |
225
+
226
+ ### Generated Text Samples (Word-based)
227
+
228
+ Below are text samples generated from each word-based Markov chain model:
229
+
230
+ **Context Size 1:**
231
+
232
+ 1. `في الألعاب الآسيوية خاض جهادًا فالأقدر قتالًا شديدًا تولَّى من حيث كانوا في المناهج العلاجية في`
233
+ 2. `من حيث منعت استخدام مصطلح من الخلايا battery of america bureau of the baskervilles العديد من`
234
+ 3. `على التلال وهي عضو النادي مبارياته الدولية بعد فوز فرنسا بيافرا التي عززت المظهر الخارجي للمبنى`
235
+
236
+ **Context Size 2:**
237
+
238
+ 1. `في عام وقد انتقل بعض أفراد فرقته إلى فرقة المسرح الكويتي مسرح الرواد في هذا المجال غونار`
239
+ 2. `في القرن 20 يابانيون في القرن 20 ذكور في سينيما ماراثية من دلهي النحات الرئيسي والمسؤول الرئيسي`
240
+ 3. `كرة قدم مغتربون في الولايات المتحدة وبريطانيا العظمى والهجينة على مركبة فضائية مأهولة في منطقة كوم ا...`
241
+
242
+ **Context Size 3:**
243
+
244
+ 1. `في القرن 20 أمريكيون في القرن 21 هـ في القاهرة 923 هـ في القاهرة بالعربية في القرن 7`
245
+ 2. `على الرغم من محدودية علمهم ومستواهما الثقافي إلا أنهما كانا تابعين لأمير بلدة فيدين البلغاري ميخائيل...`
246
+ 3. `في الولايات المتحدة تصغير يسار ترجمة لاتينية عمرها خمس مائة عام لكتاب القانون في الطب لابن سينا وقال`
247
+
248
+ **Context Size 4:**
249
+
250
+ 1. `كرة قدم مغتربون في فرنسا كيداه منتخب ماليزيا لكرة القدم روابط خارجية مراجع رجال ناميبيون في القرن 21...`
251
+ 2. `تحت سن الثامنة عشر ونسبة 18 3 في الخامسة والستين من العمر وما فوق تعداد عام بلغ عدد سكان`
252
+ 3. `على الرغم من أن الاكتشافات الأثرية لا تدعم هذه النظرية حيث أن تسمية الألوان الأساسية طبقا للتطور الت...`
253
+
254
+
255
+ ### Generated Text Samples (Subword-based)
256
+
257
+ Below are text samples generated from each subword-based Markov chain model:
258
+
259
+ **Context Size 1:**
260
+
261
+ 1. `_التفيهالرزين_ول`
262
+ 2. `اقاتية_إلوعتحروب`
263
+ 3. `ل_ب_ي_الجة_الجة_`
264
+
265
+ **Context Size 2:**
266
+
267
+ 1. `البية_عصرية_على_أ`
268
+ 2. `_الزهربية._إره_مق`
269
+ 3. `ة_التعلى_المية_ال`
270
+
271
+ **Context Size 3:**
272
+
273
+ 1. `_البحر_من_أصبحت_حر`
274
+ 2. `المصر_السنّة_-_فقد_`
275
+ 3. `ية_في_wirtugust_ha`
276
+
277
+ **Context Size 4:**
278
+
279
+ 1. `_في_جنوبيَّة_من_ناثـر`
280
+ 2. `ة_الممثلين_على_نفسه`
281
+ 3. `_المسيحيون_فلوريدا.`
282
+
283
+
284
+ ### Key Findings
285
+
286
+ - **Best Predictability:** Context-4 (word) with 96.5% predictability
287
+ - **Branching Factor:** Decreases with context size (more deterministic)
288
+ - **Memory Trade-off:** Larger contexts require more storage (3,113,652 contexts)
289
+ - **Recommendation:** Context-3 or Context-4 for text generation
290
+
291
+ ---
292
+ ## 4. Vocabulary Analysis
293
+
294
+ ![Zipf's Law](visualizations/zipf_law.png)
295
+
296
+ ![Top Words](visualizations/top20_words.png)
297
+
298
+ ![Coverage Curve](visualizations/vocab_coverage.png)
299
+
300
+ ### Statistics
301
+
302
+ | Metric | Value |
303
+ |--------|-------|
304
+ | Vocabulary Size | 986,324 |
305
+ | Total Tokens | 94,902,130 |
306
+ | Mean Frequency | 96.22 |
307
+ | Median Frequency | 4 |
308
+ | Frequency Std Dev | 4980.31 |
309
+
310
+ ### Most Common Words
311
+
312
+ | Rank | Word | Frequency |
313
+ |------|------|-----------|
314
+ | 1 | في | 3,714,132 |
315
+ | 2 | من | 2,378,870 |
316
+ | 3 | على | 1,085,920 |
317
+ | 4 | إلى | 833,112 |
318
+ | 5 | أن | 489,978 |
319
+ | 6 | عام | 455,946 |
320
+ | 7 | التي | 369,985 |
321
+ | 8 | عن | 368,235 |
322
+ | 9 | أو | 366,818 |
323
+ | 10 | مع | 331,151 |
324
+
325
+ ### Least Common Words (from vocabulary)
326
+
327
+ | Rank | Word | Frequency |
328
+ |------|------|-----------|
329
+ | 1 | وساريكات | 2 |
330
+ | 2 | نهايةالمدةفترة | 2 |
331
+ | 3 | valachi | 2 |
332
+ | 4 | فالمختصون | 2 |
333
+ | 5 | المتأسفين | 2 |
334
+ | 6 | والمنشغلين | 2 |
335
+ | 7 | انحسبت | 2 |
336
+ | 8 | غيوان | 2 |
337
+ | 9 | moji | 2 |
338
+ | 10 | إيمجوي | 2 |
339
+
340
+ ### Zipf's Law Analysis
341
+
342
+ | Metric | Value |
343
+ |--------|-------|
344
+ | Zipf Coefficient | 0.9151 |
345
+ | R² (Goodness of Fit) | 0.992048 |
346
+ | Adherence Quality | **excellent** |
347
+
348
+ ### Coverage Analysis
349
+
350
+ | Top N Words | Coverage |
351
+ |-------------|----------|
352
+ | Top 100 | 22.0% |
353
+ | Top 1,000 | 43.4% |
354
+ | Top 5,000 | 63.5% |
355
+ | Top 10,000 | 72.1% |
356
+
357
+ ### Key Findings
358
+
359
+ - **Zipf Compliance:** R²=0.9920 indicates excellent adherence to Zipf's law
360
+ - **High Frequency Dominance:** Top 100 words cover 22.0% of corpus
361
+ - **Long Tail:** 976,324 words needed for remaining 27.9% coverage
362
+
363
+ ---
364
+ ## 5. Word Embeddings Evaluation
365
+
366
+ ![Embedding Isotropy](visualizations/embedding_isotropy.png)
367
+
368
+ ![Similarity Matrix](visualizations/embedding_similarity.png)
369
+
370
+ ![t-SNE Words](visualizations/tsne_words.png)
371
+
372
+ ![t-SNE Sentences](visualizations/tsne_sentences.png)
373
+
374
+
375
+ ### 5.1 Cross-Lingual Alignment
376
+
377
+ ![Alignment Quality](visualizations/embedding_alignment_quality.png)
378
+
379
+ ![Multilingual t-SNE](visualizations/embedding_tsne_multilingual.png)
380
+
381
+
382
+ ### 5.2 Model Comparison
383
+
384
+ | Model | Dimension | Isotropy | Semantic Density | Alignment R@1 | Alignment R@10 |
385
+ |-------|-----------|----------|------------------|---------------|----------------|
386
+ | **mono_32d** | 32 | 0.8111 | 0.3617 | N/A | N/A |
387
+ | **mono_64d** | 64 | 0.7841 | 0.2928 | N/A | N/A |
388
+ | **mono_128d** | 128 | 0.7556 | 0.2345 | N/A | N/A |
389
+ | **aligned_32d** | 32 | 0.8111 🏆 | 0.3646 | 0.1340 | 0.4860 |
390
+ | **aligned_64d** | 64 | 0.7841 | 0.2939 | 0.2860 | 0.6560 |
391
+ | **aligned_128d** | 128 | 0.7556 | 0.2339 | 0.3720 | 0.7660 |
392
+
393
+ ### Key Findings
394
+
395
+ - **Best Isotropy:** aligned_32d with 0.8111 (more uniform distribution)
396
+ - **Semantic Density:** Average pairwise similarity of 0.2969. Lower values indicate better semantic separation.
397
+ - **Alignment Quality:** Aligned models achieve up to 37.2% R@1 in cross-lingual retrieval.
398
+ - **Recommendation:** 128d aligned for best cross-lingual performance
399
+
400
+ ---
401
+ ## 6. Morphological Analysis (Experimental)
402
+
403
+ 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.
404
+
405
+ ### 6.1 Productivity & Complexity
406
+
407
+ | Metric | Value | Interpretation | Recommendation |
408
+ |--------|-------|----------------|----------------|
409
+ | Productivity Index | **5.000** | High morphological productivity | Reliable analysis |
410
+ | Idiomaticity Gap | **-0.353** | Low formulaic content | - |
411
+
412
+ ### 6.2 Affix Inventory (Productive Units)
413
+
414
+ 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.
415
+
416
+ #### Productive Prefixes
417
+ | Prefix | Examples |
418
+ |--------|----------|
419
+ | `-ال` | الماكر, الويجرية, العرقيه |
420
+ | `-وال` | والمسكيت, والمأذون, والرسو |
421
+ | `-و` | وَصِيف, وخلافاً, وبالكيفية |
422
+ | `-الم` | الماكر, المحيطان, المتوسِّط |
423
+ | `-بال` | بالمدين, بالجماع, بالتأثر |
424
+ | `-ب` | بِالنيابة, بالمدين, بقاءة |
425
+ | `-ل` | للتمتع, لجرح, لقزم |
426
+ | `-م` | مصصم, معاملات, مناظرا |
427
+
428
+ #### Productive Suffixes
429
+ | Suffix | Examples |
430
+ |--------|----------|
431
+ | `-ا` | تعرضها, مناظرا, فقابلا |
432
+ | `-ن` | بالمدين, والمأذون, المحيطان |
433
+ | `-ة` | بِالنيابة, الويجرية, وبالكيفية |
434
+ | `-ت` | معاملات, والمسكيت, ومُؤسسات |
435
+ | `-ي` | اخصابي, الثانيةفي, بيبيمي |
436
+ | `-ين` | بالمدين, الغلامين, للهيروجين |
437
+ | `-ات` | معاملات, ومُؤسسات, الألقابسنوات |
438
+ | `-م` | تسكينهم, مصصم, لقزم |
439
+
440
+ ### 6.3 Bound Stems (Lexical Roots)
441
+
442
+ 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.
443
+
444
+ | Stem | Cohesion | Substitutability | Examples |
445
+ |------|----------|------------------|----------|
446
+ | `ستخد` | 2.56x | 420 contexts | ستخدم, يستخد, تستخد |
447
+ | `التع` | 1.70x | 417 contexts | التعس, التعب, التعمد |
448
+ | `مجمو` | 2.12x | 120 contexts | مجموة, مجمود, مجموع |
449
+ | `استخ` | 1.97x | 149 contexts | استخف, استخم, استخد |
450
+ | `تحدة` | 2.82x | 26 contexts | متحدة, ومتحدة, لمتحدة |
451
+ | `المق` | 1.38x | 607 contexts | المقد, المقل, المقص |
452
+ | `ارات` | 1.31x | 739 contexts | كارات, تارات, دارات |
453
+ | `لمنا` | 1.38x | 514 contexts | ظلمنا, حلمنا, لمنار |
454
+ | `المج` | 1.39x | 473 contexts | المجل, المجد, المجن |
455
+ | `امعة` | 2.14x | 53 contexts | قامعة, دامعة, سامعة |
456
+ | `لعال` | 1.76x | 115 contexts | العال, لعالم, لعالي |
457
+ | `الحا` | 1.34x | 492 contexts | الحاد, الحاق, الحاف |
458
+
459
+ ### 6.4 Affix Compatibility (Co-occurrence)
460
+
461
+ This table shows which prefixes and suffixes most frequently co-occur on the same stems, revealing the 'stacking' rules of the language's morphology.
462
+
463
+ | Prefix | Suffix | Frequency | Examples |
464
+ |--------|--------|-----------|----------|
465
+ | `-ال` | `-ة` | 297 words | المحميّة, العقاقيرية |
466
+ | `-ال` | `-ن` | 179 words | القطبيتان, المحتشدين |
467
+ | `-ال` | `-ي` | 167 words | السيجومي, الازدي |
468
+ | `-و` | `-ا` | 138 words | والكوسا, ومجتهدًا |
469
+ | `-ال` | `-ية` | 129 words | العقاقيرية, المُغطية |
470
+ | `-ال` | `-ت` | 113 words | الأستكشافات, المتغيِّرات |
471
+ | `-ال` | `-ين` | 98 words | المحتشدين, المتخاذلين |
472
+ | `-ال` | `-ات` | 97 words | الأستكشافات, المتغيِّرات |
473
+ | `-وال` | `-ة` | 72 words | والحرورية, والضرورية |
474
+ | `-م` | `-ا` | 64 words | مُؤديًا, مأمونًا |
475
+
476
+ ### 6.5 Recursive Morpheme Segmentation
477
+
478
+ Using **Recursive Hierarchical Substitutability**, we decompose complex words into their constituent morphemes. This approach handles nested affixes (e.g., `prefix-prefix-root-suffix`).
479
+
480
+ | Word | Suggested Split | Confidence | Stem |
481
+ |------|-----------------|------------|------|
482
+ | الهوسيتية | **`الهوسي-ت-ية`** | 7.5 | `ت` |
483
+ | وتحويلتين | **`وتحويل-ت-ين`** | 7.5 | `ت` |
484
+ | القراخانيين | **`القراخان-ي-ين`** | 7.5 | `ي` |
485
+ | فیروزآباد | **`فیروزآب-ا-د`** | 7.5 | `ا` |
486
+ | الارسالية | **`الا-رسال-ية`** | 6.0 | `رسال` |
487
+ | والمتعلمة | **`وال-متعلم-ة`** | 6.0 | `متعلم` |
488
+ | والكيكونغو | **`و-ال-كيكونغو`** | 6.0 | `كيكونغو` |
489
+ | والسويسريين | **`و-ال-سويسريين`** | 6.0 | `سويسريين` |
490
+ | والنازحون | **`و-ال-نازحون`** | 6.0 | `نازحون` |
491
+ | القترائية | **`الق-ترائ-ية`** | 6.0 | `ترائ` |
492
+ | للنوميديين | **`لل-نوميدي-ين`** | 6.0 | `نوميدي` |
493
+ | والفاندال | **`و-ال-فاندال`** | 6.0 | `فاندال` |
494
+ | وبالإجراءات | **`و-بال-إجراءات`** | 6.0 | `إجراءات` |
495
+ | بالهليكوبتر | **`ب-ال-هليكوبتر`** | 6.0 | `هليكوبتر` |
496
+ | والاستقلابية | **`و-ال-استقلابية`** | 6.0 | `استقلابية` |
497
+
498
+ ### 6.6 Linguistic Interpretation
499
+
500
+ > **Automated Insight:**
501
+ The language Arabic shows high morphological productivity. The subword models are significantly more efficient than word models, suggesting a rich system of affixation or compounding.
502
+
503
+ ---
504
+ ## 7. Summary & Recommendations
505
+
506
+ ![Performance Dashboard](visualizations/performance_dashboard.png)
507
+
508
+ ### Production Recommendations
509
+
510
+ | Component | Recommended | Rationale |
511
+ |-----------|-------------|-----------|
512
+ | Tokenizer | **64k BPE** | Best compression (4.35x) |
513
+ | N-gram | **2-gram** | Lowest perplexity (426) |
514
+ | Markov | **Context-4** | Highest predictability (96.5%) |
515
+ | Embeddings | **100d** | Balanced semantic capture and isotropy |
516
+
517
+
518
+ ---
519
+ ## Appendix: Metrics Glossary & Interpretation Guide
520
+
521
+ This section provides definitions, intuitions, and guidance for interpreting the metrics used throughout this report.
522
+
523
+ ### Tokenizer Metrics
524
+
525
+ **Compression Ratio**
526
+ > *Definition:* The ratio of characters to tokens (chars/token). Measures how efficiently the tokenizer represents text.
527
+ >
528
+ > *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.
529
+ >
530
+ > *What to seek:* Higher is generally better for efficiency, but extremely high compression may indicate overly aggressive merging that loses morphological information.
531
+
532
+ **Average Token Length (Fertility)**
533
+ > *Definition:* Mean number of characters per token produced by the tokenizer.
534
+ >
535
+ > *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.
536
+ >
537
+ > *What to seek:* Balance between 2-5 characters for most languages. Arabic/morphologically-rich languages may benefit from slightly longer tokens.
538
+
539
+ **Unknown Token Rate (OOV Rate)**
540
+ > *Definition:* Percentage of tokens that map to the unknown/UNK token, indicating words the tokenizer cannot represent.
541
+ >
542
+ > *Intuition:* Lower OOV means better vocabulary coverage. High OOV indicates the tokenizer encounters many unseen character sequences.
543
+ >
544
+ > *What to seek:* Below 1% is excellent; below 5% is acceptable. BPE tokenizers typically achieve very low OOV due to subword fallback.
545
+
546
+ ### N-gram Model Metrics
547
+
548
+ **Perplexity**
549
+ > *Definition:* Measures how "surprised" the model is by test data. Mathematically: 2^(cross-entropy). Lower values indicate better prediction.
550
+ >
551
+ > *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.
552
+ >
553
+ > *What to seek:* Lower is better. Perplexity decreases with larger n-grams (more context). Values vary widely by language and corpus size.
554
+
555
+ **Entropy**
556
+ > *Definition:* Average information content (in bits) needed to encode the next token given the context. Related to perplexity: perplexity = 2^entropy.
557
+ >
558
+ > *Intuition:* High entropy means high uncertainty/randomness; low entropy means predictable patterns. Natural language typically has entropy between 1-4 bits per character.
559
+ >
560
+ > *What to seek:* Lower entropy indicates more predictable text patterns. Entropy should decrease as n-gram size increases.
561
+
562
+ **Coverage (Top-K)**
563
+ > *Definition:* Percentage of corpus occurrences explained by the top K most frequent n-grams.
564
+ >
565
+ > *Intuition:* High coverage with few patterns indicates repetitive/formulaic text; low coverage suggests diverse vocabulary usage.
566
+ >
567
+ > *What to seek:* Depends on use case. For language modeling, moderate coverage (40-60% with top-1000) is typical for natural text.
568
+
569
+ ### Markov Chain Metrics
570
+
571
+ **Average Entropy**
572
+ > *Definition:* Mean entropy across all contexts, measuring average uncertainty in next-word prediction.
573
+ >
574
+ > *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).
575
+ >
576
+ > *What to seek:* Decreasing entropy with larger context sizes. Very low entropy (<0.1) indicates highly deterministic transitions.
577
+
578
+ **Branching Factor**
579
+ > *Definition:* Average number of unique next tokens observed for each context.
580
+ >
581
+ > *Intuition:* High branching = many possible continuations (flexible but uncertain); low branching = few options (predictable but potentially repetitive).
582
+ >
583
+ > *What to seek:* Branching factor should decrease with context size. Values near 1.0 indicate nearly deterministic chains.
584
+
585
+ **Predictability**
586
+ > *Definition:* Derived metric: (1 - normalized_entropy) × 100%. Indicates how deterministic the model's predictions are.
587
+ >
588
+ > *Intuition:* 100% predictability means the next word is always certain; 0% means completely random. Real text falls between these extremes.
589
+ >
590
+ > *What to seek:* Higher predictability for text generation quality, but too high (>98%) may produce repetitive output.
591
+
592
+ ### Vocabulary & Zipf's Law Metrics
593
+
594
+ **Zipf's Coefficient**
595
+ > *Definition:* The slope of the log-log plot of word frequency vs. rank. Zipf's law predicts this should be approximately -1.
596
+ >
597
+ > *Intuition:* A coefficient near -1 indicates the corpus follows natural language patterns where a few words are very common and most words are rare.
598
+ >
599
+ > *What to seek:* Values between -0.8 and -1.2 indicate healthy natural language distribution. Deviations may suggest domain-specific or artificial text.
600
+
601
+ **R² (Coefficient of Determination)**
602
+ > *Definition:* Measures how well the linear fit explains the frequency-rank relationship. Ranges from 0 to 1.
603
+ >
604
+ > *Intuition:* R² near 1.0 means the data closely follows Zipf's law; lower values indicate deviation from expected word frequency patterns.
605
+ >
606
+ > *What to seek:* R² > 0.95 is excellent; > 0.99 indicates near-perfect Zipf adherence typical of large natural corpora.
607
+
608
+ **Vocabulary Coverage**
609
+ > *Definition:* Cumulative percentage of corpus tokens accounted for by the top N words.
610
+ >
611
+ > *Intuition:* Shows how concentrated word usage is. If top-100 words cover 50% of text, the corpus relies heavily on common words.
612
+ >
613
+ > *What to seek:* Top-100 covering 30-50% is typical. Higher coverage indicates more repetitive text; lower suggests richer vocabulary.
614
+
615
+ ### Word Embedding Metrics
616
+
617
+ **Isotropy**
618
+ > *Definition:* Measures how uniformly distributed vectors are in the embedding space. Computed as the ratio of minimum to maximum singular values.
619
+ >
620
+ > *Intuition:* High isotropy (near 1.0) means vectors spread evenly in all directions; low isotropy means vectors cluster in certain directions, reducing expressiveness.
621
+ >
622
+ > *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.
623
+
624
+ **Average Norm**
625
+ > *Definition:* Mean magnitude (L2 norm) of word vectors in the embedding space.
626
+ >
627
+ > *Intuition:* Indicates the typical "length" of vectors. Consistent norms suggest stable training; high variance may indicate some words are undertrained.
628
+ >
629
+ > *What to seek:* Relatively consistent norms across models. The absolute value matters less than consistency (low std deviation).
630
+
631
+ **Cosine Similarity**
632
+ > *Definition:* Measures angular similarity between vectors, ranging from -1 (opposite) to 1 (identical direction).
633
+ >
634
+ > *Intuition:* Words with similar meanings should have high cosine similarity. This is the standard metric for semantic relatedness in embeddings.
635
+ >
636
+ > *What to seek:* Semantically related words should score > 0.5; unrelated words should be near 0. Synonyms often score > 0.7.
637
+
638
+ **t-SNE Visualization**
639
+ > *Definition:* t-Distributed Stochastic Neighbor Embedding - a dimensionality reduction technique that preserves local structure for visualization.
640
+ >
641
+ > *Intuition:* Clusters in t-SNE plots indicate groups of semantically related words. Spread indicates vocabulary diversity; tight clusters suggest semantic coherence.
642
+ >
643
+ > *What to seek:* Meaningful clusters (e.g., numbers together, verbs together). Avoid over-interpreting distances - t-SNE preserves local, not global, structure.
644
+
645
+ ### General Interpretation Guidelines
646
+
647
+ 1. **Compare within model families:** Metrics are most meaningful when comparing models of the same type (e.g., 8k vs 64k tokenizer).
648
+ 2. **Consider trade-offs:** Better performance on one metric often comes at the cost of another (e.g., compression vs. OOV rate).
649
+ 3. **Context matters:** Optimal values depend on downstream tasks. Text generation may prioritize different metrics than classification.
650
+ 4. **Corpus influence:** All metrics are influenced by corpus characteristics. Wikipedia text differs from social media or literature.
651
+ 5. **Language-specific patterns:** Morphologically rich languages (like Arabic) may show different optimal ranges than analytic languages.
652
+
653
+
654
+ ### Visualizations Index
655
+
656
+ | Visualization | Description |
657
+ |---------------|-------------|
658
+ | Tokenizer Compression | Compression ratios by vocabulary size |
659
+ | Tokenizer Fertility | Average token length by vocabulary |
660
+ | Tokenizer OOV | Unknown token rates |
661
+ | Tokenizer Total Tokens | Total tokens by vocabulary |
662
+ | N-gram Perplexity | Perplexity by n-gram size |
663
+ | N-gram Entropy | Entropy by n-gram size |
664
+ | N-gram Coverage | Top pattern coverage |
665
+ | N-gram Unique | Unique n-gram counts |
666
+ | Markov Entropy | Entropy by context size |
667
+ | Markov Branching | Branching factor by context |
668
+ | Markov Contexts | Unique context counts |
669
+ | Zipf's Law | Frequency-rank distribution with fit |
670
+ | Vocab Frequency | Word frequency distribution |
671
+ | Top 20 Words | Most frequent words |
672
+ | Vocab Coverage | Cumulative coverage curve |
673
+ | Embedding Isotropy | Vector space uniformity |
674
+ | Embedding Norms | Vector magnitude distribution |
675
+ | Embedding Similarity | Word similarity heatmap |
676
+ | Nearest Neighbors | Similar words for key terms |
677
+ | t-SNE Words | 2D word embedding visualization |
678
+ | t-SNE Sentences | 2D sentence embedding visualization |
679
+ | Position Encoding | Encoding method comparison |
680
+ | Model Sizes | Storage requirements |
681
+ | Performance Dashboard | Comprehensive performance overview |
682
+
683
+ ---
684
+ 👈 [Back to README](README.md)
685
+
686
+ *Generated by Wikilangs Pipeline · 2026-03-04 14:57:25*
ar_morph_tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
models/embeddings/aligned/ar_128d.bin CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:ef219238cabd8a9ea12da66dbcd80332fbd38875433dc953df85a37a71b899aa
3
- size 2486763168
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a23418872eb4060d92c5a30858431c4a0d120f4313a4677ad9e2337907f80414
3
+ size 1705713534
models/embeddings/aligned/ar_128d.projection.npy CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:2d61b78158be557df612ca2ef8343029b39babaae6f038fcd428534279135917
3
  size 65664
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d27f01e32d46732cff34bb048290910d32d944952b6d6c6066be98c12640f6c2
3
  size 65664
models/embeddings/aligned/ar_128d_metadata.json CHANGED
@@ -3,6 +3,6 @@
3
  "dimension": 128,
4
  "version": "aligned",
5
  "hub_language": "en",
6
- "seed_vocab_size": 200166,
7
- "vocab_size": 1398324
8
  }
 
3
  "dimension": 128,
4
  "version": "aligned",
5
  "hub_language": "en",
6
+ "seed_vocab_size": 77116,
7
+ "vocab_size": 651662
8
  }
models/embeddings/aligned/ar_32d.bin CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:70e78275bfd0f11c47d9f144be703b7d9277b2e2698a9f3c400035b92f124640
3
- size 644850336
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:30a05f3683a9b7bde4c6d30bd4edbfc63345f6c7ee83a0d8a6c90d80224b270d
3
+ size 437237118
models/embeddings/aligned/ar_32d.projection.npy CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:baedb1283a79af0fe218dcef59dcfa703ea3550812bcf17a0edcc064c20d6b39
3
  size 4224
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a98989d89641c5f1cd3758f6c607fe38b791974e69cf7a38a8796868fbd89880
3
  size 4224
models/embeddings/aligned/ar_32d_metadata.json CHANGED
@@ -3,6 +3,6 @@
3
  "dimension": 32,
4
  "version": "aligned",
5
  "hub_language": "en",
6
- "seed_vocab_size": 200166,
7
- "vocab_size": 1398324
8
  }
 
3
  "dimension": 32,
4
  "version": "aligned",
5
  "hub_language": "en",
6
+ "seed_vocab_size": 77116,
7
+ "vocab_size": 651662
8
  }
models/embeddings/aligned/ar_64d.bin CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:02bc5f2f59c273f6f58b680abc0742d269afaafa47c336c6429c6a81304b006c
3
- size 1258821280
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:feb5b0e7bf35dfc12b4304889348f19a160e32236c8ea50ace3714ad06dedda2
3
+ size 860062590
models/embeddings/aligned/ar_64d.projection.npy CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:9efa73eb7ec91ab64fdf021d74e55418d0906b47c6bc624aab5b6a37dbd88bb9
3
  size 16512
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b99ebcc070a11027cca93e3acb53ba76d4eb41fe624d515260d3a6746602381d
3
  size 16512
models/embeddings/aligned/ar_64d_metadata.json CHANGED
@@ -3,6 +3,6 @@
3
  "dimension": 64,
4
  "version": "aligned",
5
  "hub_language": "en",
6
- "seed_vocab_size": 200166,
7
- "vocab_size": 1398324
8
  }
 
3
  "dimension": 64,
4
  "version": "aligned",
5
  "hub_language": "en",
6
+ "seed_vocab_size": 77116,
7
+ "vocab_size": 651662
8
  }
models/embeddings/monolingual/ar_128d.bin CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:ef219238cabd8a9ea12da66dbcd80332fbd38875433dc953df85a37a71b899aa
3
- size 2486763168
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a23418872eb4060d92c5a30858431c4a0d120f4313a4677ad9e2337907f80414
3
+ size 1705713534
models/embeddings/monolingual/ar_128d_metadata.json CHANGED
@@ -9,7 +9,8 @@
9
  "negative": 5,
10
  "epochs": 5,
11
  "encoding_method": "rope",
12
- "dim": 128
 
13
  },
14
- "vocab_size": 1398324
15
  }
 
9
  "negative": 5,
10
  "epochs": 5,
11
  "encoding_method": "rope",
12
+ "dim": 128,
13
+ "threads": 40
14
  },
15
+ "vocab_size": 651662
16
  }
models/embeddings/monolingual/ar_32d.bin CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:70e78275bfd0f11c47d9f144be703b7d9277b2e2698a9f3c400035b92f124640
3
- size 644850336
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:30a05f3683a9b7bde4c6d30bd4edbfc63345f6c7ee83a0d8a6c90d80224b270d
3
+ size 437237118
models/embeddings/monolingual/ar_32d_metadata.json CHANGED
@@ -9,7 +9,8 @@
9
  "negative": 5,
10
  "epochs": 5,
11
  "encoding_method": "rope",
12
- "dim": 32
 
13
  },
14
- "vocab_size": 1398324
15
  }
 
9
  "negative": 5,
10
  "epochs": 5,
11
  "encoding_method": "rope",
12
+ "dim": 32,
13
+ "threads": 40
14
  },
15
+ "vocab_size": 651662
16
  }
models/embeddings/monolingual/ar_64d.bin CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:02bc5f2f59c273f6f58b680abc0742d269afaafa47c336c6429c6a81304b006c
3
- size 1258821280
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:feb5b0e7bf35dfc12b4304889348f19a160e32236c8ea50ace3714ad06dedda2
3
+ size 860062590
models/embeddings/monolingual/ar_64d_metadata.json CHANGED
@@ -9,7 +9,8 @@
9
  "negative": 5,
10
  "epochs": 5,
11
  "encoding_method": "rope",
12
- "dim": 64
 
13
  },
14
- "vocab_size": 1398324
15
  }
 
9
  "negative": 5,
10
  "epochs": 5,
11
  "encoding_method": "rope",
12
+ "dim": 64,
13
+ "threads": 40
14
  },
15
+ "vocab_size": 651662
16
  }
models/subword_markov/ar_markov_ctx1_subword.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:574edae048b28cd710d49d346838e995d3075aa7e9404f1962349f0f2b606f4f
3
- size 1510871
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:695411e3e0fa61a7791e28a45830bee9ac3b8b467563fa3e341cf37c56f9eba9
3
+ size 885004
models/subword_markov/ar_markov_ctx1_subword_metadata.json CHANGED
@@ -2,6 +2,6 @@
2
  "context_size": 1,
3
  "variant": "subword",
4
  "language": "ar",
5
- "unique_contexts": 18570,
6
- "total_transitions": 1931607401
7
  }
 
2
  "context_size": 1,
3
  "variant": "subword",
4
  "language": "ar",
5
+ "unique_contexts": 11477,
6
+ "total_transitions": 570748046
7
  }
models/subword_markov/ar_markov_ctx2_subword.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:4c019e23cfe8e01e37162bcd6b57200033e2d76cdc0cc88a628d6e7fbd6649b8
3
- size 10138087
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:021c447fa0d5480ddaa3f705fc2c2572210793992622f9af98ee6a8103ecd310
3
+ size 5670221
models/subword_markov/ar_markov_ctx2_subword_metadata.json CHANGED
@@ -2,6 +2,6 @@
2
  "context_size": 2,
3
  "variant": "subword",
4
  "language": "ar",
5
- "unique_contexts": 247596,
6
- "total_transitions": 1930342017
7
  }
 
2
  "context_size": 2,
3
  "variant": "subword",
4
  "language": "ar",
5
+ "unique_contexts": 129485,
6
+ "total_transitions": 570548046
7
  }
models/subword_markov/ar_markov_ctx3_subword.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:1ef7a7d5ec14ab20dc8f9e56c4e3c940701ba628aca3d6c03fe556dff843d17d
3
- size 44109485
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0ac54f42aa1f3b3b4d28fd393c117d51f4756740f0b1ce01f5925e6d367d3ad2
3
+ size 24893296
models/subword_markov/ar_markov_ctx3_subword_metadata.json CHANGED
@@ -2,6 +2,6 @@
2
  "context_size": 3,
3
  "variant": "subword",
4
  "language": "ar",
5
- "unique_contexts": 1290623,
6
- "total_transitions": 1929076633
7
  }
 
2
  "context_size": 3,
3
  "variant": "subword",
4
  "language": "ar",
5
+ "unique_contexts": 751177,
6
+ "total_transitions": 570348046
7
  }
models/subword_markov/ar_markov_ctx4_subword.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:f7ee34b80789c6d5441f10ed5482fffa62a5db280978fce263f369b0031fc1f2
3
- size 165497966
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:07694bbe65c76bc4b5517dfd4f4d441fb1e34a96b51bc8787e5cef7f8137044a
3
+ size 91923589
models/subword_markov/ar_markov_ctx4_subword_metadata.json CHANGED
@@ -2,6 +2,6 @@
2
  "context_size": 4,
3
  "variant": "subword",
4
  "language": "ar",
5
- "unique_contexts": 5343485,
6
- "total_transitions": 1927811249
7
  }
 
2
  "context_size": 4,
3
  "variant": "subword",
4
  "language": "ar",
5
+ "unique_contexts": 3113652,
6
+ "total_transitions": 570148046
7
  }
models/subword_ngram/ar_2gram_subword.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:051d0c469791c68d0aab623ee6f2f4956d7da4e670aec6403120a79e8734828f
3
- size 1010043
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:85c8e81a237670dd83f41fca1f4a1cde191e26f9437ee143db0965c7b6d22525
3
+ size 641342
models/subword_ngram/ar_2gram_subword_metadata.json CHANGED
@@ -2,6 +2,6 @@
2
  "n": 2,
3
  "variant": "subword",
4
  "language": "ar",
5
- "unique_ngrams": 70700,
6
- "total_ngrams": 1931607401
7
  }
 
2
  "n": 2,
3
  "variant": "subword",
4
  "language": "ar",
5
+ "unique_ngrams": 44225,
6
+ "total_ngrams": 570748046
7
  }
models/subword_ngram/ar_3gram_subword.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:11567f60179d7d679ac0fe53473a44a51239bc6838cc731298039e543e3539ec
3
- size 7513640
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5f0bc18aeb185668ed8330b530f401a76e72574597f9a070dff414446229d05e
3
+ size 4404735
models/subword_ngram/ar_3gram_subword_metadata.json CHANGED
@@ -2,6 +2,6 @@
2
  "n": 3,
3
  "variant": "subword",
4
  "language": "ar",
5
- "unique_ngrams": 528264,
6
- "total_ngrams": 1930342017
7
  }
 
2
  "n": 3,
3
  "variant": "subword",
4
  "language": "ar",
5
+ "unique_ngrams": 321654,
6
+ "total_ngrams": 570548046
7
  }
models/subword_ngram/ar_4gram_subword.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:cf2ba8cd29e1c4e91b5db8c9a037dd559bec62bb1a44450fe5ffc882168bea52
3
- size 40025731
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2a9da743ee22b7d638bc93633862fccf3d26e98fb0961bdebdb14c96c3e0b076
3
+ size 23078539
models/subword_ngram/ar_4gram_subword_metadata.json CHANGED
@@ -2,6 +2,6 @@
2
  "n": 4,
3
  "variant": "subword",
4
  "language": "ar",
5
- "unique_ngrams": 2851427,
6
- "total_ngrams": 1929076633
7
  }
 
2
  "n": 4,
3
  "variant": "subword",
4
  "language": "ar",
5
+ "unique_ngrams": 1666030,
6
+ "total_ngrams": 570348046
7
  }
models/subword_ngram/ar_5gram_subword.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:4d827290f0e4a08a5ac6ad25f1e75c878bc6b8a34c0c2c90d128f1fea76e05bd
3
- size 139944679
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c2e38dae79bd188be50f4564c8424a813005cafdffd7909810d31a64ed8fda5f
3
+ size 76060564
models/subword_ngram/ar_5gram_subword_metadata.json CHANGED
@@ -2,6 +2,6 @@
2
  "n": 5,
3
  "variant": "subword",
4
  "language": "ar",
5
- "unique_ngrams": 9618770,
6
- "total_ngrams": 1927811249
7
  }
 
2
  "n": 5,
3
  "variant": "subword",
4
  "language": "ar",
5
+ "unique_ngrams": 5324551,
6
+ "total_ngrams": 570148046
7
  }
models/tokenizer/ar_tokenizer_16k.model CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:762cad48886cec152e6e3f7ed18568586bc3c9f4e9953b3185639b108ba8aac0
3
- size 560431
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c2559917c0122732cb2a776d370d5c7e5979c181a37023fd8b41e2c531c89f94
3
+ size 560444
models/tokenizer/ar_tokenizer_16k.vocab CHANGED
The diff for this file is too large to render. See raw diff
 
models/tokenizer/ar_tokenizer_32k.model CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:c76c24bcacf6d2321aead7205693601874ae17f908952dc1038e02c3176e6192
3
- size 898238
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f89d8be50621d034e2113f1db13c6a069ddc5597b020e92abd25bc9eb70abaa9
3
+ size 898267
models/tokenizer/ar_tokenizer_32k.vocab CHANGED
The diff for this file is too large to render. See raw diff
 
models/tokenizer/ar_tokenizer_64k.model CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:f086baad9b6b110330fd920dd11031d9f3ef7f5660ab6ac1c35134bb867b9124
3
- size 1589613
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fb8462b65f3bafaca92b2c52ab2eb99e0e8559caa8a49964b92ada753bb1c34c
3
+ size 1588432
models/tokenizer/ar_tokenizer_64k.vocab CHANGED
The diff for this file is too large to render. See raw diff
 
models/tokenizer/ar_tokenizer_8k.model CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:77f3c2a9fceaccd03fdcfabdbaec3cf8ededb0885e5142dd55eb2decced61240
3
- size 396806
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:39e7834c341171505c74bc358974bcbf01abd8fe6edb43d74f6b93448701eb75
3
+ size 396789
models/tokenizer/ar_tokenizer_8k.vocab CHANGED
The diff for this file is too large to render. See raw diff
 
models/vocabulary/ar_vocabulary.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:b31772fd6a7b4c36fa172ae0fd4a4d5dabd71f58e9966f89680cfe83fda2db9c
3
- size 30017440
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:afd83458fca2ab7172dd960492c27e62334d37aeea40ba7d9310eec0710d83e9
3
+ size 14934604
models/vocabulary/ar_vocabulary_metadata.json CHANGED
@@ -1,17 +1,17 @@
1
  {
2
  "language": "ar",
3
- "vocabulary_size": 1950572,
4
  "variant": "full",
5
  "statistics": {
6
- "type_token_ratio": 0.01377005207307626,
7
  "coverage": {
8
- "top_100": 0.22964907469610985,
9
- "top_1000": 0.4549956533720101,
10
- "top_5000": 0.6553878216380935,
11
- "top_10000": 0.7363291209271269
12
  },
13
- "hapax_count": 2521609,
14
- "hapax_ratio": 0.5638432344308068,
15
- "total_documents": 1265384
16
  }
17
  }
 
1
  {
2
  "language": "ar",
3
+ "vocabulary_size": 986324,
4
  "variant": "full",
5
  "statistics": {
6
+ "type_token_ratio": 0.022798498576049157,
7
  "coverage": {
8
+ "top_100": 0.21751010819733138,
9
+ "top_1000": 0.4283766142532598,
10
+ "top_5000": 0.6275286231012406,
11
+ "top_10000": 0.7122672223562223
12
  },
13
+ "hapax_count": 1204769,
14
+ "hapax_ratio": 0.5498484089903989,
15
+ "total_documents": 200000
16
  }
17
  }
models/word_markov/ar_markov_ctx1_word.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:a9fddcbf1a23594543219647432ec4ead2edb2b2e1de36c8a8f47889080afef7
3
- size 765307915
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:05c13eef003a0e333d4228ebe6db3df097686d981e0730b7e9e17f85ac68e5b4
3
+ size 320610853
models/word_markov/ar_markov_ctx1_word_metadata.json CHANGED
@@ -2,6 +2,6 @@
2
  "context_size": 1,
3
  "variant": "word",
4
  "language": "ar",
5
- "unique_contexts": 4471621,
6
- "total_transitions": 323510512
7
  }
 
2
  "context_size": 1,
3
  "variant": "word",
4
  "language": "ar",
5
+ "unique_contexts": 2190668,
6
+ "total_transitions": 95906899
7
  }
models/word_markov/ar_markov_ctx2_word.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:ebcb89d9a7b0b49e30c58921c6880b16c819b128e34c72ab88840f17104834cc
3
- size 3214329856
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:751d17526f4fb8ef94a12a48dac950e5b876ed04957df675fd3c10e0afcb3e65
3
+ size 1237352806
models/word_markov/ar_markov_ctx2_word_metadata.json CHANGED
@@ -2,6 +2,6 @@
2
  "context_size": 2,
3
  "variant": "word",
4
  "language": "ar",
5
- "unique_contexts": 78540786,
6
- "total_transitions": 322245128
7
  }
 
2
  "context_size": 2,
3
  "variant": "word",
4
  "language": "ar",
5
+ "unique_contexts": 33010787,
6
+ "total_transitions": 95706899
7
  }
models/word_markov/ar_markov_ctx3_word.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:65e1dcc162857b9cb13d2e4b4927f8459f5f7a5a71cad4a8c86909b717912497
3
- size 5738037502
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:866b6fdcbeaf5bbc8ba9ef70c09a4e350967e03711364e04b9306269f150ef0f
3
+ size 2023586391
models/word_markov/ar_markov_ctx3_word_metadata.json CHANGED
@@ -2,6 +2,6 @@
2
  "context_size": 3,
3
  "variant": "word",
4
  "language": "ar",
5
- "unique_contexts": 181002468,
6
- "total_transitions": 320979744
7
  }
 
2
  "context_size": 3,
3
  "variant": "word",
4
  "language": "ar",
5
+ "unique_contexts": 67054969,
6
+ "total_transitions": 95506899
7
  }