--- language: ka language_name: Georgian language_family: kartvelian tags: - wikilangs - nlp - tokenizer - embeddings - n-gram - markov - wikipedia - feature-extraction - sentence-similarity - tokenization - n-grams - markov-chain - text-mining - fasttext - babelvec - vocabulous - vocabulary - monolingual - family-kartvelian license: mit library_name: wikilangs pipeline_tag: text-generation datasets: - omarkamali/wikipedia-monthly dataset_info: name: wikipedia-monthly description: Monthly snapshots of Wikipedia articles across 300+ languages metrics: - name: best_compression_ratio type: compression value: 5.034 - name: best_isotropy type: isotropy value: 0.7869 - name: vocabulary_size type: vocab value: 0 generated: 2026-01-10 --- # Georgian - Wikilangs Models ## Comprehensive Research Report & Full Ablation Study This repository contains NLP models trained and evaluated by Wikilangs, specifically on **Georgian** Wikipedia data. We analyze tokenizers, n-gram models, Markov chains, vocabulary statistics, and word embeddings. ## ๐Ÿ“‹ Repository Contents ### Models & Assets - Tokenizers (8k, 16k, 32k, 64k) - N-gram models (2, 3, 4, 5-gram) - Markov chains (context of 1, 2, 3, 4 and 5) - Subword N-gram and Markov chains - Embeddings in various sizes and dimensions (aligned and unaligned) - Language Vocabulary - Language Statistics ![Performance Dashboard](visualizations/performance_dashboard.png) ### Analysis and Evaluation - [1. Tokenizer Evaluation](#1-tokenizer-evaluation) - [2. N-gram Model Evaluation](#2-n-gram-model-evaluation) - [3. Markov Chain Evaluation](#3-markov-chain-evaluation) - [4. Vocabulary Analysis](#4-vocabulary-analysis) - [5. Word Embeddings Evaluation](#5-word-embeddings-evaluation) - [6. Morphological Analysis (Experimental)](#6--morphological-analysis-experimental) - [7. Summary & Recommendations](#7-summary--recommendations) - [Metrics Glossary](#appendix-metrics-glossary--interpretation-guide) - [Visualizations Index](#visualizations-index) --- ## 1. Tokenizer Evaluation ![Tokenizer Compression](visualizations/tokenizer_compression.png) ![Tokenizer Fertility](visualizations/tokenizer_fertility.png) ![Tokenizer OOV](visualizations/tokenizer_oov.png) ![Total Tokens](visualizations/tokenizer_total_tokens.png) ### Results | Vocab Size | Compression | Avg Token Len | UNK Rate | Total Tokens | |------------|-------------|---------------|----------|--------------| | **8k** | 3.607x | 3.61 | 0.0743% | 1,129,507 | | **16k** | 4.126x | 4.13 | 0.0850% | 987,428 | | **32k** | 4.611x | 4.61 | 0.0950% | 883,432 | | **64k** | 5.034x ๐Ÿ† | 5.04 | 0.1037% | 809,192 | ### Tokenization Examples Below are sample sentences tokenized with each vocabulary size: **Sample 1:** `แƒ‘แƒ () โ€” แƒ›แƒ”แƒแƒ แƒ” แƒแƒกแƒ แƒแƒ แƒแƒ‘แƒฃแƒš แƒ“แƒแƒ›แƒฌแƒ”แƒ แƒšแƒแƒ‘แƒแƒจแƒ˜. แƒ‘แƒ แƒแƒ แƒ˜แƒก แƒแƒ แƒแƒ‘แƒฃแƒšแƒ˜ แƒ•แƒแƒ แƒ˜แƒแƒœแƒขแƒ˜ แƒ”แƒ‘แƒ แƒแƒฃแƒšแƒ˜ แƒ‘แƒ”แƒ—แƒ˜แƒกแƒ. ...` | Vocab | Tokens | Count | |-------|--------|-------| | 8k | `โ–แƒ‘แƒ โ–() โ–โ€” โ–แƒ›แƒ”แƒแƒ แƒ” โ–แƒแƒกแƒ โ–แƒแƒ แƒแƒ‘ แƒฃแƒš โ–แƒ“แƒแƒ›แƒฌแƒ”แƒ  แƒšแƒแƒ‘แƒแƒจแƒ˜ . ... (+19 more)` | 29 | | 16k | `โ–แƒ‘แƒ โ–() โ–โ€” โ–แƒ›แƒ”แƒแƒ แƒ” โ–แƒแƒกแƒ โ–แƒแƒ แƒแƒ‘แƒฃแƒš โ–แƒ“แƒแƒ›แƒฌแƒ”แƒ  แƒšแƒแƒ‘แƒแƒจแƒ˜ . โ–แƒ‘แƒ ... (+16 more)` | 26 | | 32k | `โ–แƒ‘แƒ โ–() โ–โ€” โ–แƒ›แƒ”แƒแƒ แƒ” โ–แƒแƒกแƒ โ–แƒแƒ แƒแƒ‘แƒฃแƒš โ–แƒ“แƒแƒ›แƒฌแƒ”แƒ  แƒšแƒแƒ‘แƒแƒจแƒ˜ . โ–แƒ‘แƒ ... (+13 more)` | 23 | | 64k | `โ–แƒ‘แƒ โ–() โ–โ€” โ–แƒ›แƒ”แƒแƒ แƒ” โ–แƒแƒกแƒ โ–แƒแƒ แƒแƒ‘แƒฃแƒš โ–แƒ“แƒแƒ›แƒฌแƒ”แƒ แƒšแƒแƒ‘แƒแƒจแƒ˜ . โ–แƒ‘แƒ โ–แƒแƒ แƒ˜แƒก ... (+12 more)` | 22 | **Sample 2:** `แƒฎแƒแƒ—แƒ˜แƒœแƒ‘แƒฃแƒšแƒแƒงแƒ˜ () โ€” แƒกแƒแƒคแƒ”แƒšแƒ˜ แƒแƒ–แƒ”แƒ แƒ‘แƒแƒ˜แƒฏแƒแƒœแƒจแƒ˜, แƒคแƒฃแƒ–แƒฃแƒšแƒ˜แƒก แƒ แƒแƒ˜แƒแƒœแƒจแƒ˜. แƒ แƒ”แƒกแƒฃแƒ แƒกแƒ”แƒ‘แƒ˜ แƒ˜แƒœแƒขแƒ”แƒ แƒœแƒ”แƒขแƒจแƒ˜ แƒ แƒแƒ˜แƒ...` | Vocab | Tokens | Count | |-------|--------|-------| | 8k | `โ–แƒฎ แƒแƒ—แƒ˜แƒœ แƒ‘ แƒฃแƒšแƒ แƒง แƒ˜ โ–() โ–โ€” โ–แƒกแƒแƒคแƒ”แƒšแƒ˜ โ–แƒแƒ–แƒ”แƒ แƒ‘แƒแƒ˜แƒฏแƒแƒœแƒจแƒ˜ ... (+10 more)` | 20 | | 16k | `โ–แƒฎ แƒแƒ—แƒ˜แƒœ แƒ‘ แƒฃแƒšแƒ แƒงแƒ˜ โ–() โ–โ€” โ–แƒกแƒแƒคแƒ”แƒšแƒ˜ โ–แƒแƒ–แƒ”แƒ แƒ‘แƒแƒ˜แƒฏแƒแƒœแƒจแƒ˜ , ... (+9 more)` | 19 | | 32k | `โ–แƒฎ แƒแƒ—แƒ˜แƒœ แƒ‘แƒฃแƒšแƒ แƒงแƒ˜ โ–() โ–โ€” โ–แƒกแƒแƒคแƒ”แƒšแƒ˜ โ–แƒแƒ–แƒ”แƒ แƒ‘แƒแƒ˜แƒฏแƒแƒœแƒจแƒ˜ , โ–แƒคแƒฃแƒ–แƒฃแƒšแƒ˜แƒก ... (+6 more)` | 16 | | 64k | `โ–แƒฎ แƒแƒ—แƒ˜แƒœ แƒ‘แƒฃแƒšแƒแƒงแƒ˜ โ–() โ–โ€” โ–แƒกแƒแƒคแƒ”แƒšแƒ˜ โ–แƒแƒ–แƒ”แƒ แƒ‘แƒแƒ˜แƒฏแƒแƒœแƒจแƒ˜ , โ–แƒคแƒฃแƒ–แƒฃแƒšแƒ˜แƒก โ–แƒ แƒแƒ˜แƒแƒœแƒจแƒ˜ ... (+5 more)` | 15 | **Sample 3:** `แƒ›แƒ”แƒ แƒ“แƒ˜แƒœแƒšแƒ˜ () โ€” แƒกแƒแƒคแƒ”แƒšแƒ˜ แƒแƒ–แƒ”แƒ แƒ‘แƒแƒ˜แƒฏแƒแƒœแƒจแƒ˜, แƒคแƒฃแƒ–แƒฃแƒšแƒ˜แƒก แƒ แƒแƒ˜แƒแƒœแƒจแƒ˜. แƒ แƒ”แƒกแƒฃแƒ แƒกแƒ”แƒ‘แƒ˜ แƒ˜แƒœแƒขแƒ”แƒ แƒœแƒ”แƒขแƒจแƒ˜ แƒ แƒแƒ˜แƒแƒœแƒ˜แƒก...` | Vocab | Tokens | Count | |-------|--------|-------| | 8k | `โ–แƒ›แƒ”แƒ  แƒ“แƒ˜แƒœ แƒšแƒ˜ โ–() โ–โ€” โ–แƒกแƒแƒคแƒ”แƒšแƒ˜ โ–แƒแƒ–แƒ”แƒ แƒ‘แƒแƒ˜แƒฏแƒแƒœแƒจแƒ˜ , โ–แƒค แƒฃแƒ– ... (+7 more)` | 17 | | 16k | `โ–แƒ›แƒ”แƒ  แƒ“แƒ˜แƒœ แƒšแƒ˜ โ–() โ–โ€” โ–แƒกแƒแƒคแƒ”แƒšแƒ˜ โ–แƒแƒ–แƒ”แƒ แƒ‘แƒแƒ˜แƒฏแƒแƒœแƒจแƒ˜ , โ–แƒค แƒฃแƒ– ... (+7 more)` | 17 | | 32k | `โ–แƒ›แƒ”แƒ  แƒ“แƒ˜แƒœ แƒšแƒ˜ โ–() โ–โ€” โ–แƒกแƒแƒคแƒ”แƒšแƒ˜ โ–แƒแƒ–แƒ”แƒ แƒ‘แƒแƒ˜แƒฏแƒแƒœแƒจแƒ˜ , โ–แƒคแƒฃแƒ–แƒฃแƒšแƒ˜แƒก โ–แƒ แƒแƒ˜แƒแƒœแƒจแƒ˜ ... (+5 more)` | 15 | | 64k | `โ–แƒ›แƒ”แƒ  แƒ“แƒ˜แƒœ แƒšแƒ˜ โ–() โ–โ€” โ–แƒกแƒแƒคแƒ”แƒšแƒ˜ โ–แƒแƒ–แƒ”แƒ แƒ‘แƒแƒ˜แƒฏแƒแƒœแƒจแƒ˜ , โ–แƒคแƒฃแƒ–แƒฃแƒšแƒ˜แƒก โ–แƒ แƒแƒ˜แƒแƒœแƒจแƒ˜ ... (+5 more)` | 15 | ### Key Findings - **Best Compression:** 64k achieves 5.034x compression - **Lowest UNK Rate:** 8k with 0.0743% unknown tokens - **Trade-off:** Larger vocabularies improve compression but increase model size - **Recommendation:** 32k vocabulary provides optimal balance for production use --- ## 2. N-gram Model Evaluation ![N-gram Perplexity](visualizations/ngram_perplexity.png) ![N-gram Unique](visualizations/ngram_unique.png) ![N-gram Coverage](visualizations/ngram_coverage.png) ### Results | N-gram | Variant | Perplexity | Entropy | Unique N-grams | Top-100 Coverage | Top-1000 Coverage | |--------|---------|------------|---------|----------------|------------------|-------------------| | **2-gram** | Word | 211,247 | 17.69 | 839,931 | 5.0% | 14.8% | | **2-gram** | Subword | 423 ๐Ÿ† | 8.73 | 18,881 | 58.4% | 96.6% | | **3-gram** | Word | 297,944 | 18.18 | 972,504 | 4.8% | 13.7% | | **3-gram** | Subword | 3,918 | 11.94 | 159,884 | 21.8% | 60.3% | | **4-gram** | Word | 509,839 | 18.96 | 1,548,052 | 4.2% | 12.7% | | **4-gram** | Subword | 22,811 | 14.48 | 936,455 | 10.0% | 32.5% | | **5-gram** | Word | 359,649 | 18.46 | 1,104,097 | 4.9% | 14.4% | | **5-gram** | Subword | 88,814 | 16.44 | 2,995,844 | 5.2% | 19.7% | ### Top 5 N-grams by Size **2-grams (Word):** | Rank | N-gram | Count | |------|--------|-------| | 1 | `แƒ แƒ”แƒกแƒฃแƒ แƒกแƒ”แƒ‘แƒ˜ แƒ˜แƒœแƒขแƒ”แƒ แƒœแƒ”แƒขแƒจแƒ˜` | 100,310 | | 2 | `แƒ˜แƒฎแƒ˜แƒšแƒ”แƒ— แƒแƒ’แƒ แƒ”แƒ—แƒ•แƒ”` | 38,767 | | 3 | `แƒ”แƒ แƒ— แƒ”แƒ แƒ—แƒ˜` | 38,192 | | 4 | `แƒ“แƒ แƒกแƒฎแƒ•แƒ` | 20,983 | | 5 | `of the` | 20,829 | **3-grams (Word):** | Rank | N-gram | Count | |------|--------|-------| | 1 | `แƒฌแƒšแƒ˜แƒก แƒ›แƒแƒœแƒแƒชแƒ”แƒ›แƒ”แƒ‘แƒ˜แƒ— แƒ›แƒแƒกแƒแƒฎแƒšแƒ”แƒแƒ‘แƒ` | 9,844 | | 2 | `แƒ แƒ”แƒกแƒฃแƒ แƒกแƒ”แƒ‘แƒ˜ แƒ˜แƒœแƒขแƒ”แƒ แƒœแƒ”แƒขแƒจแƒ˜ แƒกแƒฅแƒแƒšแƒ˜แƒ` | 8,451 | | 3 | `แƒ›แƒ˜แƒฃแƒฎแƒ”แƒ“แƒแƒ•แƒแƒ“ แƒ˜แƒ›แƒ˜แƒกแƒ แƒ แƒแƒ›` | 8,239 | | 4 | `แƒแƒคแƒ˜แƒชแƒ˜แƒแƒšแƒฃแƒ แƒ˜ แƒกแƒแƒ˜แƒขแƒ˜ แƒกแƒฅแƒแƒšแƒ˜แƒ` | 7,888 | | 5 | `แƒ›แƒ“แƒ”แƒ‘แƒแƒ แƒ”แƒแƒ‘แƒก แƒ–แƒฆแƒ•แƒ˜แƒก แƒ“แƒแƒœแƒ˜แƒ“แƒแƒœ` | 7,694 | **4-grams (Word):** | Rank | N-gram | Count | |------|--------|-------| | 1 | `แƒ™แƒแƒชแƒ˜ แƒฌ แƒ˜แƒฎแƒ˜แƒšแƒ”แƒ— แƒแƒ’แƒ แƒ”แƒ—แƒ•แƒ”` | 6,676 | | 2 | `แƒ›แƒฃแƒœแƒ˜แƒชแƒ˜แƒžแƒแƒšแƒ˜แƒขแƒ”แƒขแƒ˜แƒก แƒแƒคแƒ˜แƒชแƒ˜แƒแƒšแƒฃแƒ แƒ˜ แƒกแƒแƒ˜แƒขแƒ˜ แƒกแƒฅแƒแƒšแƒ˜แƒ` | 5,942 | | 3 | `แƒแƒคแƒ˜แƒชแƒ˜แƒแƒšแƒฃแƒ แƒ˜ แƒกแƒแƒ˜แƒขแƒ˜ แƒกแƒฅแƒแƒšแƒ˜แƒ แƒ›แƒฃแƒœแƒ˜แƒชแƒ˜แƒžแƒแƒšแƒ˜แƒขแƒ”แƒขแƒ”แƒ‘แƒ˜` | 5,878 | | 4 | `แƒ™แƒ› แƒ˜แƒ แƒ˜แƒฎแƒ˜แƒšแƒ”แƒ— แƒแƒ’แƒ แƒ”แƒ—แƒ•แƒ”` | 5,763 | | 5 | `แƒญแƒ˜แƒแƒœแƒญแƒ•แƒ”แƒšแƒแƒกแƒ”แƒ‘แƒ แƒ—แƒ แƒ”แƒ แƒ— แƒ”แƒ แƒ—แƒ˜ แƒœแƒแƒ˜แƒ แƒกแƒแƒฎแƒ”แƒแƒ‘แƒ` | 5,614 | **5-grams (Word):** | Rank | N-gram | Count | |------|--------|-------| | 1 | `แƒ›แƒฃแƒœแƒ˜แƒชแƒ˜แƒžแƒแƒšแƒ˜แƒขแƒ”แƒขแƒ˜แƒก แƒแƒคแƒ˜แƒชแƒ˜แƒแƒšแƒฃแƒ แƒ˜ แƒกแƒแƒ˜แƒขแƒ˜ แƒกแƒฅแƒแƒšแƒ˜แƒ แƒ›แƒฃแƒœแƒ˜แƒชแƒ˜แƒžแƒแƒšแƒ˜แƒขแƒ”แƒขแƒ”แƒ‘แƒ˜` | 5,860 | | 2 | `แƒ™แƒšแƒแƒกแƒ˜แƒก แƒญแƒ˜แƒแƒœแƒญแƒ•แƒ”แƒšแƒแƒกแƒ”แƒ‘แƒ แƒ—แƒ แƒ”แƒ แƒ— แƒ”แƒ แƒ—แƒ˜ แƒœแƒแƒ˜แƒ แƒกแƒแƒฎแƒ”แƒแƒ‘แƒ` | 5,614 | | 3 | `แƒ›แƒฌแƒ”แƒ แƒ—แƒ แƒ™แƒšแƒแƒกแƒ˜แƒก แƒญแƒ˜แƒแƒœแƒญแƒ•แƒ”แƒšแƒแƒกแƒ”แƒ‘แƒ แƒ—แƒ แƒ”แƒ แƒ— แƒ”แƒ แƒ—แƒ˜` | 5,614 | | 4 | `แƒคแƒ”แƒฎแƒกแƒแƒฎแƒกแƒ แƒ˜แƒแƒœแƒ—แƒ แƒขแƒ˜แƒžแƒ˜แƒก แƒ›แƒฌแƒ”แƒ แƒ—แƒ แƒ™แƒšแƒแƒกแƒ˜แƒก แƒญแƒ˜แƒแƒœแƒญแƒ•แƒ”แƒšแƒแƒกแƒ”แƒ‘แƒ แƒ—แƒ` | 5,614 | | 5 | `แƒขแƒ˜แƒžแƒ˜แƒก แƒ›แƒฌแƒ”แƒ แƒ—แƒ แƒ™แƒšแƒแƒกแƒ˜แƒก แƒญแƒ˜แƒแƒœแƒญแƒ•แƒ”แƒšแƒแƒกแƒ”แƒ‘แƒ แƒ—แƒ แƒ”แƒ แƒ—` | 5,614 | **2-grams (Subword):** | Rank | N-gram | Count | |------|--------|-------| | 1 | `แƒก _` | 7,040,665 | | 2 | `แƒ˜ แƒก` | 7,006,427 | | 3 | `แƒ˜ _` | 6,580,536 | | 4 | `แƒ _` | 4,984,758 | | 5 | `แƒ” แƒ‘` | 4,979,269 | **3-grams (Subword):** | Rank | N-gram | Count | |------|--------|-------| | 1 | `แƒ˜ แƒก _` | 5,017,584 | | 2 | `แƒ” แƒ‘ แƒ˜` | 2,375,826 | | 3 | `_ แƒ“ แƒ` | 2,051,321 | | 4 | `_ แƒก แƒ` | 1,739,078 | | 5 | `แƒ“ แƒ _` | 1,650,928 | **4-grams (Subword):** | Rank | N-gram | Count | |------|--------|-------| | 1 | `_ แƒ“ แƒ _` | 1,089,218 | | 2 | `แƒ‘ แƒ˜ แƒก _` | 984,947 | | 3 | `แƒ” แƒ‘ แƒ˜ แƒก` | 883,610 | | 4 | `แƒ” แƒ‘ แƒ˜ _` | 738,436 | | 5 | `แƒ˜ แƒก _ แƒ›` | 733,039 | **5-grams (Subword):** | Rank | N-gram | Count | |------|--------|-------| | 1 | `แƒ” แƒ‘ แƒ˜ แƒก _` | 734,333 | | 2 | `แƒ _ แƒ“ แƒ _` | 430,206 | | 3 | `, _ แƒ  แƒ แƒ›` | 406,399 | | 4 | `แƒ˜ แƒก _ แƒก แƒ` | 350,334 | | 5 | `แƒ” แƒ‘ แƒฃ แƒš แƒ˜` | 307,583 | ### Key Findings - **Best Perplexity:** 2-gram (subword) with 423 - **Entropy Trend:** Decreases with larger n-grams (more predictable) - **Coverage:** Top-1000 patterns cover ~20% of corpus - **Recommendation:** 4-gram or 5-gram for best predictive performance --- ## 3. Markov Chain Evaluation ![Markov Entropy](visualizations/markov_entropy.png) ![Markov Contexts](visualizations/markov_contexts.png) ![Markov Branching](visualizations/markov_branching.png) ### Results | Context | Variant | Avg Entropy | Perplexity | Branching Factor | Unique Contexts | Predictability | |---------|---------|-------------|------------|------------------|-----------------|----------------| | **1** | Word | 0.9133 | 1.883 | 9.96 | 1,644,802 | 8.7% | | **1** | Subword | 1.0685 | 2.097 | 7.59 | 8,326 | 0.0% | | **2** | Word | 0.2778 | 1.212 | 1.75 | 16,356,120 | 72.2% | | **2** | Subword | 0.7948 | 1.735 | 5.53 | 63,087 | 20.5% | | **3** | Word | 0.0801 | 1.057 | 1.15 | 28,502,543 | 92.0% | | **3** | Subword | 0.7992 | 1.740 | 4.61 | 348,410 | 20.1% | | **4** | Word | 0.0282 ๐Ÿ† | 1.020 | 1.04 | 32,622,645 | 97.2% | | **4** | Subword | 0.7081 | 1.634 | 3.48 | 1,604,353 | 29.2% | ### Generated Text Samples (Word-based) Below are text samples generated from each word-based Markov chain model: **Context Size 1:** 1. `แƒ“แƒ แƒคแƒ”แƒกแƒขแƒ˜แƒ•แƒแƒšแƒ˜แƒก roadburn festival at war chapter 8 6 7 489 แƒฎแƒ”แƒšแƒแƒ•แƒœแƒ”แƒ‘แƒแƒจแƒ˜ แƒ’แƒแƒฌแƒแƒคแƒฃแƒšแƒ˜ แƒ“แƒ แƒ“แƒแƒกแƒแƒ•แƒšแƒฃแƒ แƒ˜ แƒ›แƒแƒ แƒ˜แƒฃแƒšแƒ˜` 2. `แƒฌแƒšแƒ˜แƒก แƒแƒžแƒ แƒ˜แƒšแƒจแƒ˜ แƒŸแƒฃแƒ แƒœแƒแƒš modern philology v แƒกแƒแƒฃแƒ™แƒฃแƒœแƒ”แƒ”แƒ‘แƒ˜แƒ— แƒซแƒ”แƒ’แƒšแƒ˜ แƒ•แƒแƒขแƒ”แƒ แƒขแƒแƒœ แƒ’แƒšแƒแƒกแƒ˜แƒ”แƒ แƒ˜แƒก แƒ›แƒจแƒ•แƒ˜แƒ“แƒแƒ‘แƒ˜แƒก แƒ’แƒแƒœแƒ›แƒขแƒ™แƒ˜แƒชแƒ”แƒ‘แƒแƒจแƒ˜ ...` 3. `แƒฌแƒ”แƒšแƒก แƒขแƒแƒซแƒ แƒ˜แƒก แƒ™แƒ แƒแƒ›แƒ˜แƒขแƒ˜ แƒชแƒ”แƒ›แƒ”แƒœแƒขแƒฅแƒ•แƒ˜แƒจแƒ˜แƒก แƒฎแƒกแƒœแƒแƒ แƒ˜แƒก แƒกแƒ˜แƒ›แƒ™แƒ•แƒ แƒ˜แƒ•แƒ” 0 1 แƒœแƒแƒ”แƒ›แƒ‘แƒ”แƒ แƒ˜ แƒ“แƒ”แƒ™แƒ”แƒ›แƒ‘แƒ”แƒ แƒ˜ แƒ›แƒฃแƒœแƒ˜แƒชแƒ˜แƒžแƒแƒšแƒ˜แƒขแƒ”แƒขแƒจแƒ˜ แƒญแƒแƒšแƒ˜แƒก แƒ›แƒฃแƒฎแƒ˜...` **Context Size 2:** 1. `แƒ แƒ”แƒกแƒฃแƒ แƒกแƒ”แƒ‘แƒ˜ แƒ˜แƒœแƒขแƒ”แƒ แƒœแƒ”แƒขแƒจแƒ˜ แƒแƒคแƒ˜แƒชแƒ˜แƒแƒšแƒฃแƒ แƒ˜ แƒกแƒแƒ˜แƒขแƒ˜ แƒกแƒฅแƒแƒšแƒ˜แƒ แƒ›แƒฃแƒœแƒ˜แƒชแƒ˜แƒžแƒแƒšแƒ˜แƒขแƒ”แƒขแƒ”แƒ‘แƒ˜ แƒฅแƒแƒšแƒแƒฅแƒ”แƒ‘แƒ˜ แƒ“แƒ แƒฌแƒ”แƒšแƒก แƒ˜แƒก แƒ›แƒ˜แƒ˜แƒฌแƒ•แƒ˜แƒ”แƒก แƒžแƒ”แƒขแƒ”แƒ แƒ‘แƒฃแƒ แƒ’...` 2. `แƒ˜แƒฎแƒ˜แƒšแƒ”แƒ— แƒแƒ’แƒ แƒ”แƒ—แƒ•แƒ” แƒ›แƒ˜แƒœแƒแƒก แƒŸแƒ”แƒ แƒแƒ˜แƒกแƒ˜ แƒ‘แƒ แƒแƒ–แƒ˜แƒšแƒ˜แƒ˜แƒก แƒจแƒขแƒแƒขแƒ”แƒ‘แƒ˜ แƒ แƒ”แƒกแƒฃแƒ แƒกแƒ”แƒ‘แƒ˜ แƒ˜แƒœแƒขแƒ”แƒ แƒœแƒ”แƒขแƒจแƒ˜ แƒแƒคแƒ˜แƒชแƒ˜แƒแƒšแƒฃแƒ แƒ˜ แƒกแƒแƒ˜แƒขแƒ˜ แƒฐแƒแƒ แƒžแƒ”แƒ แƒ˜ แƒ›แƒฃแƒกแƒ˜แƒ™แƒแƒก...` 3. `แƒ”แƒ แƒ— แƒ”แƒ แƒ—แƒ˜ แƒ˜แƒœแƒ˜แƒชแƒ˜แƒแƒขแƒแƒ แƒ˜ แƒกแƒฃแƒšแƒ˜ แƒ“แƒ แƒแƒ› แƒ“แƒ แƒแƒ˜แƒ“แƒแƒœ แƒชแƒ˜แƒฎแƒ”แƒกแƒ˜แƒ›แƒแƒ’แƒ แƒ”แƒ› แƒจแƒ”แƒฌแƒงแƒ•แƒ˜แƒขแƒ แƒ›แƒฎแƒแƒšแƒแƒ“ แƒ›แƒแƒจแƒ˜แƒœ แƒ”แƒฅแƒ•แƒ”แƒ›แƒ“แƒ”แƒ‘แƒแƒ แƒ”แƒ‘แƒ แƒ—แƒฃ แƒแƒฏแƒแƒฎแƒก แƒกแƒแƒ™...` **Context Size 3:** 1. `แƒฌแƒšแƒ˜แƒก แƒ›แƒแƒœแƒแƒชแƒ”แƒ›แƒ”แƒ‘แƒ˜แƒ— แƒ›แƒแƒกแƒแƒฎแƒšแƒ”แƒแƒ‘แƒ 84 469 แƒแƒ“แƒแƒ›แƒ˜แƒแƒœแƒก แƒจแƒ”แƒแƒ“แƒ’แƒ”แƒœแƒ“แƒ แƒคแƒแƒ แƒ—แƒแƒ‘แƒ˜ 358 แƒ™แƒ› แƒ›แƒแƒกแƒแƒฎแƒšแƒ”แƒแƒ‘แƒ 61 418 แƒแƒ“แƒแƒ›แƒ˜แƒแƒœแƒ˜ แƒฌแƒšแƒ˜แƒก...` 2. `แƒ›แƒ˜แƒฃแƒฎแƒ”แƒ“แƒแƒ•แƒแƒ“ แƒ˜แƒ›แƒ˜แƒกแƒ แƒ แƒแƒ› แƒ›แƒžแƒ แƒ›แƒ”แƒ“แƒ˜แƒ™แƒแƒ›แƒ”แƒœแƒขแƒฃแƒ แƒแƒ“ แƒ•แƒ”แƒ  แƒ˜แƒ™แƒฃแƒ แƒœแƒ”แƒ‘แƒ แƒ›แƒ”แƒ“แƒ˜แƒ™แƒแƒ›แƒ”แƒœแƒขแƒ”แƒ‘แƒ˜ แƒจแƒ”แƒ˜แƒซแƒšแƒ”แƒ‘แƒ แƒ’แƒแƒ›แƒแƒ•แƒ˜แƒงแƒ”แƒœแƒแƒ— แƒกแƒ˜แƒ›แƒžแƒขแƒแƒ›แƒ”แƒ‘แƒ˜แƒก ...` 3. `แƒ แƒ”แƒกแƒฃแƒ แƒกแƒ”แƒ‘แƒ˜ แƒ˜แƒœแƒขแƒ”แƒ แƒœแƒ”แƒขแƒจแƒ˜ แƒกแƒฅแƒแƒšแƒ˜แƒ แƒ›แƒแƒ›แƒฆแƒ”แƒ แƒšแƒ”แƒ‘แƒ˜ 25 แƒแƒ’แƒ•แƒ˜แƒกแƒขแƒ records แƒ˜แƒก แƒจแƒ”แƒ›แƒกแƒ แƒฃแƒšแƒ”แƒ‘แƒšแƒ”แƒ‘แƒ˜ records แƒ˜แƒก แƒจแƒ”แƒ›แƒกแƒ แƒฃแƒšแƒ”แƒ‘แƒšแƒ”แƒ‘แƒ˜ ...` **Context Size 4:** 1. `แƒ™แƒแƒชแƒ˜ แƒฌ แƒ˜แƒฎแƒ˜แƒšแƒ”แƒ— แƒแƒ’แƒ แƒ”แƒ—แƒ•แƒ” แƒกแƒ”แƒ•แƒ˜แƒšแƒ˜แƒ˜แƒก แƒ›แƒฃแƒœแƒ˜แƒชแƒ˜แƒžแƒแƒšแƒ˜แƒขแƒ”แƒขแƒ”แƒ‘แƒ˜ แƒ แƒ”แƒกแƒฃแƒ แƒกแƒ”แƒ‘แƒ˜ แƒ˜แƒœแƒขแƒ”แƒ แƒœแƒ”แƒขแƒจแƒ˜ แƒแƒšแƒแƒœแƒ˜แƒกแƒ˜แƒก แƒ›แƒฃแƒœแƒ˜แƒชแƒ˜แƒžแƒแƒšแƒ˜แƒขแƒ”แƒขแƒ˜แƒก แƒแƒคแƒ˜แƒชแƒ˜แƒ...` 2. `แƒ›แƒฃแƒœแƒ˜แƒชแƒ˜แƒžแƒแƒšแƒ˜แƒขแƒ”แƒขแƒ˜แƒก แƒแƒคแƒ˜แƒชแƒ˜แƒแƒšแƒฃแƒ แƒ˜ แƒกแƒแƒ˜แƒขแƒ˜ แƒกแƒฅแƒแƒšแƒ˜แƒ แƒ›แƒฃแƒœแƒ˜แƒชแƒ˜แƒžแƒแƒšแƒ˜แƒขแƒ”แƒขแƒ”แƒ‘แƒ˜ แƒฅแƒแƒšแƒแƒฅแƒ”แƒ‘แƒ˜ แƒ’แƒ•แƒ”แƒ แƒ“แƒ”แƒ‘แƒ˜ แƒ’แƒ•แƒแƒ แƒ˜แƒก แƒจแƒ”แƒ›แƒชแƒ•แƒ”แƒšแƒ˜ แƒกแƒ˜แƒ”แƒ‘แƒ˜แƒ— แƒ’แƒ•...` 3. `แƒ™แƒ› แƒ˜แƒ แƒ˜แƒฎแƒ˜แƒšแƒ”แƒ— แƒแƒ’แƒ แƒ”แƒ—แƒ•แƒ” แƒ™แƒแƒšแƒฃแƒ›แƒ‘แƒ˜แƒ˜แƒก แƒฅแƒแƒšแƒแƒฅแƒ”แƒ‘แƒ˜แƒก แƒกแƒ˜แƒ แƒ แƒ”แƒกแƒฃแƒ แƒกแƒ”แƒ‘แƒ˜ แƒ˜แƒœแƒขแƒ”แƒ แƒœแƒ”แƒขแƒจแƒ˜ แƒฅแƒแƒšแƒแƒฅแƒ˜แƒก แƒ›แƒ—แƒแƒ•แƒ แƒแƒ‘แƒ˜แƒก แƒกแƒแƒ˜แƒขแƒ˜ แƒฅแƒแƒšแƒแƒฅแƒ˜แƒก แƒกแƒ...` ### Generated Text Samples (Subword-based) Below are text samples generated from each subword-based Markov chain model: **Context Size 1:** 1. `_แƒ›แƒ”แƒ”แƒœแƒ;_แƒฌแƒšแƒแƒ’แƒแƒก_แƒ™` 2. `แƒ_แƒ›แƒแƒก_แƒ›แƒ“แƒ˜แƒกแƒแƒฆแƒแƒ‘แƒฃแƒš` 3. `แƒ˜แƒกแƒ_แƒช_แƒ‘แƒแƒฐแƒแƒก_แƒกแƒขแƒฉแƒ˜` **Context Size 2:** 1. `แƒก_แƒœแƒ˜แƒ”แƒ แƒแƒšแƒ˜แƒ”แƒ แƒ’แƒ˜แƒ”แƒ แƒ˜แƒก` 2. `แƒ˜แƒก_แƒแƒฅแƒ›แƒœแƒ˜แƒœแƒ˜แƒก_แƒ›แƒ™แƒ•แƒ”_` 3. `แƒ˜_แƒ”แƒ แƒ—แƒ”แƒ›แƒ”แƒšแƒ˜,_nalos` **Context Size 3:** 1. `แƒ˜แƒก_แƒฏแƒ•แƒ แƒ˜แƒ_แƒ“แƒแƒจแƒ˜,_แƒ แƒแƒ›` 2. `แƒ”แƒ‘แƒ˜แƒก_แƒฌแƒแƒ แƒ›แƒแƒ“แƒ˜แƒก_แƒ™แƒ แƒ”แƒ‘` 3. `_แƒ“แƒแƒ˜แƒฅแƒชแƒ._แƒ™แƒ˜แƒ“แƒ”แƒ แƒ˜แƒšแƒ—แƒ` **Context Size 4:** 1. `_แƒ“แƒ_แƒแƒ›_แƒžแƒ แƒแƒ•แƒ˜._แƒ—แƒแƒ›แƒแƒจ` 2. `แƒ‘แƒ˜แƒก_แƒกแƒแƒญแƒ˜แƒ แƒ._แƒฌแƒ”แƒšแƒก._แƒฎ` 3. `แƒ”แƒ‘แƒ˜แƒกแƒแƒ›แƒ”_แƒกแƒ˜แƒ แƒ˜แƒ˜แƒก_แƒฌแƒงแƒแƒš` ### Key Findings - **Best Predictability:** Context-4 (word) with 97.2% predictability - **Branching Factor:** Decreases with context size (more deterministic) - **Memory Trade-off:** Larger contexts require more storage (1,604,353 contexts) - **Recommendation:** Context-3 or Context-4 for text generation --- ## 4. Vocabulary Analysis ![Zipf's Law](visualizations/zipf_law.png) ![Top Words](visualizations/top20_words.png) ![Coverage Curve](visualizations/vocab_coverage.png) ### Statistics | Metric | Value | |--------|-------| | Vocabulary Size | 715,127 | | Total Tokens | 37,347,310 | | Mean Frequency | 52.22 | | Median Frequency | 4 | | Frequency Std Dev | 1624.79 | ### Most Common Words | Rank | Word | Frequency | |------|------|-----------| | 1 | แƒ“แƒ | 1,097,500 | | 2 | แƒฌแƒšแƒ˜แƒก | 288,743 | | 3 | แƒฌแƒ”แƒšแƒก | 254,559 | | 4 | แƒ˜แƒงแƒ | 188,838 | | 5 | แƒ˜แƒก | 162,453 | | 6 | แƒ แƒแƒ›แƒ”แƒšแƒ˜แƒช | 141,611 | | 7 | the | 128,418 | | 8 | แƒ แƒแƒ› | 124,976 | | 9 | 1 | 122,280 | | 10 | แƒ›แƒ˜แƒกแƒ˜ | 118,080 | ### Least Common Words (from vocabulary) | Rank | Word | Frequency | |------|------|-----------| | 1 | pbsuccess | 2 | | 2 | แƒ›แƒแƒœแƒ’แƒฃแƒกแƒ˜ | 2 | | 3 | แƒ‘แƒแƒ แƒœแƒฐแƒแƒ›แƒ˜ | 2 | | 4 | แƒ แƒแƒฉแƒแƒ™แƒ˜แƒก | 2 | | 5 | peig | 2 | | 6 | แƒšแƒ”แƒ›แƒกแƒ˜แƒก | 2 | | 7 | smap | 2 | | 8 | แƒ™แƒแƒ›แƒ˜แƒขแƒ˜แƒก | 2 | | 9 | แƒ•แƒ˜แƒšแƒแƒ™แƒแƒ›แƒžแƒแƒก | 2 | | 10 | แƒ“แƒ”แƒ•แƒแƒ แƒ”แƒก | 2 | ### Zipf's Law Analysis | Metric | Value | |--------|-------| | Zipf Coefficient | 0.9374 | | Rยฒ (Goodness of Fit) | 0.993145 | | Adherence Quality | **excellent** | ### Coverage Analysis | Top N Words | Coverage | |-------------|----------| | Top 100 | 19.3% | | Top 1,000 | 42.2% | | Top 5,000 | 62.0% | | Top 10,000 | 70.3% | ### Key Findings - **Zipf Compliance:** Rยฒ=0.9931 indicates excellent adherence to Zipf's law - **High Frequency Dominance:** Top 100 words cover 19.3% of corpus - **Long Tail:** 705,127 words needed for remaining 29.7% coverage --- ## 5. Word Embeddings Evaluation ![Embedding Isotropy](visualizations/embedding_isotropy.png) ![Similarity Matrix](visualizations/embedding_similarity.png) ![t-SNE Words](visualizations/tsne_words.png) ![t-SNE Sentences](visualizations/tsne_sentences.png) ### 5.1 Cross-Lingual Alignment ![Alignment Quality](visualizations/embedding_alignment_quality.png) ![Multilingual t-SNE](visualizations/embedding_tsne_multilingual.png) ### 5.2 Model Comparison | Model | Dimension | Isotropy | Semantic Density | Alignment R@1 | Alignment R@10 | |-------|-----------|----------|------------------|---------------|----------------| | **mono_32d** | 32 | 0.7869 | 0.3479 | N/A | N/A | | **mono_64d** | 64 | 0.7389 | 0.2989 | N/A | N/A | | **mono_128d** | 128 | 0.6243 | 0.2604 | N/A | N/A | | **aligned_32d** | 32 | 0.7869 ๐Ÿ† | 0.3607 | 0.1100 | 0.4300 | | **aligned_64d** | 64 | 0.7389 | 0.3031 | 0.2300 | 0.6300 | | **aligned_128d** | 128 | 0.6243 | 0.2636 | 0.2980 | 0.7120 | ### Key Findings - **Best Isotropy:** aligned_32d with 0.7869 (more uniform distribution) - **Semantic Density:** Average pairwise similarity of 0.3057. Lower values indicate better semantic separation. - **Alignment Quality:** Aligned models achieve up to 29.8% R@1 in cross-lingual retrieval. - **Recommendation:** 128d aligned for best cross-lingual performance --- ## 6. Morphological Analysis (Experimental) This section presents an automated morphological analysis derived from the statistical divergence between word-level and subword-level models. By analyzing where subword predictability spikes and where word-level coverage fails, we can infer linguistic structures without supervised data. ### 6.1 Productivity & Complexity | Metric | Value | Interpretation | Recommendation | |--------|-------|----------------|----------------| | Productivity Index | **5.000** | High morphological productivity | Reliable analysis | | Idiomaticity Gap | **-0.271** | Low formulaic content | - | ### 6.2 Affix Inventory (Productive Units) These are the most productive prefixes and suffixes identified by sampling the vocabulary for global substitutability patterns. A unit is considered an affix if stripping it leaves a valid stem that appears in other contexts. #### Productive Prefixes | Prefix | Examples | |--------|----------| | `-แƒกแƒ` | แƒกแƒแƒขแƒแƒ›แƒ—แƒแƒจแƒแƒ แƒ˜แƒกแƒ, แƒกแƒแƒ’แƒแƒœแƒซแƒฃแƒ แƒ˜แƒกแƒ, แƒกแƒแƒ›แƒแƒ แƒ—แƒšแƒ˜แƒแƒœแƒ˜ | | `-แƒ` | แƒแƒ•แƒขแƒแƒ›แƒแƒขแƒ˜แƒ–แƒ˜แƒ แƒ”แƒ‘แƒฃแƒš, แƒแƒ’แƒ แƒแƒขแƒ”แƒฅแƒœแƒ˜แƒ™แƒ˜แƒก, แƒแƒชแƒแƒฃแƒ แƒแƒก | | `-แƒ’แƒ` | แƒ’แƒแƒ›แƒแƒ•แƒšแƒ˜แƒœแƒ”แƒ‘แƒ”แƒ‘แƒแƒ›แƒ“แƒ”, แƒ’แƒแƒ›แƒแƒชแƒแƒšแƒ™แƒ”แƒ•แƒ”แƒ‘แƒ”แƒšแƒ˜, แƒ’แƒแƒ—แƒฎแƒ แƒ”แƒ‘แƒ˜แƒกแƒ—แƒ•แƒ˜แƒก | | `-แƒ“แƒ` | แƒ“แƒแƒ’แƒ•แƒแƒœแƒ”แƒ‘แƒ”แƒ—, แƒ“แƒแƒ™แƒ แƒซแƒแƒšแƒฃแƒš, แƒ“แƒแƒžแƒงแƒ แƒแƒ‘แƒšแƒ˜ | | `-แƒ›` | แƒ›แƒแƒ™แƒแƒ•แƒจแƒ˜แƒ แƒ”แƒแƒ‘แƒแƒ–แƒ”, แƒ›แƒแƒ•แƒ แƒ˜แƒ™แƒ˜แƒแƒกแƒก, แƒ›แƒแƒœแƒ˜แƒจแƒœแƒ”แƒ‘แƒ”แƒš | | `-แƒ›แƒ` | แƒ›แƒแƒ•แƒ แƒ˜แƒ™แƒ˜แƒแƒกแƒก, แƒ›แƒแƒœแƒ˜แƒจแƒœแƒ”แƒ‘แƒ”แƒš, แƒ›แƒแƒ แƒฏแƒแƒœแƒ˜แƒจแƒ•แƒ˜แƒšแƒ˜ | | `-แƒ›แƒ` | แƒ›แƒแƒ™แƒแƒ•แƒจแƒ˜แƒ แƒ”แƒแƒ‘แƒแƒ–แƒ”, แƒ›แƒแƒ›แƒฅแƒœแƒ”แƒ•แƒ˜, แƒ›แƒแƒ›แƒšแƒแƒชแƒ•แƒ”แƒšแƒ—แƒแƒ’แƒแƒœ | | `-แƒก` | แƒกแƒแƒขแƒแƒ›แƒ—แƒแƒจแƒแƒ แƒ˜แƒกแƒ, แƒกแƒแƒ’แƒแƒœแƒซแƒฃแƒ แƒ˜แƒกแƒ, แƒกแƒแƒ›แƒแƒ แƒ—แƒšแƒ˜แƒแƒœแƒ˜ | #### Productive Suffixes | Suffix | Examples | |--------|----------| | `-แƒก` | แƒ“แƒ แƒ”แƒ˜แƒ™แƒก, แƒ›แƒแƒ•แƒ แƒ˜แƒ™แƒ˜แƒแƒกแƒก, แƒ“แƒ แƒแƒฉแƒแƒก | | `-แƒ˜` | แƒ‘แƒแƒœแƒ˜แƒจแƒ”แƒ•แƒกแƒ™แƒ˜, แƒ”แƒ’แƒ–แƒ”แƒ›แƒžแƒšแƒแƒ แƒจแƒ˜, แƒกแƒแƒ›แƒแƒ แƒ—แƒšแƒ˜แƒแƒœแƒ˜ | | `-แƒ˜แƒก` | แƒžแƒแƒ แƒ›แƒ”แƒšแƒ˜แƒก, แƒ˜แƒแƒกแƒแƒ แƒ˜แƒก, แƒงแƒฃแƒกแƒแƒ แƒ˜แƒก | | `-แƒ` | แƒ™แƒ˜แƒ แƒฅแƒ•แƒ˜แƒกแƒแƒ, แƒ–แƒ”แƒ“แƒแƒ›แƒ˜แƒแƒชแƒ”แƒœแƒ˜แƒกแƒ, แƒกแƒแƒ’แƒแƒœแƒซแƒฃแƒ แƒ˜แƒกแƒ | | `-แƒแƒœ` | แƒ“แƒ˜แƒแƒ™แƒแƒœแƒ—แƒแƒœ, แƒ”แƒ แƒ“แƒ›แƒแƒœ, แƒ‘แƒ แƒ˜แƒขแƒแƒœแƒ”แƒšแƒ”แƒ‘แƒ˜แƒกแƒแƒ’แƒแƒœ | | `-แƒœ` | แƒ“แƒ˜แƒแƒ™แƒแƒœแƒ—แƒแƒœ, แƒ”แƒ แƒ“แƒ›แƒแƒœ, แƒ‘แƒ แƒ˜แƒขแƒแƒœแƒ”แƒšแƒ”แƒ‘แƒ˜แƒกแƒแƒ’แƒแƒœ | | `-แƒšแƒ˜` | แƒ›แƒแƒ แƒฏแƒแƒœแƒ˜แƒจแƒ•แƒ˜แƒšแƒ˜, แƒฉแƒแƒ›แƒแƒจแƒแƒ แƒ”แƒ‘แƒฃแƒšแƒ˜, แƒ“แƒแƒžแƒงแƒ แƒแƒ‘แƒšแƒ˜ | | `-แƒกแƒ` | แƒ–แƒ”แƒ“แƒแƒ›แƒ˜แƒแƒชแƒ”แƒœแƒ˜แƒกแƒ, แƒกแƒแƒ’แƒแƒœแƒซแƒฃแƒ แƒ˜แƒกแƒ, แƒขแƒงแƒ•แƒ˜แƒแƒ•แƒ˜แƒกแƒ | ### 6.3 Bound Stems (Lexical Roots) Bound stems are high-frequency subword units that are semantically cohesive but rarely appear as standalone words. These often correspond to the 'core' of a word that requires inflection or derivation to be valid. | Stem | Cohesion | Substitutability | Examples | |------|----------|------------------|----------| | `แƒ”แƒ—แƒ˜แƒก` | 1.85x | 194 contexts | แƒฉแƒ”แƒ—แƒ˜แƒก, แƒจแƒ”แƒ—แƒ˜แƒก, แƒ‘แƒ”แƒ—แƒ˜แƒก | | `แƒ”แƒšแƒ”แƒ‘` | 1.48x | 550 contexts | แƒ”แƒšแƒ”แƒ‘แƒ˜, แƒ™แƒ”แƒšแƒ”แƒ‘, แƒฏแƒ”แƒšแƒ”แƒ‘ | | `แƒ›แƒ“แƒ”แƒ’` | 2.33x | 52 contexts | แƒ”แƒ›แƒ“แƒ”แƒ’, แƒจแƒแƒ›แƒ“แƒ”แƒ’, แƒ“แƒแƒ›แƒ“แƒ”แƒ’ | | `แƒ”แƒœแƒ”แƒ‘` | 1.41x | 544 contexts | แƒ”แƒœแƒ”แƒ‘แƒ, แƒ”แƒœแƒ”แƒ‘แƒ˜, แƒ”แƒœแƒ”แƒ‘แƒก | | `แƒ”แƒ‘แƒฃแƒš` | 1.59x | 250 contexts | แƒฅแƒ”แƒ‘แƒฃแƒš, แƒ™แƒ แƒ”แƒ‘แƒฃแƒš, แƒฅแƒ”แƒ‘แƒฃแƒšแƒ˜ | | `แƒ“แƒ’แƒ”แƒœ` | 1.75x | 134 contexts | แƒแƒ“แƒ’แƒ”แƒœแƒก, แƒ•แƒแƒ“แƒ’แƒ”แƒœ, แƒฃแƒ“แƒ’แƒ”แƒœแƒก | | `แƒแƒ แƒ—แƒ•` | 1.68x | 147 contexts | แƒฅแƒแƒ แƒ—แƒ•, แƒ›แƒแƒ แƒ—แƒ•แƒ”, แƒฉแƒแƒ แƒ—แƒ•แƒ | | `แƒ แƒ—แƒ•แƒ”` | 1.81x | 96 contexts | แƒ›แƒแƒ แƒ—แƒ•แƒ”, แƒ แƒ—แƒ•แƒ”แƒšแƒก, แƒฅแƒแƒ แƒ—แƒ•แƒ” | | `แƒแƒ›แƒ”แƒš` | 1.63x | 118 contexts | แƒขแƒแƒ›แƒ”แƒš, แƒ แƒแƒ›แƒ”แƒš, แƒ“แƒแƒ›แƒ”แƒšแƒ˜ | | `แƒœแƒขแƒ”แƒ ` | 1.51x | 148 contexts | แƒฃแƒœแƒขแƒ”แƒ , แƒ˜แƒœแƒขแƒ”แƒ , แƒ”แƒœแƒขแƒ”แƒ  | | `แƒแƒ•แƒšแƒ”` | 1.43x | 180 contexts | แƒกแƒแƒ•แƒšแƒ”, แƒแƒ•แƒšแƒ”แƒœ, แƒžแƒแƒ•แƒšแƒ” | | `แƒแƒšแƒแƒฅ` | 1.58x | 106 contexts | แƒฅแƒแƒšแƒแƒฅ, แƒ›แƒแƒšแƒแƒฅ, แƒ“แƒแƒšแƒแƒฅแƒก | ### 6.4 Affix Compatibility (Co-occurrence) This table shows which prefixes and suffixes most frequently co-occur on the same stems, revealing the 'stacking' rules of the language's morphology. | Prefix | Suffix | Frequency | Examples | |--------|--------|-----------|----------| | `-แƒ›` | `-แƒก` | 186 words | แƒ›แƒแƒœแƒแƒขแƒแƒœแƒฃแƒ แƒแƒ‘แƒ˜แƒก, แƒ›แƒแƒกแƒฃแƒšแƒ˜แƒจแƒ•แƒ˜แƒšแƒก | | `-แƒ›` | `-แƒ˜` | 167 words | แƒ›แƒฎแƒแƒขแƒ•แƒ แƒ”แƒ‘แƒจแƒ˜, แƒ›แƒ”แƒšแƒแƒœแƒฅแƒแƒšแƒ˜แƒ™แƒฃแƒ แƒ˜ | | `-แƒ›` | `-แƒ` | 129 words | แƒ›แƒฆแƒ”แƒ‘แƒแƒ•แƒ—แƒ, แƒ›แƒแƒœแƒ“แƒ˜แƒšแƒแƒกแƒœแƒ”แƒ‘แƒ›แƒ | | `-แƒ` | `-แƒ˜` | 124 words | แƒแƒšแƒขแƒ”แƒœแƒ‘แƒฃแƒ แƒ’แƒจแƒ˜, แƒแƒขแƒ™แƒ˜แƒœแƒ˜ | | `-แƒ` | `-แƒก` | 120 words | แƒแƒšแƒ“แƒ”แƒก, แƒแƒœแƒ“แƒ”แƒ แƒกแƒแƒœแƒ˜แƒก | | `-แƒ’แƒ` | `-แƒ` | 111 words | แƒ’แƒแƒ›แƒ”แƒ’แƒ–แƒแƒ•แƒ แƒ, แƒ’แƒแƒ™แƒ แƒ˜แƒขแƒ˜แƒ™แƒ”แƒ‘แƒ | | `-แƒ›` | `-แƒ˜แƒก` | 104 words | แƒ›แƒแƒœแƒแƒขแƒแƒœแƒฃแƒ แƒแƒ‘แƒ˜แƒก, แƒ›แƒฃแƒกแƒแƒœแƒ“แƒแƒ›แƒ˜แƒก | | `-แƒ` | `-แƒ` | 93 words | แƒแƒ‘แƒ แƒ”แƒ•แƒ˜แƒแƒชแƒ˜แƒ, แƒแƒ˜แƒฃแƒ—แƒแƒ˜แƒ | | `-แƒก` | `-แƒก` | 88 words | แƒกแƒ˜แƒกแƒšแƒ”แƒ˜แƒก, แƒกแƒ™แƒ˜แƒแƒ แƒแƒก | | `-แƒก` | `-แƒ˜` | 82 words | แƒกแƒแƒคแƒ แƒ—แƒฎแƒ”แƒจแƒ˜, แƒกแƒขแƒ”แƒ แƒ”แƒแƒกแƒ™แƒแƒžแƒฃแƒšแƒ˜ | ### 6.5 Recursive Morpheme Segmentation Using **Recursive Hierarchical Substitutability**, we decompose complex words into their constituent morphemes. This approach handles nested affixes (e.g., `prefix-prefix-root-suffix`). | Word | Suggested Split | Confidence | Stem | |------|-----------------|------------|------| | แƒ“แƒแƒ™แƒแƒ แƒ’แƒ•แƒแƒกแƒ | **`แƒ“แƒแƒ™แƒแƒ แƒ’แƒ•แƒ-แƒก-แƒ`** | 7.5 | `แƒก` | | แƒžแƒ”แƒ“แƒ˜แƒแƒขแƒ แƒ˜แƒแƒกแƒ | **`แƒžแƒ”แƒ“แƒ˜แƒแƒขแƒ แƒ˜แƒ-แƒก-แƒ`** | 7.5 | `แƒก` | | แƒ˜แƒœแƒ“แƒ˜แƒ™แƒแƒขแƒแƒ แƒ”แƒ‘แƒ˜แƒ | **`แƒ˜แƒœแƒ“แƒ˜แƒ™แƒแƒขแƒแƒ แƒ”แƒ‘-แƒ˜-แƒ`** | 7.5 | `แƒ˜` | | แƒ™แƒแƒ แƒœแƒแƒฎแƒแƒ‘แƒ“แƒแƒ— | **`แƒ™แƒแƒ แƒœแƒแƒฎแƒแƒ‘แƒ“-แƒ-แƒ—`** | 7.5 | `แƒ` | | แƒœแƒแƒชแƒ˜แƒแƒœแƒแƒšแƒ˜แƒ–แƒ›แƒกแƒ | **`แƒœแƒแƒชแƒ˜แƒแƒœแƒแƒšแƒ˜แƒ–แƒ›-แƒก-แƒ`** | 7.5 | `แƒก` | | แƒ›แƒ˜แƒ›แƒแƒฎแƒ˜แƒšแƒ•แƒแƒ–แƒ” | **`แƒ›แƒ˜แƒ›แƒแƒฎแƒ˜แƒšแƒ•-แƒ-แƒ–แƒ”`** | 7.5 | `แƒ` | | แƒ›แƒ”แƒขแƒงแƒ”แƒ•แƒ”แƒแƒ‘แƒแƒจแƒ˜ | **`แƒ›แƒ”แƒขแƒงแƒ”แƒ•แƒ”แƒแƒ‘-แƒ-แƒจแƒ˜`** | 7.5 | `แƒ` | | แƒแƒ แƒ˜แƒกแƒขแƒแƒ™แƒ แƒแƒขแƒ˜แƒ | **`แƒแƒ แƒ˜แƒกแƒขแƒแƒ™แƒ แƒแƒข-แƒ˜-แƒ`** | 7.5 | `แƒ˜` | | แƒ’แƒแƒ“แƒแƒฃแƒฎแƒ“แƒ”แƒšแƒแƒ‘แƒแƒก | **`แƒ’แƒแƒ“แƒแƒฃแƒฎแƒ“แƒ”แƒšแƒแƒ‘-แƒ-แƒก`** | 7.5 | `แƒ` | | ะฟั€ะพะฒะธะฝั†ะธะธแƒแƒกแƒ | **`ะฟั€ะพะฒะธะฝั†ะธะธแƒ-แƒก-แƒ`** | 7.5 | `แƒก` | | แƒซแƒ”แƒ’แƒšแƒ”แƒ‘แƒกแƒแƒช | **`แƒซแƒ”แƒ’แƒšแƒ”แƒ‘-แƒก-แƒแƒช`** | 7.5 | `แƒก` | | แƒ™แƒแƒœแƒคแƒ˜แƒกแƒ™แƒแƒชแƒ˜แƒแƒกแƒ | **`แƒ™แƒแƒœแƒคแƒ˜แƒกแƒ™แƒแƒชแƒ˜แƒ-แƒก-แƒ`** | 7.5 | `แƒก` | | แƒแƒ แƒแƒ™แƒแƒขแƒแƒ™แƒแƒจแƒ˜ | **`แƒแƒ แƒแƒ™แƒแƒขแƒแƒ™-แƒ-แƒจแƒ˜`** | 7.5 | `แƒ` | | แƒ›แƒแƒœแƒแƒ™แƒ แƒ˜แƒกแƒขแƒแƒšแƒ˜ | **`แƒ›แƒแƒœแƒแƒ™แƒ แƒ˜แƒกแƒข-แƒ-แƒšแƒ˜`** | 7.5 | `แƒ` | | แƒฐแƒแƒšแƒแƒœแƒ“แƒ˜แƒแƒก | **`แƒฐแƒแƒšแƒแƒœแƒ“แƒ˜-แƒ-แƒก`** | 7.5 | `แƒ` | ### 6.6 Linguistic Interpretation > **Automated Insight:** The language Georgian shows high morphological productivity. The subword models are significantly more efficient than word models, suggesting a rich system of affixation or compounding. --- ## 7. Summary & Recommendations ![Performance Dashboard](visualizations/performance_dashboard.png) ### Production Recommendations | Component | Recommended | Rationale | |-----------|-------------|-----------| | Tokenizer | **64k BPE** | Best compression (5.03x) | | N-gram | **2-gram** | Lowest perplexity (423) | | Markov | **Context-4** | Highest predictability (97.2%) | | Embeddings | **100d** | Balanced semantic capture and isotropy | --- ## Appendix: Metrics Glossary & Interpretation Guide This section provides definitions, intuitions, and guidance for interpreting the metrics used throughout this report. ### Tokenizer Metrics **Compression Ratio** > *Definition:* The ratio of characters to tokens (chars/token). Measures how efficiently the tokenizer represents text. > > *Intuition:* Higher compression means fewer tokens needed to represent the same text, reducing sequence lengths for downstream models. A 3x compression means ~3 characters per token on average. > > *What to seek:* Higher is generally better for efficiency, but extremely high compression may indicate overly aggressive merging that loses morphological information. **Average Token Length (Fertility)** > *Definition:* Mean number of characters per token produced by the tokenizer. > > *Intuition:* Reflects the granularity of tokenization. Longer tokens capture more context but may struggle with rare words; shorter tokens are more flexible but increase sequence length. > > *What to seek:* Balance between 2-5 characters for most languages. Arabic/morphologically-rich languages may benefit from slightly longer tokens. **Unknown Token Rate (OOV Rate)** > *Definition:* Percentage of tokens that map to the unknown/UNK token, indicating words the tokenizer cannot represent. > > *Intuition:* Lower OOV means better vocabulary coverage. High OOV indicates the tokenizer encounters many unseen character sequences. > > *What to seek:* Below 1% is excellent; below 5% is acceptable. BPE tokenizers typically achieve very low OOV due to subword fallback. ### N-gram Model Metrics **Perplexity** > *Definition:* Measures how "surprised" the model is by test data. Mathematically: 2^(cross-entropy). Lower values indicate better prediction. > > *Intuition:* If perplexity is 100, the model is as uncertain as if choosing uniformly among 100 options at each step. A perplexity of 10 means effectively choosing among 10 equally likely options. > > *What to seek:* Lower is better. Perplexity decreases with larger n-grams (more context). Values vary widely by language and corpus size. **Entropy** > *Definition:* Average information content (in bits) needed to encode the next token given the context. Related to perplexity: perplexity = 2^entropy. > > *Intuition:* High entropy means high uncertainty/randomness; low entropy means predictable patterns. Natural language typically has entropy between 1-4 bits per character. > > *What to seek:* Lower entropy indicates more predictable text patterns. Entropy should decrease as n-gram size increases. **Coverage (Top-K)** > *Definition:* Percentage of corpus occurrences explained by the top K most frequent n-grams. > > *Intuition:* High coverage with few patterns indicates repetitive/formulaic text; low coverage suggests diverse vocabulary usage. > > *What to seek:* Depends on use case. For language modeling, moderate coverage (40-60% with top-1000) is typical for natural text. ### Markov Chain Metrics **Average Entropy** > *Definition:* Mean entropy across all contexts, measuring average uncertainty in next-word prediction. > > *Intuition:* Lower entropy means the model is more confident about what comes next. Context-1 has high entropy (many possible next words); Context-4 has low entropy (few likely continuations). > > *What to seek:* Decreasing entropy with larger context sizes. Very low entropy (<0.1) indicates highly deterministic transitions. **Branching Factor** > *Definition:* Average number of unique next tokens observed for each context. > > *Intuition:* High branching = many possible continuations (flexible but uncertain); low branching = few options (predictable but potentially repetitive). > > *What to seek:* Branching factor should decrease with context size. Values near 1.0 indicate nearly deterministic chains. **Predictability** > *Definition:* Derived metric: (1 - normalized_entropy) ร— 100%. Indicates how deterministic the model's predictions are. > > *Intuition:* 100% predictability means the next word is always certain; 0% means completely random. Real text falls between these extremes. > > *What to seek:* Higher predictability for text generation quality, but too high (>98%) may produce repetitive output. ### Vocabulary & Zipf's Law Metrics **Zipf's Coefficient** > *Definition:* The slope of the log-log plot of word frequency vs. rank. Zipf's law predicts this should be approximately -1. > > *Intuition:* A coefficient near -1 indicates the corpus follows natural language patterns where a few words are very common and most words are rare. > > *What to seek:* Values between -0.8 and -1.2 indicate healthy natural language distribution. Deviations may suggest domain-specific or artificial text. **Rยฒ (Coefficient of Determination)** > *Definition:* Measures how well the linear fit explains the frequency-rank relationship. Ranges from 0 to 1. > > *Intuition:* Rยฒ near 1.0 means the data closely follows Zipf's law; lower values indicate deviation from expected word frequency patterns. > > *What to seek:* Rยฒ > 0.95 is excellent; > 0.99 indicates near-perfect Zipf adherence typical of large natural corpora. **Vocabulary Coverage** > *Definition:* Cumulative percentage of corpus tokens accounted for by the top N words. > > *Intuition:* Shows how concentrated word usage is. If top-100 words cover 50% of text, the corpus relies heavily on common words. > > *What to seek:* Top-100 covering 30-50% is typical. Higher coverage indicates more repetitive text; lower suggests richer vocabulary. ### Word Embedding Metrics **Isotropy** > *Definition:* Measures how uniformly distributed vectors are in the embedding space. Computed as the ratio of minimum to maximum singular values. > > *Intuition:* High isotropy (near 1.0) means vectors spread evenly in all directions; low isotropy means vectors cluster in certain directions, reducing expressiveness. > > *What to seek:* Higher isotropy generally indicates better-quality embeddings. Values > 0.1 are reasonable; > 0.3 is good. Lower-dimensional embeddings tend to have higher isotropy. **Average Norm** > *Definition:* Mean magnitude (L2 norm) of word vectors in the embedding space. > > *Intuition:* Indicates the typical "length" of vectors. Consistent norms suggest stable training; high variance may indicate some words are undertrained. > > *What to seek:* Relatively consistent norms across models. The absolute value matters less than consistency (low std deviation). **Cosine Similarity** > *Definition:* Measures angular similarity between vectors, ranging from -1 (opposite) to 1 (identical direction). > > *Intuition:* Words with similar meanings should have high cosine similarity. This is the standard metric for semantic relatedness in embeddings. > > *What to seek:* Semantically related words should score > 0.5; unrelated words should be near 0. Synonyms often score > 0.7. **t-SNE Visualization** > *Definition:* t-Distributed Stochastic Neighbor Embedding - a dimensionality reduction technique that preserves local structure for visualization. > > *Intuition:* Clusters in t-SNE plots indicate groups of semantically related words. Spread indicates vocabulary diversity; tight clusters suggest semantic coherence. > > *What to seek:* Meaningful clusters (e.g., numbers together, verbs together). Avoid over-interpreting distances - t-SNE preserves local, not global, structure. ### General Interpretation Guidelines 1. **Compare within model families:** Metrics are most meaningful when comparing models of the same type (e.g., 8k vs 64k tokenizer). 2. **Consider trade-offs:** Better performance on one metric often comes at the cost of another (e.g., compression vs. OOV rate). 3. **Context matters:** Optimal values depend on downstream tasks. Text generation may prioritize different metrics than classification. 4. **Corpus influence:** All metrics are influenced by corpus characteristics. Wikipedia text differs from social media or literature. 5. **Language-specific patterns:** Morphologically rich languages (like Arabic) may show different optimal ranges than analytic languages. ### Visualizations Index | Visualization | Description | |---------------|-------------| | Tokenizer Compression | Compression ratios by vocabulary size | | Tokenizer Fertility | Average token length by vocabulary | | Tokenizer OOV | Unknown token rates | | Tokenizer Total Tokens | Total tokens by vocabulary | | N-gram Perplexity | Perplexity by n-gram size | | N-gram Entropy | Entropy by n-gram size | | N-gram Coverage | Top pattern coverage | | N-gram Unique | Unique n-gram counts | | Markov Entropy | Entropy by context size | | Markov Branching | Branching factor by context | | Markov Contexts | Unique context counts | | Zipf's Law | Frequency-rank distribution with fit | | Vocab Frequency | Word frequency distribution | | Top 20 Words | Most frequent words | | Vocab Coverage | Cumulative coverage curve | | Embedding Isotropy | Vector space uniformity | | Embedding Norms | Vector magnitude distribution | | Embedding Similarity | Word similarity heatmap | | Nearest Neighbors | Similar words for key terms | | t-SNE Words | 2D word embedding visualization | | t-SNE Sentences | 2D sentence embedding visualization | | Position Encoding | Encoding method comparison | | Model Sizes | Storage requirements | | Performance Dashboard | Comprehensive performance overview | --- ## About This Project ### Data Source Models trained on [wikipedia-monthly](https://huggingface.co/datasets/omarkamali/wikipedia-monthly) - a monthly snapshot of Wikipedia articles across 300+ languages. ### Project A project by **[Wikilangs](https://wikilangs.org)** - Open-source NLP models for every Wikipedia language. ### Maintainer [Omar Kamali](https://omarkamali.com) - [Omneity Labs](https://omneitylabs.com) ### Citation If you use these models in your research, please cite: ```bibtex @misc{wikilangs2025, author = {Kamali, Omar}, title = {Wikilangs: Open NLP Models for Wikipedia Languages}, year = {2025}, doi = {10.5281/zenodo.18073153}, publisher = {Zenodo}, url = {https://huggingface.co/wikilangs} institution = {Omneity Labs} } ``` ### License MIT License - Free for academic and commercial use. ### Links - ๐ŸŒ Website: [wikilangs.org](https://wikilangs.org) - ๐Ÿค— Models: [huggingface.co/wikilangs](https://huggingface.co/wikilangs) - ๐Ÿ“Š Data: [wikipedia-monthly](https://huggingface.co/datasets/omarkamali/wikipedia-monthly) - ๐Ÿ‘ค Author: [Omar Kamali](https://huggingface.co/omarkamali) - ๐Ÿค Sponsor: [Featherless AI](https://featherless.ai) --- *Generated by Wikilangs Models Pipeline* *Report Date: 2026-01-10 11:10:47*