🔗 Live demo / 線上試用:https://trickster-2005.github.io/Turkic-Suffix-Lab/
An interactive, block-based morphology engine that shows how Turkish, Kazakh and Uzbek nouns take suffixes — and why each form is chosen. Built for teaching vowel harmony and consonant assimilation.
ev + -lAr + -(I)m + -DA → evlerimde (Turkish)
үй + -LAr + -(I)m + -DA → үйлерімде (Kazakh)
uy + -lar + -(i)m + -da → uylarimda (Uzbek)
“in my houses”
| Tab | What it does |
|---|---|
| 🔍 Analyzer (top of Builder) | Type any noun form and get it split back into stem + suffixes (e.g. evleri → 4 readings). Near-miss forms are diagnosed: evlarimde → “did you mean evlerimde? (vowel harmony)”. Unknown stems get a guessed split. |
| 🧱 Builder | Pick a word (or type your own), stack suffix blocks (number · 6 possessors · 6 cases), and compare three languages side by side. Each step shows the archiphoneme, the chosen allomorph, and a one-sentence rule highlighting the trigger and chosen sounds. Includes stem traits, Leipzig gloss and a shareable link. |
| ▦ Paradigms | Full possessor × case table for any word; click a cell to open it in the Builder. Allomorph explorer groups every word by the form it takes (e.g. all six Kazakh plurals -лар/-лер/-дар/-дер/-тар/-тер). |
| 🎯 Practice | Multiple-choice quiz. Wrong options are generated by switching off exactly one real rule, so every mistake teaches something. Score, streak, keyboard shortcuts. |
| 📖 Grammar | Eight bite-sized lessons plus an interactive Turkish vowel chart. |
| </> Code | Live finite-state trace of the current input and a clean TypeScript reference selector. |
- Covers: vowel harmony (2-way / 4-way), Turkish D/T and Kazakh L/D/T assimilation, buffer consonants (y, n, s), pronominal n, consonant softening (kitap → kitabı), vowel drop (ağız → ağzı), and lexical exceptions (saat → saatler).
- UI in English (default) and Traditional Chinese (Taiwan); dark theme by default with a light option; responsive from phones to desktops.
- Sakha (Yakut) is shown but disabled in this version.
No build step, no dependencies. Open index.html directly, or serve the folder:
python -m http.server 8000Then visit http://localhost:8000.
node tests/engine.test.js376 checks: golden forms for all three languages, distractor sanity checks, analyzer cases, and a generate → analyze round trip.
index.html page shell
css/styles.css design tokens, dark/light themes, responsive layout
js/engine.js morphology engine (Turkish, Kazakh, Uzbek)
js/data.js lexicon (20 concepts × 3 languages)
js/i18n.js UI strings, rule explanations, lessons (EN / zh-TW)
js/app.js UI: builder, paradigms, explorer, practice, grammar, code
src/selector.ts condensed TypeScript reference (shown in the Code tab)
js/snippet.js generated from src/selector.ts by tools/build-snippet.js
PROMPT.md the full specification / system prompt this tool implements
tests/ golden-form tests
After editing src/selector.ts, regenerate the embedded copy with node tools/build-snippet.js.
Rules are simplified for learners. Kazakh is written in Cyrillic with a simplified romanization; Latin input is auto-converted. Kazakh “2PL” is shown with the polite 2nd-person form -(ы)ңыз.
一個互動式、積木式的構詞引擎,展示土耳其語、哈薩克語、烏茲別克語的名詞如何接後綴——以及為什麼會選到那個形式。專為教授「母音和諧」與「子音同化」設計。
ev + -lAr + -(I)m + -DA → evlerimde (土耳其語)
үй + -LAr + -(I)m + -DA → үйлерімде (哈薩克語)
uy + -lar + -(i)m + -da → uylarimda (烏茲別克語)
「在我的房子(複數)裡」
| 分頁 | 說明 |
|---|---|
| 🔍 拆解(組裝台上方) | 輸入任一名詞變化形,拆回「詞幹 + 後綴」(例如 evleri 有 4 種解讀)。接近但錯誤的形式會被診斷:evlarimde →「你是不是想打 evlerimde?(母音和諧)」。詞庫外的詞幹會給出推測拆法。 |
| 🧱 組裝台 | 選一個詞(或自行輸入),疊加後綴積木(數・6 種領屬・6 種格),三種語言並排比較。每一步都會顯示抽象詞素、選定的詞素變體,以及一句話規則說明,並標出觸發音與選定音。另有詞幹特徵分析、逐詞素註解(Leipzig gloss)與分享連結。 |
| ▦ 變化表 | 任一詞的完整「領屬 × 格」表;點任一格即可帶回組裝台。詞素變體探索會把所有詞依所用形式分組(例如哈薩克語複數的六種形式 -лар/-лер/-дар/-дер/-тар/-тер)。 |
| 🎯 練習 | 選擇題測驗。錯誤選項是「故意關掉一條真實規則」產生的,所以每次答錯都學得到東西。含得分、連對紀錄、鍵盤快捷鍵。 |
| 📖 文法教室 | 八張簡短的文法卡片,加上可點選的土耳其語母音表。 |
| </> 程式碼 | 以有限狀態機呈現目前輸入的即時轉移紀錄,以及精簡的 TypeScript 參考實作。 |
- 涵蓋:母音和諧(二重/四重)、土耳其語 D/T 與哈薩克語 L/D/T 同化、緩衝子音(y、n、s)、代名詞性 n、字尾濁化(kitap → kitabı)、母音脫落(ağız → ağzı)、詞彙例外(saat → saatler)。
- 介面支援英文(預設)與台灣繁體中文;預設深色主題,可切換淺色;手機到桌機皆為響應式設計(RWD)。
- **薩哈語(雅庫特語)**在此版本顯示為關閉狀態。
不需建置、沒有相依套件。直接開啟 index.html,或啟動靜態伺服器:
python -m http.server 8000然後前往 http://localhost:8000。
node tests/engine.test.js共 376 項檢查:三種語言的標準形式、錯誤選項合理性、拆解案例,以及「生成 → 拆解」往返測試。
index.html 頁面骨架
css/styles.css 設計變數、深/淺色主題、響應式版面
js/engine.js 構詞引擎(土耳其語、哈薩克語、烏茲別克語)
js/data.js 詞庫(20 個概念 × 3 種語言)
js/i18n.js 介面文字、規則解說、文法課(英文/繁中)
js/app.js 介面:組裝台、變化表、探索、練習、文法、程式碼
src/selector.ts 精簡 TypeScript 參考實作(顯示於「程式碼」分頁)
js/snippet.js 由 tools/build-snippet.js 從 src/selector.ts 產生
PROMPT.md 本工具實作的完整規格/系統提示詞
tests/ 標準形式測試
修改 src/selector.ts 後,請執行 node tools/build-snippet.js 重新產生內嵌版本。
規則為學習者做了簡化。哈薩克語以西里爾字母書寫並附簡化拉丁轉寫,也可直接輸入拉丁字母自動轉換。哈薩克語的「2PL」以敬稱 -(ы)ңыз 呈現。