omarkamali commited on
Commit
c922b43
·
verified ·
1 Parent(s): 35d611c

Upload all models and assets for hu (latest)

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. README.md +130 -673
  2. RESEARCH_REPORT.md +686 -0
  3. hu_morph_tokenizer.json +0 -0
  4. models/embeddings/aligned/hu_128d.bin +2 -2
  5. models/embeddings/aligned/hu_128d.projection.npy +1 -1
  6. models/embeddings/aligned/hu_128d_metadata.json +2 -2
  7. models/embeddings/aligned/hu_32d.bin +2 -2
  8. models/embeddings/aligned/hu_32d.projection.npy +1 -1
  9. models/embeddings/aligned/hu_32d_metadata.json +2 -2
  10. models/embeddings/aligned/hu_64d.bin +2 -2
  11. models/embeddings/aligned/hu_64d.projection.npy +1 -1
  12. models/embeddings/aligned/hu_64d_metadata.json +2 -2
  13. models/embeddings/monolingual/hu_128d.bin +2 -2
  14. models/embeddings/monolingual/hu_128d_metadata.json +2 -2
  15. models/embeddings/monolingual/hu_32d.bin +2 -2
  16. models/embeddings/monolingual/hu_32d_metadata.json +2 -2
  17. models/embeddings/monolingual/hu_64d.bin +2 -2
  18. models/embeddings/monolingual/hu_64d_metadata.json +2 -2
  19. models/subword_markov/hu_markov_ctx1_subword.parquet +2 -2
  20. models/subword_markov/hu_markov_ctx1_subword_metadata.json +2 -2
  21. models/subword_markov/hu_markov_ctx2_subword.parquet +2 -2
  22. models/subword_markov/hu_markov_ctx2_subword_metadata.json +2 -2
  23. models/subword_markov/hu_markov_ctx3_subword.parquet +2 -2
  24. models/subword_markov/hu_markov_ctx3_subword_metadata.json +2 -2
  25. models/subword_markov/hu_markov_ctx4_subword.parquet +2 -2
  26. models/subword_markov/hu_markov_ctx4_subword_metadata.json +2 -2
  27. models/subword_ngram/hu_2gram_subword.parquet +2 -2
  28. models/subword_ngram/hu_2gram_subword_metadata.json +2 -2
  29. models/subword_ngram/hu_3gram_subword.parquet +2 -2
  30. models/subword_ngram/hu_3gram_subword_metadata.json +2 -2
  31. models/subword_ngram/hu_4gram_subword.parquet +2 -2
  32. models/subword_ngram/hu_4gram_subword_metadata.json +2 -2
  33. models/subword_ngram/hu_5gram_subword.parquet +2 -2
  34. models/subword_ngram/hu_5gram_subword_metadata.json +2 -2
  35. models/tokenizer/hu_tokenizer_16k.model +2 -2
  36. models/tokenizer/hu_tokenizer_16k.vocab +0 -0
  37. models/tokenizer/hu_tokenizer_32k.model +2 -2
  38. models/tokenizer/hu_tokenizer_32k.vocab +0 -0
  39. models/tokenizer/hu_tokenizer_64k.model +2 -2
  40. models/tokenizer/hu_tokenizer_64k.vocab +0 -0
  41. models/tokenizer/hu_tokenizer_8k.model +2 -2
  42. models/tokenizer/hu_tokenizer_8k.vocab +0 -0
  43. models/vocabulary/hu_vocabulary.parquet +2 -2
  44. models/vocabulary/hu_vocabulary_metadata.json +9 -9
  45. models/vocabulary/hu_vocabulary_top.parquet +2 -2
  46. models/vocabulary/hu_vocabulary_top_metadata.json +10 -10
  47. models/word_markov/hu_markov_ctx1_word.parquet +2 -2
  48. models/word_markov/hu_markov_ctx1_word_metadata.json +2 -2
  49. models/word_markov/hu_markov_ctx2_word.parquet +2 -2
  50. models/word_markov/hu_markov_ctx2_word_metadata.json +2 -2
README.md CHANGED
@@ -33,741 +33,198 @@ dataset_info:
33
  metrics:
34
  - name: best_compression_ratio
35
  type: compression
36
- value: 4.660
37
  - name: best_isotropy
38
  type: isotropy
39
- value: 0.7896
 
 
 
40
  - name: vocabulary_size
41
  type: vocab
42
- value: 0
43
- generated: 2026-01-13
44
  ---
45
 
46
- # Hungarian - Wikilangs Models
47
- ## Comprehensive Research Report & Full Ablation Study
48
 
49
- This repository contains NLP models trained and evaluated by Wikilangs, specifically on **Hungarian** Wikipedia data.
50
- We analyze tokenizers, n-gram models, Markov chains, vocabulary statistics, and word embeddings.
51
 
52
- ## 📋 Repository Contents
53
 
54
- ### Models & Assets
55
 
56
- - Tokenizers (8k, 16k, 32k, 64k)
57
- - N-gram models (2, 3, 4, 5-gram)
58
- - Markov chains (context of 1, 2, 3, 4 and 5)
59
- - Subword N-gram and Markov chains
60
- - Embeddings in various sizes and dimensions (aligned and unaligned)
61
- - Language Vocabulary
62
- - Language Statistics
63
 
64
- ![Performance Dashboard](visualizations/performance_dashboard.png)
65
 
66
- ### Analysis and Evaluation
67
 
68
- - [1. Tokenizer Evaluation](#1-tokenizer-evaluation)
69
- - [2. N-gram Model Evaluation](#2-n-gram-model-evaluation)
70
- - [3. Markov Chain Evaluation](#3-markov-chain-evaluation)
71
- - [4. Vocabulary Analysis](#4-vocabulary-analysis)
72
- - [5. Word Embeddings Evaluation](#5-word-embeddings-evaluation)
73
- - [6. Morphological Analysis (Experimental)](#6--morphological-analysis-experimental)
74
- - [7. Summary & Recommendations](#7-summary--recommendations)
75
- - [Metrics Glossary](#appendix-metrics-glossary--interpretation-guide)
76
- - [Visualizations Index](#visualizations-index)
77
 
78
- ---
79
- ## 1. Tokenizer Evaluation
80
 
81
- ![Tokenizer Compression](visualizations/tokenizer_compression.png)
82
 
83
- ![Tokenizer Fertility](visualizations/tokenizer_fertility.png)
84
 
85
- ![Tokenizer OOV](visualizations/tokenizer_oov.png)
86
 
87
- ![Total Tokens](visualizations/tokenizer_total_tokens.png)
 
88
 
89
- ### Results
 
90
 
91
- | Vocab Size | Compression | Avg Token Len | UNK Rate | Total Tokens |
92
- |------------|-------------|---------------|----------|--------------|
93
- | **8k** | 3.504x | 3.50 | 0.1728% | 3,324,472 |
94
- | **16k** | 3.921x | 3.92 | 0.1933% | 2,971,202 |
95
- | **32k** | 4.310x | 4.31 | 0.2125% | 2,702,863 |
96
- | **64k** | 4.660x 🏆 | 4.66 | 0.2298% | 2,499,703 |
97
 
98
- ### Tokenization Examples
 
99
 
100
- Below are sample sentences tokenized with each vocabulary size:
 
 
101
 
102
- **Sample 1:** `orvlövész, személy → lásd: mesterlövész Orvlövész amerikai akciófilm`
 
 
 
103
 
104
  | Vocab | Tokens | Count |
105
  |-------|--------|-------|
106
- | 8k | `▁orv l öv ész , ▁személy lásd : ... (+12 more)` | 22 |
107
- | 16k | `▁orv löv ész , ▁személy ▁→ ▁lásd : mester löv ... (+7 more)` | 17 |
108
- | 32k | `▁orv löv ész , ▁személy ▁→lásd :mester löv ... (+7 more)` | 17 |
109
- | 64k | `▁orv lövész , ▁személy ▁→lásd : ▁mesterlövészorv lövész ... (+2 more)` | 12 |
110
 
111
- **Sample 2:** `Monterde, település Spanyolországban, Zaragoza tartományban Monterde de Albarrac...`
112
 
113
  | Vocab | Tokens | Count |
114
  |-------|--------|-------|
115
- | 8k | `▁mont er de , ▁településspanyol országban , zar ag ... (+19 more)` | 29 |
116
- | 16k | `▁mont er de , ▁településspanyol országban , zar ag ... (+19 more)` | 29 |
117
- | 32k | `▁mont er de ,településspanyol országban , ▁zarag oza ... (+17 more)` | 27 |
118
- | 64k | `▁monter de ,településspanyol országban , ▁zaragozatartományban ▁monter ... (+14 more)` | 24 |
119
 
120
- **Sample 3:** `A Nyoman szóra a következő lapok hivatkozhatnak: Nyoman, a Nyeman folyó belarusz...`
121
 
122
  | Vocab | Tokens | Count |
123
  |-------|--------|-------|
124
- | 8k | `▁a ▁nyom anszó ra a ▁következőlap okhivatkoz ... (+25 more)` | 35 |
125
- | 16k | `▁a ▁nyom anszó ra akövetkezőlapokhivatkoz hatnak ... (+23 more)` | 33 |
126
- | 32k | `▁a ▁nyom anszó ra akövetkezőlapokhivatkoz hatnak ... (+21 more)` | 31 |
127
- | 64k | `▁a ▁nyom anszóraakövetkezőlapokhivatkoz hatnak : ... (+17 more)` | 27 |
128
-
129
-
130
- ### Key Findings
131
-
132
- - **Best Compression:** 64k achieves 4.660x compression
133
- - **Lowest UNK Rate:** 8k with 0.1728% unknown tokens
134
- - **Trade-off:** Larger vocabularies improve compression but increase model size
135
- - **Recommendation:** 32k vocabulary provides optimal balance for production use
136
-
137
- ---
138
- ## 2. N-gram Model Evaluation
139
-
140
- ![N-gram Perplexity](visualizations/ngram_perplexity.png)
141
-
142
- ![N-gram Unique](visualizations/ngram_unique.png)
143
-
144
- ![N-gram Coverage](visualizations/ngram_coverage.png)
145
-
146
- ### Results
147
-
148
- | N-gram | Variant | Perplexity | Entropy | Unique N-grams | Top-100 Coverage | Top-1000 Coverage |
149
- |--------|---------|------------|---------|----------------|------------------|-------------------|
150
- | **2-gram** | Word | 534,583 | 19.03 | 4,267,292 | 5.3% | 13.6% |
151
- | **2-gram** | Subword | 435 🏆 | 8.77 | 36,188 | 54.2% | 98.1% |
152
- | **3-gram** | Word | 2,075,420 | 20.98 | 7,553,147 | 2.6% | 6.6% |
153
- | **3-gram** | Subword | 4,599 | 12.17 | 265,628 | 17.2% | 55.9% |
154
- | **4-gram** | Word | 4,222,921 | 22.01 | 12,285,779 | 2.7% | 6.1% |
155
- | **4-gram** | Subword | 30,520 | 14.90 | 1,702,927 | 7.5% | 26.9% |
156
- | **5-gram** | Word | 3,104,259 | 21.57 | 8,851,426 | 3.4% | 7.3% |
157
- | **5-gram** | Subword | 140,455 | 17.10 | 6,669,073 | 3.8% | 16.0% |
158
-
159
- ### Top 5 N-grams by Size
160
-
161
- **2-grams (Word):**
162
-
163
- | Rank | N-gram | Count |
164
- |------|--------|-------|
165
- | 1 | `és a` | 750,740 |
166
- | 2 | `hogy a` | 246,908 |
167
- | 3 | `további információk` | 239,762 |
168
- | 4 | `és az` | 222,085 |
169
- | 5 | `volt a` | 210,831 |
170
-
171
- **3-grams (Word):**
172
-
173
- | Rank | N-gram | Count |
174
- |------|--------|-------|
175
- | 1 | `jegyzetek további információk` | 116,226 |
176
- | 2 | `népesség a település` | 75,437 |
177
- | 3 | `személyek elhunyt személyek` | 70,441 |
178
- | 4 | `született személyek elhunyt` | 69,726 |
179
- | 5 | `további információk megye` | 43,373 |
180
-
181
- **4-grams (Word):**
182
-
183
- | Rank | N-gram | Count |
184
- |------|--------|-------|
185
- | 1 | `született személyek elhunyt személyek` | 69,726 |
186
- | 2 | `a település népességének változása` | 42,715 |
187
- | 3 | `népesség a település népességének` | 42,581 |
188
- | 4 | `jegyzetek további információk megye` | 41,857 |
189
- | 5 | `megyében népesség a település` | 40,991 |
190
-
191
- **5-grams (Word):**
192
-
193
- | Rank | N-gram | Count |
194
- |------|--------|-------|
195
- | 1 | `népesség a település népességének változása` | 42,500 |
196
- | 2 | `jegyzetek további információk megye települései` | 39,789 |
197
- | 3 | `további információk megye települései létrehozott` | 38,604 |
198
- | 4 | `települései létrehozott francia település cikkek` | 33,554 |
199
- | 5 | `megye települései létrehozott francia település` | 33,497 |
200
-
201
- **2-grams (Subword):**
202
-
203
- | Rank | N-gram | Count |
204
- |------|--------|-------|
205
- | 1 | `_ a` | 28,615,318 |
206
- | 2 | `a _` | 26,126,954 |
207
- | 3 | `s z` | 20,526,948 |
208
- | 4 | `t _` | 17,995,334 |
209
- | 5 | `e l` | 17,138,516 |
210
-
211
- **3-grams (Subword):**
212
-
213
- | Rank | N-gram | Count |
214
- |------|--------|-------|
215
- | 1 | `_ a _` | 14,744,854 |
216
- | 2 | `_ s z` | 7,371,389 |
217
- | 3 | `_ a z` | 5,409,490 |
218
- | 4 | `é s _` | 5,376,301 |
219
- | 5 | `s z e` | 5,046,767 |
220
-
221
- **4-grams (Subword):**
222
-
223
- | Rank | N-gram | Count |
224
- |------|--------|-------|
225
- | 1 | `_ a z _` | 4,706,514 |
226
- | 2 | `_ é s _` | 4,404,673 |
227
- | 3 | `_ e g y` | 2,864,622 |
228
- | 4 | `_ m e g` | 2,653,603 |
229
- | 5 | `_ s z e` | 2,581,753 |
230
-
231
- **5-grams (Subword):**
232
-
233
- | Rank | N-gram | Count |
234
- |------|--------|-------|
235
- | 1 | `_ s z e r` | 1,290,178 |
236
- | 2 | `_ a z _ e` | 1,248,859 |
237
- | 3 | `_ é s _ a` | 1,122,375 |
238
- | 4 | `_ e g y _` | 1,119,120 |
239
- | 5 | `_ v o l t` | 1,080,101 |
240
-
241
-
242
- ### Key Findings
243
-
244
- - **Best Perplexity:** 2-gram (subword) with 435
245
- - **Entropy Trend:** Decreases with larger n-grams (more predictable)
246
- - **Coverage:** Top-1000 patterns cover ~16% of corpus
247
- - **Recommendation:** 4-gram or 5-gram for best predictive performance
248
-
249
- ---
250
- ## 3. Markov Chain Evaluation
251
-
252
- ![Markov Entropy](visualizations/markov_entropy.png)
253
-
254
- ![Markov Contexts](visualizations/markov_contexts.png)
255
-
256
- ![Markov Branching](visualizations/markov_branching.png)
257
-
258
- ### Results
259
-
260
- | Context | Variant | Avg Entropy | Perplexity | Branching Factor | Unique Contexts | Predictability |
261
- |---------|---------|-------------|------------|------------------|-----------------|----------------|
262
- | **1** | Word | 0.9149 | 1.885 | 11.86 | 5,253,585 | 8.5% |
263
- | **1** | Subword | 1.3264 | 2.508 | 10.40 | 16,190 | 0.0% |
264
- | **2** | Word | 0.3314 | 1.258 | 2.16 | 62,241,118 | 66.9% |
265
- | **2** | Subword | 0.6166 | 1.533 | 4.07 | 168,239 | 38.3% |
266
- | **3** | Word | 0.1296 | 1.094 | 1.28 | 134,211,461 | 87.0% |
267
- | **3** | Subword | 0.6817 | 1.604 | 4.31 | 684,267 | 31.8% |
268
- | **4** | Word | 0.0479 🏆 | 1.034 | 1.08 | 171,557,270 | 95.2% |
269
- | **4** | Subword | 0.7163 | 1.643 | 3.92 | 2,950,554 | 28.4% |
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. `a legközelebbi piac volt az amerikai r hernádi judit lánya családjához tartozó veb kranbau hennigsdo...`
278
- 2. `az íreket a belül félprím kanonikus alakja a turistaút mellett támadhatók ám később v vlagyimir ilji...`
279
- 3. `és a krasznojarszki határterület melyből római korból ugyanis a kerlés beszterce naszód vármegyéhez ...`
280
-
281
- **Context Size 2:**
282
-
283
- 1. `és a vérlemezke szám vizsgálatok az eklampsiasok vérének calciumion concentratiójáról bodó richárdda...`
284
- 2. `hogy a tábornagy unokája teschen harmadik hercegének és aragóniai nyelven nyelvjárásban íxar bárója ...`
285
- 3. `további információk görög irodalom története athenaeum november 4 a aguja km 279 36 32 53 2 45`
286
-
287
- **Context Size 3:**
288
-
289
- 1. `jegyzetek további információk színészek született személyek személyek színésznők humoristák york iak...`
290
- 2. `népesség a település népessége az elmúlt években az alábbi módon változott jegyzetek további informá...`
291
- 3. `született személyek elhunyt személyek becsületrend lovagjai tárcaírók származású magyarok emigránsok...`
292
-
293
- **Context Size 4:**
294
-
295
- 1. `született személyek elhunyt személyek nők eurovíziós dalfesztivál pontbejelentői`
296
- 2. `a település népességének változása jegyzetek további információk települései létrehozott spanyol tel...`
297
- 3. `népesség a település népességének változása jegyzetek további információk megye települései létrehoz...`
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. `_bódáműválla_ém_`
307
- 2. `etotéspa_mégóncs`
308
- 3. `apcigyla_em_k)_h`
309
-
310
- **Context Size 2:**
311
-
312
- 1. `_avallés_ma_akasz`
313
- 2. `a_+_céletőbbeild.`
314
- 3. `szettáraminterico`
315
-
316
- **Context Size 3:**
317
 
318
- 1. `_a_tor_anni_volsen`
319
- 2. `_szólósításai_form`
320
- 3. `_az_amika_végzeti_`
321
 
322
- **Context Size 4:**
323
 
324
- 1. `_az_le_a_muzsikus_b`
325
- 2. `_és_4-i_egyet_érkez`
326
- 3. `_egy_kir._idős_diss`
327
 
 
 
328
 
329
- ### Key Findings
330
-
331
- - **Best Predictability:** Context-4 (word) with 95.2% predictability
332
- - **Branching Factor:** Decreases with context size (more deterministic)
333
- - **Memory Trade-off:** Larger contexts require more storage (2,950,554 contexts)
334
- - **Recommendation:** Context-3 or Context-4 for text generation
335
-
336
- ---
337
- ## 4. Vocabulary Analysis
338
-
339
- ![Zipf's Law](visualizations/zipf_law.png)
340
-
341
- ![Top Words](visualizations/top20_words.png)
342
-
343
- ![Coverage Curve](visualizations/vocab_coverage.png)
344
-
345
- ### Statistics
346
-
347
- | Metric | Value |
348
- |--------|-------|
349
- | Vocabulary Size | 2,314,804 |
350
- | Total Tokens | 210,700,540 |
351
- | Mean Frequency | 91.02 |
352
- | Median Frequency | 4 |
353
- | Frequency Std Dev | 11249.15 |
354
-
355
- ### Most Common Words
356
-
357
- | Rank | Word | Frequency |
358
- |------|------|-----------|
359
- | 1 | a | 15,266,391 |
360
- | 2 | az | 4,841,770 |
361
- | 3 | és | 4,422,301 |
362
- | 4 | is | 1,350,461 |
363
- | 5 | egy | 1,181,563 |
364
- | 6 | hogy | 978,556 |
365
- | 7 | volt | 963,293 |
366
- | 8 | 1 | 909,318 |
367
- | 9 | nem | 804,148 |
368
- | 10 | 2 | 677,083 |
369
-
370
- ### Least Common Words (from vocabulary)
371
-
372
- | Rank | Word | Frequency |
373
- |------|------|-----------|
374
- | 1 | vichyvel | 2 |
375
- | 2 | ftpf | 2 |
376
- | 3 | hakeimi | 2 |
377
- | 4 | ixkun | 2 |
378
- | 5 | demannt | 2 |
379
- | 6 | summercamp | 2 |
380
- | 7 | madguy | 2 |
381
- | 8 | meisterleistung | 2 |
382
- | 9 | copín | 2 |
383
- | 10 | transparentete | 2 |
384
-
385
- ### Zipf's Law Analysis
386
-
387
- | Metric | Value |
388
- |--------|-------|
389
- | Zipf Coefficient | 0.9342 |
390
- | R² (Goodness of Fit) | 0.996484 |
391
- | Adherence Quality | **excellent** |
392
-
393
- ### Coverage Analysis
394
-
395
- | Top N Words | Coverage |
396
- |-------------|----------|
397
- | Top 100 | 25.6% |
398
- | Top 1,000 | 45.5% |
399
- | Top 5,000 | 61.8% |
400
- | Top 10,000 | 69.0% |
401
-
402
- ### Key Findings
403
-
404
- - **Zipf Compliance:** R²=0.9965 indicates excellent adherence to Zipf's law
405
- - **High Frequency Dominance:** Top 100 words cover 25.6% of corpus
406
- - **Long Tail:** 2,304,804 words needed for remaining 31.0% coverage
407
-
408
- ---
409
- ## 5. Word Embeddings Evaluation
410
-
411
- ![Embedding Isotropy](visualizations/embedding_isotropy.png)
412
-
413
- ![Similarity Matrix](visualizations/embedding_similarity.png)
414
-
415
- ![t-SNE Words](visualizations/tsne_words.png)
416
-
417
- ![t-SNE Sentences](visualizations/tsne_sentences.png)
418
-
419
-
420
- ### 5.1 Cross-Lingual Alignment
421
-
422
- ![Alignment Quality](visualizations/embedding_alignment_quality.png)
423
-
424
- ![Multilingual t-SNE](visualizations/embedding_tsne_multilingual.png)
425
-
426
-
427
- ### 5.2 Model Comparison
428
-
429
- | Model | Dimension | Isotropy | Semantic Density | Alignment R@1 | Alignment R@10 |
430
- |-------|-----------|----------|------------------|---------------|----------------|
431
- | **mono_32d** | 32 | 0.7896 | 0.3549 | N/A | N/A |
432
- | **mono_64d** | 64 | 0.7843 | 0.2900 | N/A | N/A |
433
- | **mono_128d** | 128 | 0.7205 | 0.2280 | N/A | N/A |
434
- | **aligned_32d** | 32 | 0.7896 🏆 | 0.3731 | 0.3780 | 0.7580 |
435
- | **aligned_64d** | 64 | 0.7843 | 0.2877 | 0.5600 | 0.8860 |
436
- | **aligned_128d** | 128 | 0.7205 | 0.2242 | 0.7160 | 0.9400 |
437
 
438
- ### Key Findings
439
 
440
- - **Best Isotropy:** aligned_32d with 0.7896 (more uniform distribution)
441
- - **Semantic Density:** Average pairwise similarity of 0.2930. Lower values indicate better semantic separation.
442
- - **Alignment Quality:** Aligned models achieve up to 71.6% R@1 in cross-lingual retrieval.
443
- - **Recommendation:** 128d aligned for best cross-lingual performance
444
 
445
- ---
446
- ## 6. Morphological Analysis (Experimental)
447
-
448
- This section presents an automated morphological analysis derived from the statistical divergence between word-level and subword-level models. By analyzing where subword predictability spikes and where word-level coverage fails, we can infer linguistic structures without supervised data.
449
-
450
- ### 6.1 Productivity & Complexity
451
-
452
- | Metric | Value | Interpretation | Recommendation |
453
- |--------|-------|----------------|----------------|
454
- | Productivity Index | **5.000** | High morphological productivity | Reliable analysis |
455
- | Idiomaticity Gap | **-0.542** | Low formulaic content | - |
456
-
457
- ### 6.2 Affix Inventory (Productive Units)
458
-
459
- These are the most productive prefixes and suffixes identified by sampling the vocabulary for global substitutability patterns. A unit is considered an affix if stripping it leaves a valid stem that appears in other contexts.
460
-
461
- #### Productive Prefixes
462
- | Prefix | Examples |
463
- |--------|----------|
464
- | `-s` | szedhessék, sejttípusban, szemszínű |
465
- | `-k` | kóborlónak, kőalappal, küldetéseikben |
466
- | `-m` | meklēt, morarano, megbüntethették |
467
- | `-a` | ammaniti, aurignacian, aranybaglyok |
468
- | `-t` | tagként, távhőtermelő, terepviszony |
469
- | `-b` | bolondozott, buga, birkózással |
470
- | `-ma` | manbij, macham, magánszínházakban |
471
- | `-e` | elaborate, elitegyetemek, eugène |
472
-
473
- #### Productive Suffixes
474
- | Suffix | Examples |
475
- |--------|----------|
476
- | `-t` | cseréphéjazat, tagként, irritációkat |
477
- | `-k` | kóborlónak, érbetegségek, szedhessék |
478
- | `-n` | vardaman, pihenőhelyükön, sejttípusban |
479
- | `-a` | hera, buga, philosophya |
480
- | `-l` | hurból, lavel, vranishtnál |
481
- | `-s` | francoizmus, nativizálás, öndiagnózis |
482
- | `-i` | ammaniti, lendvai, diófalvi |
483
- | `-e` | elaborate, piauiense, eugène |
484
-
485
- ### 6.3 Bound Stems (Lexical Roots)
486
-
487
- 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.
488
-
489
- | Stem | Cohesion | Substitutability | Examples |
490
- |------|----------|------------------|----------|
491
- | `mber` | 1.61x | 605 contexts | ember, umber, ámber |
492
- | `epül` | 1.89x | 164 contexts | repül, repüle, repülő |
493
- | `erül` | 1.60x | 344 contexts | terül, kerül, merül |
494
- | `örté` | 2.09x | 79 contexts | törté, körtés, sörtéi |
495
- | `ület` | 1.50x | 362 contexts | fület, sz��let, ízület |
496
- | `atás` | 1.41x | 443 contexts | katás, fatás, hatás |
497
- | `rtén` | 2.05x | 57 contexts | artén, értény, történ |
498
- | `ítot` | 1.62x | 161 contexts | ított, sított, vított |
499
- | `ítás` | 1.38x | 376 contexts | sítás, újítás, ámítás |
500
- | `ormá` | 1.46x | 267 contexts | ormán, ormát, dormán |
501
- | `alál` | 1.43x | 226 contexts | talál, halál, valál |
502
- | `lepü` | 2.81x | 14 contexts | telepü, telepük, települ |
503
-
504
- ### 6.4 Affix Compatibility (Co-occurrence)
505
-
506
- This table shows which prefixes and suffixes most frequently co-occur on the same stems, revealing the 'stacking' rules of the language's morphology.
507
-
508
- | Prefix | Suffix | Frequency | Examples |
509
- |--------|--------|-----------|----------|
510
- | `-k` | `-k` | 118 words | kinyissanak, konowalik |
511
- | `-s` | `-t` | 87 words | szvetlánát, szkádit |
512
- | `-k` | `-t` | 84 words | konceptalbumokat, kevesebbért |
513
- | `-k` | `-l` | 84 words | kártyacsomagokkal, karmáról |
514
- | `-s` | `-l` | 84 words | szénül, szőnyeggyárból |
515
- | `-s` | `-k` | 81 words | sóraktárnak, számolhatnánk |
516
- | `-s` | `-n` | 80 words | sarrewerden, sumbawán |
517
- | `-s` | `-a` | 77 words | sserunkuma, sztalina |
518
- | `-k` | `-a` | 77 words | kruczynska, kivételszámba |
519
- | `-m` | `-k` | 75 words | manhunterek, megbetegedéseik |
520
-
521
- ### 6.5 Recursive Morpheme Segmentation
522
-
523
- Using **Recursive Hierarchical Substitutability**, we decompose complex words into their constituent morphemes. This approach handles nested affixes (e.g., `prefix-prefix-root-suffix`).
524
-
525
- | Word | Suggested Split | Confidence | Stem |
526
- |------|-----------------|------------|------|
527
- | családira | **`család-i-ra`** | 7.5 | `i` |
528
- | xantofilek | **`xantofi-l-ek`** | 7.5 | `l` |
529
- | marinaviale | **`marinavi-al-e`** | 7.5 | `al` |
530
- | castillának | **`castillá-n-ak`** | 7.5 | `n` |
531
- | karakterjének | **`karakterjé-n-ek`** | 7.5 | `n` |
532
- | kampánystábjának | **`kampánystábjá-n-ak`** | 7.5 | `n` |
533
- | nyelveire | **`nyelve-i-re`** | 7.5 | `i` |
534
- | távharcban | **`távharc-ba-n`** | 7.5 | `ba` |
535
- | guadalcanalt | **`guadalcan-al-t`** | 7.5 | `al` |
536
- | palesztínai | **`palesztín-a-i`** | 7.5 | `a` |
537
- | idénymunkákon | **`idénymunká-k-on`** | 7.5 | `k` |
538
- | képzőművészeknek | **`képzőművészek-n-ek`** | 7.5 | `n` |
539
- | paakkanen | **`paakka-n-en`** | 7.5 | `n` |
540
- | körlapnak | **`körlap-n-ak`** | 7.5 | `n` |
541
- | férfimunkások | **`férfimunká-s-ok`** | 7.5 | `s` |
542
-
543
- ### 6.6 Linguistic Interpretation
544
-
545
- > **Automated Insight:**
546
- The language Hungarian shows high morphological productivity. The subword models are significantly more efficient than word models, suggesting a rich system of affixation or compounding.
547
 
548
- ---
549
- ## 7. Summary & Recommendations
550
 
551
  ![Performance Dashboard](visualizations/performance_dashboard.png)
552
 
553
- ### Production Recommendations
554
-
555
- | Component | Recommended | Rationale |
556
- |-----------|-------------|-----------|
557
- | Tokenizer | **64k BPE** | Best compression (4.66x) |
558
- | N-gram | **2-gram** | Lowest perplexity (435) |
559
- | Markov | **Context-4** | Highest predictability (95.2%) |
560
- | Embeddings | **100d** | Balanced semantic capture and isotropy |
561
-
562
-
563
- ---
564
- ## Appendix: Metrics Glossary & Interpretation Guide
565
-
566
- This section provides definitions, intuitions, and guidance for interpreting the metrics used throughout this report.
567
-
568
- ### Tokenizer Metrics
569
-
570
- **Compression Ratio**
571
- > *Definition:* The ratio of characters to tokens (chars/token). Measures how efficiently the tokenizer represents text.
572
- >
573
- > *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.
574
- >
575
- > *What to seek:* Higher is generally better for efficiency, but extremely high compression may indicate overly aggressive merging that loses morphological information.
576
-
577
- **Average Token Length (Fertility)**
578
- > *Definition:* Mean number of characters per token produced by the tokenizer.
579
- >
580
- > *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.
581
- >
582
- > *What to seek:* Balance between 2-5 characters for most languages. Arabic/morphologically-rich languages may benefit from slightly longer tokens.
583
-
584
- **Unknown Token Rate (OOV Rate)**
585
- > *Definition:* Percentage of tokens that map to the unknown/UNK token, indicating words the tokenizer cannot represent.
586
- >
587
- > *Intuition:* Lower OOV means better vocabulary coverage. High OOV indicates the tokenizer encounters many unseen character sequences.
588
- >
589
- > *What to seek:* Below 1% is excellent; below 5% is acceptable. BPE tokenizers typically achieve very low OOV due to subword fallback.
590
-
591
- ### N-gram Model Metrics
592
-
593
- **Perplexity**
594
- > *Definition:* Measures how "surprised" the model is by test data. Mathematically: 2^(cross-entropy). Lower values indicate better prediction.
595
- >
596
- > *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.
597
- >
598
- > *What to seek:* Lower is better. Perplexity decreases with larger n-grams (more context). Values vary widely by language and corpus size.
599
-
600
- **Entropy**
601
- > *Definition:* Average information content (in bits) needed to encode the next token given the context. Related to perplexity: perplexity = 2^entropy.
602
- >
603
- > *Intuition:* High entropy means high uncertainty/randomness; low entropy means predictable patterns. Natural language typically has entropy between 1-4 bits per character.
604
- >
605
- > *What to seek:* Lower entropy indicates more predictable text patterns. Entropy should decrease as n-gram size increases.
606
-
607
- **Coverage (Top-K)**
608
- > *Definition:* Percentage of corpus occurrences explained by the top K most frequent n-grams.
609
- >
610
- > *Intuition:* High coverage with few patterns indicates repetitive/formulaic text; low coverage suggests diverse vocabulary usage.
611
- >
612
- > *What to seek:* Depends on use case. For language modeling, moderate coverage (40-60% with top-1000) is typical for natural text.
613
-
614
- ### Markov Chain Metrics
615
-
616
- **Average Entropy**
617
- > *Definition:* Mean entropy across all contexts, measuring average uncertainty in next-word prediction.
618
- >
619
- > *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).
620
- >
621
- > *What to seek:* Decreasing entropy with larger context sizes. Very low entropy (<0.1) indicates highly deterministic transitions.
622
-
623
- **Branching Factor**
624
- > *Definition:* Average number of unique next tokens observed for each context.
625
- >
626
- > *Intuition:* High branching = many possible continuations (flexible but uncertain); low branching = few options (predictable but potentially repetitive).
627
- >
628
- > *What to seek:* Branching factor should decrease with context size. Values near 1.0 indicate nearly deterministic chains.
629
-
630
- **Predictability**
631
- > *Definition:* Derived metric: (1 - normalized_entropy) × 100%. Indicates how deterministic the model's predictions are.
632
- >
633
- > *Intuition:* 100% predictability means the next word is always certain; 0% means completely random. Real text falls between these extremes.
634
- >
635
- > *What to seek:* Higher predictability for text generation quality, but too high (>98%) may produce repetitive output.
636
-
637
- ### Vocabulary & Zipf's Law Metrics
638
-
639
- **Zipf's Coefficient**
640
- > *Definition:* The slope of the log-log plot of word frequency vs. rank. Zipf's law predicts this should be approximately -1.
641
- >
642
- > *Intuition:* A coefficient near -1 indicates the corpus follows natural language patterns where a few words are very common and most words are rare.
643
- >
644
- > *What to seek:* Values between -0.8 and -1.2 indicate healthy natural language distribution. Deviations may suggest domain-specific or artificial text.
645
-
646
- **R² (Coefficient of Determination)**
647
- > *Definition:* Measures how well the linear fit explains the frequency-rank relationship. Ranges from 0 to 1.
648
- >
649
- > *Intuition:* R² near 1.0 means the data closely follows Zipf's law; lower values indicate deviation from expected word frequency patterns.
650
- >
651
- > *What to seek:* R² > 0.95 is excellent; > 0.99 indicates near-perfect Zipf adherence typical of large natural corpora.
652
-
653
- **Vocabulary Coverage**
654
- > *Definition:* Cumulative percentage of corpus tokens accounted for by the top N words.
655
- >
656
- > *Intuition:* Shows how concentrated word usage is. If top-100 words cover 50% of text, the corpus relies heavily on common words.
657
- >
658
- > *What to seek:* Top-100 covering 30-50% is typical. Higher coverage indicates more repetitive text; lower suggests richer vocabulary.
659
-
660
- ### Word Embedding Metrics
661
-
662
- **Isotropy**
663
- > *Definition:* Measures how uniformly distributed vectors are in the embedding space. Computed as the ratio of minimum to maximum singular values.
664
- >
665
- > *Intuition:* High isotropy (near 1.0) means vectors spread evenly in all directions; low isotropy means vectors cluster in certain directions, reducing expressiveness.
666
- >
667
- > *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.
668
-
669
- **Average Norm**
670
- > *Definition:* Mean magnitude (L2 norm) of word vectors in the embedding space.
671
- >
672
- > *Intuition:* Indicates the typical "length" of vectors. Consistent norms suggest stable training; high variance may indicate some words are undertrained.
673
- >
674
- > *What to seek:* Relatively consistent norms across models. The absolute value matters less than consistency (low std deviation).
675
-
676
- **Cosine Similarity**
677
- > *Definition:* Measures angular similarity between vectors, ranging from -1 (opposite) to 1 (identical direction).
678
- >
679
- > *Intuition:* Words with similar meanings should have high cosine similarity. This is the standard metric for semantic relatedness in embeddings.
680
- >
681
- > *What to seek:* Semantically related words should score > 0.5; unrelated words should be near 0. Synonyms often score > 0.7.
682
-
683
- **t-SNE Visualization**
684
- > *Definition:* t-Distributed Stochastic Neighbor Embedding - a dimensionality reduction technique that preserves local structure for visualization.
685
- >
686
- > *Intuition:* Clusters in t-SNE plots indicate groups of semantically related words. Spread indicates vocabulary diversity; tight clusters suggest semantic coherence.
687
- >
688
- > *What to seek:* Meaningful clusters (e.g., numbers together, verbs together). Avoid over-interpreting distances - t-SNE preserves local, not global, structure.
689
-
690
- ### General Interpretation Guidelines
691
-
692
- 1. **Compare within model families:** Metrics are most meaningful when comparing models of the same type (e.g., 8k vs 64k tokenizer).
693
- 2. **Consider trade-offs:** Better performance on one metric often comes at the cost of another (e.g., compression vs. OOV rate).
694
- 3. **Context matters:** Optimal values depend on downstream tasks. Text generation may prioritize different metrics than classification.
695
- 4. **Corpus influence:** All metrics are influenced by corpus characteristics. Wikipedia text differs from social media or literature.
696
- 5. **Language-specific patterns:** Morphologically rich languages (like Arabic) may show different optimal ranges than analytic languages.
697
-
698
-
699
- ### Visualizations Index
700
-
701
- | Visualization | Description |
702
- |---------------|-------------|
703
- | Tokenizer Compression | Compression ratios by vocabulary size |
704
- | Tokenizer Fertility | Average token length by vocabulary |
705
- | Tokenizer OOV | Unknown token rates |
706
- | Tokenizer Total Tokens | Total tokens by vocabulary |
707
- | N-gram Perplexity | Perplexity by n-gram size |
708
- | N-gram Entropy | Entropy by n-gram size |
709
- | N-gram Coverage | Top pattern coverage |
710
- | N-gram Unique | Unique n-gram counts |
711
- | Markov Entropy | Entropy by context size |
712
- | Markov Branching | Branching factor by context |
713
- | Markov Contexts | Unique context counts |
714
- | Zipf's Law | Frequency-rank distribution with fit |
715
- | Vocab Frequency | Word frequency distribution |
716
- | Top 20 Words | Most frequent words |
717
- | Vocab Coverage | Cumulative coverage curve |
718
- | Embedding Isotropy | Vector space uniformity |
719
- | Embedding Norms | Vector magnitude distribution |
720
- | Embedding Similarity | Word similarity heatmap |
721
- | Nearest Neighbors | Similar words for key terms |
722
- | t-SNE Words | 2D word embedding visualization |
723
- | t-SNE Sentences | 2D sentence embedding visualization |
724
- | Position Encoding | Encoding method comparison |
725
- | Model Sizes | Storage requirements |
726
- | Performance Dashboard | Comprehensive performance overview |
727
 
728
  ---
729
- ## About This Project
730
-
731
- ### Data Source
732
 
733
- Models trained on [wikipedia-monthly](https://huggingface.co/datasets/omarkamali/wikipedia-monthly) - a monthly snapshot of Wikipedia articles across 300+ languages.
734
 
735
- ### Project
736
 
737
- A project by **[Wikilangs](https://wikilangs.org)** - Open-source NLP models for every Wikipedia language.
738
-
739
- ### Maintainer
740
-
741
- [Omar Kamali](https://omarkamali.com) - [Omneity Labs](https://omneitylabs.com)
742
 
743
  ### Citation
744
 
745
- If you use these models in your research, please cite:
746
-
747
  ```bibtex
748
  @misc{wikilangs2025,
749
- author = {Kamali, Omar},
750
- title = {Wikilangs: Open NLP Models for Wikipedia Languages},
751
- year = {2025},
752
- doi = {10.5281/zenodo.18073153},
753
  publisher = {Zenodo},
754
- url = {https://huggingface.co/wikilangs}
755
  institution = {Omneity Labs}
756
  }
757
  ```
758
 
759
- ### License
760
-
761
- MIT License - Free for academic and commercial use.
762
-
763
  ### Links
764
 
765
- - 🌐 Website: [wikilangs.org](https://wikilangs.org)
766
- - 🤗 Models: [huggingface.co/wikilangs](https://huggingface.co/wikilangs)
767
- - 📊 Data: [wikipedia-monthly](https://huggingface.co/datasets/omarkamali/wikipedia-monthly)
768
- - 👤 Author: [Omar Kamali](https://huggingface.co/omarkamali)
 
 
769
  - 🤝 Sponsor: [Featherless AI](https://featherless.ai)
770
- ---
771
- *Generated by Wikilangs Models Pipeline*
772
 
773
- *Report Date: 2026-01-13 20:45:23*
 
 
 
 
33
  metrics:
34
  - name: best_compression_ratio
35
  type: compression
36
+ value: 4.661
37
  - name: best_isotropy
38
  type: isotropy
39
+ value: 0.7886
40
+ - name: best_alignment_r10
41
+ type: alignment
42
+ value: 0.9180
43
  - name: vocabulary_size
44
  type: vocab
45
+ value: 1458224
46
+ generated: 2026-03-04
47
  ---
48
 
49
+ # Hungarian Wikilangs Models
 
50
 
51
+ Open-source tokenizers, n-gram & Markov language models, vocabulary stats, and word embeddings trained on **Hungarian** Wikipedia by [Wikilangs](https://wikilangs.org).
 
52
 
53
+ 🌐 [Language Page](https://wikilangs.org/languages/hu/) · 🎮 [Playground](https://wikilangs.org/playground/?lang=hu) · 📊 [Full Research Report](RESEARCH_REPORT.md)
54
 
55
+ ## Language Samples
56
 
57
+ Example sentences drawn from the Hungarian Wikipedia corpus:
 
 
 
 
 
 
58
 
59
+ > magyar nép magyar nyelv Magyarország Magyar állampolgárság Magyar, régi magyar családnév
60
 
61
+ > A Tejútrendszer szinonimája a csillagászatban Galaktika, egy tudományos-fantasztikus antológia neve
62
 
63
+ > Óe, japán családnév Óe, kisváros Japánban, Jamagata prefektúrában ÓE, az Óbudai Egyetem rövidítése
 
 
 
 
 
 
 
 
64
 
65
+ > Szó fogalma a nyelvészetben Szó fogalma a matematikai logikában és a formális nyelvek elméletében Szó fogalma az informatikában Szó fogalma a zenében Szo, japán kana
 
66
 
67
+ > Memória (biológia) Memória (számítástechnika): Számítástechnikában használják Memória (játék) Párkereső kártyajáték
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("hu_tokenizer_32k.model")
78
 
79
+ text = "Elvonás, addiktológia Elvonás, a szóalkotás egy módja"
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:** `Elvonás, addiktológia Elvonás, a szóalkotás egy módja`
94
 
95
  | Vocab | Tokens | Count |
96
  |-------|--------|-------|
97
+ | 8k | `▁elv on ás , ▁ad d ikt ológia elv on (+9 more)` | 19 |
98
+ | 16k | `▁elv on ás , ▁add ikt ológiaelv on ás (+8 more)` | 18 |
99
+ | 32k | `▁elvon ás , ▁add ikt ológia elvon ás , a (+5 more)` | 15 |
100
+ | 64k | `▁elvon ás , ▁add ikt ológia elvon ás ,a (+4 more)` | 14 |
101
 
102
+ **Sample 2:** `Memória (biológia) Memória (számítástechnika): Számítástechnikában használják Me…`
103
 
104
  | Vocab | Tokens | Count |
105
  |-------|--------|-------|
106
+ | 8k | `▁mem ória ▁( bi ológia ) mem ória( szám (+23 more)` | 33 |
107
+ | 16k | `▁mem ória ▁( bi ológia ) mem ória( számítás (+19 more)` | 29 |
108
+ | 32k | `▁memória ▁( bi ológia ) memória( számítás technika ): (+12 more)` | 22 |
109
+ | 64k | `▁memória ▁( biológia ) memória( számítás technika ):számítástechn (+10 more)` | 20 |
110
 
111
+ **Sample 3:** `Óe, japán családnév Óe, kisváros Japánban, Jamagata prefektúrában ÓE, az Óbudai `
112
 
113
  | Vocab | Tokens | Count |
114
  |-------|--------|-------|
115
+ | 8k | `▁ó e ,japáncsalád névó e , kis (+21 more)` | 31 |
116
+ | 16k | `▁ó e ,japáncsaládnévó e , kisvárosjapánban (+16 more)` | 26 |
117
+ | 32k | `▁ó e ,japáncsaládnévó e , kisvárosjapánban (+13 more)` | 23 |
118
+ | 64k | `▁ó e ,japáncsaládnévó e , kisvárosjapánban (+11 more)` | 21 |
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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("hu_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("hu_3gram_word.parquet").to_pandas()
141
+ print(df.head())
142
+ ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
143
 
144
+ ## Models Overview
 
145
 
146
  ![Performance Dashboard](visualizations/performance_dashboard.png)
147
 
148
+ | Category | Assets |
149
+ |----------|--------|
150
+ | Tokenizers | BPE at 8k, 16k, 32k, 64k vocab sizes |
151
+ | N-gram models | 2 / 3 / 4 / 5-gram (word & subword) |
152
+ | Markov chains | Context 1–5 (word & subword) |
153
+ | Embeddings | 32d, 64d, 128d mono & aligned |
154
+ | Vocabulary | Full frequency list + Zipf analysis |
155
+ | Statistics | Corpus & model statistics JSON |
156
+
157
+ ## Metrics Summary
158
+
159
+ | Component | Model | Key Metric | Value |
160
+ |-----------|-------|------------|-------|
161
+ | Tokenizer | 8k BPE | Compression | 3.50x |
162
+ | Tokenizer | 16k BPE | Compression | 3.92x |
163
+ | Tokenizer | 32k BPE | Compression | 4.31x |
164
+ | Tokenizer | 64k BPE | Compression | 4.66x 🏆 |
165
+ | N-gram | 2-gram (subword) | Perplexity | 429 🏆 |
166
+ | N-gram | 2-gram (word) | Perplexity | 362,917 |
167
+ | N-gram | 3-gram (subword) | Perplexity | 4,501 |
168
+ | N-gram | 3-gram (word) | Perplexity | 1,261,909 |
169
+ | N-gram | 4-gram (subword) | Perplexity | 29,749 |
170
+ | N-gram | 4-gram (word) | Perplexity | 2,487,801 |
171
+ | N-gram | 5-gram (subword) | Perplexity | 135,455 |
172
+ | N-gram | 5-gram (word) | Perplexity | 1,806,602 |
173
+ | Markov | ctx-1 (subword) | Predictability | 0.0% |
174
+ | Markov | ctx-1 (word) | Predictability | 5.8% |
175
+ | Markov | ctx-2 (subword) | Predictability | 32.3% |
176
+ | Markov | ctx-2 (word) | Predictability | 68.8% |
177
+ | Markov | ctx-3 (subword) | Predictability | 23.4% |
178
+ | Markov | ctx-3 (word) | Predictability | 88.4% |
179
+ | Markov | ctx-4 (subword) | Predictability | 25.2% |
180
+ | Markov | ctx-4 (word) | Predictability | 96.0% 🏆 |
181
+ | Vocabulary | full | Size | 1,458,224 |
182
+ | Vocabulary | full | Zipf | 0.9963 |
183
+ | Embeddings | mono_32d | Isotropy | 0.7886 |
184
+ | Embeddings | mono_64d | Isotropy | 0.7831 |
185
+ | Embeddings | mono_128d | Isotropy | 0.7114 |
186
+ | Embeddings | aligned_32d | Isotropy | 0.7886 🏆 |
187
+ | Embeddings | aligned_64d | Isotropy | 0.7831 |
188
+ | Embeddings | aligned_128d | Isotropy | 0.7114 |
189
+ | Alignment | aligned_32d | R@1 / R@5 / R@10 | 36.0% / 62.8% / 75.2% |
190
+ | Alignment | aligned_64d | R@1 / R@5 / R@10 | 53.2% / 77.0% / 85.6% |
191
+ | Alignment | aligned_128d | R@1 / R@5 / R@10 | 63.0% / 85.4% / 91.8% 🏆 |
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/hu/)
221
+ - 🎮 [Playground](https://wikilangs.org/playground/?lang=hu)
222
+ - 🤗 [HuggingFace models](https://huggingface.co/wikilangs)
223
+ - 📊 [wikipedia-monthly dataset](https://huggingface.co/datasets/omarkamali/wikipedia-monthly)
224
+ - 👤 [Omar Kamali](https://huggingface.co/omarkamali)
225
  - 🤝 Sponsor: [Featherless AI](https://featherless.ai)
 
 
226
 
227
+ **License:** MIT — free for academic and commercial use.
228
+
229
+ ---
230
+ *Generated by Wikilangs Pipeline · 2026-03-04 18:37:58*
RESEARCH_REPORT.md ADDED
@@ -0,0 +1,686 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Hungarian — Full Ablation Study & Research Report
2
+
3
+ Detailed evaluation of all model variants trained on **Hungarian** Wikipedia data by [Wikilangs](https://wikilangs.org).
4
+
5
+ 👈 [Back to README](README.md)
6
+
7
+ ## 📋 Repository Contents
8
+
9
+ ### Models & Assets
10
+
11
+ - Tokenizers (8k, 16k, 32k, 64k)
12
+ - N-gram models (2, 3, 4, 5-gram)
13
+ - Markov chains (context of 1, 2, 3, 4 and 5)
14
+ - Subword N-gram and Markov chains
15
+ - Embeddings in various sizes and dimensions (aligned and unaligned)
16
+ - Language Vocabulary
17
+ - Language Statistics
18
+
19
+ ![Performance Dashboard](visualizations/performance_dashboard.png)
20
+
21
+ ### Analysis and Evaluation
22
+
23
+ - [1. Tokenizer Evaluation](#1-tokenizer-evaluation)
24
+ - [2. N-gram Model Evaluation](#2-n-gram-model-evaluation)
25
+ - [3. Markov Chain Evaluation](#3-markov-chain-evaluation)
26
+ - [4. Vocabulary Analysis](#4-vocabulary-analysis)
27
+ - [5. Word Embeddings Evaluation](#5-word-embeddings-evaluation)
28
+ - [6. Morphological Analysis (Experimental)](#6--morphological-analysis-experimental)
29
+ - [7. Summary & Recommendations](#7-summary--recommendations)
30
+ - [Metrics Glossary](#appendix-metrics-glossary--interpretation-guide)
31
+ - [Visualizations Index](#visualizations-index)
32
+
33
+ ---
34
+ ## 1. Tokenizer Evaluation
35
+
36
+ ![Tokenizer Compression](visualizations/tokenizer_compression.png)
37
+
38
+ ![Tokenizer Fertility](visualizations/tokenizer_fertility.png)
39
+
40
+ ![Tokenizer OOV](visualizations/tokenizer_oov.png)
41
+
42
+ ![Total Tokens](visualizations/tokenizer_total_tokens.png)
43
+
44
+ ### Results
45
+
46
+ | Vocab Size | Compression | Avg Token Len | UNK Rate | Total Tokens |
47
+ |------------|-------------|---------------|----------|--------------|
48
+ | **8k** | 3.505x | 3.51 | 0.1725% | 3,328,421 |
49
+ | **16k** | 3.921x | 3.92 | 0.1930% | 2,974,904 |
50
+ | **32k** | 4.311x | 4.31 | 0.2122% | 2,705,982 |
51
+ | **64k** | 4.661x 🏆 | 4.66 | 0.2295% | 2,502,482 |
52
+
53
+ ### Tokenization Examples
54
+
55
+ Below are sample sentences tokenized with each vocabulary size:
56
+
57
+ **Sample 1:** `Elvonás, addiktológia Elvonás, a szóalkotás egy módja`
58
+
59
+ | Vocab | Tokens | Count |
60
+ |-------|--------|-------|
61
+ | 8k | `▁elv on ás , ▁ad d ikt ológia ▁elv on ... (+9 more)` | 19 |
62
+ | 16k | `▁elv on ás , ▁add ikt ológia ▁elv on ás ... (+8 more)` | 18 |
63
+ | 32k | `▁elvon ás , ▁add ikt ológia ▁elvon ás , ▁a ... (+5 more)` | 15 |
64
+ | 64k | `▁elvon ás , ▁add ikt ológia ▁elvon ás , ▁a ... (+4 more)` | 14 |
65
+
66
+ **Sample 2:** `Memória (biológia) Memória (számítástechnika): Számítástechnikában használják Me...`
67
+
68
+ | Vocab | Tokens | Count |
69
+ |-------|--------|-------|
70
+ | 8k | `▁mem ória ▁( bi ológia ) ▁mem ória ▁( szám ... (+23 more)` | 33 |
71
+ | 16k | `▁mem ória ▁( bi ológia ) ▁mem ória ▁( számítás ... (+19 more)` | 29 |
72
+ | 32k | `▁memória ▁( bi ológia ) ▁memória ▁( számítás technika ): ... (+12 more)` | 22 |
73
+ | 64k | `▁memória ▁( biológia ) ▁memória ▁( számítás technika ): ▁számítástechn ... (+10 more)` | 20 |
74
+
75
+ **Sample 3:** `Óe, japán családnév Óe, kisváros Japánban, Jamagata prefektúrában ÓE, az Óbudai ...`
76
+
77
+ | Vocab | Tokens | Count |
78
+ |-------|--------|-------|
79
+ | 8k | `▁ó e , ▁japán ▁család név ▁ó e , ▁kis ... (+21 more)` | 31 |
80
+ | 16k | `▁ó e , ▁japán ▁családnév ▁ó e , ▁kisváros ▁japánban ... (+16 more)` | 26 |
81
+ | 32k | `▁ó e , ▁japán ▁családnév ▁ó e , ▁kisváros ▁japánban ... (+13 more)` | 23 |
82
+ | 64k | `▁ó e , ▁japán ▁családnév ▁ó e , ▁kisváros ▁japánban ... (+11 more)` | 21 |
83
+
84
+
85
+ ### Key Findings
86
+
87
+ - **Best Compression:** 64k achieves 4.661x compression
88
+ - **Lowest UNK Rate:** 8k with 0.1725% unknown tokens
89
+ - **Trade-off:** Larger vocabularies improve compression but increase model size
90
+ - **Recommendation:** 32k vocabulary provides optimal balance for production use
91
+
92
+ ---
93
+ ## 2. N-gram Model Evaluation
94
+
95
+ ![N-gram Perplexity](visualizations/ngram_perplexity.png)
96
+
97
+ ![N-gram Unique](visualizations/ngram_unique.png)
98
+
99
+ ![N-gram Coverage](visualizations/ngram_coverage.png)
100
+
101
+ ### Results
102
+
103
+ | N-gram | Variant | Perplexity | Entropy | Unique N-grams | Top-100 Coverage | Top-1000 Coverage |
104
+ |--------|---------|------------|---------|----------------|------------------|-------------------|
105
+ | **2-gram** | Word | 362,917 | 18.47 | 2,207,301 | 5.4% | 14.2% |
106
+ | **2-gram** | Subword | 429 🏆 | 8.74 | 22,141 | 54.6% | 98.3% |
107
+ | **3-gram** | Word | 1,261,909 | 20.27 | 3,510,384 | 2.1% | 6.2% |
108
+ | **3-gram** | Subword | 4,501 | 12.14 | 188,349 | 17.4% | 56.2% |
109
+ | **4-gram** | Word | 2,487,801 | 21.25 | 5,404,855 | 2.0% | 5.1% |
110
+ | **4-gram** | Subword | 29,749 | 14.86 | 1,214,042 | 7.6% | 26.9% |
111
+ | **5-gram** | Word | 1,806,602 | 20.78 | 3,707,959 | 2.3% | 5.8% |
112
+ | **5-gram** | Subword | 135,455 | 17.05 | 4,635,566 | 3.7% | 15.6% |
113
+
114
+ ### Top 5 N-grams by Size
115
+
116
+ **2-grams (Word):**
117
+
118
+ | Rank | N-gram | Count |
119
+ |------|--------|-------|
120
+ | 1 | `és a` | 381,304 |
121
+ | 2 | `hogy a` | 127,431 |
122
+ | 3 | `és az` | 111,129 |
123
+ | 4 | `a magyar` | 107,955 |
124
+ | 5 | `volt a` | 102,268 |
125
+
126
+ **3-grams (Word):**
127
+
128
+ | Rank | N-gram | Count |
129
+ |------|--------|-------|
130
+ | 1 | `személyek elhunyt személyek` | 25,908 |
131
+ | 2 | `született személyek elhunyt` | 25,567 |
132
+ | 3 | `madarai madarai madarai` | 21,522 |
133
+ | 4 | `jegyzetek további információk` | 19,348 |
134
+ | 5 | `kisbolygók listája jegyzetek` | 13,405 |
135
+
136
+ **4-grams (Word):**
137
+
138
+ | Rank | N-gram | Count |
139
+ |------|--------|-------|
140
+ | 1 | `született személyek elhunyt személyek` | 25,567 |
141
+ | 2 | `madarai madarai madarai madarai` | 17,618 |
142
+ | 3 | `listája jegyzetek naprendszer kisbolygói` | 13,129 |
143
+ | 4 | `kisbolygók listája jegyzetek naprendszer` | 13,128 |
144
+ | 5 | `kapcsolódó szócikkek kisbolygók listája` | 13,112 |
145
+
146
+ **5-grams (Word):**
147
+
148
+ | Rank | N-gram | Count |
149
+ |------|--------|-------|
150
+ | 1 | `madarai madarai madarai madarai madarai` | 14,553 |
151
+ | 2 | `kisbolygók listája jegyzetek naprendszer kisbolygói` | 13,128 |
152
+ | 3 | `kapcsolódó szócikkek kisbolygók listája jegyzetek` | 13,034 |
153
+ | 4 | `szócikkek kisbolygók listája jegyzetek naprendszer` | 12,763 |
154
+ | 5 | `a naprendszer kisbolygóövében található aszteroida` | 12,084 |
155
+
156
+ **2-grams (Subword):**
157
+
158
+ | Rank | N-gram | Count |
159
+ |------|--------|-------|
160
+ | 1 | `_ a` | 14,447,157 |
161
+ | 2 | `a _` | 13,088,817 |
162
+ | 3 | `s z` | 10,335,605 |
163
+ | 4 | `t _` | 8,923,690 |
164
+ | 5 | `e l` | 8,560,877 |
165
+
166
+ **3-grams (Subword):**
167
+
168
+ | Rank | N-gram | Count |
169
+ |------|--------|-------|
170
+ | 1 | `_ a _` | 7,569,874 |
171
+ | 2 | `_ s z` | 3,684,895 |
172
+ | 3 | `_ a z` | 2,740,812 |
173
+ | 4 | `é s _` | 2,565,914 |
174
+ | 5 | `s z e` | 2,500,891 |
175
+
176
+ **4-grams (Subword):**
177
+
178
+ | Rank | N-gram | Count |
179
+ |------|--------|-------|
180
+ | 1 | `_ a z _` | 2,372,557 |
181
+ | 2 | `_ é s _` | 2,184,467 |
182
+ | 3 | `_ e g y` | 1,442,169 |
183
+ | 4 | `_ m e g` | 1,293,813 |
184
+ | 5 | `. _ a _` | 1,289,446 |
185
+
186
+ **5-grams (Subword):**
187
+
188
+ | Rank | N-gram | Count |
189
+ |------|--------|-------|
190
+ | 1 | `_ a z _ e` | 641,291 |
191
+ | 2 | `_ s z e r` | 617,289 |
192
+ | 3 | `_ é s _ a` | 566,317 |
193
+ | 4 | `_ e g y _` | 545,352 |
194
+ | 5 | `_ v o l t` | 535,186 |
195
+
196
+
197
+ ### Key Findings
198
+
199
+ - **Best Perplexity:** 2-gram (subword) with 429
200
+ - **Entropy Trend:** Decreases with larger n-grams (more predictable)
201
+ - **Coverage:** Top-1000 patterns cover ~16% of corpus
202
+ - **Recommendation:** 4-gram or 5-gram for best predictive performance
203
+
204
+ ---
205
+ ## 3. Markov Chain Evaluation
206
+
207
+ ![Markov Entropy](visualizations/markov_entropy.png)
208
+
209
+ ![Markov Contexts](visualizations/markov_contexts.png)
210
+
211
+ ![Markov Branching](visualizations/markov_branching.png)
212
+
213
+ ### Results
214
+
215
+ | Context | Variant | Avg Entropy | Perplexity | Branching Factor | Unique Contexts | Predictability |
216
+ |---------|---------|-------------|------------|------------------|-----------------|----------------|
217
+ | **1** | Word | 0.9424 | 1.922 | 10.97 | 3,256,935 | 5.8% |
218
+ | **1** | Subword | 1.1652 | 2.243 | 8.26 | 11,176 | 0.0% |
219
+ | **2** | Word | 0.3123 | 1.242 | 2.03 | 35,712,539 | 68.8% |
220
+ | **2** | Subword | 0.6772 | 1.599 | 4.69 | 92,249 | 32.3% |
221
+ | **3** | Word | 0.1163 | 1.084 | 1.24 | 72,420,142 | 88.4% |
222
+ | **3** | Subword | 0.7664 | 1.701 | 4.71 | 432,153 | 23.4% |
223
+ | **4** | Word | 0.0401 🏆 | 1.028 | 1.06 | 89,534,275 | 96.0% |
224
+ | **4** | Subword | 0.7484 | 1.680 | 3.95 | 2,032,871 | 25.2% |
225
+
226
+ ### Generated Text Samples (Word-based)
227
+
228
+ Below are text samples generated from each word-based Markov chain model:
229
+
230
+ **Context Size 1:**
231
+
232
+ 1. `a filozófiában jeleskedők élete vácon igazgatótanár aszalón bőcsön borsod abaúj zemplén vármegye hon...`
233
+ 2. `az elfelejtett kísérlet singer berta fia némó elbűvölő szörnyeteg régebben megszűnt a európa bajnoki...`
234
+ 3. `és dániai roskilde dánia szoroson át kellett találni a királyi engedélyt egy bizonyos ágakra elosztó...`
235
+
236
+ **Context Size 2:**
237
+
238
+ 1. `és a helybeli hazafiak köztük władysław gomułka lett akkor több fellépést is a neve és a razorblade`
239
+ 2. `hogy a gerjesztést követően 0 0 0 0 0 0 0 fe7 lépéssorozatból áll a leendő űrkísérletekhez`
240
+ 3. `és az egy évvel korábban halt meg csak hallomásból ismerik a kantonmozdony mivel az ember annak érde...`
241
+
242
+ **Context Size 3:**
243
+
244
+ 1. `született személyek elhunyt személyek drámaírók novogyevicsi temetőben eltemetett személyek erdélyi ...`
245
+ 2. `madarai madarai madarai északi mariana szigetek madarai madarai madarai madarai amerikai egyesült ál...`
246
+ 3. `jegyzetek további információk labdarúgók river plate labdarúgói cruz azul labdarúgói atlas labdarúgó...`
247
+
248
+ **Context Size 4:**
249
+
250
+ 1. `madarai madarai madarai madarai madarai madarai tomé és príncipe madarai madarai madarai seychelle s...`
251
+ 2. `született személyek elhunyt személyek úszók olimpiai ezüstérmesek nők`
252
+ 3. `kisbolygók listája jegyzetek naprendszer kisbolygói vec lista de aënna`
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. `_tén.krermi_k_ho`
262
+ 2. `emi_ra_vaiszegyő`
263
+ 3. `ajat_(gola,_jena`
264
+
265
+ **Context Size 2:**
266
+
267
+ 1. `_a_törül_ingmukiv`
268
+ 2. `a_katt,_fő_sztünc`
269
+ 3. `szvetibelyek_mika`
270
+
271
+ **Context Size 3:**
272
+
273
+ 1. `_a_„tusábang_napil`
274
+ 2. `_szócikkel_a_bolyg`
275
+ 3. `_az_a4_március_211`
276
+
277
+ **Context Size 4:**
278
+
279
+ 1. `_az_eszit_lasszultá`
280
+ 2. `_és_galéria_szereti`
281
+ 3. `_egyik_mária_foglal`
282
+
283
+
284
+ ### Key Findings
285
+
286
+ - **Best Predictability:** Context-4 (word) with 96.0% predictability
287
+ - **Branching Factor:** Decreases with context size (more deterministic)
288
+ - **Memory Trade-off:** Larger contexts require more storage (2,032,871 contexts)
289
+ - **Recommendation:** Context-3 or Context-4 for text generation
290
+
291
+ ---
292
+ ## 4. Vocabulary Analysis
293
+
294
+ ![Zipf's Law](visualizations/zipf_law.png)
295
+
296
+ ![Top Words](visualizations/top20_words.png)
297
+
298
+ ![Coverage Curve](visualizations/vocab_coverage.png)
299
+
300
+ ### Statistics
301
+
302
+ | Metric | Value |
303
+ |--------|-------|
304
+ | Vocabulary Size | 1,458,224 |
305
+ | Total Tokens | 103,537,627 |
306
+ | Mean Frequency | 71.00 |
307
+ | Median Frequency | 4 |
308
+ | Frequency Std Dev | 7231.61 |
309
+
310
+ ### Most Common Words
311
+
312
+ | Rank | Word | Frequency |
313
+ |------|------|-----------|
314
+ | 1 | a | 7,834,400 |
315
+ | 2 | az | 2,443,698 |
316
+ | 3 | és | 2,194,407 |
317
+ | 4 | is | 733,028 |
318
+ | 5 | egy | 579,913 |
319
+ | 6 | hogy | 494,341 |
320
+ | 7 | volt | 474,789 |
321
+ | 8 | nem | 446,048 |
322
+ | 9 | 1 | 405,757 |
323
+ | 10 | magyar | 343,055 |
324
+
325
+ ### Least Common Words (from vocabulary)
326
+
327
+ | Rank | Word | Frequency |
328
+ |------|------|-----------|
329
+ | 1 | léggömbzár | 2 |
330
+ | 2 | elterelővel | 2 |
331
+ | 3 | hajófelderítő | 2 |
332
+ | 4 | szűrőrendszerrel | 2 |
333
+ | 5 | 801ml | 2 |
334
+ | 6 | 801tp | 2 |
335
+ | 7 | sorosmotort | 2 |
336
+ | 8 | stammkennzeichen | 2 |
337
+ | 9 | schindleréről | 2 |
338
+ | 10 | kapraraszműlesiklásnem | 2 |
339
+
340
+ ### Zipf's Law Analysis
341
+
342
+ | Metric | Value |
343
+ |--------|-------|
344
+ | Zipf Coefficient | 0.9296 |
345
+ | R² (Goodness of Fit) | 0.996343 |
346
+ | Adherence Quality | **excellent** |
347
+
348
+ ### Coverage Analysis
349
+
350
+ | Top N Words | Coverage |
351
+ |-------------|----------|
352
+ | Top 100 | 25.8% |
353
+ | Top 1,000 | 45.6% |
354
+ | Top 5,000 | 61.9% |
355
+ | Top 10,000 | 69.2% |
356
+
357
+ ### Key Findings
358
+
359
+ - **Zipf Compliance:** R²=0.9963 indicates excellent adherence to Zipf's law
360
+ - **High Frequency Dominance:** Top 100 words cover 25.8% of corpus
361
+ - **Long Tail:** 1,448,224 words needed for remaining 30.8% coverage
362
+
363
+ ---
364
+ ## 5. Word Embeddings Evaluation
365
+
366
+ ![Embedding Isotropy](visualizations/embedding_isotropy.png)
367
+
368
+ ![Similarity Matrix](visualizations/embedding_similarity.png)
369
+
370
+ ![t-SNE Words](visualizations/tsne_words.png)
371
+
372
+ ![t-SNE Sentences](visualizations/tsne_sentences.png)
373
+
374
+
375
+ ### 5.1 Cross-Lingual Alignment
376
+
377
+ ![Alignment Quality](visualizations/embedding_alignment_quality.png)
378
+
379
+ ![Multilingual t-SNE](visualizations/embedding_tsne_multilingual.png)
380
+
381
+
382
+ ### 5.2 Model Comparison
383
+
384
+ | Model | Dimension | Isotropy | Semantic Density | Alignment R@1 | Alignment R@10 |
385
+ |-------|-----------|----------|------------------|---------------|----------------|
386
+ | **mono_32d** | 32 | 0.7886 | 0.3560 | N/A | N/A |
387
+ | **mono_64d** | 64 | 0.7831 | 0.2846 | N/A | N/A |
388
+ | **mono_128d** | 128 | 0.7114 | 0.2337 | N/A | N/A |
389
+ | **aligned_32d** | 32 | 0.7886 🏆 | 0.3516 | 0.3600 | 0.7520 |
390
+ | **aligned_64d** | 64 | 0.7831 | 0.2765 | 0.5320 | 0.8560 |
391
+ | **aligned_128d** | 128 | 0.7114 | 0.2243 | 0.6300 | 0.9180 |
392
+
393
+ ### Key Findings
394
+
395
+ - **Best Isotropy:** aligned_32d with 0.7886 (more uniform distribution)
396
+ - **Semantic Density:** Average pairwise similarity of 0.2878. Lower values indicate better semantic separation.
397
+ - **Alignment Quality:** Aligned models achieve up to 63.0% R@1 in cross-lingual retrieval.
398
+ - **Recommendation:** 128d aligned for best cross-lingual performance
399
+
400
+ ---
401
+ ## 6. Morphological Analysis (Experimental)
402
+
403
+ This section presents an automated morphological analysis derived from the statistical divergence between word-level and subword-level models. By analyzing where subword predictability spikes and where word-level coverage fails, we can infer linguistic structures without supervised data.
404
+
405
+ ### 6.1 Productivity & Complexity
406
+
407
+ | Metric | Value | Interpretation | Recommendation |
408
+ |--------|-------|----------------|----------------|
409
+ | Productivity Index | **5.000** | High morphological productivity | Reliable analysis |
410
+ | Idiomaticity Gap | **-0.625** | Low formulaic content | - |
411
+
412
+ ### 6.2 Affix Inventory (Productive Units)
413
+
414
+ These are the most productive prefixes and suffixes identified by sampling the vocabulary for global substitutability patterns. A unit is considered an affix if stripping it leaves a valid stem that appears in other contexts.
415
+
416
+ #### Productive Prefixes
417
+ | Prefix | Examples |
418
+ |--------|----------|
419
+ | `-s` | schmör, szabadítására, szertárai |
420
+ | `-k` | kelvinator, kürtszavára, keselyűféléket |
421
+ | `-a` | arkopharma, adequate, akszukhosz |
422
+ | `-m` | megyéjébe, mongu, mozilátogatók |
423
+ | `-t` | tlp, terheltségének, tanulhatóak |
424
+ | `-b` | balszárnyának, bhov, beszédfejlődési |
425
+ | `-ma` | mainstoneky, margati, mayrnak |
426
+ | `-e` | elektronszerkezetével, egységnyiek, esztyemirova |
427
+
428
+ #### Productive Suffixes
429
+ | Suffix | Examples |
430
+ |--------|----------|
431
+ | `-k` | mozilátogatók, balszárnyának, kóruspadok |
432
+ | `-t` | használókat, felvevőpiacot, keselyűféléket |
433
+ | `-n` | végezetlen, érinthetetlen, állatkertjeiben |
434
+ | `-a` | arkopharma, kürtszavára, vaskarika |
435
+ | `-l` | elektronszerkezetével, versenyeitől, pálinkafőzéssel |
436
+ | `-s` | rombouts, ikszes, gibbins |
437
+ | `-i` | lxviii, desai, vibrálni |
438
+ | `-e` | megyéjébe, jugoslovenske, adequate |
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
+ | `váro` | 2.03x | 219 contexts | város, váron, várod |
447
+ | `embe` | 1.60x | 288 contexts | ember, embed, bembe |
448
+ | `llen` | 1.53x | 361 contexts | llena, illen, lleno |
449
+ | `atás` | 1.48x | 365 contexts | patás, hatás, avatás |
450
+ | `llet` | 1.60x | 226 contexts | allet, ellet, illet |
451
+ | `ítás` | 1.43x | 316 contexts | újítás, ásítás, ámítás |
452
+ | `ítot` | 1.65x | 136 contexts | ított, vított, osított |
453
+ | `erül` | 1.43x | 288 contexts | kerül, terül, derül |
454
+ | `mber` | 1.33x | 400 contexts | ember, imber, amber |
455
+ | `ület` | 1.38x | 311 contexts | fület, szület, őrület |
456
+ | `rtén` | 2.09x | 42 contexts | örtény, értény, kurtén |
457
+ | `örté` | 1.85x | 64 contexts | törté, örtény, körték |
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
+ | `-k` | `-t` | 115 words | közéletét, kansast |
466
+ | `-k` | `-k` | 112 words | kreatívnak, kiújulnak |
467
+ | `-s` | `-l` | 101 words | szúfizmussal, szinkronstábbal |
468
+ | `-s` | `-k` | 99 words | sírkamrájuk, szülővárosnak |
469
+ | `-s` | `-t` | 95 words | szakmáikat, shiflett |
470
+ | `-m` | `-k` | 86 words | mellékérték, maffiacsoportok |
471
+ | `-k` | `-l` | 83 words | középjel, krízisekkel |
472
+ | `-s` | `-n` | 81 words | szövegírásban, spalatóban |
473
+ | `-k` | `-n` | 76 words | kihalásában, konstruktiven |
474
+ | `-k` | `-a` | 72 words | korongcsiga, kaparinthatja |
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
+ | vercruysse | **`vercruys-s-e`** | 7.5 | `s` |
483
+ | szocialta | **`szoci-al-ta`** | 7.5 | `al` |
484
+ | stílusbanaz | **`stílusban-a-z`** | 7.5 | `a` |
485
+ | részvényeiket | **`részvényei-k-et`** | 7.5 | `k` |
486
+ | hátoldalra | **`hátold-al-ra`** | 7.5 | `al` |
487
+ | fullernek | **`fuller-n-ek`** | 7.5 | `n` |
488
+ | nézhetőnek | **`nézhető-n-ek`** | 7.5 | `n` |
489
+ | napjainkbeli | **`napjainkb-el-i`** | 7.5 | `el` |
490
+ | gyarmataikra | **`gyarmatai-k-ra`** | 7.5 | `k` |
491
+ | mandülion | **`mandül-i-on`** | 7.5 | `i` |
492
+ | robotterheit | **`robotterhe-i-t`** | 7.5 | `i` |
493
+ | albuginea | **`albugin-e-a`** | 7.5 | `e` |
494
+ | elnagyoltak | **`elnagyol-t-ak`** | 7.5 | `t` |
495
+ | minőségileg | **`minőségil-e-g`** | 7.5 | `e` |
496
+ | szárnyacskák | **`szárnyacs-k-ák`** | 7.5 | `k` |
497
+
498
+ ### 6.6 Linguistic Interpretation
499
+
500
+ > **Automated Insight:**
501
+ The language Hungarian shows high morphological productivity. The subword models are significantly more efficient than word models, suggesting a rich system of affixation or compounding.
502
+
503
+ ---
504
+ ## 7. Summary & Recommendations
505
+
506
+ ![Performance Dashboard](visualizations/performance_dashboard.png)
507
+
508
+ ### Production Recommendations
509
+
510
+ | Component | Recommended | Rationale |
511
+ |-----------|-------------|-----------|
512
+ | Tokenizer | **64k BPE** | Best compression (4.66x) |
513
+ | N-gram | **2-gram** | Lowest perplexity (429) |
514
+ | Markov | **Context-4** | Highest predictability (96.0%) |
515
+ | Embeddings | **100d** | Balanced semantic capture and isotropy |
516
+
517
+
518
+ ---
519
+ ## Appendix: Metrics Glossary & Interpretation Guide
520
+
521
+ This section provides definitions, intuitions, and guidance for interpreting the metrics used throughout this report.
522
+
523
+ ### Tokenizer Metrics
524
+
525
+ **Compression Ratio**
526
+ > *Definition:* The ratio of characters to tokens (chars/token). Measures how efficiently the tokenizer represents text.
527
+ >
528
+ > *Intuition:* Higher compression means fewer tokens needed to represent the same text, reducing sequence lengths for downstream models. A 3x compression means ~3 characters per token on average.
529
+ >
530
+ > *What to seek:* Higher is generally better for efficiency, but extremely high compression may indicate overly aggressive merging that loses morphological information.
531
+
532
+ **Average Token Length (Fertility)**
533
+ > *Definition:* Mean number of characters per token produced by the tokenizer.
534
+ >
535
+ > *Intuition:* Reflects the granularity of tokenization. Longer tokens capture more context but may struggle with rare words; shorter tokens are more flexible but increase sequence length.
536
+ >
537
+ > *What to seek:* Balance between 2-5 characters for most languages. Arabic/morphologically-rich languages may benefit from slightly longer tokens.
538
+
539
+ **Unknown Token Rate (OOV Rate)**
540
+ > *Definition:* Percentage of tokens that map to the unknown/UNK token, indicating words the tokenizer cannot represent.
541
+ >
542
+ > *Intuition:* Lower OOV means better vocabulary coverage. High OOV indicates the tokenizer encounters many unseen character sequences.
543
+ >
544
+ > *What to seek:* Below 1% is excellent; below 5% is acceptable. BPE tokenizers typically achieve very low OOV due to subword fallback.
545
+
546
+ ### N-gram Model Metrics
547
+
548
+ **Perplexity**
549
+ > *Definition:* Measures how "surprised" the model is by test data. Mathematically: 2^(cross-entropy). Lower values indicate better prediction.
550
+ >
551
+ > *Intuition:* If perplexity is 100, the model is as uncertain as if choosing uniformly among 100 options at each step. A perplexity of 10 means effectively choosing among 10 equally likely options.
552
+ >
553
+ > *What to seek:* Lower is better. Perplexity decreases with larger n-grams (more context). Values vary widely by language and corpus size.
554
+
555
+ **Entropy**
556
+ > *Definition:* Average information content (in bits) needed to encode the next token given the context. Related to perplexity: perplexity = 2^entropy.
557
+ >
558
+ > *Intuition:* High entropy means high uncertainty/randomness; low entropy means predictable patterns. Natural language typically has entropy between 1-4 bits per character.
559
+ >
560
+ > *What to seek:* Lower entropy indicates more predictable text patterns. Entropy should decrease as n-gram size increases.
561
+
562
+ **Coverage (Top-K)**
563
+ > *Definition:* Percentage of corpus occurrences explained by the top K most frequent n-grams.
564
+ >
565
+ > *Intuition:* High coverage with few patterns indicates repetitive/formulaic text; low coverage suggests diverse vocabulary usage.
566
+ >
567
+ > *What to seek:* Depends on use case. For language modeling, moderate coverage (40-60% with top-1000) is typical for natural text.
568
+
569
+ ### Markov Chain Metrics
570
+
571
+ **Average Entropy**
572
+ > *Definition:* Mean entropy across all contexts, measuring average uncertainty in next-word prediction.
573
+ >
574
+ > *Intuition:* Lower entropy means the model is more confident about what comes next. Context-1 has high entropy (many possible next words); Context-4 has low entropy (few likely continuations).
575
+ >
576
+ > *What to seek:* Decreasing entropy with larger context sizes. Very low entropy (<0.1) indicates highly deterministic transitions.
577
+
578
+ **Branching Factor**
579
+ > *Definition:* Average number of unique next tokens observed for each context.
580
+ >
581
+ > *Intuition:* High branching = many possible continuations (flexible but uncertain); low branching = few options (predictable but potentially repetitive).
582
+ >
583
+ > *What to seek:* Branching factor should decrease with context size. Values near 1.0 indicate nearly deterministic chains.
584
+
585
+ **Predictability**
586
+ > *Definition:* Derived metric: (1 - normalized_entropy) × 100%. Indicates how deterministic the model's predictions are.
587
+ >
588
+ > *Intuition:* 100% predictability means the next word is always certain; 0% means completely random. Real text falls between these extremes.
589
+ >
590
+ > *What to seek:* Higher predictability for text generation quality, but too high (>98%) may produce repetitive output.
591
+
592
+ ### Vocabulary & Zipf's Law Metrics
593
+
594
+ **Zipf's Coefficient**
595
+ > *Definition:* The slope of the log-log plot of word frequency vs. rank. Zipf's law predicts this should be approximately -1.
596
+ >
597
+ > *Intuition:* A coefficient near -1 indicates the corpus follows natural language patterns where a few words are very common and most words are rare.
598
+ >
599
+ > *What to seek:* Values between -0.8 and -1.2 indicate healthy natural language distribution. Deviations may suggest domain-specific or artificial text.
600
+
601
+ **R² (Coefficient of Determination)**
602
+ > *Definition:* Measures how well the linear fit explains the frequency-rank relationship. Ranges from 0 to 1.
603
+ >
604
+ > *Intuition:* R² near 1.0 means the data closely follows Zipf's law; lower values indicate deviation from expected word frequency patterns.
605
+ >
606
+ > *What to seek:* R² > 0.95 is excellent; > 0.99 indicates near-perfect Zipf adherence typical of large natural corpora.
607
+
608
+ **Vocabulary Coverage**
609
+ > *Definition:* Cumulative percentage of corpus tokens accounted for by the top N words.
610
+ >
611
+ > *Intuition:* Shows how concentrated word usage is. If top-100 words cover 50% of text, the corpus relies heavily on common words.
612
+ >
613
+ > *What to seek:* Top-100 covering 30-50% is typical. Higher coverage indicates more repetitive text; lower suggests richer vocabulary.
614
+
615
+ ### Word Embedding Metrics
616
+
617
+ **Isotropy**
618
+ > *Definition:* Measures how uniformly distributed vectors are in the embedding space. Computed as the ratio of minimum to maximum singular values.
619
+ >
620
+ > *Intuition:* High isotropy (near 1.0) means vectors spread evenly in all directions; low isotropy means vectors cluster in certain directions, reducing expressiveness.
621
+ >
622
+ > *What to seek:* Higher isotropy generally indicates better-quality embeddings. Values > 0.1 are reasonable; > 0.3 is good. Lower-dimensional embeddings tend to have higher isotropy.
623
+
624
+ **Average Norm**
625
+ > *Definition:* Mean magnitude (L2 norm) of word vectors in the embedding space.
626
+ >
627
+ > *Intuition:* Indicates the typical "length" of vectors. Consistent norms suggest stable training; high variance may indicate some words are undertrained.
628
+ >
629
+ > *What to seek:* Relatively consistent norms across models. The absolute value matters less than consistency (low std deviation).
630
+
631
+ **Cosine Similarity**
632
+ > *Definition:* Measures angular similarity between vectors, ranging from -1 (opposite) to 1 (identical direction).
633
+ >
634
+ > *Intuition:* Words with similar meanings should have high cosine similarity. This is the standard metric for semantic relatedness in embeddings.
635
+ >
636
+ > *What to seek:* Semantically related words should score > 0.5; unrelated words should be near 0. Synonyms often score > 0.7.
637
+
638
+ **t-SNE Visualization**
639
+ > *Definition:* t-Distributed Stochastic Neighbor Embedding - a dimensionality reduction technique that preserves local structure for visualization.
640
+ >
641
+ > *Intuition:* Clusters in t-SNE plots indicate groups of semantically related words. Spread indicates vocabulary diversity; tight clusters suggest semantic coherence.
642
+ >
643
+ > *What to seek:* Meaningful clusters (e.g., numbers together, verbs together). Avoid over-interpreting distances - t-SNE preserves local, not global, structure.
644
+
645
+ ### General Interpretation Guidelines
646
+
647
+ 1. **Compare within model families:** Metrics are most meaningful when comparing models of the same type (e.g., 8k vs 64k tokenizer).
648
+ 2. **Consider trade-offs:** Better performance on one metric often comes at the cost of another (e.g., compression vs. OOV rate).
649
+ 3. **Context matters:** Optimal values depend on downstream tasks. Text generation may prioritize different metrics than classification.
650
+ 4. **Corpus influence:** All metrics are influenced by corpus characteristics. Wikipedia text differs from social media or literature.
651
+ 5. **Language-specific patterns:** Morphologically rich languages (like Arabic) may show different optimal ranges than analytic languages.
652
+
653
+
654
+ ### Visualizations Index
655
+
656
+ | Visualization | Description |
657
+ |---------------|-------------|
658
+ | Tokenizer Compression | Compression ratios by vocabulary size |
659
+ | Tokenizer Fertility | Average token length by vocabulary |
660
+ | Tokenizer OOV | Unknown token rates |
661
+ | Tokenizer Total Tokens | Total tokens by vocabulary |
662
+ | N-gram Perplexity | Perplexity by n-gram size |
663
+ | N-gram Entropy | Entropy by n-gram size |
664
+ | N-gram Coverage | Top pattern coverage |
665
+ | N-gram Unique | Unique n-gram counts |
666
+ | Markov Entropy | Entropy by context size |
667
+ | Markov Branching | Branching factor by context |
668
+ | Markov Contexts | Unique context counts |
669
+ | Zipf's Law | Frequency-rank distribution with fit |
670
+ | Vocab Frequency | Word frequency distribution |
671
+ | Top 20 Words | Most frequent words |
672
+ | Vocab Coverage | Cumulative coverage curve |
673
+ | Embedding Isotropy | Vector space uniformity |
674
+ | Embedding Norms | Vector magnitude distribution |
675
+ | Embedding Similarity | Word similarity heatmap |
676
+ | Nearest Neighbors | Similar words for key terms |
677
+ | t-SNE Words | 2D word embedding visualization |
678
+ | t-SNE Sentences | 2D sentence embedding visualization |
679
+ | Position Encoding | Encoding method comparison |
680
+ | Model Sizes | Storage requirements |
681
+ | Performance Dashboard | Comprehensive performance overview |
682
+
683
+ ---
684
+ 👈 [Back to README](README.md)
685
+
686
+ *Generated by Wikilangs Pipeline · 2026-03-04 21:45:03*
hu_morph_tokenizer.json CHANGED
The diff for this file is too large to render. See raw diff
 
models/embeddings/aligned/hu_128d.bin CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:375b8f2dd8cf940cba11f19cb5ec4171ea4174ff0b1269f785266cd4b5c64c52
3
- size 2714345871
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ac5f40483139f9b93d9759f9d6f4ea94ad068a08c38d2d93976b928dc188a4c0
3
+ size 2039461602
models/embeddings/aligned/hu_128d.projection.npy CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:136255d5f3ca15d641cb487855d85fc949561b6c56e897d1ce027f0ebbf3e372
3
  size 65664
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:73e7df4f64bd325d3fe9012b98e783bdcd87f25e40299dcfe2dae8bf4f5ae1d2
3
  size 65664
models/embeddings/aligned/hu_128d_metadata.json CHANGED
@@ -3,6 +3,6 @@
3
  "dimension": 128,
4
  "version": "aligned",
5
  "hub_language": "en",
6
- "seed_vocab_size": 243333,
7
- "vocab_size": 1618616
8
  }
 
3
  "dimension": 128,
4
  "version": "aligned",
5
  "hub_language": "en",
6
+ "seed_vocab_size": 162633,
7
+ "vocab_size": 972473
8
  }
models/embeddings/aligned/hu_32d.bin CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:3f9652b70cf7ee2b5106f4004f971eeef2d332dcae5338f29a79a5bcdeab244e
3
- size 703248783
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c0041e9b10e5214b7217011bd551e460921c12609cfe20b2449e67e938ee04b0
3
+ size 524602338
models/embeddings/aligned/hu_32d.projection.npy CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:8dc66efeb06287764dbbf2ed082afbb622bb7b9f922217dbb5c2ba654b056b43
3
  size 4224
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:63f09eac4c362a8c92a28c4ee67062a30cc4f108e6aa616a747c48d1d8d62345
3
  size 4224
models/embeddings/aligned/hu_32d_metadata.json CHANGED
@@ -3,6 +3,6 @@
3
  "dimension": 32,
4
  "version": "aligned",
5
  "hub_language": "en",
6
- "seed_vocab_size": 243333,
7
- "vocab_size": 1618616
8
  }
 
3
  "dimension": 32,
4
  "version": "aligned",
5
  "hub_language": "en",
6
+ "seed_vocab_size": 162633,
7
+ "vocab_size": 972473
8
  }
models/embeddings/aligned/hu_64d.bin CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:1574b857512f5d411dad824e3703bf62ec3e405f3a714968d3ab2d02ad14dfb4
3
- size 1373614479
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2b37f1dad9963f7ddf4ddd73aa8d62dbbdfa0308116572f51bee3a7284837e3d
3
+ size 1029555426
models/embeddings/aligned/hu_64d.projection.npy CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:da8c128f66de235f988d24cf79edd7e3e5d4c2c060d8c95fcd28bf8cc6315c90
3
  size 16512
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7c8a290b5482911e7bbc14dd278380591bf4622fca04b1f4595b207fc99999b6
3
  size 16512
models/embeddings/aligned/hu_64d_metadata.json CHANGED
@@ -3,6 +3,6 @@
3
  "dimension": 64,
4
  "version": "aligned",
5
  "hub_language": "en",
6
- "seed_vocab_size": 243333,
7
- "vocab_size": 1618616
8
  }
 
3
  "dimension": 64,
4
  "version": "aligned",
5
  "hub_language": "en",
6
+ "seed_vocab_size": 162633,
7
+ "vocab_size": 972473
8
  }
models/embeddings/monolingual/hu_128d.bin CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:375b8f2dd8cf940cba11f19cb5ec4171ea4174ff0b1269f785266cd4b5c64c52
3
- size 2714345871
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ac5f40483139f9b93d9759f9d6f4ea94ad068a08c38d2d93976b928dc188a4c0
3
+ size 2039461602
models/embeddings/monolingual/hu_128d_metadata.json CHANGED
@@ -10,7 +10,7 @@
10
  "epochs": 5,
11
  "encoding_method": "rope",
12
  "dim": 128,
13
- "threads": 32
14
  },
15
- "vocab_size": 1618616
16
  }
 
10
  "epochs": 5,
11
  "encoding_method": "rope",
12
  "dim": 128,
13
+ "threads": 40
14
  },
15
+ "vocab_size": 972473
16
  }
models/embeddings/monolingual/hu_32d.bin CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:3f9652b70cf7ee2b5106f4004f971eeef2d332dcae5338f29a79a5bcdeab244e
3
- size 703248783
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c0041e9b10e5214b7217011bd551e460921c12609cfe20b2449e67e938ee04b0
3
+ size 524602338
models/embeddings/monolingual/hu_32d_metadata.json CHANGED
@@ -10,7 +10,7 @@
10
  "epochs": 5,
11
  "encoding_method": "rope",
12
  "dim": 32,
13
- "threads": 32
14
  },
15
- "vocab_size": 1618616
16
  }
 
10
  "epochs": 5,
11
  "encoding_method": "rope",
12
  "dim": 32,
13
+ "threads": 40
14
  },
15
+ "vocab_size": 972473
16
  }
models/embeddings/monolingual/hu_64d.bin CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:1574b857512f5d411dad824e3703bf62ec3e405f3a714968d3ab2d02ad14dfb4
3
- size 1373614479
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2b37f1dad9963f7ddf4ddd73aa8d62dbbdfa0308116572f51bee3a7284837e3d
3
+ size 1029555426
models/embeddings/monolingual/hu_64d_metadata.json CHANGED
@@ -10,7 +10,7 @@
10
  "epochs": 5,
11
  "encoding_method": "rope",
12
  "dim": 64,
13
- "threads": 32
14
  },
15
- "vocab_size": 1618616
16
  }
 
10
  "epochs": 5,
11
  "encoding_method": "rope",
12
  "dim": 64,
13
+ "threads": 40
14
  },
15
+ "vocab_size": 972473
16
  }
models/subword_markov/hu_markov_ctx1_subword.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:ee84467b29c11c347a311cf0ea75e29e989a3c7090beb9e54030345c6f13a89a
3
- size 1019494
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:15019d7061b46935c7d1701c34e31760dc7deaf8fa279719fb9578ae862f4ca7
3
+ size 614313
models/subword_markov/hu_markov_ctx1_subword_metadata.json CHANGED
@@ -2,6 +2,6 @@
2
  "context_size": 1,
3
  "variant": "subword",
4
  "language": "hu",
5
- "unique_contexts": 16190,
6
- "total_transitions": 1556873257
7
  }
 
2
  "context_size": 1,
3
  "variant": "subword",
4
  "language": "hu",
5
+ "unique_contexts": 11176,
6
+ "total_transitions": 766898101
7
  }
models/subword_markov/hu_markov_ctx2_subword.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:b675eb29bc21d836f1cdbed36a2c11cf3bd6db7331976b2e8fce87c4c719cab9
3
- size 5674279
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:128923605d56517b96f48b02a68ce1ecba9886c57768511585ca9469f9df47ed
3
+ size 3506798
models/subword_markov/hu_markov_ctx2_subword_metadata.json CHANGED
@@ -2,6 +2,6 @@
2
  "context_size": 2,
3
  "variant": "subword",
4
  "language": "hu",
5
- "unique_contexts": 168239,
6
- "total_transitions": 1556310830
7
  }
 
2
  "context_size": 2,
3
  "variant": "subword",
4
  "language": "hu",
5
+ "unique_contexts": 92249,
6
+ "total_transitions": 766698101
7
  }
models/subword_markov/hu_markov_ctx3_subword.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:0c09193d68124a3c177d36ee556d065ee244312be1204c913cf042b5fa8fe1a9
3
- size 23554790
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ce93fdda23c8e6c85b86d410a30d9bf0885b1d249d6dfb5278e51884c2836ef8
3
+ size 16293919
models/subword_markov/hu_markov_ctx3_subword_metadata.json CHANGED
@@ -2,6 +2,6 @@
2
  "context_size": 3,
3
  "variant": "subword",
4
  "language": "hu",
5
- "unique_contexts": 684267,
6
- "total_transitions": 1555748403
7
  }
 
2
  "context_size": 3,
3
  "variant": "subword",
4
  "language": "hu",
5
+ "unique_contexts": 432153,
6
+ "total_transitions": 766498101
7
  }
models/subword_markov/hu_markov_ctx4_subword.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:56dd1c44f1eac81305777f98b1b1fdd1bac38abde1ffc5dd7d89b79b3da3e21a
3
- size 93017977
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:57066abea88bd23b3e44cd525747be16dc7877361561ad81cca010197f73491d
3
+ size 63397137
models/subword_markov/hu_markov_ctx4_subword_metadata.json CHANGED
@@ -2,6 +2,6 @@
2
  "context_size": 4,
3
  "variant": "subword",
4
  "language": "hu",
5
- "unique_contexts": 2950554,
6
- "total_transitions": 1555185976
7
  }
 
2
  "context_size": 4,
3
  "variant": "subword",
4
  "language": "hu",
5
+ "unique_contexts": 2032871,
6
+ "total_transitions": 766298101
7
  }
models/subword_ngram/hu_2gram_subword.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:20d2ea54b401349f90480fb0ac1dba7af22576a021784b6bf9ae8fb4911f0df1
3
- size 507298
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9054882766ef38cf70d512ba5cd21b614e073d406c2eaae887203d8ec2eedf3c
3
+ size 305120
models/subword_ngram/hu_2gram_subword_metadata.json CHANGED
@@ -2,6 +2,6 @@
2
  "n": 2,
3
  "variant": "subword",
4
  "language": "hu",
5
- "unique_ngrams": 36188,
6
- "total_ngrams": 1556873257
7
  }
 
2
  "n": 2,
3
  "variant": "subword",
4
  "language": "hu",
5
+ "unique_ngrams": 22141,
6
+ "total_ngrams": 766898101
7
  }
models/subword_ngram/hu_3gram_subword.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:7636ce6ce98b732539967c7f551c1b3c5dcceffd035039b94b2ba4eb524d786a
3
- size 3391815
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f7ee1e8748d8f43792fb4676a193880fe31449f15d2d161948b0c69c01bf4dfa
3
+ size 2335656
models/subword_ngram/hu_3gram_subword_metadata.json CHANGED
@@ -2,6 +2,6 @@
2
  "n": 3,
3
  "variant": "subword",
4
  "language": "hu",
5
- "unique_ngrams": 265628,
6
- "total_ngrams": 1556310830
7
  }
 
2
  "n": 3,
3
  "variant": "subword",
4
  "language": "hu",
5
+ "unique_ngrams": 188349,
6
+ "total_ngrams": 766698101
7
  }
models/subword_ngram/hu_4gram_subword.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:a8814c47a4265d4cd03493f65e29a83cc7a8a62945249281728d38ce644516c1
3
- size 20914049
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:645919ec3a0379eeef3114112cc06335efc173d8d05fb9bda959b475e3ec6d1b
3
+ size 14797215
models/subword_ngram/hu_4gram_subword_metadata.json CHANGED
@@ -2,6 +2,6 @@
2
  "n": 4,
3
  "variant": "subword",
4
  "language": "hu",
5
- "unique_ngrams": 1702927,
6
- "total_ngrams": 1555748403
7
  }
 
2
  "n": 4,
3
  "variant": "subword",
4
  "language": "hu",
5
+ "unique_ngrams": 1214042,
6
+ "total_ngrams": 766498101
7
  }
models/subword_ngram/hu_5gram_subword.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:633d60e5de159880bb7e039189895673d3e73e10109d5881432ee255f6cf3331
3
- size 82955605
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:53eabe7ebd9993847864fbb7af8d3732489d932ca80175ab1931a991f9a593e5
3
+ size 57471895
models/subword_ngram/hu_5gram_subword_metadata.json CHANGED
@@ -2,6 +2,6 @@
2
  "n": 5,
3
  "variant": "subword",
4
  "language": "hu",
5
- "unique_ngrams": 6669073,
6
- "total_ngrams": 1555185976
7
  }
 
2
  "n": 5,
3
  "variant": "subword",
4
  "language": "hu",
5
+ "unique_ngrams": 4635566,
6
+ "total_ngrams": 766298101
7
  }
models/tokenizer/hu_tokenizer_16k.model CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:15ad1bb3bd57c70f1f03dc95e27a78321998cf83d913f8f7cbf6b006bfeb895a
3
- size 515352
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b2ff58a7ec607916f3d3509a90a99e6e1136ecf10e4963718bc7a795f6e77b92
3
+ size 515365
models/tokenizer/hu_tokenizer_16k.vocab CHANGED
The diff for this file is too large to render. See raw diff
 
models/tokenizer/hu_tokenizer_32k.model CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:0b664d5351034ef6729c82d2132e6fe3be9fab25a609277386e907dc28db58c6
3
- size 807072
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:10d865bb0ad1e96227c466c82d774af69e9a984ce38059e116491e9aaf3eb649
3
+ size 807084
models/tokenizer/hu_tokenizer_32k.vocab CHANGED
The diff for this file is too large to render. See raw diff
 
models/tokenizer/hu_tokenizer_64k.model CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:df847f99abe5a8f28da22082c6870c2e7491717cd6ad66b47c6eb461e84d87a8
3
- size 1409445
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4fd7fa65eb4cdbef1e40f8b026eb26f8249eb4a83378ea8da0f6bb1ae4986c3a
3
+ size 1408798
models/tokenizer/hu_tokenizer_64k.vocab CHANGED
The diff for this file is too large to render. See raw diff
 
models/tokenizer/hu_tokenizer_8k.model CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:5e7f073105cd2d0bdcf315b341cc562090f71959359c4a4502754a4a8670f877
3
- size 375259
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3015cce9081c9499ba0a0986db71927df9f0175b3de0b40c058fd6a30094517e
3
+ size 375203
models/tokenizer/hu_tokenizer_8k.vocab CHANGED
The diff for this file is too large to render. See raw diff
 
models/vocabulary/hu_vocabulary.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:e8df83c0273fca0c16af2fd45828b48c68caa032e510f7933870b7ca77700ebe
3
- size 37935458
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5439749d4589463a472ee712e633e85a06ddcc857d89c8070781f1dec71ba085
3
+ size 23710723
models/vocabulary/hu_vocabulary_metadata.json CHANGED
@@ -1,17 +1,17 @@
1
  {
2
  "language": "hu",
3
- "vocabulary_size": 2314804,
4
  "variant": "full",
5
  "statistics": {
6
- "type_token_ratio": 0.024602190193199654,
7
  "coverage": {
8
- "top_100": 0.2529332275962186,
9
- "top_1000": 0.44873191758286696,
10
- "top_5000": 0.6096742017591764,
11
- "top_10000": 0.6806728104958041
12
  },
13
- "hapax_count": 2941252,
14
- "hapax_ratio": 0.5595929723732015,
15
- "total_documents": 562427
16
  }
17
  }
 
1
  {
2
  "language": "hu",
3
+ "vocabulary_size": 1458224,
4
  "variant": "full",
5
  "statistics": {
6
+ "type_token_ratio": 0.030938835136859615,
7
  "coverage": {
8
+ "top_100": 0.25355992510693054,
9
+ "top_1000": 0.44783662664797846,
10
+ "top_5000": 0.6088421633536062,
11
+ "top_10000": 0.680017672938653
12
  },
13
+ "hapax_count": 1800825,
14
+ "hapax_ratio": 0.5525614987685058,
15
+ "total_documents": 200000
16
  }
17
  }
models/vocabulary/hu_vocabulary_top.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:c83816501330ded60e0420340fe6230675c584707519923db6ca4f037c5883aa
3
- size 16412935
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:31eeb36262c3af9d6f88ef1f7c42ee96f41decd5ef2be414b96194189c3e7f1e
3
+ size 16200875
models/vocabulary/hu_vocabulary_top_metadata.json CHANGED
@@ -3,18 +3,18 @@
3
  "vocabulary_size": 1000000,
4
  "variant": "top",
5
  "statistics": {
6
- "type_token_ratio": 0.024602190193199654,
7
  "coverage": {
8
- "top_100": 0.2529332275962186,
9
- "top_1000": 0.44873191758286696,
10
- "top_5000": 0.6096742017591764,
11
- "top_10000": 0.6806728104958041
12
  },
13
- "hapax_count": 2941252,
14
- "hapax_ratio": 0.5595929723732015,
15
- "total_documents": 562427,
16
  "top_vocab_size": 1000000,
17
- "coverage_ratio": 0.9696590871134426,
18
- "tokens_excluded": 1314804
19
  }
20
  }
 
3
  "vocabulary_size": 1000000,
4
  "variant": "top",
5
  "statistics": {
6
+ "type_token_ratio": 0.030938835136859615,
7
  "coverage": {
8
+ "top_100": 0.25355992510693054,
9
+ "top_1000": 0.44783662664797846,
10
+ "top_5000": 0.6088421633536062,
11
+ "top_10000": 0.680017672938653
12
  },
13
+ "hapax_count": 1800825,
14
+ "hapax_ratio": 0.5525614987685058,
15
+ "total_documents": 200000,
16
  "top_vocab_size": 1000000,
17
+ "coverage_ratio": 0.9741609455206348,
18
+ "tokens_excluded": 458224
19
  }
20
  }
models/word_markov/hu_markov_ctx1_word.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:53185f9b3a357eaea2da7d6c25fbc6d0e3250f9f6eaf51a06513a2406b6318ea
3
- size 629808716
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6caa76823b030a4259c6d3aff0017851f6d3ffa4b7958271efbccd6345c67f74
3
+ size 360806255
models/word_markov/hu_markov_ctx1_word_metadata.json CHANGED
@@ -2,6 +2,6 @@
2
  "context_size": 1,
3
  "variant": "word",
4
  "language": "hu",
5
- "unique_contexts": 5253585,
6
- "total_transitions": 213079365
7
  }
 
2
  "context_size": 1,
3
  "variant": "word",
4
  "language": "hu",
5
+ "unique_contexts": 3256935,
6
+ "total_transitions": 105138452
7
  }
models/word_markov/hu_markov_ctx2_word.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:5847b23aa1b2113ad2efeaebd6a28738668d378879019204d8ac57debedee7c3
3
- size 2061019439
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0ee4e25daa679821824689b8a8931934999ddf03ede6bcd7b3e287b9dc78211b
3
+ size 1127303217
models/word_markov/hu_markov_ctx2_word_metadata.json CHANGED
@@ -2,6 +2,6 @@
2
  "context_size": 2,
3
  "variant": "word",
4
  "language": "hu",
5
- "unique_contexts": 62241118,
6
- "total_transitions": 212516938
7
  }
 
2
  "context_size": 2,
3
  "variant": "word",
4
  "language": "hu",
5
+ "unique_contexts": 35712539,
6
+ "total_transitions": 104938452
7
  }