Upload all models and assets for ary (latest)
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- README.md +130 -665
- RESEARCH_REPORT.md +688 -0
- ary_morph_tokenizer.json +0 -0
- models/embeddings/aligned/ary_128d.bin +2 -2
- models/embeddings/aligned/ary_128d.projection.npy +1 -1
- models/embeddings/aligned/ary_128d_metadata.json +2 -2
- models/embeddings/aligned/ary_32d.bin +2 -2
- models/embeddings/aligned/ary_32d.projection.npy +1 -1
- models/embeddings/aligned/ary_32d_metadata.json +2 -2
- models/embeddings/aligned/ary_64d.bin +2 -2
- models/embeddings/aligned/ary_64d.projection.npy +1 -1
- models/embeddings/aligned/ary_64d_metadata.json +2 -2
- models/embeddings/monolingual/ary_128d.bin +2 -2
- models/embeddings/monolingual/ary_128d_metadata.json +3 -2
- models/embeddings/monolingual/ary_32d.bin +2 -2
- models/embeddings/monolingual/ary_32d_metadata.json +3 -2
- models/embeddings/monolingual/ary_64d.bin +2 -2
- models/embeddings/monolingual/ary_64d_metadata.json +3 -2
- models/subword_markov/ary_markov_ctx1_subword.parquet +2 -2
- models/subword_markov/ary_markov_ctx1_subword_metadata.json +2 -2
- models/subword_markov/ary_markov_ctx2_subword.parquet +2 -2
- models/subword_markov/ary_markov_ctx2_subword_metadata.json +2 -2
- models/subword_markov/ary_markov_ctx3_subword.parquet +2 -2
- models/subword_markov/ary_markov_ctx3_subword_metadata.json +2 -2
- models/subword_markov/ary_markov_ctx4_subword.parquet +2 -2
- models/subword_markov/ary_markov_ctx4_subword_metadata.json +2 -2
- models/subword_ngram/ary_2gram_subword.parquet +2 -2
- models/subword_ngram/ary_2gram_subword_metadata.json +2 -2
- models/subword_ngram/ary_3gram_subword.parquet +2 -2
- models/subword_ngram/ary_3gram_subword_metadata.json +2 -2
- models/subword_ngram/ary_4gram_subword.parquet +2 -2
- models/subword_ngram/ary_4gram_subword_metadata.json +2 -2
- models/subword_ngram/ary_5gram_subword.parquet +2 -2
- models/subword_ngram/ary_5gram_subword_metadata.json +2 -2
- models/tokenizer/ary_tokenizer_16k.model +2 -2
- models/tokenizer/ary_tokenizer_16k.vocab +0 -0
- models/tokenizer/ary_tokenizer_32k.model +2 -2
- models/tokenizer/ary_tokenizer_32k.vocab +0 -0
- models/tokenizer/ary_tokenizer_64k.model +2 -2
- models/tokenizer/ary_tokenizer_64k.vocab +0 -0
- models/tokenizer/ary_tokenizer_8k.model +2 -2
- models/tokenizer/ary_tokenizer_8k.vocab +0 -0
- models/vocabulary/ary_vocabulary.parquet +2 -2
- models/vocabulary/ary_vocabulary_metadata.json +9 -9
- models/word_markov/ary_markov_ctx1_word.parquet +2 -2
- models/word_markov/ary_markov_ctx1_word_metadata.json +2 -2
- models/word_markov/ary_markov_ctx2_word.parquet +2 -2
- models/word_markov/ary_markov_ctx2_word_metadata.json +2 -2
- models/word_markov/ary_markov_ctx3_word.parquet +2 -2
- models/word_markov/ary_markov_ctx3_word_metadata.json +2 -2
README.md
CHANGED
|
@@ -33,733 +33,198 @@ dataset_info:
|
|
| 33 |
metrics:
|
| 34 |
- name: best_compression_ratio
|
| 35 |
type: compression
|
| 36 |
-
value: 4.
|
| 37 |
- name: best_isotropy
|
| 38 |
type: isotropy
|
| 39 |
-
value: 0.
|
|
|
|
|
|
|
|
|
|
| 40 |
- name: vocabulary_size
|
| 41 |
type: vocab
|
| 42 |
-
value:
|
| 43 |
-
generated: 2026-
|
| 44 |
---
|
| 45 |
|
| 46 |
-
# Moroccan Arabic
|
| 47 |
-
## Comprehensive Research Report & Full Ablation Study
|
| 48 |
|
| 49 |
-
|
| 50 |
-
We analyze tokenizers, n-gram models, Markov chains, vocabulary statistics, and word embeddings.
|
| 51 |
|
| 52 |
-
|
| 53 |
|
| 54 |
-
##
|
| 55 |
|
| 56 |
-
|
| 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 |
-
|
| 65 |
|
| 66 |
-
|
| 67 |
|
| 68 |
-
|
| 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 |
-
|
| 82 |
|
| 83 |
-
|
| 84 |
|
| 85 |
-
|
| 86 |
|
| 87 |
-
|
|
|
|
| 88 |
|
| 89 |
-
|
|
|
|
| 90 |
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
| **16k** | 3.753x | 3.76 | 0.0981% | 278,271 |
|
| 95 |
-
| **32k** | 3.983x | 3.99 | 0.1041% | 262,209 |
|
| 96 |
-
| **64k** | 4.171x 🏆 | 4.18 | 0.1090% | 250,397 |
|
| 97 |
|
| 98 |
-
#
|
|
|
|
| 99 |
|
| 100 |
-
|
|
|
|
|
|
|
| 101 |
|
| 102 |
-
|
|
|
|
|
|
|
|
|
|
| 103 |
|
| 104 |
| Vocab | Tokens | Count |
|
| 105 |
|-------|--------|-------|
|
| 106 |
-
| 8k | `▁
|
| 107 |
-
| 16k | `▁
|
| 108 |
-
| 32k | `▁ه
|
| 109 |
-
| 64k | `▁ه
|
| 110 |
|
| 111 |
-
**Sample 2:** `
|
| 112 |
|
| 113 |
| Vocab | Tokens | Count |
|
| 114 |
|-------|--------|-------|
|
| 115 |
-
| 8k | `▁ل
|
| 116 |
-
| 16k | `▁ل
|
| 117 |
-
| 32k | `▁ل
|
| 118 |
-
| 64k | `▁ل
|
| 119 |
|
| 120 |
-
**Sample 3:** `
|
| 121 |
|
| 122 |
| Vocab | Tokens | Count |
|
| 123 |
|-------|--------|-------|
|
| 124 |
-
| 8k | `▁
|
| 125 |
-
| 16k | `▁
|
| 126 |
-
| 32k | `▁
|
| 127 |
-
| 64k | `▁
|
| 128 |
-
|
| 129 |
-
|
| 130 |
-
### Key Findings
|
| 131 |
-
|
| 132 |
-
- **Best Compression:** 64k achieves 4.171x compression
|
| 133 |
-
- **Lowest UNK Rate:** 8k with 0.0910% 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 |
-

|
| 141 |
-
|
| 142 |
-

|
| 143 |
-
|
| 144 |
-

|
| 145 |
-
|
| 146 |
-
### Results
|
| 147 |
-
|
| 148 |
-
| N-gram | Variant | Perplexity | Entropy | Unique N-grams | Top-100 Coverage | Top-1000 Coverage |
|
| 149 |
-
|--------|---------|------------|---------|----------------|------------------|-------------------|
|
| 150 |
-
| **2-gram** | Word | 7,228 | 12.82 | 39,512 | 23.0% | 50.8% |
|
| 151 |
-
| **2-gram** | Subword | 424 🏆 | 8.73 | 5,903 | 58.0% | 96.4% |
|
| 152 |
-
| **3-gram** | Word | 5,655 | 12.47 | 43,555 | 27.5% | 57.1% |
|
| 153 |
-
| **3-gram** | Subword | 3,784 | 11.89 | 44,651 | 23.1% | 60.7% |
|
| 154 |
-
| **4-gram** | Word | 7,985 | 12.96 | 70,559 | 27.5% | 53.6% |
|
| 155 |
-
| **4-gram** | Subword | 20,064 | 14.29 | 220,807 | 12.0% | 36.0% |
|
| 156 |
-
| **5-gram** | Word | 7,565 | 12.89 | 58,964 | 28.5% | 52.9% |
|
| 157 |
-
| **5-gram** | Subword | 62,379 | 15.93 | 527,725 | 7.3% | 25.0% |
|
| 158 |
-
|
| 159 |
-
### Top 5 N-grams by Size
|
| 160 |
-
|
| 161 |
-
**2-grams (Word):**
|
| 162 |
-
|
| 163 |
-
| Rank | N-gram | Count |
|
| 164 |
-
|------|--------|-------|
|
| 165 |
-
| 1 | `واصلة ل` | 8,540 |
|
| 166 |
-
| 2 | `نسبة د` | 7,170 |
|
| 167 |
-
| 3 | `ف لمغريب` | 6,305 |
|
| 168 |
-
| 4 | `ف إقليم` | 6,018 |
|
| 169 |
-
| 5 | `ف نسبة` | 4,265 |
|
| 170 |
-
|
| 171 |
-
**3-grams (Word):**
|
| 172 |
-
|
| 173 |
-
| Rank | N-gram | Count |
|
| 174 |
-
|------|--------|-------|
|
| 175 |
-
| 1 | `ف نسبة د` | 4,264 |
|
| 176 |
-
| 2 | `فيها مصدر و` | 3,236 |
|
| 177 |
-
| 3 | `و نسبة د` | 2,894 |
|
| 178 |
-
| 4 | `مصدر و بايت` | 2,856 |
|
| 179 |
-
| 5 | `اللي خدامين ف` | 2,760 |
|
| 180 |
-
|
| 181 |
-
**4-grams (Word):**
|
| 182 |
-
|
| 183 |
-
| Rank | N-gram | Count |
|
| 184 |
-
|------|--------|-------|
|
| 185 |
-
| 1 | `فيها مصدر و بايت` | 2,856 |
|
| 186 |
-
| 2 | `نسبة نّاس اللي خدامين` | 2,705 |
|
| 187 |
-
| 3 | `نّاس اللي خدامين ف` | 2,594 |
|
| 188 |
-
| 4 | `على حساب لإحصاء الرسمي` | 2,501 |
|
| 189 |
-
| 5 | `حساب لإحصاء الرسمي د` | 2,500 |
|
| 190 |
-
|
| 191 |
-
**5-grams (Word):**
|
| 192 |
-
|
| 193 |
-
| Rank | N-gram | Count |
|
| 194 |
-
|------|--------|-------|
|
| 195 |
-
| 1 | `نسبة نّاس اللي خدامين ف` | 2,593 |
|
| 196 |
-
| 2 | `ف لمغريب هاد دّوار كينتامي` | 2,500 |
|
| 197 |
-
| 3 | `هاد دّوار كينتامي ل مشيخة` | 2,500 |
|
| 198 |
-
| 4 | `لمغريب هاد دّوار كينتامي ل` | 2,500 |
|
| 199 |
-
| 5 | `حساب لإحصاء الرسمي د عام` | 2,500 |
|
| 200 |
-
|
| 201 |
-
**2-grams (Subword):**
|
| 202 |
-
|
| 203 |
-
| Rank | N-gram | Count |
|
| 204 |
-
|------|--------|-------|
|
| 205 |
-
| 1 | `ا ل` | 347,466 |
|
| 206 |
-
| 2 | `_ ل` | 278,371 |
|
| 207 |
-
| 3 | `ة _` | 229,442 |
|
| 208 |
-
| 4 | `_ ا` | 220,960 |
|
| 209 |
-
| 5 | `_ م` | 156,801 |
|
| 210 |
-
|
| 211 |
-
**3-grams (Subword):**
|
| 212 |
-
|
| 213 |
-
| Rank | N-gram | Count |
|
| 214 |
-
|------|--------|-------|
|
| 215 |
-
| 1 | `_ ا ل` | 216,048 |
|
| 216 |
-
| 2 | `_ ف _` | 83,146 |
|
| 217 |
-
| 3 | `ا ت _` | 63,800 |
|
| 218 |
-
| 4 | `ي ة _` | 60,271 |
|
| 219 |
-
| 5 | `_ د _` | 59,563 |
|
| 220 |
-
|
| 221 |
-
**4-grams (Subword):**
|
| 222 |
-
|
| 223 |
-
| Rank | N-gram | Count |
|
| 224 |
-
|------|--------|-------|
|
| 225 |
-
| 1 | `_ د ي ا` | 47,798 |
|
| 226 |
-
| 2 | `د ي ا ل` | 47,559 |
|
| 227 |
-
| 3 | `ي ا ل _` | 33,039 |
|
| 228 |
-
| 4 | `د _ ا ل` | 32,831 |
|
| 229 |
-
| 5 | `_ م ن _` | 28,909 |
|
| 230 |
-
|
| 231 |
-
**5-grams (Subword):**
|
| 232 |
-
|
| 233 |
-
| Rank | N-gram | Count |
|
| 234 |
-
|------|--------|-------|
|
| 235 |
-
| 1 | `_ د ي ا ل` | 47,427 |
|
| 236 |
-
| 2 | `د ي ا ل _` | 32,608 |
|
| 237 |
-
| 3 | `_ ع ل ى _` | 19,473 |
|
| 238 |
-
| 4 | `_ ا ل ل ي` | 18,967 |
|
| 239 |
-
| 5 | `ا ل ل ي _` | 18,744 |
|
| 240 |
-
|
| 241 |
-
|
| 242 |
-
### Key Findings
|
| 243 |
-
|
| 244 |
-
- **Best Perplexity:** 2-gram (subword) with 424
|
| 245 |
-
- **Entropy Trend:** Decreases with larger n-grams (more predictable)
|
| 246 |
-
- **Coverage:** Top-1000 patterns cover ~25% of corpus
|
| 247 |
-
- **Recommendation:** 4-gram or 5-gram for best predictive performance
|
| 248 |
-
|
| 249 |
-
---
|
| 250 |
-
## 3. Markov Chain Evaluation
|
| 251 |
-
|
| 252 |
-

|
| 253 |
-
|
| 254 |
-

|
| 255 |
-
|
| 256 |
-

|
| 257 |
-
|
| 258 |
-
### Results
|
| 259 |
-
|
| 260 |
-
| Context | Variant | Avg Entropy | Perplexity | Branching Factor | Unique Contexts | Predictability |
|
| 261 |
-
|---------|---------|-------------|------------|------------------|-----------------|----------------|
|
| 262 |
-
| **1** | Word | 0.8561 | 1.810 | 5.38 | 178,865 | 14.4% |
|
| 263 |
-
| **1** | Subword | 1.1236 | 2.179 | 8.36 | 2,156 | 0.0% |
|
| 264 |
-
| **2** | Word | 0.2259 | 1.169 | 1.49 | 962,233 | 77.4% |
|
| 265 |
-
| **2** | Subword | 0.8160 | 1.761 | 5.10 | 18,029 | 18.4% |
|
| 266 |
-
| **3** | Word | 0.0618 | 1.044 | 1.10 | 1,431,084 | 93.8% |
|
| 267 |
-
| **3** | Subword | 0.8022 | 1.744 | 4.13 | 91,858 | 19.8% |
|
| 268 |
-
| **4** | Word | 0.0208 🏆 | 1.015 | 1.04 | 1,574,083 | 97.9% |
|
| 269 |
-
| **4** | Subword | 0.6604 | 1.581 | 2.86 | 379,445 | 34.0% |
|
| 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. `ف لمغريب فيها 5 463 462 461 كم من غير ب شبه منقّر مكررعبد المسيح في`
|
| 278 |
-
2. `و أداب روسيا ف لمغريب ف وقت مابين اللغات الرسمية ديال حيزب لإستقلال تا سينيما ليها`
|
| 279 |
-
3. `د الناس فليبيا اكتشفو أنه يتقتل ولكن بقات كتلعب فالتيران ديال هاد الريحلة معا لمونتاخاب و`
|
| 280 |
-
|
| 281 |
-
**Context Size 2:**
|
| 282 |
-
|
| 283 |
-
1. `واصلة ل 98 6 و عدد لفاميلات تزاد ب 81 6 و نسبة د الناس و لمحيط`
|
| 284 |
-
2. `نسبة د الشوماج واصلة ل 21 12 نوطات مصادر ف لمغريب جّبل معروف عند الصامويين حتال ليوم`
|
| 285 |
-
3. `ف لمغريب هاد دّوار كينتامي ل مشيخة سدي حمد الدغوغي لي كتضم 14 د دّواور لعاداد د`
|
| 286 |
-
|
| 287 |
-
**Context Size 3:**
|
| 288 |
-
|
| 289 |
-
1. `ف نسبة د التسكويل واصلة ل 91 89 و نسبة د الشوماج واصلة ل 7 6 و لخصوبة`
|
| 290 |
-
2. `فيها مصدر و بايت زادهوم داريجابوت حيين مغاربا د لقرن 21 مغاربا مغاربا فيها مصدر و بايت زادهوم`
|
| 291 |
-
3. `و نسبة د لأمية واصلة ل 53 4 و نسبة د لأمية واصلة ل 92 5 و نسبة`
|
| 292 |
-
|
| 293 |
-
**Context Size 4:**
|
| 294 |
-
|
| 295 |
-
1. `نسبة نّاس اللي خدامين ف دّولة ولا لبيطاليين اللي سبق ليهوم خدمو 44 3 نسبة نّاس اللي خدامين ف`
|
| 296 |
-
2. `نّاس اللي خدامين ف لپريڤي ولا لبيطاليين اللي سبق ليهوم مصادر الدار البيضاء سطات قروية ف إقليم سطات ق...`
|
| 297 |
-
3. `على حساب لإحصاء الرسمي د عام إحصائيات إحصائيات عامة عدد السكان ديال أورسفان نقص ب 30 7 و عدد`
|
| 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. `ة_27_نت،_خري_د_لج`
|
| 315 |
-
|
| 316 |
-
**Context Size 3:**
|
| 317 |
|
| 318 |
-
|
| 319 |
-
2. `_ف_موقريب._الدفايي`
|
| 320 |
-
3. `ات_ف_البالشخصياتول`
|
| 321 |
|
| 322 |
-
|
| 323 |
|
| 324 |
-
|
| 325 |
-
|
| 326 |
-
3. `يال_تعرّض_للحزب_الوه`
|
| 327 |
|
|
|
|
|
|
|
| 328 |
|
| 329 |
-
|
| 330 |
-
|
| 331 |
-
|
| 332 |
-
|
| 333 |
-
- **Memory Trade-off:** Larger contexts require more storage (379,445 contexts)
|
| 334 |
-
- **Recommendation:** Context-3 or Context-4 for text generation
|
| 335 |
-
|
| 336 |
-
---
|
| 337 |
-
## 4. Vocabulary Analysis
|
| 338 |
-
|
| 339 |
-

|
| 340 |
-
|
| 341 |
-

|
| 342 |
-
|
| 343 |
-

|
| 344 |
-
|
| 345 |
-
### Statistics
|
| 346 |
-
|
| 347 |
-
| Metric | Value |
|
| 348 |
-
|--------|-------|
|
| 349 |
-
| Vocabulary Size | 78,779 |
|
| 350 |
-
| Total Tokens | 2,032,841 |
|
| 351 |
-
| Mean Frequency | 25.80 |
|
| 352 |
-
| Median Frequency | 4 |
|
| 353 |
-
| Frequency Std Dev | 515.92 |
|
| 354 |
-
|
| 355 |
-
### Most Common Words
|
| 356 |
-
|
| 357 |
-
| Rank | Word | Frequency |
|
| 358 |
-
|------|------|-----------|
|
| 359 |
-
| 1 | ف | 83,458 |
|
| 360 |
-
| 2 | و | 59,829 |
|
| 361 |
-
| 3 | د | 59,731 |
|
| 362 |
-
| 4 | ديال | 32,565 |
|
| 363 |
-
| 5 | من | 29,236 |
|
| 364 |
-
| 6 | ل | 23,572 |
|
| 365 |
-
| 7 | على | 19,570 |
|
| 366 |
-
| 8 | لي | 18,402 |
|
| 367 |
-
| 9 | اللي | 17,442 |
|
| 368 |
-
| 10 | ب | 17,233 |
|
| 369 |
-
|
| 370 |
-
### Least Common Words (from vocabulary)
|
| 371 |
-
|
| 372 |
-
| Rank | Word | Frequency |
|
| 373 |
-
|------|------|-----------|
|
| 374 |
-
| 1 | بوفوار | 2 |
|
| 375 |
-
| 2 | بيتسي | 2 |
|
| 376 |
-
| 3 | وصانعي | 2 |
|
| 377 |
-
| 4 | وأهميتها | 2 |
|
| 378 |
-
| 5 | بورديو | 2 |
|
| 379 |
-
| 6 | بلومر | 2 |
|
| 380 |
-
| 7 | مقترحة | 2 |
|
| 381 |
-
| 8 | anchor | 2 |
|
| 382 |
-
| 9 | بعصبة | 2 |
|
| 383 |
-
| 10 | ماڭي | 2 |
|
| 384 |
-
|
| 385 |
-
### Zipf's Law Analysis
|
| 386 |
-
|
| 387 |
-
| Metric | Value |
|
| 388 |
-
|--------|-------|
|
| 389 |
-
| Zipf Coefficient | 1.0213 |
|
| 390 |
-
| R² (Goodness of Fit) | 0.998918 |
|
| 391 |
-
| Adherence Quality | **excellent** |
|
| 392 |
-
|
| 393 |
-
### Coverage Analysis
|
| 394 |
-
|
| 395 |
-
| Top N Words | Coverage |
|
| 396 |
-
|-------------|----------|
|
| 397 |
-
| Top 100 | 38.6% |
|
| 398 |
-
| Top 1,000 | 62.9% |
|
| 399 |
-
| Top 5,000 | 77.8% |
|
| 400 |
-
| Top 10,000 | 84.2% |
|
| 401 |
-
|
| 402 |
-
### Key Findings
|
| 403 |
-
|
| 404 |
-
- **Zipf Compliance:** R²=0.9989 indicates excellent adherence to Zipf's law
|
| 405 |
-
- **High Frequency Dominance:** Top 100 words cover 38.6% of corpus
|
| 406 |
-
- **Long Tail:** 68,779 words needed for remaining 15.8% coverage
|
| 407 |
-
|
| 408 |
-
---
|
| 409 |
-
## 5. Word Embeddings Evaluation
|
| 410 |
-
|
| 411 |
-

|
| 412 |
-
|
| 413 |
-

|
| 414 |
-
|
| 415 |
-

|
| 416 |
-
|
| 417 |
-

|
| 418 |
-
|
| 419 |
-
|
| 420 |
-
### 5.1 Cross-Lingual Alignment
|
| 421 |
-
|
| 422 |
-

|
| 423 |
-
|
| 424 |
-

|
| 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.8284 🏆 | 0.3330 | N/A | N/A |
|
| 432 |
-
| **mono_64d** | 64 | 0.8181 | 0.2588 | N/A | N/A |
|
| 433 |
-
| **mono_128d** | 128 | 0.7036 | 0.2093 | N/A | N/A |
|
| 434 |
-
| **aligned_32d** | 32 | 0.8284 | 0.3345 | 0.0180 | 0.1360 |
|
| 435 |
-
| **aligned_64d** | 64 | 0.8181 | 0.2550 | 0.0380 | 0.1760 |
|
| 436 |
-
| **aligned_128d** | 128 | 0.7036 | 0.2072 | 0.0620 | 0.2760 |
|
| 437 |
|
| 438 |
-
###
|
| 439 |
|
| 440 |
-
|
| 441 |
-
|
| 442 |
-
- **Alignment Quality:** Aligned models achieve up to 6.2% R@1 in cross-lingual retrieval.
|
| 443 |
-
- **Recommendation:** 128d aligned for best cross-lingual performance
|
| 444 |
|
| 445 |
-
|
| 446 |
-
|
| 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 | **1.114** | High formulaic/idiomatic 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 |
-
#### Productive Suffixes
|
| 469 |
-
| Suffix | Examples |
|
| 470 |
-
|--------|----------|
|
| 471 |
-
| `-ة` | سميّة, رقصة, اللحظة |
|
| 472 |
-
| `-ات` | سطراتيجيات, الفيرمات, لحتيفالات |
|
| 473 |
-
| `-ية` | الشرقية, اللاجنسية, ولوسطانية |
|
| 474 |
-
| `-ين` | لمتعصبين, ثنين, لمالحين |
|
| 475 |
-
|
| 476 |
-
### 6.3 Bound Stems (Lexical Roots)
|
| 477 |
-
|
| 478 |
-
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.
|
| 479 |
-
|
| 480 |
-
| Stem | Cohesion | Substitutability | Examples |
|
| 481 |
-
|------|----------|------------------|----------|
|
| 482 |
-
| `انية` | 1.80x | 68 contexts | غانية, ثانية, سانية |
|
| 483 |
-
| `اللو` | 1.74x | 61 contexts | اللوه, اللور, اللول |
|
| 484 |
-
| `الات` | 1.71x | 65 contexts | تالات, حالات, صالات |
|
| 485 |
-
| `جماع` | 1.90x | 38 contexts | جماعي, تجماع, إجماع |
|
| 486 |
-
| `النا` | 1.63x | 63 contexts | الناي, النار, الناس |
|
| 487 |
-
| `لمغر` | 1.92x | 30 contexts | لمغرب, لمغربب, للمغرب |
|
| 488 |
-
| `إحصا` | 2.13x | 17 contexts | إحصاء, لإحصا, إحصائي |
|
| 489 |
-
| `مغري` | 2.08x | 18 contexts | مغريب, مغرية, مغريبي |
|
| 490 |
-
| `حصاء` | 2.24x | 14 contexts | إحصاء, لإحصاء, ليحصاء |
|
| 491 |
-
| `دهوم` | 2.14x | 16 contexts | ضدهوم, يردهوم, زادهوم |
|
| 492 |
-
| `قليم` | 2.06x | 17 contexts | فقليم, اقليم, إقليم |
|
| 493 |
-
| `لجوا` | 1.77x | 26 contexts | لجواب, لجواد, الجوا |
|
| 494 |
-
|
| 495 |
-
### 6.4 Affix Compatibility (Co-occurrence)
|
| 496 |
-
|
| 497 |
-
This table shows which prefixes and suffixes most frequently co-occur on the same stems, revealing the 'stacking' rules of the language's morphology.
|
| 498 |
-
|
| 499 |
-
| Prefix | Suffix | Frequency | Examples |
|
| 500 |
-
|--------|--------|-----------|----------|
|
| 501 |
-
| `-ال` | `-ة` | 280 words | الراكوبة, العمدة |
|
| 502 |
-
| `-ال` | `-ات` | 163 words | الشلالات, العبرات |
|
| 503 |
-
| `-ال` | `-ية` | 152 words | الزراعية, الطباشيرية |
|
| 504 |
-
| `-ال` | `-ين` | 76 words | الموحدين, الاثنين |
|
| 505 |
-
| `-لم` | `-ة` | 66 words | لمملكة, لمُحمدية |
|
| 506 |
-
| `-لم` | `-ين` | 45 words | لموناضيلين, لمعتقلين |
|
| 507 |
-
| `-لم` | `-ات` | 25 words | لمونضّامات, لممرات |
|
| 508 |
-
| `-لم` | `-ية` | 21 words | لمُحمدية, لمراكشية |
|
| 509 |
-
| `-كا` | `-ين` | 2 words | كايسين, كاتبين |
|
| 510 |
-
|
| 511 |
-
### 6.5 Recursive Morpheme Segmentation
|
| 512 |
-
|
| 513 |
-
Using **Recursive Hierarchical Substitutability**, we decompose complex words into their constituent morphemes. This approach handles nested affixes (e.g., `prefix-prefix-root-suffix`).
|
| 514 |
-
|
| 515 |
-
| Word | Suggested Split | Confidence | Stem |
|
| 516 |
-
|------|-----------------|------------|------|
|
| 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 |
-
| التلفزيونية | **`ال-تلفزيون-ية`** | 6.0 | `تلفزيون` |
|
| 532 |
-
|
| 533 |
-
### 6.6 Linguistic Interpretation
|
| 534 |
-
|
| 535 |
-
> **Automated Insight:**
|
| 536 |
-
The language Moroccan Arabic shows high morphological productivity. The subword models are significantly more efficient than word models, suggesting a rich system of affixation or compounding.
|
| 537 |
-
|
| 538 |
-
> **Note on Idiomaticity:** The high Idiomaticity Gap suggests a large number of frequent multi-word expressions or formulaic sequences that are statistically distinct from their component parts.
|
| 539 |
|
| 540 |
-
|
| 541 |
-
## 7. Summary & Recommendations
|
| 542 |
|
| 543 |

|
| 544 |
|
| 545 |
-
|
| 546 |
-
|
| 547 |
-
|
|
| 548 |
-
|-
|
| 549 |
-
|
|
| 550 |
-
|
|
| 551 |
-
|
|
| 552 |
-
|
|
| 553 |
-
|
| 554 |
-
|
| 555 |
-
|
| 556 |
-
|
| 557 |
-
|
| 558 |
-
|
| 559 |
-
|
| 560 |
-
|
| 561 |
-
|
| 562 |
-
|
| 563 |
-
|
| 564 |
-
|
| 565 |
-
|
| 566 |
-
|
| 567 |
-
|
| 568 |
-
|
| 569 |
-
|
| 570 |
-
|
| 571 |
-
|
| 572 |
-
|
| 573 |
-
|
| 574 |
-
|
| 575 |
-
|
| 576 |
-
|
| 577 |
-
|
| 578 |
-
|
| 579 |
-
|
| 580 |
-
|
| 581 |
-
|
| 582 |
-
|
| 583 |
-
|
| 584 |
-
|
| 585 |
-
|
| 586 |
-
|
| 587 |
-
|
| 588 |
-
|
| 589 |
-
|
| 590 |
-
|
| 591 |
-
|
| 592 |
-
**Entropy**
|
| 593 |
-
> *Definition:* Average information content (in bits) needed to encode the next token given the context. Related to perplexity: perplexity = 2^entropy.
|
| 594 |
-
>
|
| 595 |
-
> *Intuition:* High entropy means high uncertainty/randomness; low entropy means predictable patterns. Natural language typically has entropy between 1-4 bits per character.
|
| 596 |
-
>
|
| 597 |
-
> *What to seek:* Lower entropy indicates more predictable text patterns. Entropy should decrease as n-gram size increases.
|
| 598 |
-
|
| 599 |
-
**Coverage (Top-K)**
|
| 600 |
-
> *Definition:* Percentage of corpus occurrences explained by the top K most frequent n-grams.
|
| 601 |
-
>
|
| 602 |
-
> *Intuition:* High coverage with few patterns indicates repetitive/formulaic text; low coverage suggests diverse vocabulary usage.
|
| 603 |
-
>
|
| 604 |
-
> *What to seek:* Depends on use case. For language modeling, moderate coverage (40-60% with top-1000) is typical for natural text.
|
| 605 |
-
|
| 606 |
-
### Markov Chain Metrics
|
| 607 |
-
|
| 608 |
-
**Average Entropy**
|
| 609 |
-
> *Definition:* Mean entropy across all contexts, measuring average uncertainty in next-word prediction.
|
| 610 |
-
>
|
| 611 |
-
> *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).
|
| 612 |
-
>
|
| 613 |
-
> *What to seek:* Decreasing entropy with larger context sizes. Very low entropy (<0.1) indicates highly deterministic transitions.
|
| 614 |
-
|
| 615 |
-
**Branching Factor**
|
| 616 |
-
> *Definition:* Average number of unique next tokens observed for each context.
|
| 617 |
-
>
|
| 618 |
-
> *Intuition:* High branching = many possible continuations (flexible but uncertain); low branching = few options (predictable but potentially repetitive).
|
| 619 |
-
>
|
| 620 |
-
> *What to seek:* Branching factor should decrease with context size. Values near 1.0 indicate nearly deterministic chains.
|
| 621 |
-
|
| 622 |
-
**Predictability**
|
| 623 |
-
> *Definition:* Derived metric: (1 - normalized_entropy) × 100%. Indicates how deterministic the model's predictions are.
|
| 624 |
-
>
|
| 625 |
-
> *Intuition:* 100% predictability means the next word is always certain; 0% means completely random. Real text falls between these extremes.
|
| 626 |
-
>
|
| 627 |
-
> *What to seek:* Higher predictability for text generation quality, but too high (>98%) may produce repetitive output.
|
| 628 |
-
|
| 629 |
-
### Vocabulary & Zipf's Law Metrics
|
| 630 |
-
|
| 631 |
-
**Zipf's Coefficient**
|
| 632 |
-
> *Definition:* The slope of the log-log plot of word frequency vs. rank. Zipf's law predicts this should be approximately -1.
|
| 633 |
-
>
|
| 634 |
-
> *Intuition:* A coefficient near -1 indicates the corpus follows natural language patterns where a few words are very common and most words are rare.
|
| 635 |
-
>
|
| 636 |
-
> *What to seek:* Values between -0.8 and -1.2 indicate healthy natural language distribution. Deviations may suggest domain-specific or artificial text.
|
| 637 |
-
|
| 638 |
-
**R² (Coefficient of Determination)**
|
| 639 |
-
> *Definition:* Measures how well the linear fit explains the frequency-rank relationship. Ranges from 0 to 1.
|
| 640 |
-
>
|
| 641 |
-
> *Intuition:* R² near 1.0 means the data closely follows Zipf's law; lower values indicate deviation from expected word frequency patterns.
|
| 642 |
-
>
|
| 643 |
-
> *What to seek:* R² > 0.95 is excellent; > 0.99 indicates near-perfect Zipf adherence typical of large natural corpora.
|
| 644 |
-
|
| 645 |
-
**Vocabulary Coverage**
|
| 646 |
-
> *Definition:* Cumulative percentage of corpus tokens accounted for by the top N words.
|
| 647 |
-
>
|
| 648 |
-
> *Intuition:* Shows how concentrated word usage is. If top-100 words cover 50% of text, the corpus relies heavily on common words.
|
| 649 |
-
>
|
| 650 |
-
> *What to seek:* Top-100 covering 30-50% is typical. Higher coverage indicates more repetitive text; lower suggests richer vocabulary.
|
| 651 |
-
|
| 652 |
-
### Word Embedding Metrics
|
| 653 |
-
|
| 654 |
-
**Isotropy**
|
| 655 |
-
> *Definition:* Measures how uniformly distributed vectors are in the embedding space. Computed as the ratio of minimum to maximum singular values.
|
| 656 |
-
>
|
| 657 |
-
> *Intuition:* High isotropy (near 1.0) means vectors spread evenly in all directions; low isotropy means vectors cluster in certain directions, reducing expressiveness.
|
| 658 |
-
>
|
| 659 |
-
> *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.
|
| 660 |
-
|
| 661 |
-
**Average Norm**
|
| 662 |
-
> *Definition:* Mean magnitude (L2 norm) of word vectors in the embedding space.
|
| 663 |
-
>
|
| 664 |
-
> *Intuition:* Indicates the typical "length" of vectors. Consistent norms suggest stable training; high variance may indicate some words are undertrained.
|
| 665 |
-
>
|
| 666 |
-
> *What to seek:* Relatively consistent norms across models. The absolute value matters less than consistency (low std deviation).
|
| 667 |
-
|
| 668 |
-
**Cosine Similarity**
|
| 669 |
-
> *Definition:* Measures angular similarity between vectors, ranging from -1 (opposite) to 1 (identical direction).
|
| 670 |
-
>
|
| 671 |
-
> *Intuition:* Words with similar meanings should have high cosine similarity. This is the standard metric for semantic relatedness in embeddings.
|
| 672 |
-
>
|
| 673 |
-
> *What to seek:* Semantically related words should score > 0.5; unrelated words should be near 0. Synonyms often score > 0.7.
|
| 674 |
-
|
| 675 |
-
**t-SNE Visualization**
|
| 676 |
-
> *Definition:* t-Distributed Stochastic Neighbor Embedding - a dimensionality reduction technique that preserves local structure for visualization.
|
| 677 |
-
>
|
| 678 |
-
> *Intuition:* Clusters in t-SNE plots indicate groups of semantically related words. Spread indicates vocabulary diversity; tight clusters suggest semantic coherence.
|
| 679 |
-
>
|
| 680 |
-
> *What to seek:* Meaningful clusters (e.g., numbers together, verbs together). Avoid over-interpreting distances - t-SNE preserves local, not global, structure.
|
| 681 |
-
|
| 682 |
-
### General Interpretation Guidelines
|
| 683 |
-
|
| 684 |
-
1. **Compare within model families:** Metrics are most meaningful when comparing models of the same type (e.g., 8k vs 64k tokenizer).
|
| 685 |
-
2. **Consider trade-offs:** Better performance on one metric often comes at the cost of another (e.g., compression vs. OOV rate).
|
| 686 |
-
3. **Context matters:** Optimal values depend on downstream tasks. Text generation may prioritize different metrics than classification.
|
| 687 |
-
4. **Corpus influence:** All metrics are influenced by corpus characteristics. Wikipedia text differs from social media or literature.
|
| 688 |
-
5. **Language-specific patterns:** Morphologically rich languages (like Arabic) may show different optimal ranges than analytic languages.
|
| 689 |
-
|
| 690 |
-
|
| 691 |
-
### Visualizations Index
|
| 692 |
-
|
| 693 |
-
| Visualization | Description |
|
| 694 |
-
|---------------|-------------|
|
| 695 |
-
| Tokenizer Compression | Compression ratios by vocabulary size |
|
| 696 |
-
| Tokenizer Fertility | Average token length by vocabulary |
|
| 697 |
-
| Tokenizer OOV | Unknown token rates |
|
| 698 |
-
| Tokenizer Total Tokens | Total tokens by vocabulary |
|
| 699 |
-
| N-gram Perplexity | Perplexity by n-gram size |
|
| 700 |
-
| N-gram Entropy | Entropy by n-gram size |
|
| 701 |
-
| N-gram Coverage | Top pattern coverage |
|
| 702 |
-
| N-gram Unique | Unique n-gram counts |
|
| 703 |
-
| Markov Entropy | Entropy by context size |
|
| 704 |
-
| Markov Branching | Branching factor by context |
|
| 705 |
-
| Markov Contexts | Unique context counts |
|
| 706 |
-
| Zipf's Law | Frequency-rank distribution with fit |
|
| 707 |
-
| Vocab Frequency | Word frequency distribution |
|
| 708 |
-
| Top 20 Words | Most frequent words |
|
| 709 |
-
| Vocab Coverage | Cumulative coverage curve |
|
| 710 |
-
| Embedding Isotropy | Vector space uniformity |
|
| 711 |
-
| Embedding Norms | Vector magnitude distribution |
|
| 712 |
-
| Embedding Similarity | Word similarity heatmap |
|
| 713 |
-
| Nearest Neighbors | Similar words for key terms |
|
| 714 |
-
| t-SNE Words | 2D word embedding visualization |
|
| 715 |
-
| t-SNE Sentences | 2D sentence embedding visualization |
|
| 716 |
-
| Position Encoding | Encoding method comparison |
|
| 717 |
-
| Model Sizes | Storage requirements |
|
| 718 |
-
| Performance Dashboard | Comprehensive performance overview |
|
| 719 |
|
| 720 |
---
|
| 721 |
-
## About This Project
|
| 722 |
-
|
| 723 |
-
### Data Source
|
| 724 |
|
| 725 |
-
|
| 726 |
|
| 727 |
-
|
| 728 |
|
| 729 |
-
A project by **[Wikilangs](https://wikilangs.org)**
|
| 730 |
-
|
| 731 |
-
### Maintainer
|
| 732 |
-
|
| 733 |
-
[Omar Kamali](https://omarkamali.com) - [Omneity Labs](https://omneitylabs.com)
|
| 734 |
|
| 735 |
### Citation
|
| 736 |
|
| 737 |
-
If you use these models in your research, please cite:
|
| 738 |
-
|
| 739 |
```bibtex
|
| 740 |
@misc{wikilangs2025,
|
| 741 |
-
author
|
| 742 |
-
title
|
| 743 |
-
year
|
| 744 |
-
doi
|
| 745 |
publisher = {Zenodo},
|
| 746 |
-
url
|
| 747 |
institution = {Omneity Labs}
|
| 748 |
}
|
| 749 |
```
|
| 750 |
|
| 751 |
-
### License
|
| 752 |
-
|
| 753 |
-
MIT License - Free for academic and commercial use.
|
| 754 |
-
|
| 755 |
### Links
|
| 756 |
|
| 757 |
-
- 🌐
|
| 758 |
-
-
|
| 759 |
-
-
|
| 760 |
-
-
|
|
|
|
|
|
|
| 761 |
- 🤝 Sponsor: [Featherless AI](https://featherless.ai)
|
| 762 |
-
---
|
| 763 |
-
*Generated by Wikilangs Models Pipeline*
|
| 764 |
|
| 765 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
metrics:
|
| 34 |
- name: best_compression_ratio
|
| 35 |
type: compression
|
| 36 |
+
value: 4.172
|
| 37 |
- name: best_isotropy
|
| 38 |
type: isotropy
|
| 39 |
+
value: 0.8215
|
| 40 |
+
- name: best_alignment_r10
|
| 41 |
+
type: alignment
|
| 42 |
+
value: 0.2420
|
| 43 |
- name: vocabulary_size
|
| 44 |
type: vocab
|
| 45 |
+
value: 79667
|
| 46 |
+
generated: 2026-03-02
|
| 47 |
---
|
| 48 |
|
| 49 |
+
# Moroccan Arabic — Wikilangs Models
|
|
|
|
| 50 |
|
| 51 |
+
Open-source tokenizers, n-gram & Markov language models, vocabulary stats, and word embeddings trained on **Moroccan Arabic** Wikipedia by [Wikilangs](https://wikilangs.org).
|
|
|
|
| 52 |
|
| 53 |
+
🌐 [Language Page](https://wikilangs.org/languages/ary/) · 🎮 [Playground](https://wikilangs.org/playground/?lang=ary) · 📊 [Full Research Report](RESEARCH_REPORT.md)
|
| 54 |
|
| 55 |
+
## Language Samples
|
| 56 |
|
| 57 |
+
Example sentences drawn from the Moroccan Arabic Wikipedia corpus:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 58 |
|
| 59 |
+
> آيت ميلك جماعة ترابية قروية كاينة في إقليم اشتوكة آيت باها، جهة سوس ماسة، ساكنين فيها نسمة، على حسب الإحصاء العام ويب
|
| 60 |
|
| 61 |
+
> أورو هي لفلوس لي كاتخدًم بزاف ديال الدول ديال الاتحاد الأوروپي. هاد الدول تافقو يخدًمو الأورو مبعد المعاهدة ديال ماستريخت عام شوف حتى الاتحاد الأوروپي مصادر
|
| 62 |
|
| 63 |
+
> إيلبا (ب ، إيصولا د إيلبا) هي واحد الجزيرة تابعة للطاليان و تيسكن فيها تقريبا 30.000 واحد. جات ف البحر البيض المتوسط مابين طوسكانيا و كورسيكا. مصادر ف الطاليان ݣزيرة
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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("ary_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 | `▁ق ريش ▁هيا ▁قبيلة ▁ؤلا ▁أج موع ▁ق بلي ▁لي … (+19 more)` | 29 |
|
| 98 |
+
| 16k | `▁قريش ▁هيا ▁قبيلة ▁ؤلا ▁أج موع ▁ق بلي ▁لي ، … (+16 more)` | 26 |
|
| 99 |
+
| 32k | `▁قريش ▁هيا ▁قبيلة ▁ؤلا ▁أجموع ▁ق بلي ▁لي ، ▁علا … (+15 more)` | 25 |
|
| 100 |
+
| 64k | `▁قريش ▁هيا ▁قبيلة ▁ؤلا ▁أجموع ▁قبلي ▁لي ، ▁علا ▁حساب … (+14 more)` | 24 |
|
| 101 |
|
| 102 |
+
**Sample 2:** `آيت ميلك جماعة ترابية قروية كاينة في إقليم اشتوكة آيت باها، جهة سوس ماسة، ساكنين…`
|
| 103 |
|
| 104 |
| Vocab | Tokens | Count |
|
| 105 |
|-------|--------|-------|
|
| 106 |
+
| 8k | `▁آيت ▁ميل ك ▁جماعة ▁ترابية ▁قروية ▁كاينة ▁في ▁إقليم ▁اشتوكة … (+16 more)` | 26 |
|
| 107 |
+
| 16k | `▁آيت ▁ميل ك ▁جماعة ▁ترابية ▁قروية ▁كاينة ▁في ▁إقليم ▁اشتوكة … (+16 more)` | 26 |
|
| 108 |
+
| 32k | `▁آيت ▁ميل ك ▁جماعة ▁ترابية ▁قروية ▁كاينة ▁في ▁إقليم ▁اشتوكة … (+16 more)` | 26 |
|
| 109 |
+
| 64k | `▁آيت ▁ميلك ▁جماعة ▁ترابية ▁قروية ▁كاينة ▁في ▁إقليم ▁اشتوكة ▁آيت … (+15 more)` | 25 |
|
| 110 |
|
| 111 |
+
**Sample 3:** `خديجة بنت علي بن أبي طالب، هي بنت علي بن أبي طالب. مصادر د نسا`
|
| 112 |
|
| 113 |
| Vocab | Tokens | Count |
|
| 114 |
|-------|--------|-------|
|
| 115 |
+
| 8k | `▁خديجة ▁بنت ▁علي ▁بن ▁أبي ▁طالب ، ▁هي ▁بنت ▁علي … (+7 more)` | 17 |
|
| 116 |
+
| 16k | `▁خديجة ▁بنت ▁علي ▁بن ▁أبي ▁طالب ، ▁هي ▁بنت ▁علي … (+7 more)` | 17 |
|
| 117 |
+
| 32k | `▁خديجة ▁بنت ▁علي ▁بن ▁أبي ▁طالب ، ▁هي ▁بنت ▁علي … (+7 more)` | 17 |
|
| 118 |
+
| 64k | `▁خديجة ▁بنت ▁علي ▁بن ▁أبي ▁طالب ، ▁هي ▁بنت ▁علي … (+7 more)` | 17 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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("ary_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("ary_3gram_word.parquet").to_pandas()
|
| 141 |
+
print(df.head())
|
| 142 |
+
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 143 |
|
| 144 |
+
## Models Overview
|
|
|
|
| 145 |
|
| 146 |

|
| 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.48x |
|
| 162 |
+
| Tokenizer | 16k BPE | Compression | 3.76x |
|
| 163 |
+
| Tokenizer | 32k BPE | Compression | 3.98x |
|
| 164 |
+
| Tokenizer | 64k BPE | Compression | 4.17x 🏆 |
|
| 165 |
+
| N-gram | 2-gram (subword) | Perplexity | 428 🏆 |
|
| 166 |
+
| N-gram | 2-gram (word) | Perplexity | 7,415 |
|
| 167 |
+
| N-gram | 3-gram (subword) | Perplexity | 3,823 |
|
| 168 |
+
| N-gram | 3-gram (word) | Perplexity | 5,775 |
|
| 169 |
+
| N-gram | 4-gram (subword) | Perplexity | 20,320 |
|
| 170 |
+
| N-gram | 4-gram (word) | Perplexity | 8,149 |
|
| 171 |
+
| N-gram | 5-gram (subword) | Perplexity | 63,356 |
|
| 172 |
+
| N-gram | 5-gram (word) | Perplexity | 7,702 |
|
| 173 |
+
| Markov | ctx-1 (subword) | Predictability | 0.0% |
|
| 174 |
+
| Markov | ctx-1 (word) | Predictability | 14.2% |
|
| 175 |
+
| Markov | ctx-2 (subword) | Predictability | 18.4% |
|
| 176 |
+
| Markov | ctx-2 (word) | Predictability | 77.3% |
|
| 177 |
+
| Markov | ctx-3 (subword) | Predictability | 19.7% |
|
| 178 |
+
| Markov | ctx-3 (word) | Predictability | 93.8% |
|
| 179 |
+
| Markov | ctx-4 (subword) | Predictability | 33.7% |
|
| 180 |
+
| Markov | ctx-4 (word) | Predictability | 97.9% 🏆 |
|
| 181 |
+
| Vocabulary | full | Size | 79,667 |
|
| 182 |
+
| Vocabulary | full | Zipf R² | 0.9989 |
|
| 183 |
+
| Embeddings | mono_32d | Isotropy | 0.8215 🏆 |
|
| 184 |
+
| Embeddings | mono_64d | Isotropy | 0.8006 |
|
| 185 |
+
| Embeddings | mono_128d | Isotropy | 0.6555 |
|
| 186 |
+
| Embeddings | aligned_32d | Isotropy | 0.8215 |
|
| 187 |
+
| Embeddings | aligned_64d | Isotropy | 0.8006 |
|
| 188 |
+
| Embeddings | aligned_128d | Isotropy | 0.6555 |
|
| 189 |
+
| Alignment | aligned_32d | R@1 / R@5 / R@10 | 0.8% / 5.8% / 10.8% |
|
| 190 |
+
| Alignment | aligned_64d | R@1 / R@5 / R@10 | 3.8% / 10.0% / 20.0% |
|
| 191 |
+
| Alignment | aligned_128d | R@1 / R@5 / R@10 | 4.4% / 15.6% / 24.2% 🏆 |
|
| 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/ary/)
|
| 221 |
+
- 🎮 [Playground](https://wikilangs.org/playground/?lang=ary)
|
| 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-02 12:03:27*
|
RESEARCH_REPORT.md
ADDED
|
@@ -0,0 +1,688 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Moroccan Arabic — Full Ablation Study & Research Report
|
| 2 |
+
|
| 3 |
+
Detailed evaluation of all model variants trained on **Moroccan 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 |
+

|
| 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 |
+

|
| 37 |
+
|
| 38 |
+

|
| 39 |
+
|
| 40 |
+

|
| 41 |
+
|
| 42 |
+

|
| 43 |
+
|
| 44 |
+
### Results
|
| 45 |
+
|
| 46 |
+
| Vocab Size | Compression | Avg Token Len | UNK Rate | Total Tokens |
|
| 47 |
+
|------------|-------------|---------------|----------|--------------|
|
| 48 |
+
| **8k** | 3.481x | 3.48 | 0.0910% | 300,053 |
|
| 49 |
+
| **16k** | 3.755x | 3.76 | 0.0982% | 278,145 |
|
| 50 |
+
| **32k** | 3.985x | 3.99 | 0.1041% | 262,127 |
|
| 51 |
+
| **64k** | 4.172x 🏆 | 4.18 | 0.1090% | 250,361 |
|
| 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 | `▁ق ريش ▁هيا ▁قبيلة ▁ؤلا ▁أج موع ▁ق بلي ▁لي ... (+19 more)` | 29 |
|
| 62 |
+
| 16k | `▁قريش ▁هيا ▁قبيلة ▁ؤلا ▁أج موع ▁ق بلي ▁لي ، ... (+16 more)` | 26 |
|
| 63 |
+
| 32k | `▁قريش ▁هيا ▁قبيلة ▁ؤلا ▁أجموع ▁ق بلي ▁لي ، ▁علا ... (+15 more)` | 25 |
|
| 64 |
+
| 64k | `▁قريش ▁هيا ▁قبيلة ▁ؤلا ▁أجموع ▁قبلي ▁لي ، ▁علا ▁حساب ... (+14 more)` | 24 |
|
| 65 |
+
|
| 66 |
+
**Sample 2:** `آيت ميلك جماعة ترابية قروية كاينة في إقليم اشتوكة آيت باها، جهة سوس ماسة، ساكنين...`
|
| 67 |
+
|
| 68 |
+
| Vocab | Tokens | Count |
|
| 69 |
+
|-------|--------|-------|
|
| 70 |
+
| 8k | `▁آيت ▁ميل ك ▁جماعة ▁ترابية ▁قروية ▁كاينة ▁في ▁إقليم ▁اشتوكة ... (+16 more)` | 26 |
|
| 71 |
+
| 16k | `▁آيت ▁ميل ك ▁جماعة ▁ترابية ▁قروية ▁كاينة ▁في ▁إقليم ▁اشتوكة ... (+16 more)` | 26 |
|
| 72 |
+
| 32k | `▁آيت ▁ميل ك ▁جماعة ▁ترابية ▁قروية ▁كاينة ▁في ▁إقليم ▁اشتوكة ... (+16 more)` | 26 |
|
| 73 |
+
| 64k | `▁آيت ▁ميلك ▁جماعة ▁ترابية ▁قروية ▁كاينة ▁في ▁إقليم ▁اشتوكة ▁آيت ... (+15 more)` | 25 |
|
| 74 |
+
|
| 75 |
+
**Sample 3:** `خديجة بنت علي بن أبي طالب، هي بنت علي بن أبي طالب. مصادر د نسا`
|
| 76 |
+
|
| 77 |
+
| Vocab | Tokens | Count |
|
| 78 |
+
|-------|--------|-------|
|
| 79 |
+
| 8k | `▁خديجة ▁بنت ▁علي ▁بن ▁أبي ▁طالب ، ▁هي ▁بنت ▁علي ... (+7 more)` | 17 |
|
| 80 |
+
| 16k | `▁خديجة ▁بنت ▁علي ▁بن ▁أبي ▁طالب ، ▁هي ▁بنت ▁علي ... (+7 more)` | 17 |
|
| 81 |
+
| 32k | `▁خديجة ▁بنت ▁علي ▁بن ▁أبي ▁طالب ، ▁هي ▁بنت ▁علي ... (+7 more)` | 17 |
|
| 82 |
+
| 64k | `▁خديجة ▁بنت ▁علي ▁بن ▁أبي ▁طالب ، ▁هي ▁بنت ▁علي ... (+7 more)` | 17 |
|
| 83 |
+
|
| 84 |
+
|
| 85 |
+
### Key Findings
|
| 86 |
+
|
| 87 |
+
- **Best Compression:** 64k achieves 4.172x compression
|
| 88 |
+
- **Lowest UNK Rate:** 8k with 0.0910% 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 |
+

|
| 96 |
+
|
| 97 |
+

|
| 98 |
+
|
| 99 |
+

|
| 100 |
+
|
| 101 |
+
### Results
|
| 102 |
+
|
| 103 |
+
| N-gram | Variant | Perplexity | Entropy | Unique N-grams | Top-100 Coverage | Top-1000 Coverage |
|
| 104 |
+
|--------|---------|------------|---------|----------------|------------------|-------------------|
|
| 105 |
+
| **2-gram** | Word | 7,415 | 12.86 | 40,208 | 22.8% | 50.4% |
|
| 106 |
+
| **2-gram** | Subword | 428 🏆 | 8.74 | 5,913 | 57.8% | 96.3% |
|
| 107 |
+
| **3-gram** | Word | 5,775 | 12.50 | 44,139 | 27.3% | 56.7% |
|
| 108 |
+
| **3-gram** | Subword | 3,823 | 11.90 | 44,840 | 23.0% | 60.5% |
|
| 109 |
+
| **4-gram** | Word | 8,149 | 12.99 | 71,489 | 27.3% | 53.3% |
|
| 110 |
+
| **4-gram** | Subword | 20,320 | 14.31 | 222,645 | 11.9% | 35.8% |
|
| 111 |
+
| **5-gram** | Word | 7,702 | 12.91 | 59,669 | 28.3% | 52.6% |
|
| 112 |
+
| **5-gram** | Subword | 63,356 | 15.95 | 533,903 | 7.3% | 24.8% |
|
| 113 |
+
|
| 114 |
+
### Top 5 N-grams by Size
|
| 115 |
+
|
| 116 |
+
**2-grams (Word):**
|
| 117 |
+
|
| 118 |
+
| Rank | N-gram | Count |
|
| 119 |
+
|------|--------|-------|
|
| 120 |
+
| 1 | `واصلة ل` | 8,540 |
|
| 121 |
+
| 2 | `نسبة د` | 7,170 |
|
| 122 |
+
| 3 | `ف لمغريب` | 6,310 |
|
| 123 |
+
| 4 | `ف إقليم` | 6,015 |
|
| 124 |
+
| 5 | `ف نسبة` | 4,265 |
|
| 125 |
+
|
| 126 |
+
**3-grams (Word):**
|
| 127 |
+
|
| 128 |
+
| Rank | N-gram | Count |
|
| 129 |
+
|------|--------|-------|
|
| 130 |
+
| 1 | `ف نسبة د` | 4,264 |
|
| 131 |
+
| 2 | `فيها مصدر و` | 3,235 |
|
| 132 |
+
| 3 | `و نسبة د` | 2,894 |
|
| 133 |
+
| 4 | `مصدر و بايت` | 2,855 |
|
| 134 |
+
| 5 | `اللي خدامين ف` | 2,761 |
|
| 135 |
+
|
| 136 |
+
**4-grams (Word):**
|
| 137 |
+
|
| 138 |
+
| Rank | N-gram | Count |
|
| 139 |
+
|------|--------|-------|
|
| 140 |
+
| 1 | `فيها مصدر و بايت` | 2,855 |
|
| 141 |
+
| 2 | `نسبة نّاس اللي خدامين` | 2,705 |
|
| 142 |
+
| 3 | `نّاس اللي خدامين ف` | 2,595 |
|
| 143 |
+
| 4 | `على حساب لإحصاء الرسمي` | 2,501 |
|
| 144 |
+
| 5 | `لمغريب هاد دّوار كينتامي` | 2,500 |
|
| 145 |
+
|
| 146 |
+
**5-grams (Word):**
|
| 147 |
+
|
| 148 |
+
| Rank | N-gram | Count |
|
| 149 |
+
|------|--------|-------|
|
| 150 |
+
| 1 | `نسبة نّاس اللي خدامين ف` | 2,594 |
|
| 151 |
+
| 2 | `ف لمغريب هاد دّوار كينتامي` | 2,500 |
|
| 152 |
+
| 3 | `لمغريب هاد دّوار كينتامي ل` | 2,500 |
|
| 153 |
+
| 4 | `هاد دّوار كينتامي ل مشيخة` | 2,500 |
|
| 154 |
+
| 5 | `حساب لإحصاء الرسمي د عام` | 2,500 |
|
| 155 |
+
|
| 156 |
+
**2-grams (Subword):**
|
| 157 |
+
|
| 158 |
+
| Rank | N-gram | Count |
|
| 159 |
+
|------|--------|-------|
|
| 160 |
+
| 1 | `ا ل` | 348,897 |
|
| 161 |
+
| 2 | `_ ل` | 282,523 |
|
| 162 |
+
| 3 | `ة _` | 230,243 |
|
| 163 |
+
| 4 | `_ ا` | 221,714 |
|
| 164 |
+
| 5 | `_ م` | 157,830 |
|
| 165 |
+
|
| 166 |
+
**3-grams (Subword):**
|
| 167 |
+
|
| 168 |
+
| Rank | N-gram | Count |
|
| 169 |
+
|------|--------|-------|
|
| 170 |
+
| 1 | `_ ا ل` | 216,894 |
|
| 171 |
+
| 2 | `_ ف _` | 84,068 |
|
| 172 |
+
| 3 | `ا ت _` | 64,715 |
|
| 173 |
+
| 4 | `_ و _` | 60,577 |
|
| 174 |
+
| 5 | `ي ة _` | 60,370 |
|
| 175 |
+
|
| 176 |
+
**4-grams (Subword):**
|
| 177 |
+
|
| 178 |
+
| Rank | N-gram | Count |
|
| 179 |
+
|------|--------|-------|
|
| 180 |
+
| 1 | `_ د ي ا` | 48,269 |
|
| 181 |
+
| 2 | `د ي ا ل` | 48,014 |
|
| 182 |
+
| 3 | `ي ا ل _` | 33,434 |
|
| 183 |
+
| 4 | `د _ ا ل` | 33,075 |
|
| 184 |
+
| 5 | `_ م ن _` | 29,173 |
|
| 185 |
+
|
| 186 |
+
**5-grams (Subword):**
|
| 187 |
+
|
| 188 |
+
| Rank | N-gram | Count |
|
| 189 |
+
|------|--------|-------|
|
| 190 |
+
| 1 | `_ د ي ا ل` | 47,884 |
|
| 191 |
+
| 2 | `د ي ا ل _` | 33,006 |
|
| 192 |
+
| 3 | `_ ع ل ى _` | 19,658 |
|
| 193 |
+
| 4 | `_ ا ل ل ي` | 18,939 |
|
| 194 |
+
| 5 | `ا ل ل ي _` | 18,733 |
|
| 195 |
+
|
| 196 |
+
|
| 197 |
+
### Key Findings
|
| 198 |
+
|
| 199 |
+
- **Best Perplexity:** 2-gram (subword) with 428
|
| 200 |
+
- **Entropy Trend:** Decreases with larger n-grams (more predictable)
|
| 201 |
+
- **Coverage:** Top-1000 patterns cover ~25% of corpus
|
| 202 |
+
- **Recommendation:** 4-gram or 5-gram for best predictive performance
|
| 203 |
+
|
| 204 |
+
---
|
| 205 |
+
## 3. Markov Chain Evaluation
|
| 206 |
+
|
| 207 |
+

|
| 208 |
+
|
| 209 |
+

|
| 210 |
+
|
| 211 |
+

|
| 212 |
+
|
| 213 |
+
### Results
|
| 214 |
+
|
| 215 |
+
| Context | Variant | Avg Entropy | Perplexity | Branching Factor | Unique Contexts | Predictability |
|
| 216 |
+
|---------|---------|-------------|------------|------------------|-----------------|----------------|
|
| 217 |
+
| **1** | Word | 0.8581 | 1.813 | 5.40 | 180,421 | 14.2% |
|
| 218 |
+
| **1** | Subword | 1.1243 | 2.180 | 8.36 | 2,159 | 0.0% |
|
| 219 |
+
| **2** | Word | 0.2267 | 1.170 | 1.49 | 973,633 | 77.3% |
|
| 220 |
+
| **2** | Subword | 0.8165 | 1.761 | 5.10 | 18,051 | 18.4% |
|
| 221 |
+
| **3** | Word | 0.0619 | 1.044 | 1.10 | 1,450,643 | 93.8% |
|
| 222 |
+
| **3** | Subword | 0.8035 | 1.745 | 4.14 | 92,103 | 19.7% |
|
| 223 |
+
| **4** | Word | 0.0207 🏆 | 1.014 | 1.04 | 1,595,675 | 97.9% |
|
| 224 |
+
| **4** | Subword | 0.6627 | 1.583 | 2.87 | 381,563 | 33.7% |
|
| 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. `و نسبة نّاس اللي سبق ليهوم مصادر ربحو جايزة أحسن 10 سنين موراها تولّا لحكم الداتي`
|
| 234 |
+
3. `د لميداليات ف إقليم لحوز جهة مراكش آسفي ف المغرب من بعد باللي كان نتر خيالي`
|
| 235 |
+
|
| 236 |
+
**Context Size 2:**
|
| 237 |
+
|
| 238 |
+
1. `واصلة ل 3 ف لعقد ديال عوام كيوافق ف تّقويم لهيجري ؤ ف تّقويم لڭريڭوري بدا نهار`
|
| 239 |
+
2. `نسبة د الشوماج واصلة ل 6 6 044 0 290 يوكطوتانية هيدروجين 7 7 و لخصوبة لكاملة`
|
| 240 |
+
3. `ف لمغريب هاد دّوار كينتامي ل مشيخة أيت قضني لي كتضم 9 د دّواور لعاداد د سّكان`
|
| 241 |
+
|
| 242 |
+
**Context Size 3:**
|
| 243 |
+
|
| 244 |
+
1. `ف نسبة د التسكويل واصلة ل 90 8 و نسبة د لأمية واصلة ل 50 33 لخدمة ف`
|
| 245 |
+
2. `فيها مصدر و بايت على حساب النوع د لحنش التشلال التنفوسي فشلان لكبدة لكوما و bites a d`
|
| 246 |
+
3. `و نسبة د الشوماج واصلة ل 18 4 و لموعدّال د لعمر عند الجواج اللولاني هوّ 23 87`
|
| 247 |
+
|
| 248 |
+
**Context Size 4:**
|
| 249 |
+
|
| 250 |
+
1. `نسبة نّاس اللي خدامين في لقطاع لخاص 39 1 مصادر الرباط سلا القنيطرة قروية ف إقليم لخميسات مسكونين ف`
|
| 251 |
+
2. `نّاس اللي خدامين ف لپريڤي 57 1 مصادر الرباط سلا القنيطرة قروية ف إقليم سيدي إيفني جهة ݣلميم واد`
|
| 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. `ات_(گاع_ل_من_مابين`
|
| 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 97.9% predictability
|
| 287 |
+
- **Branching Factor:** Decreases with context size (more deterministic)
|
| 288 |
+
- **Memory Trade-off:** Larger contexts require more storage (381,563 contexts)
|
| 289 |
+
- **Recommendation:** Context-3 or Context-4 for text generation
|
| 290 |
+
|
| 291 |
+
---
|
| 292 |
+
## 4. Vocabulary Analysis
|
| 293 |
+
|
| 294 |
+

|
| 295 |
+
|
| 296 |
+

|
| 297 |
+
|
| 298 |
+

|
| 299 |
+
|
| 300 |
+
### Statistics
|
| 301 |
+
|
| 302 |
+
| Metric | Value |
|
| 303 |
+
|--------|-------|
|
| 304 |
+
| Vocabulary Size | 79,667 |
|
| 305 |
+
| Total Tokens | 2,057,009 |
|
| 306 |
+
| Mean Frequency | 25.82 |
|
| 307 |
+
| Median Frequency | 4 |
|
| 308 |
+
| Frequency Std Dev | 518.98 |
|
| 309 |
+
|
| 310 |
+
### Most Common Words
|
| 311 |
+
|
| 312 |
+
| Rank | Word | Frequency |
|
| 313 |
+
|------|------|-----------|
|
| 314 |
+
| 1 | ف | 84,381 |
|
| 315 |
+
| 2 | و | 60,856 |
|
| 316 |
+
| 3 | د | 60,420 |
|
| 317 |
+
| 4 | ديال | 32,966 |
|
| 318 |
+
| 5 | من | 29,503 |
|
| 319 |
+
| 6 | ل | 23,808 |
|
| 320 |
+
| 7 | على | 19,757 |
|
| 321 |
+
| 8 | لي | 18,777 |
|
| 322 |
+
| 9 | ب | 17,745 |
|
| 323 |
+
| 10 | اللي | 17,410 |
|
| 324 |
+
|
| 325 |
+
### Least Common Words (from vocabulary)
|
| 326 |
+
|
| 327 |
+
| Rank | Word | Frequency |
|
| 328 |
+
|------|------|-----------|
|
| 329 |
+
| 1 | ختيلال | 2 |
|
| 330 |
+
| 2 | تسطية | 2 |
|
| 331 |
+
| 3 | التخمار | 2 |
|
| 332 |
+
| 4 | لمركزين | 2 |
|
| 333 |
+
| 5 | تعلاف | 2 |
|
| 334 |
+
| 6 | الروضيو | 2 |
|
| 335 |
+
| 7 | رِد | 2 |
|
| 336 |
+
| 8 | وينغز | 2 |
|
| 337 |
+
| 9 | تايغرز | 2 |
|
| 338 |
+
| 10 | كلتة | 2 |
|
| 339 |
+
|
| 340 |
+
### Zipf's Law Analysis
|
| 341 |
+
|
| 342 |
+
| Metric | Value |
|
| 343 |
+
|--------|-------|
|
| 344 |
+
| Zipf Coefficient | 1.0203 |
|
| 345 |
+
| R² (Goodness of Fit) | 0.998917 |
|
| 346 |
+
| Adherence Quality | **excellent** |
|
| 347 |
+
|
| 348 |
+
### Coverage Analysis
|
| 349 |
+
|
| 350 |
+
| Top N Words | Coverage |
|
| 351 |
+
|-------------|----------|
|
| 352 |
+
| Top 100 | 38.4% |
|
| 353 |
+
| Top 1,000 | 62.8% |
|
| 354 |
+
| Top 5,000 | 77.7% |
|
| 355 |
+
| Top 10,000 | 84.1% |
|
| 356 |
+
|
| 357 |
+
### Key Findings
|
| 358 |
+
|
| 359 |
+
- **Zipf Compliance:** R²=0.9989 indicates excellent adherence to Zipf's law
|
| 360 |
+
- **High Frequency Dominance:** Top 100 words cover 38.4% of corpus
|
| 361 |
+
- **Long Tail:** 69,667 words needed for remaining 15.9% coverage
|
| 362 |
+
|
| 363 |
+
---
|
| 364 |
+
## 5. Word Embeddings Evaluation
|
| 365 |
+
|
| 366 |
+

|
| 367 |
+
|
| 368 |
+

|
| 369 |
+
|
| 370 |
+

|
| 371 |
+
|
| 372 |
+

|
| 373 |
+
|
| 374 |
+
|
| 375 |
+
### 5.1 Cross-Lingual Alignment
|
| 376 |
+
|
| 377 |
+

|
| 378 |
+
|
| 379 |
+

|
| 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.8215 🏆 | 0.3275 | N/A | N/A |
|
| 387 |
+
| **mono_64d** | 64 | 0.8006 | 0.2538 | N/A | N/A |
|
| 388 |
+
| **mono_128d** | 128 | 0.6555 | 0.2039 | N/A | N/A |
|
| 389 |
+
| **aligned_32d** | 32 | 0.8215 | 0.3276 | 0.0080 | 0.1080 |
|
| 390 |
+
| **aligned_64d** | 64 | 0.8006 | 0.2565 | 0.0380 | 0.2000 |
|
| 391 |
+
| **aligned_128d** | 128 | 0.6555 | 0.2044 | 0.0440 | 0.2420 |
|
| 392 |
+
|
| 393 |
+
### Key Findings
|
| 394 |
+
|
| 395 |
+
- **Best Isotropy:** mono_32d with 0.8215 (more uniform distribution)
|
| 396 |
+
- **Semantic Density:** Average pairwise similarity of 0.2623. Lower values indicate better semantic separation.
|
| 397 |
+
- **Alignment Quality:** Aligned models achieve up to 4.4% 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 | **1.121** | High formulaic/idiomatic 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 |
+
| `انية` | 1.84x | 68 contexts | سانية, تانية, غانية |
|
| 447 |
+
| `النا` | 1.79x | 63 contexts | الناي, الناس, النار |
|
| 448 |
+
| `لمغر` | 2.03x | 30 contexts | لمغرب, المغرب, لمغربي |
|
| 449 |
+
| `جماع` | 1.89x | 37 contexts | جماعة, إجماع, جماعي |
|
| 450 |
+
| `اللو` | 1.66x | 61 contexts | اللون, اللور, اللوز |
|
| 451 |
+
| `الات` | 1.59x | 65 contexts | صالات, حالات, سالات |
|
| 452 |
+
| `مغري` | 2.11x | 18 contexts | مغرية, مغريب, لمغريب |
|
| 453 |
+
| `دهوم` | 2.19x | 16 contexts | ضدهوم, يردهوم, جهدهوم |
|
| 454 |
+
| `إحصا` | 2.09x | 17 contexts | إحصاء, لإحصا, إحصائي |
|
| 455 |
+
| `حصاء` | 2.23x | 14 contexts | إحصاء, ليحصاء, لإحصاء |
|
| 456 |
+
| `قليم` | 2.08x | 16 contexts | إقليم, فقليم, اقليم |
|
| 457 |
+
| `لجوا` | 1.76x | 26 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 |
+
| `-ال` | `-ة` | 281 words | الرواقية, القهوة |
|
| 466 |
+
| `-ل` | `-ة` | 184 words | لفريسة, للمنصة |
|
| 467 |
+
| `-ال` | `-ت` | 170 words | المجموعات, الصوتيات |
|
| 468 |
+
| `-ال` | `-ات` | 164 words | المجموعات, الصوتيات |
|
| 469 |
+
| `-ال` | `-ية` | 142 words | الرواقية, السيادية |
|
| 470 |
+
| `-ل` | `-ت` | 131 words | لقمقومات, لپوطوات |
|
| 471 |
+
| `-ل` | `-ات` | 125 words | لقمقومات, لپوطوات |
|
| 472 |
+
| `-ل` | `-ن` | 124 words | لعيّان, لخيشوميين |
|
| 473 |
+
| `-ال` | `-ن` | 119 words | الكربون, الفريقين |
|
| 474 |
+
| `-ل` | `-ية` | 116 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 |
+
| والمسيحية | **`و-ال-مسيحية`** | 7.5 | `مسيحية` |
|
| 487 |
+
| فالسعودية | **`ف-ال-سعودية`** | 7.5 | `سعودية` |
|
| 488 |
+
| بالفرنسية | **`ب-ال-فرنسية`** | 7.5 | `فرنسية` |
|
| 489 |
+
| بالكيلوݣرام | **`ب-ال-كيلوݣرام`** | 7.5 | `كيلوݣرام` |
|
| 490 |
+
| والأساتذة | **`و-ال-أساتذة`** | 7.5 | `أساتذة` |
|
| 491 |
+
| والأقاليم | **`و-ال-أقاليم`** | 7.5 | `أقاليم` |
|
| 492 |
+
| باللاتينية | **`ب-ال-لاتينية`** | 7.5 | `لاتينية` |
|
| 493 |
+
| باليونانية | **`ب-ال-يونانية`** | 7.5 | `يونانية` |
|
| 494 |
+
| لبزقوليين | **`لبزقول-ي-ين`** | 7.5 | `ي` |
|
| 495 |
+
| فالجورنال | **`ف-ال-جورنال`** | 7.5 | `جورنال` |
|
| 496 |
+
| بالصيناعة | **`ب-ال-صيناعة`** | 7.5 | `صيناعة` |
|
| 497 |
+
|
| 498 |
+
### 6.6 Linguistic Interpretation
|
| 499 |
+
|
| 500 |
+
> **Automated Insight:**
|
| 501 |
+
The language Moroccan 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 |
+
> **Note on Idiomaticity:** The high Idiomaticity Gap suggests a large number of frequent multi-word expressions or formulaic sequences that are statistically distinct from their component parts.
|
| 504 |
+
|
| 505 |
+
---
|
| 506 |
+
## 7. Summary & Recommendations
|
| 507 |
+
|
| 508 |
+

|
| 509 |
+
|
| 510 |
+
### Production Recommendations
|
| 511 |
+
|
| 512 |
+
| Component | Recommended | Rationale |
|
| 513 |
+
|-----------|-------------|-----------|
|
| 514 |
+
| Tokenizer | **64k BPE** | Best compression (4.17x) |
|
| 515 |
+
| N-gram | **2-gram** | Lowest perplexity (428) |
|
| 516 |
+
| Markov | **Context-4** | Highest predictability (97.9%) |
|
| 517 |
+
| Embeddings | **100d** | Balanced semantic capture and isotropy |
|
| 518 |
+
|
| 519 |
+
|
| 520 |
+
---
|
| 521 |
+
## Appendix: Metrics Glossary & Interpretation Guide
|
| 522 |
+
|
| 523 |
+
This section provides definitions, intuitions, and guidance for interpreting the metrics used throughout this report.
|
| 524 |
+
|
| 525 |
+
### Tokenizer Metrics
|
| 526 |
+
|
| 527 |
+
**Compression Ratio**
|
| 528 |
+
> *Definition:* The ratio of characters to tokens (chars/token). Measures how efficiently the tokenizer represents text.
|
| 529 |
+
>
|
| 530 |
+
> *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.
|
| 531 |
+
>
|
| 532 |
+
> *What to seek:* Higher is generally better for efficiency, but extremely high compression may indicate overly aggressive merging that loses morphological information.
|
| 533 |
+
|
| 534 |
+
**Average Token Length (Fertility)**
|
| 535 |
+
> *Definition:* Mean number of characters per token produced by the tokenizer.
|
| 536 |
+
>
|
| 537 |
+
> *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.
|
| 538 |
+
>
|
| 539 |
+
> *What to seek:* Balance between 2-5 characters for most languages. Arabic/morphologically-rich languages may benefit from slightly longer tokens.
|
| 540 |
+
|
| 541 |
+
**Unknown Token Rate (OOV Rate)**
|
| 542 |
+
> *Definition:* Percentage of tokens that map to the unknown/UNK token, indicating words the tokenizer cannot represent.
|
| 543 |
+
>
|
| 544 |
+
> *Intuition:* Lower OOV means better vocabulary coverage. High OOV indicates the tokenizer encounters many unseen character sequences.
|
| 545 |
+
>
|
| 546 |
+
> *What to seek:* Below 1% is excellent; below 5% is acceptable. BPE tokenizers typically achieve very low OOV due to subword fallback.
|
| 547 |
+
|
| 548 |
+
### N-gram Model Metrics
|
| 549 |
+
|
| 550 |
+
**Perplexity**
|
| 551 |
+
> *Definition:* Measures how "surprised" the model is by test data. Mathematically: 2^(cross-entropy). Lower values indicate better prediction.
|
| 552 |
+
>
|
| 553 |
+
> *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.
|
| 554 |
+
>
|
| 555 |
+
> *What to seek:* Lower is better. Perplexity decreases with larger n-grams (more context). Values vary widely by language and corpus size.
|
| 556 |
+
|
| 557 |
+
**Entropy**
|
| 558 |
+
> *Definition:* Average information content (in bits) needed to encode the next token given the context. Related to perplexity: perplexity = 2^entropy.
|
| 559 |
+
>
|
| 560 |
+
> *Intuition:* High entropy means high uncertainty/randomness; low entropy means predictable patterns. Natural language typically has entropy between 1-4 bits per character.
|
| 561 |
+
>
|
| 562 |
+
> *What to seek:* Lower entropy indicates more predictable text patterns. Entropy should decrease as n-gram size increases.
|
| 563 |
+
|
| 564 |
+
**Coverage (Top-K)**
|
| 565 |
+
> *Definition:* Percentage of corpus occurrences explained by the top K most frequent n-grams.
|
| 566 |
+
>
|
| 567 |
+
> *Intuition:* High coverage with few patterns indicates repetitive/formulaic text; low coverage suggests diverse vocabulary usage.
|
| 568 |
+
>
|
| 569 |
+
> *What to seek:* Depends on use case. For language modeling, moderate coverage (40-60% with top-1000) is typical for natural text.
|
| 570 |
+
|
| 571 |
+
### Markov Chain Metrics
|
| 572 |
+
|
| 573 |
+
**Average Entropy**
|
| 574 |
+
> *Definition:* Mean entropy across all contexts, measuring average uncertainty in next-word prediction.
|
| 575 |
+
>
|
| 576 |
+
> *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).
|
| 577 |
+
>
|
| 578 |
+
> *What to seek:* Decreasing entropy with larger context sizes. Very low entropy (<0.1) indicates highly deterministic transitions.
|
| 579 |
+
|
| 580 |
+
**Branching Factor**
|
| 581 |
+
> *Definition:* Average number of unique next tokens observed for each context.
|
| 582 |
+
>
|
| 583 |
+
> *Intuition:* High branching = many possible continuations (flexible but uncertain); low branching = few options (predictable but potentially repetitive).
|
| 584 |
+
>
|
| 585 |
+
> *What to seek:* Branching factor should decrease with context size. Values near 1.0 indicate nearly deterministic chains.
|
| 586 |
+
|
| 587 |
+
**Predictability**
|
| 588 |
+
> *Definition:* Derived metric: (1 - normalized_entropy) × 100%. Indicates how deterministic the model's predictions are.
|
| 589 |
+
>
|
| 590 |
+
> *Intuition:* 100% predictability means the next word is always certain; 0% means completely random. Real text falls between these extremes.
|
| 591 |
+
>
|
| 592 |
+
> *What to seek:* Higher predictability for text generation quality, but too high (>98%) may produce repetitive output.
|
| 593 |
+
|
| 594 |
+
### Vocabulary & Zipf's Law Metrics
|
| 595 |
+
|
| 596 |
+
**Zipf's Coefficient**
|
| 597 |
+
> *Definition:* The slope of the log-log plot of word frequency vs. rank. Zipf's law predicts this should be approximately -1.
|
| 598 |
+
>
|
| 599 |
+
> *Intuition:* A coefficient near -1 indicates the corpus follows natural language patterns where a few words are very common and most words are rare.
|
| 600 |
+
>
|
| 601 |
+
> *What to seek:* Values between -0.8 and -1.2 indicate healthy natural language distribution. Deviations may suggest domain-specific or artificial text.
|
| 602 |
+
|
| 603 |
+
**R² (Coefficient of Determination)**
|
| 604 |
+
> *Definition:* Measures how well the linear fit explains the frequency-rank relationship. Ranges from 0 to 1.
|
| 605 |
+
>
|
| 606 |
+
> *Intuition:* R² near 1.0 means the data closely follows Zipf's law; lower values indicate deviation from expected word frequency patterns.
|
| 607 |
+
>
|
| 608 |
+
> *What to seek:* R² > 0.95 is excellent; > 0.99 indicates near-perfect Zipf adherence typical of large natural corpora.
|
| 609 |
+
|
| 610 |
+
**Vocabulary Coverage**
|
| 611 |
+
> *Definition:* Cumulative percentage of corpus tokens accounted for by the top N words.
|
| 612 |
+
>
|
| 613 |
+
> *Intuition:* Shows how concentrated word usage is. If top-100 words cover 50% of text, the corpus relies heavily on common words.
|
| 614 |
+
>
|
| 615 |
+
> *What to seek:* Top-100 covering 30-50% is typical. Higher coverage indicates more repetitive text; lower suggests richer vocabulary.
|
| 616 |
+
|
| 617 |
+
### Word Embedding Metrics
|
| 618 |
+
|
| 619 |
+
**Isotropy**
|
| 620 |
+
> *Definition:* Measures how uniformly distributed vectors are in the embedding space. Computed as the ratio of minimum to maximum singular values.
|
| 621 |
+
>
|
| 622 |
+
> *Intuition:* High isotropy (near 1.0) means vectors spread evenly in all directions; low isotropy means vectors cluster in certain directions, reducing expressiveness.
|
| 623 |
+
>
|
| 624 |
+
> *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.
|
| 625 |
+
|
| 626 |
+
**Average Norm**
|
| 627 |
+
> *Definition:* Mean magnitude (L2 norm) of word vectors in the embedding space.
|
| 628 |
+
>
|
| 629 |
+
> *Intuition:* Indicates the typical "length" of vectors. Consistent norms suggest stable training; high variance may indicate some words are undertrained.
|
| 630 |
+
>
|
| 631 |
+
> *What to seek:* Relatively consistent norms across models. The absolute value matters less than consistency (low std deviation).
|
| 632 |
+
|
| 633 |
+
**Cosine Similarity**
|
| 634 |
+
> *Definition:* Measures angular similarity between vectors, ranging from -1 (opposite) to 1 (identical direction).
|
| 635 |
+
>
|
| 636 |
+
> *Intuition:* Words with similar meanings should have high cosine similarity. This is the standard metric for semantic relatedness in embeddings.
|
| 637 |
+
>
|
| 638 |
+
> *What to seek:* Semantically related words should score > 0.5; unrelated words should be near 0. Synonyms often score > 0.7.
|
| 639 |
+
|
| 640 |
+
**t-SNE Visualization**
|
| 641 |
+
> *Definition:* t-Distributed Stochastic Neighbor Embedding - a dimensionality reduction technique that preserves local structure for visualization.
|
| 642 |
+
>
|
| 643 |
+
> *Intuition:* Clusters in t-SNE plots indicate groups of semantically related words. Spread indicates vocabulary diversity; tight clusters suggest semantic coherence.
|
| 644 |
+
>
|
| 645 |
+
> *What to seek:* Meaningful clusters (e.g., numbers together, verbs together). Avoid over-interpreting distances - t-SNE preserves local, not global, structure.
|
| 646 |
+
|
| 647 |
+
### General Interpretation Guidelines
|
| 648 |
+
|
| 649 |
+
1. **Compare within model families:** Metrics are most meaningful when comparing models of the same type (e.g., 8k vs 64k tokenizer).
|
| 650 |
+
2. **Consider trade-offs:** Better performance on one metric often comes at the cost of another (e.g., compression vs. OOV rate).
|
| 651 |
+
3. **Context matters:** Optimal values depend on downstream tasks. Text generation may prioritize different metrics than classification.
|
| 652 |
+
4. **Corpus influence:** All metrics are influenced by corpus characteristics. Wikipedia text differs from social media or literature.
|
| 653 |
+
5. **Language-specific patterns:** Morphologically rich languages (like Arabic) may show different optimal ranges than analytic languages.
|
| 654 |
+
|
| 655 |
+
|
| 656 |
+
### Visualizations Index
|
| 657 |
+
|
| 658 |
+
| Visualization | Description |
|
| 659 |
+
|---------------|-------------|
|
| 660 |
+
| Tokenizer Compression | Compression ratios by vocabulary size |
|
| 661 |
+
| Tokenizer Fertility | Average token length by vocabulary |
|
| 662 |
+
| Tokenizer OOV | Unknown token rates |
|
| 663 |
+
| Tokenizer Total Tokens | Total tokens by vocabulary |
|
| 664 |
+
| N-gram Perplexity | Perplexity by n-gram size |
|
| 665 |
+
| N-gram Entropy | Entropy by n-gram size |
|
| 666 |
+
| N-gram Coverage | Top pattern coverage |
|
| 667 |
+
| N-gram Unique | Unique n-gram counts |
|
| 668 |
+
| Markov Entropy | Entropy by context size |
|
| 669 |
+
| Markov Branching | Branching factor by context |
|
| 670 |
+
| Markov Contexts | Unique context counts |
|
| 671 |
+
| Zipf's Law | Frequency-rank distribution with fit |
|
| 672 |
+
| Vocab Frequency | Word frequency distribution |
|
| 673 |
+
| Top 20 Words | Most frequent words |
|
| 674 |
+
| Vocab Coverage | Cumulative coverage curve |
|
| 675 |
+
| Embedding Isotropy | Vector space uniformity |
|
| 676 |
+
| Embedding Norms | Vector magnitude distribution |
|
| 677 |
+
| Embedding Similarity | Word similarity heatmap |
|
| 678 |
+
| Nearest Neighbors | Similar words for key terms |
|
| 679 |
+
| t-SNE Words | 2D word embedding visualization |
|
| 680 |
+
| t-SNE Sentences | 2D sentence embedding visualization |
|
| 681 |
+
| Position Encoding | Encoding method comparison |
|
| 682 |
+
| Model Sizes | Storage requirements |
|
| 683 |
+
| Performance Dashboard | Comprehensive performance overview |
|
| 684 |
+
|
| 685 |
+
---
|
| 686 |
+
👈 [Back to README](README.md)
|
| 687 |
+
|
| 688 |
+
*Generated by Wikilangs Pipeline · 2026-03-02 12:03:50*
|
ary_morph_tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
models/embeddings/aligned/ary_128d.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:23dd29124172fc87eca0b06da00cc83acbea4338d4ab0bb944c1443f13f8a402
|
| 3 |
+
size 1061407900
|
models/embeddings/aligned/ary_128d.projection.npy
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 65664
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:cf17e00d60be7e77cd190f5673e7b5fb42725875195a574e8af838fe7ab7c4fe
|
| 3 |
size 65664
|
models/embeddings/aligned/ary_128d_metadata.json
CHANGED
|
@@ -3,6 +3,6 @@
|
|
| 3 |
"dimension": 128,
|
| 4 |
"version": "aligned",
|
| 5 |
"hub_language": "en",
|
| 6 |
-
"seed_vocab_size":
|
| 7 |
-
"vocab_size":
|
| 8 |
}
|
|
|
|
| 3 |
"dimension": 128,
|
| 4 |
"version": "aligned",
|
| 5 |
"hub_language": "en",
|
| 6 |
+
"seed_vocab_size": 3971,
|
| 7 |
+
"vocab_size": 35802
|
| 8 |
}
|
models/embeddings/aligned/ary_32d.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:85ae7c72bcc613fc8ebe04229c068b299fa614cafb556f87a170dec369e8b068
|
| 3 |
+
size 265911964
|
models/embeddings/aligned/ary_32d.projection.npy
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4224
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6a4134a5733227be26d45ca94a80c670cff54c5a385ea3abd083727066f0058f
|
| 3 |
size 4224
|
models/embeddings/aligned/ary_32d_metadata.json
CHANGED
|
@@ -3,6 +3,6 @@
|
|
| 3 |
"dimension": 32,
|
| 4 |
"version": "aligned",
|
| 5 |
"hub_language": "en",
|
| 6 |
-
"seed_vocab_size":
|
| 7 |
-
"vocab_size":
|
| 8 |
}
|
|
|
|
| 3 |
"dimension": 32,
|
| 4 |
"version": "aligned",
|
| 5 |
"hub_language": "en",
|
| 6 |
+
"seed_vocab_size": 3971,
|
| 7 |
+
"vocab_size": 35802
|
| 8 |
}
|
models/embeddings/aligned/ary_64d.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e0f2ba5eeba6b085b95d8dddb3edbbf6f17c9da5abe2bda71e649e7efa93dba0
|
| 3 |
+
size 531077276
|
models/embeddings/aligned/ary_64d.projection.npy
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 16512
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bec30000a60507faa1fe0b953a2e43945709f09dad828de79a04e310e7380831
|
| 3 |
size 16512
|
models/embeddings/aligned/ary_64d_metadata.json
CHANGED
|
@@ -3,6 +3,6 @@
|
|
| 3 |
"dimension": 64,
|
| 4 |
"version": "aligned",
|
| 5 |
"hub_language": "en",
|
| 6 |
-
"seed_vocab_size":
|
| 7 |
-
"vocab_size":
|
| 8 |
}
|
|
|
|
| 3 |
"dimension": 64,
|
| 4 |
"version": "aligned",
|
| 5 |
"hub_language": "en",
|
| 6 |
+
"seed_vocab_size": 3971,
|
| 7 |
+
"vocab_size": 35802
|
| 8 |
}
|
models/embeddings/monolingual/ary_128d.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:23dd29124172fc87eca0b06da00cc83acbea4338d4ab0bb944c1443f13f8a402
|
| 3 |
+
size 1061407900
|
models/embeddings/monolingual/ary_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":
|
| 15 |
}
|
|
|
|
| 9 |
"negative": 5,
|
| 10 |
"epochs": 5,
|
| 11 |
"encoding_method": "rope",
|
| 12 |
+
"dim": 128,
|
| 13 |
+
"threads": 40
|
| 14 |
},
|
| 15 |
+
"vocab_size": 35802
|
| 16 |
}
|
models/embeddings/monolingual/ary_32d.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:85ae7c72bcc613fc8ebe04229c068b299fa614cafb556f87a170dec369e8b068
|
| 3 |
+
size 265911964
|
models/embeddings/monolingual/ary_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":
|
| 15 |
}
|
|
|
|
| 9 |
"negative": 5,
|
| 10 |
"epochs": 5,
|
| 11 |
"encoding_method": "rope",
|
| 12 |
+
"dim": 32,
|
| 13 |
+
"threads": 40
|
| 14 |
},
|
| 15 |
+
"vocab_size": 35802
|
| 16 |
}
|
models/embeddings/monolingual/ary_64d.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e0f2ba5eeba6b085b95d8dddb3edbbf6f17c9da5abe2bda71e649e7efa93dba0
|
| 3 |
+
size 531077276
|
models/embeddings/monolingual/ary_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":
|
| 15 |
}
|
|
|
|
| 9 |
"negative": 5,
|
| 10 |
"epochs": 5,
|
| 11 |
"encoding_method": "rope",
|
| 12 |
+
"dim": 64,
|
| 13 |
+
"threads": 40
|
| 14 |
},
|
| 15 |
+
"vocab_size": 35802
|
| 16 |
}
|
models/subword_markov/ary_markov_ctx1_subword.parquet
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a47d186cfa8ba5504f207f80b2a7ee4d4a993924df44c1e658f81586ab974232
|
| 3 |
+
size 138893
|
models/subword_markov/ary_markov_ctx1_subword_metadata.json
CHANGED
|
@@ -2,6 +2,6 @@
|
|
| 2 |
"context_size": 1,
|
| 3 |
"variant": "subword",
|
| 4 |
"language": "ary",
|
| 5 |
-
"unique_contexts":
|
| 6 |
-
"total_transitions":
|
| 7 |
}
|
|
|
|
| 2 |
"context_size": 1,
|
| 3 |
"variant": "subword",
|
| 4 |
"language": "ary",
|
| 5 |
+
"unique_contexts": 2159,
|
| 6 |
+
"total_transitions": 11813843
|
| 7 |
}
|
models/subword_markov/ary_markov_ctx2_subword.parquet
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:186a66b4aac4749ba72cd645b66d11d219a06361505677603344d72626665cc8
|
| 3 |
+
size 793471
|
models/subword_markov/ary_markov_ctx2_subword_metadata.json
CHANGED
|
@@ -2,6 +2,6 @@
|
|
| 2 |
"context_size": 2,
|
| 3 |
"variant": "subword",
|
| 4 |
"language": "ary",
|
| 5 |
-
"unique_contexts":
|
| 6 |
-
"total_transitions":
|
| 7 |
}
|
|
|
|
| 2 |
"context_size": 2,
|
| 3 |
"variant": "subword",
|
| 4 |
"language": "ary",
|
| 5 |
+
"unique_contexts": 18051,
|
| 6 |
+
"total_transitions": 11802900
|
| 7 |
}
|
models/subword_markov/ary_markov_ctx3_subword.parquet
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a84fe22f4f1abae384b0dab4be36edac253da06347c8acfe4c377644117593e6
|
| 3 |
+
size 2887510
|
models/subword_markov/ary_markov_ctx3_subword_metadata.json
CHANGED
|
@@ -2,6 +2,6 @@
|
|
| 2 |
"context_size": 3,
|
| 3 |
"variant": "subword",
|
| 4 |
"language": "ary",
|
| 5 |
-
"unique_contexts":
|
| 6 |
-
"total_transitions":
|
| 7 |
}
|
|
|
|
| 2 |
"context_size": 3,
|
| 3 |
"variant": "subword",
|
| 4 |
"language": "ary",
|
| 5 |
+
"unique_contexts": 92103,
|
| 6 |
+
"total_transitions": 11791957
|
| 7 |
}
|
models/subword_markov/ary_markov_ctx4_subword.parquet
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b35928174eefb8cdcf6d948433a4d30d1732c733bee1a59cbf4b1b34a96af4a9
|
| 3 |
+
size 9333153
|
models/subword_markov/ary_markov_ctx4_subword_metadata.json
CHANGED
|
@@ -2,6 +2,6 @@
|
|
| 2 |
"context_size": 4,
|
| 3 |
"variant": "subword",
|
| 4 |
"language": "ary",
|
| 5 |
-
"unique_contexts":
|
| 6 |
-
"total_transitions":
|
| 7 |
}
|
|
|
|
| 2 |
"context_size": 4,
|
| 3 |
"variant": "subword",
|
| 4 |
"language": "ary",
|
| 5 |
+
"unique_contexts": 381563,
|
| 6 |
+
"total_transitions": 11781014
|
| 7 |
}
|
models/subword_ngram/ary_2gram_subword.parquet
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:11f67345d6612258f0c36fbcc4ef91d3a4f788f8946cd10aca12fb49e0591722
|
| 3 |
+
size 83143
|
models/subword_ngram/ary_2gram_subword_metadata.json
CHANGED
|
@@ -2,6 +2,6 @@
|
|
| 2 |
"n": 2,
|
| 3 |
"variant": "subword",
|
| 4 |
"language": "ary",
|
| 5 |
-
"unique_ngrams":
|
| 6 |
-
"total_ngrams":
|
| 7 |
}
|
|
|
|
| 2 |
"n": 2,
|
| 3 |
"variant": "subword",
|
| 4 |
"language": "ary",
|
| 5 |
+
"unique_ngrams": 5913,
|
| 6 |
+
"total_ngrams": 11813843
|
| 7 |
}
|
models/subword_ngram/ary_3gram_subword.parquet
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:731fe728fefb3100db18de2567e0ab19ed6320bc9b3860a656e1b0d723071d5f
|
| 3 |
+
size 605193
|
models/subword_ngram/ary_3gram_subword_metadata.json
CHANGED
|
@@ -2,6 +2,6 @@
|
|
| 2 |
"n": 3,
|
| 3 |
"variant": "subword",
|
| 4 |
"language": "ary",
|
| 5 |
-
"unique_ngrams":
|
| 6 |
-
"total_ngrams":
|
| 7 |
}
|
|
|
|
| 2 |
"n": 3,
|
| 3 |
"variant": "subword",
|
| 4 |
"language": "ary",
|
| 5 |
+
"unique_ngrams": 44840,
|
| 6 |
+
"total_ngrams": 11802900
|
| 7 |
}
|
models/subword_ngram/ary_4gram_subword.parquet
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2906b0bb46f6eb9129cd9215d946598cc0e16a7cae247295719ba3050cc96116
|
| 3 |
+
size 2842344
|
models/subword_ngram/ary_4gram_subword_metadata.json
CHANGED
|
@@ -2,6 +2,6 @@
|
|
| 2 |
"n": 4,
|
| 3 |
"variant": "subword",
|
| 4 |
"language": "ary",
|
| 5 |
-
"unique_ngrams":
|
| 6 |
-
"total_ngrams":
|
| 7 |
}
|
|
|
|
| 2 |
"n": 4,
|
| 3 |
"variant": "subword",
|
| 4 |
"language": "ary",
|
| 5 |
+
"unique_ngrams": 222645,
|
| 6 |
+
"total_ngrams": 11791957
|
| 7 |
}
|
models/subword_ngram/ary_5gram_subword.parquet
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:533843b27ab76aad1a2125aba30039074abf08adaee6e22d0fe500236c06a257
|
| 3 |
+
size 7278591
|
models/subword_ngram/ary_5gram_subword_metadata.json
CHANGED
|
@@ -2,6 +2,6 @@
|
|
| 2 |
"n": 5,
|
| 3 |
"variant": "subword",
|
| 4 |
"language": "ary",
|
| 5 |
-
"unique_ngrams":
|
| 6 |
-
"total_ngrams":
|
| 7 |
}
|
|
|
|
| 2 |
"n": 5,
|
| 3 |
"variant": "subword",
|
| 4 |
"language": "ary",
|
| 5 |
+
"unique_ngrams": 533903,
|
| 6 |
+
"total_ngrams": 11781014
|
| 7 |
}
|
models/tokenizer/ary_tokenizer_16k.model
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f4d5e32d06745b883de576bf9b8e04f6b546761414ef32c72ce2e58c2493d6f2
|
| 3 |
+
size 558827
|
models/tokenizer/ary_tokenizer_16k.vocab
CHANGED
|
The diff for this file is too large to render.
See raw diff
|
|
|
models/tokenizer/ary_tokenizer_32k.model
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a7d26a99b4d6eaba0bf6312cb2107eb329d0d96c3e427e621e8b0750a99f2374
|
| 3 |
+
size 891273
|
models/tokenizer/ary_tokenizer_32k.vocab
CHANGED
|
The diff for this file is too large to render.
See raw diff
|
|
|
models/tokenizer/ary_tokenizer_64k.model
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3d3dc68570a8afe23be4f8d6f0d33b09f73fc4cd0a38ab57824a5bc552a1eeb9
|
| 3 |
+
size 1592537
|
models/tokenizer/ary_tokenizer_64k.vocab
CHANGED
|
The diff for this file is too large to render.
See raw diff
|
|
|
models/tokenizer/ary_tokenizer_8k.model
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8ef26d909eaf49e80af1cd939826a6e5d8ecab53a921532d6dd5019f91013175
|
| 3 |
+
size 396383
|
models/tokenizer/ary_tokenizer_8k.vocab
CHANGED
|
The diff for this file is too large to render.
See raw diff
|
|
|
models/vocabulary/ary_vocabulary.parquet
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ae2ef916c872a66f5ac3b2a576a30a32773cb05153f900a81655c67a9a53d98d
|
| 3 |
+
size 1426642
|
models/vocabulary/ary_vocabulary_metadata.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
| 1 |
{
|
| 2 |
"language": "ary",
|
| 3 |
-
"vocabulary_size":
|
| 4 |
"variant": "full",
|
| 5 |
"statistics": {
|
| 6 |
-
"type_token_ratio": 0.
|
| 7 |
"coverage": {
|
| 8 |
-
"top_100": 0.
|
| 9 |
-
"top_1000": 0.
|
| 10 |
-
"top_5000": 0.
|
| 11 |
-
"top_10000": 0.
|
| 12 |
},
|
| 13 |
-
"hapax_count":
|
| 14 |
-
"hapax_ratio": 0.
|
| 15 |
-
"total_documents":
|
| 16 |
}
|
| 17 |
}
|
|
|
|
| 1 |
{
|
| 2 |
"language": "ary",
|
| 3 |
+
"vocabulary_size": 79667,
|
| 4 |
"variant": "full",
|
| 5 |
"statistics": {
|
| 6 |
+
"type_token_ratio": 0.08362757688063684,
|
| 7 |
"coverage": {
|
| 8 |
+
"top_100": 0.366426714703403,
|
| 9 |
+
"top_1000": 0.5985740986276256,
|
| 10 |
+
"top_5000": 0.7404440555697419,
|
| 11 |
+
"top_10000": 0.8014438827079335
|
| 12 |
},
|
| 13 |
+
"hapax_count": 100784,
|
| 14 |
+
"hapax_ratio": 0.558511728945808,
|
| 15 |
+
"total_documents": 10943
|
| 16 |
}
|
| 17 |
}
|
models/word_markov/ary_markov_ctx1_word.parquet
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ea031ad3bae66c0cd73c32d8253f69299f69d10016ee3f7ed372ca7d93a180dd
|
| 3 |
+
size 10728094
|
models/word_markov/ary_markov_ctx1_word_metadata.json
CHANGED
|
@@ -2,6 +2,6 @@
|
|
| 2 |
"context_size": 1,
|
| 3 |
"variant": "word",
|
| 4 |
"language": "ary",
|
| 5 |
-
"unique_contexts":
|
| 6 |
-
"total_transitions":
|
| 7 |
}
|
|
|
|
| 2 |
"context_size": 1,
|
| 3 |
"variant": "word",
|
| 4 |
"language": "ary",
|
| 5 |
+
"unique_contexts": 180421,
|
| 6 |
+
"total_transitions": 2146850
|
| 7 |
}
|
models/word_markov/ary_markov_ctx2_word.parquet
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b484e89a2f5ad24d4011e063ffd1dfcceaa56a738004916a9aff590bcdc9eb02
|
| 3 |
+
size 26992628
|
models/word_markov/ary_markov_ctx2_word_metadata.json
CHANGED
|
@@ -2,6 +2,6 @@
|
|
| 2 |
"context_size": 2,
|
| 3 |
"variant": "word",
|
| 4 |
"language": "ary",
|
| 5 |
-
"unique_contexts":
|
| 6 |
-
"total_transitions":
|
| 7 |
}
|
|
|
|
| 2 |
"context_size": 2,
|
| 3 |
"variant": "word",
|
| 4 |
"language": "ary",
|
| 5 |
+
"unique_contexts": 973633,
|
| 6 |
+
"total_transitions": 2135907
|
| 7 |
}
|
models/word_markov/ary_markov_ctx3_word.parquet
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7131ba67344fb5d89210dc4d2112f8cc84f31f8e36fb9130be3ca9cf72dc830f
|
| 3 |
+
size 37168553
|
models/word_markov/ary_markov_ctx3_word_metadata.json
CHANGED
|
@@ -2,6 +2,6 @@
|
|
| 2 |
"context_size": 3,
|
| 3 |
"variant": "word",
|
| 4 |
"language": "ary",
|
| 5 |
-
"unique_contexts":
|
| 6 |
-
"total_transitions":
|
| 7 |
}
|
|
|
|
| 2 |
"context_size": 3,
|
| 3 |
"variant": "word",
|
| 4 |
"language": "ary",
|
| 5 |
+
"unique_contexts": 1450643,
|
| 6 |
+
"total_transitions": 2124964
|
| 7 |
}
|