ข้ามไปยังเนื้อหาหลัก

ข้อกำหนดการ์ดภาษา

แหล่งข้อมูลเดียวที่เชื่อถือได้ เอกสารนี้กำหนดรูปแบบมาตรฐานของการ์ดภาษาทุกใบ การ์ดทุกใบต้องมีฟิลด์ระดับบนสุดทุกฟิลด์ที่ระบุไว้ที่นี่ แม้ว่าค่าจะเป็น null หรือ [] ก็ตาม การ์ดที่ขาดฟิลด์ใดฟิลด์หนึ่งถือว่าไม่เป็นไปตามมาตรฐาน ความสม่ำเสมอนี้ทำให้เครื่องมืออัตโนมัติ ตัวตรวจสอบ สคริปต์เสริมข้อมูล และผู้ตรวจสอบที่เป็นมนุษย์สามารถไว้วางใจโครงสร้างการ์ดได้

หลักการออกแบบ

  1. รูปแบบที่สม่ำเสมอ การ์ดกว่า 8,000 ใบมีฟิลด์ระดับบนสุดเหมือนกันทุกใบ ค่าที่ไม่ทราบ ใช้ null อาร์เรย์ว่างใช้ [] ออบเจกต์ว่างใช้ null (ไม่ใช่ {}) ซึ่งหมายความว่าโค้ดไม่จำเป็นต้องตรวจสอบว่า "ฟิลด์นี้มีอยู่หรือไม่" — ตรวจสอบเพียงว่า "มีข้อมูลอยู่หรือไม่"

  2. อ้างอิงแหล่งที่มาทุกอย่าง ข้อเท็จจริงทุกข้อสามารถสืบย้อนไปยังแหล่งข้อมูลหลักที่มีชื่อและระบุเวอร์ชันได้ ข้อมูลที่ไม่มีแหล่งอ้างอิงไม่สามารถตรวจสอบได้ ฟิลด์ dataSources (และการระบุ source ในซับออบเจกต์) ทำให้แหล่งที่มาชัดเจน

  3. รักษาความขัดแย้งไว้ เมื่อแหล่งข้อมูลไม่ตรงกัน (Wikidata ระบุ 50,000 คน Ethnologue ระบุ 20,000 คน) เราเก็บ ทั้งสอง ค่าพร้อมระบุแหล่งที่มา เราไม่เฉลี่ย ไม่ตัดสิน และไม่เลือกข้าง ผู้ใช้สามารถพิจารณาความแตกต่างได้เอง

  4. Null หมายถึงไม่ทราบ ไม่ใช่ไม่เกี่ยวข้อง หากฟิลด์เป็น null หมายความว่า "เรายังไม่พบข้อมูลสำหรับฟิลด์นี้" หากฟิลด์ไม่เกี่ยวข้องจริงๆ (เช่น grammatical gender สำหรับภาษามือ) ค่าควรอธิบายสิ่งนั้น: { "grammatical": false, "inclusiveGuidance": "Not applicable — ASL does not have grammatical gender." }

  5. เพิ่มข้อมูลเท่านั้น สคริปต์เสริมข้อมูลเพิ่มข้อมูลเท่านั้น ไม่เขียนทับ ค่าที่มนุษย์ดูแลมีความสำคัญเหนือกว่าข้อมูลอัตโนมัติ


สถาปัตยกรรมสามชั้น

ชั้นตำแหน่งวัตถุประสงค์
การ์ดภาษาshared/language-cards/<code>.jsonการกำหนดค่าต่อภาษา: เอกลักษณ์ การจำแนก ทรัพยากร และทุกอย่าง
การ์ด Genusshared/language-cards/genera/<genus>.jsonคุณสมบัติรันไทม์ที่ใช้ร่วมกันสำหรับภาษาที่เกี่ยวข้อง (ดูแลโดยมนุษย์ ไม่ใช่สร้างอัตโนมัติ)
ต้นไม้ภาษาshared/language-cards/language-tree.jsonลำดับชั้น Glottolog แบบสมบูรณ์ — ข้อมูลอ้างอิงสำหรับ Lab UI และการค้นพบภาษา

โมเดลการสืบทอด

เมื่อการ์ดกำหนด "extends": "family-dravidian" รันไทม์จะรวมการ์ดหลัก เข้ากับการ์ดลูกโดยใช้ _deepMerge() (ใน lib/registers.js) ซึ่งช่วยให้ การ์ด genus กำหนด register ที่ใช้ร่วมกัน ระบบความเป็นทางการ และแนวทางเรื่องเพศ ที่ส่งต่อไปยังภาษาสมาชิกทุกภาษา — โดยไม่ต้องทำซ้ำข้อมูลในการ์ดแต่ละใบ

ความหมายของการรวม

ค่าของลูกพฤติกรรมเหตุผล
nullสืบทอดจากหลักnull หมายถึง "ฉันไม่ได้กำหนดสิ่งนี้" — ค่าของหลักจะถูกส่งผ่าน
ไม่ใช่ nullแทนที่หลักข้อมูลของลูกเฉพาะเจาะจงกว่า — มีความสำคัญเหนือกว่า
ออบเจกต์ซ้อนรวมแบบเรียกซ้ำฟิลด์ของลูกแทนที่ ฟิลด์ของหลักถูกเก็บไว้
อาร์เรย์แทนที่ทั้งหมดอาร์เรย์ไม่รวมทีละรายการ — อาร์เรย์ของลูกชนะ

ฟิลด์เอกลักษณ์ (ไม่สืบทอดเด็ดขาด)

ฟิลด์บางฟิลด์เป็นของการ์ดนั้นเองและต้องไม่สืบทอดจากหลักเด็ดขาด:

code, extends, _migration, aliases, iso639_1, iso639_3

แม้ว่าการ์ดหลักจะกำหนด aliases: ["macro-code"] การ์ดลูกจะไม่ สืบทอด alias เหล่านั้น ฟิลด์เหล่านี้เป็นค่าของการ์ดลูกเสมอ (รวมถึง null หากไม่ได้กำหนด)

เหตุผล: หากไม่มีกฎนี้ ภาษา Cree ทุกภาษาจะสืบทอด aliases: ["cre"] จากหลัก macrolanguage ทำให้ทุกสำเนียงกลายเป็น alias ของ macro

ตัวอย่าง: การ์ด Cree แก้ไขอย่างไร

┌───────────────────────┐
│ family-algic.json │ formality: null, registers: null
│ (no registers) │
└──────────┬────────────┘
│ extends
┌──────────┴────────────┐
│ genus-cree.json │ formality: { system: "obviative-animate", ... }
│ (sourced registers) │ registers: { formal: {...}, informal: {...} }
└──────────┬────────────┘
│ extends
┌──────────┴────────────┐
│ crk.json │ code: "crk", extends: "genus-cree"
│ (Plains Cree) │ formality: null → inherits from genus-cree
│ │ registers: null → inherits from genus-cree
│ │ script: "Cans" → own value, no inheritance
│ │ code: "crk" → identity field, never inherited
└───────────────────────┘

ที่รันไทม์ getLanguageCard("crk") คืนออบเจกต์ที่รวมแล้วพร้อม register ของ genus-cree + คุณสมบัติของ family-algic (ถ้ามี) + เอกลักษณ์และ metadata ของ crk เอง

เทมเพลตการ์ด Genus

การ์ด Genus อยู่ใน shared/language-cards/genera/ และกำหนดคุณสมบัติที่ใช้ร่วมกัน สำหรับกลุ่มภาษา โดยใช้ schema เดียวกับการ์ดปกติแต่มีข้อตกลงที่แตกต่างกัน:

{
// Identity — genus cards use a prefixed code, NOT an ISO 639-3 code
"code": "genus-cree", // "genus-", "family-", or "macrolanguage-" prefix
"name": "Cree Languages", // Human-readable group name
"extends": "family-algic", // Genus cards can extend family cards (chaining)

// Formality — shared across the group, sourced from typological databases
"formality": {
"system": "obviative-animate",
"description": "Cree languages use an obviative/proximate system...",
"default": "formal",
"source": "WALS 37A, 38A + Wolfart 1973"
},

// Registers — shared presets, if the group shares a formality system
"registers": {
"formal": {
"label": "Formal (Proximate)",
"description": "...",
"prompt": "...",
"isDefault": true
},
"informal": {
"label": "Informal",
"description": "...",
"prompt": "..."
}
},

// Gender — shared grammatical gender behavior
"gender": {
"grammatical": false, // Cree doesn't have grammatical gender
"inclusiveGuidance": null // so no inclusive guidance needed
},

// Everything else is null — individual cards provide their own
// classification, geography, resources, etc.
"classification": null,
"methodSupport": null,
// ...
}

กฎสำคัญ: การ์ด Genus ต้องมีเฉพาะข้อมูลที่ใช้ร่วมกันจริงๆ ทั่วทั้งกลุ่ม และอ้างอิงจากแหล่งข้อมูลที่น่าเชื่อถือ หากระบบความเป็นทางการแตกต่างกันระหว่างสมาชิก ควรอยู่ในการ์ดแต่ละใบ ไม่ใช่ใน genus

เทมเพลตมาตรฐาน

การ์ดทุกใบต้องมีรูปแบบระดับบนสุดนี้ Schema ของซับออบเจกต์ มีเอกสารอยู่ใน Field Reference ด้านล่าง

{
// ═══════════════════════════════════════════════════════════════════════
// § 1. IDENTITY
// Who is this language? What codes identify it?
// Sources: ISO 639-3 registry, ISO 639-1, BCP 47/IANA.
// ═══════════════════════════════════════════════════════════════════════

"code": "xxx", // REQUIRED. ISO 639-3 code. This IS the card ID and filename.
"name": "English Name", // REQUIRED. English reference name from ISO 639-3 registry.
"nativeName": null, // Endonym (name in the language itself). Source: Wikidata P1705.
// Examples: "nêhiyawêwin / ᓀᐦᐃᔭᐍᐏᐣ", "日本語", "Esperanto".
"alternateNames": [], // Other names this language is known by. Source: Glottolog, Ethnologue.
// Not aliases (those are code-level). These are name-level variants.
// Example: ["Qafar af", "Afaraf", "'Afar Af"] for Afar (aar).
"iso639_3": "xxx", // REQUIRED. Three-letter ISO 639-3 code. Same as `code`.
"iso639_1": null, // Two-letter ISO 639-1 code (e.g., "en", "fr"). null if none.
"bcp47": null, // IETF BCP 47 tag. Often same as iso639_1. Can include subtags
// (e.g., "iu-Cans-CA"). null if unknown.
"aliases": [], // Alternative code-level identifiers that resolve to this card.
// Example: ["fil"] for tl (Tagalog), ["iu"] for iku (Inuktitut).
// Used by code resolution: user types "fil", system loads tl.json.
"isoScope": "I", // REQUIRED. ISO 639-3 scope:
// "I" = Individual language
// "M" = Macrolanguage (e.g., Chinese, Arabic, Cree)
// "S" = Special (e.g., mis, mul, zxx)
"isoType": "L", // REQUIRED. ISO 639-3 type:
// "L" = Living "E" = Extinct "A" = Ancient
// "H" = Historical "C" = Constructed
"macrolanguage": null, // If this language is part of a macrolanguage, the macrolanguage
// ISO 639-3 code (e.g., "cre" for Plains Cree, "ara" for Arabic
// varieties). Source: ISO 639-3 macrolanguages.tab.
"extends": null, // Genus card key if shared properties are inherited from a genus
// card (e.g., "genus-cree", "genus-eskimo-aleut").
// null for most languages.

// ═══════════════════════════════════════════════════════════════════════
// § 2. CLASSIFICATION
// Where does this language sit in the family tree?
// Source: Glottolog. NEVER hand-build classifications.
// ═══════════════════════════════════════════════════════════════════════

"glottocode": null, // Glottolog identifier (e.g., "plai1258", "stan1293").
// null if the language is not in Glottolog.
"classification": null, // Genealogical classification from Glottolog. When populated:
// {
// "family": "Algic", // Top-level family. null for isolates.
// "familyGlottocode": "algi1248", // Glottocode of the family.
// "genus": "Plains Creeic", // WALS-style genus.
// "genusGlottocode": "plai1264", // Glottocode of the genus.
// "ancestry": ["Algic", "Algonquian-Blackfoot", "Algonquian",
// "Cree-Montagnais-Naskapi", "Cree", "Plains Creeic"]
// }
// For isolates: family = language name, genus = language name,
// ancestry = [language name].
"isIsolate": false, // true if a language isolate (no known genetic relatives).
// Source: Glottolog CLDF.

// ═══════════════════════════════════════════════════════════════════════
// § 3. GEOGRAPHY
// Where is this language spoken?
// Sources: Glottolog (coordinates, countries), census data, Ethnologue.
// ═══════════════════════════════════════════════════════════════════════

"macroarea": null, // Glottolog macroarea. One of: "Africa", "Australia",
// "Eurasia", "North America", "Papunesia", "South America".
// null if unknown. Source: Glottolog CLDF.
"coordinates": null, // Representative geographic point. When populated:
// { "lat": 52.1, "lng": -106.6, "source": "glottolog-5.3" }
// This is a representative point, not a boundary.
"countries": [], // ISO 3166-1 alpha-2 country codes where this language is spoken.
// Example: ["CA", "US"]. Source: Glottolog.
"regions": [], // Detailed regional breakdown with admin codes & speaker estimates.
// Each entry:
// {
// "country": "Canada",
// "countryCode": "CA",
// "officialStatus": "recognized", // official, co-official,
// // recognized, none
// "region": "Saskatchewan, Alberta, Manitoba",
// "speakerEstimate": "~20,000",
// "coordinates": [-106.6, 52.1], // [lng, lat]
// "admin1Codes": ["CA-SK", "CA-AB", "CA-MB"]
// }

"arealContext": null, // Linguistic area / Sprachbund membership. DISTINCT from
// contactInfluences (which is language-specific contact history).
// This field captures zone-level typological convergence patterns
// — i.e., what linguistic area the language exists within and
// what features are common across that area.
// {
// "zone": "Mainland Southeast Asian Sprachbund",
// "arealFeatures": "Tonal convergence, classifier systems,
// topic-prominence, monosyllabicity trend.",
// "typicalContacts": ["Classical Chinese", "Sanskrit/Pali"],
// "source": "areal-linguistics (Enfield 2005)"
// }
// NOT the same as contactInfluences. A language can exist within
// a convergence area without having specific contact history with
// any particular language in that area.

// ═══════════════════════════════════════════════════════════════════════
// § 4. WRITING SYSTEMS
// How is this language written?
// Sources: Wikidata P282, ISO 15924, manual research.
// Note: Some languages have NO standardized orthography. Some have
// competing orthographies. Some use multiple scripts routinely (e.g.,
// Serbian: Cyrillic + Latin; Japanese: Kanji + Hiragana + Katakana).
// Sign languages may use notation systems (SignWriting, HamNoSys) or
// none at all.
// ═══════════════════════════════════════════════════════════════════════

"script": null, // Primary ISO 15924 script code (e.g., "Latn", "Cyrl", "Cans",
// "Jpan"). null if no written form or unknown.
"scriptUnicodeName": null, // Unicode script block name derived from the script field.
// e.g., "Latin", "Cyrillic", "Canadian_Aboriginal", "CJK".
// Used by code_switching metric plugin. Auto-populated by
// enrich-script-unicode-names.mjs. null if script is null.
"scripts": [], // All writing systems with detail. Array of:
// {
// "code": "Cans",
// "name": "Unified Canadian Aboriginal Syllabics",
// "primary": true
// }
// A language with multiple scripts has multiple entries.
// A language with no written form has [].
"dir": null, // Writing direction: "ltr" (left-to-right) or "rtl" (right-to-left).
// null if no written form or unknown.
"scriptConverter": null, // Script converter key if we have a converter for this language
// (e.g., "crk" for SRO↔Syllabics). null for most languages.
"orthographicStatus": null, // Writing system standardization status. When populated:
// {
// "status": "standardized",
// // "standardized" — official/agreed orthography exists
// // "competing" — multiple orthographies in active use
// // "emerging" — orthography under development
// // "none" — primarily oral, no standard writing
// "notes": "Uses SIL-developed Latin orthography since 1960s.",
// "source": "ethnologue" // or "manual-curation"
// }
// Crucial for LRLs where orthographic variation directly impacts
// MT training data quality and evaluation consistency.

// ═══════════════════════════════════════════════════════════════════════
// § 5. DEMOGRAPHICS & VITALITY
// How many people speak this language? Is it endangered?
// Sources: Census, Ethnologue, UNESCO Atlas, Wikidata, Glottolog AES.
//
// CRITICAL: Store ALL estimates separately with source attribution.
// Never average or "resolve" conflicting data. Speaker counts are
// politically contested for many languages. Present the evidence,
// let the reader assess.
// ═══════════════════════════════════════════════════════════════════════

"speakerEstimates": [], // Array of speaker count estimates from different authorities.
// Each entry:
// {
// "source": "wikidata", // or "ethnologue-28",
// // "census-ph-2020", etc.
// "count": 20000, // Point estimate. null if range-only.
// "date": "2026-06-07", // When this data was retrieved.
// "countRange": { "min": 15000, "max": 25000 }, // Optional range.
// "note": "Wikidata has 2 estimates: 15,000 and 25,000"
// }
// Empty array means we have not yet found speaker count data.

"vitality": null, // Endangerment / vitality assessment. When populated:
// {
// "unescoStatus": "severely-endangered",
// // Enum: "safe", "vulnerable", "definitely-endangered",
// // "severely-endangered", "critically-endangered",
// // "extinct"
// "aesStatus": "shifting",
// // Glottolog AES label (free text from AES data).
// "egids": "6b",
// // Ethnologue Expanded Graded Intergenerational Disruption
// // Scale. Levels: 0 (international) to 10 (extinct).
// "trend": "declining",
// // Qualitative trend: "stable", "growing", "declining",
// // "shifting", "moribund", "awakening"
// "source": "glottolog-aes-5.3",
// "notes": "Intergenerational transmission breaking down."
// }

// ═══════════════════════════════════════════════════════════════════════
// § 5.5. DOCUMENTATION & DIGITAL PRESENCE
// How well-documented is this language? What digital footprint does it
// have? These fields answer the practical question: "What can I
// actually DO with this language?"
// Sources: Glottolog (references), Wikipedia, Common Voice, Tatoeba.
// ═══════════════════════════════════════════════════════════════════════

"documentationDepth": null, // How well-documented is this language in the literature?
// {
// "referenceCount": 42,
// // Number of published references in Glottolog.
// "med": "grammar",
// // Most Extensive Description type. One of:
// // "long_grammar", "grammar", "grammar_sketch",
// // "dictionary", "phonology", "text", "wordlist",
// // "comparative", "minimal", "unknown"
// "source": "glottolog-5.3"
// }

"digitalPresence": null, // Digital footprint across web platforms. When populated:
// {
// "wikipedia": {
// "edition": true, // Has its own Wikipedia edition?
// "articleCount": 75000, // Number of articles.
// "editionCode": "crk", // Wikipedia subdomain code.
// "source": "wikimedia-api-2026"
// },
// "commonVoice": {
// "validatedHours": 12.5,
// "totalHours": 25.0,
// "speakers": 45,
// "sentences": 1200,
// "source": "common-voice-20.0"
// },
// "tatoeba": {
// "sentenceCount": 342,
// "source": "tatoeba-2026"
// }
// }

"dialectCount": null, // Number of recognized dialects in Glottolog.
// Derived from child_dialect_count in languoid.csv.
// Simple integer. null if 0 or unknown.
// Source: glottolog-5.3.

// ═══════════════════════════════════════════════════════════════════════
// § 6. FORMALITY, REGISTERS & GENDER
// How does politeness work in this language? What translation registers
// do we offer? How should gender be handled?
//
// This section drives Champollion's register-preset system — the
// mechanism by which users select formal/informal/professional tone.
// These fields require genuine linguistic research, not automation.
// ═══════════════════════════════════════════════════════════════════════

"formality": null, // Formality system description. When populated:
// {
// "system": "T-V",
// // One of: "T-V", "speech-levels", "keigo", "particles",
// // "register-levels", "register-and-code-switching",
// // "code-switching", "none"
// "description": "French uses a vous/tu distinction...",
// "default": "formal-vous" // Key into the `registers` object.
// }

"registers": null, // Translation register presets. When populated, keyed by preset ID:
// {
// "formal-vous": {
// "label": "Formal (vouvoiement)",
// "description": "One sentence: when to use this preset.",
// "prompt": "The actual LLM system prompt instruction that
// steers translation tone. Must name specific
// linguistic features (pronouns, verb forms, particles).",
// "deeplFormality": "prefer_more"
// // Only if methodSupport.deepl.formality is true.
// // One of: "prefer_more", "prefer_less", "default".
// }
// }

"gender": null, // Grammatical gender and inclusive guidance. When populated:
// {
// "grammatical": true, // Does the language have gram. gender?
// "inclusiveGuidance": "Use gender-neutral forms when possible.
// Prefer 'iel' (neologism) or rephrase to
// avoid gendered agreement."
// }
// For languages without grammatical gender (Turkish, Finnish):
// { "grammatical": false, "inclusiveGuidance": null }

"codeSwitching": null, // Code-switching behavior (for languages where mixing with another
// language is the norm, not an error). When populated:
// {
// "contactLanguage": "Spanish",
// "contactIso639_3": "spa",
// "mixedVarietyName": "Jopará", // null if no named mixed variety
// "prevalence": "dominant", // "rare", "common", "dominant"
// "morphologicalIntegration": true,
// "pipelineStrategy": "hybrid-fst",
// "notes": "Jopará IS the everyday language of most Paraguayans..."
// }

// ═══════════════════════════════════════════════════════════════════════
// § 7. LINGUISTIC PROFILE
// What makes this language what it is? What are the specific challenges
// for machine translation? What rules govern its typography?
// What languages have shaped it through contact?
//
// These fields require genuine linguistic expertise. For many languages
// (especially low-resource), this section will remain null until a
// qualified researcher or community member contributes.
// ═══════════════════════════════════════════════════════════════════════

"linguisticChallenges": null, // MT-relevant challenges, keyed by challenge ID.
// When populated:
// {
// "polysynthesis": "Cree is highly polysynthetic. A single verb
// can incorporate subject, object, tense...",
// "animacy": "Verb conjugation changes based on whether the
// subject/object is animate or inanimate...",
// "neologisms": "Avoid literal translations of modern software
// concepts. Maintain Cree metaphorical logic..."
// }
// Aim for 3–6 challenges per language when researched.

"contactInfluences": [], // How other languages have shaped this one. Array of:
// {
// "source": "English",
// "sourceIso639_3": "eng", // null if proto-language/unknown
// "type": "superstrate",
// // Enum: "superstrate", "substrate", "adstrate",
// // "learned_borrowing", "lexical_borrowing",
// // "relexification"
// "domains": ["education", "government", "technology"],
// "depth": "deep",
// // Enum: "light", "moderate", "heavy", "structural",
// // "defining"
// "period": "1870–present",
// "notes": "Residential school era and ongoing...",
// "citation_needed": false
// // true if no published academic source found.
// // See language-card-citation-procedure.md.
// }

"rules": null, // Typography, plural, and capitalization rules. When populated:
// {
// "typography": {
// "quoteStart": "\u201c",
// "quoteEnd": "\u201d",
// "usesSpaces": true, // false for CJK, Thai, Lao, Khmer
// "punctuationSpacing": {
// "doublePunctuation": "none" // "thin-nbsp" for French
// }
// },
// "plurals": {
// "categories": ["one", "other"]
// // From CLDR. Possible values:
// // "zero", "one", "two", "few", "many", "other"
// },
// "capitalization": {
// "hasCase": true
// // true for Latin, Cyrillic, Greek, Armenian scripts.
// // false for CJK, Arabic, Devanagari, etc.
// }
// }
// Source: CLDR + ISO 15924 derivation.

"typologicalProfile": null, // Grambank typological features. When populated:
// {
// "featuresDocumented": 195,
// "featuresCoverage": 1, // 0.0–1.0 fraction of features
// "wordOrderDominant": "SVO",
// "hasDefiniteArticle": true,
// "hasIndefiniteArticle": true,
// "hasGenderSystem": true,
// "hasCaseMorphology": true,
// "hasEvidentiality": false,
// "hasToneSystem": false,
// "source": "grambank-1.0.3"
// }
// Auto-populated by enrich-grambank-typology.mjs.

"phonologicalInventory": null, // PHOIBLE phoneme inventory. When populated:
// {
// "consonants": 24,
// "vowels": 16,
// "tones": 0,
// "totalPhonemes": 40,
// "isTonal": false,
// "inventorySize": "moderately-large",
// // Enum: "small", "moderately-small", "average",
// // "moderately-large", "large"
// "source": "phoible-2.0"
// }
// Auto-populated by enrich-phoible-phonemes.mjs.

// ═══════════════════════════════════════════════════════════════════════
// § 8. ENCYCLOPEDIC
// General knowledge about the language for human context. History,
// dialect situation, institutional resources, representative sayings.
// This section is for understanding, not computation.
// ═══════════════════════════════════════════════════════════════════════

"encyclopedic": null, // General knowledge. When populated:
// {
// "family": "Algic", // Redundant with classification
// // but useful for human readers.
// "dialects": {
// "split": true, // Is there significant variation?
// "classification": "Plains Cree (y-dialect)",
// "variants": ["crk", "cwd", "csw"] // ISO codes of variants
// },
// "demographics": {
// "speakers": "Approx. 20,000 active speakers",
// "regions": ["Saskatchewan", "Alberta", "Manitoba"]
// },
// "history": "Plains Cree is the most widely spoken Algonquian
// language in western Canada...",
// "resources": {
// "wikipedia": "https://en.wikipedia.org/wiki/Plains_Cree",
// "foundations": [{ "name": "ALTLab", "url": "https://..." }],
// "dictionaries": [{ "name": "itwêwina", "url": "https://..." }]
// }
// }

"culturalAphorism": null, // A representative saying, proverb, or teaching in the language.
// When populated:
// {
// "text": "ê-wîcêhtonaniwahk kâ-kî-isi-wâpahtamâhk ôma pimâtisiwin",
// "transliteration": null, // Romanized form if non-Latin script.
// "translation": "Through helping each other we come to understand
// this life",
// "literal": "By-helping-one-another we-have-come-to-see this life",
// "source": "Cree teaching, documented in nêhiyawêwin educational
// resources"
// }
// Choose sayings that reveal something about the language's
// worldview or structure. Must be sourced.

"varieties": [], // For macrolanguages or languages with significant dialectal
// variation, the individual varieties with their own tool coverage.
// Each entry:
// {
// "name": "Cusco Quechua",
// "iso639_3": "quz",
// "region": "Cusco, Peru",
// "fstCoverage": true,
// "corpusCoverage": true,
// "nllbCoverage": false,
// "mutualIntelligibility": "Primary variety for this card",
// "notes": "SQUOIA FST was built for this variety."
// }

// ═══════════════════════════════════════════════════════════════════════
// § 9. DIGITAL RESOURCES & TOOLING
// What NLP tools, corpora, models, and datasets exist for this language?
// What translation APIs support it? What eval benchmarks are available?
//
// This is Champollion's operational core — these fields determine what
// we can actually DO with this language.
// ═══════════════════════════════════════════════════════════════════════

"resources": null, // NLP resources available for this language. When populated:
// {
// "fsts": [{ // Finite-state transducers
// "name": "GiellaLT Plains Cree FST (lang-crk)",
// "url": "https://github.com/giellalt/lang-crk/releases",
// "type": "morphological-analyzer"
// }],
// "corpora": [{ // Text corpora
// "name": "EDTeKLA Cree Language Textbook Corpus",
// "type": "parallel", // "parallel", "monolingual"
// "pairs": ["en-crk"],
// "url": "https://...",
// "exposure": "open-web" // "open-web", "restricted",
// // "holdout"
// }],
// "models": [{ // Pre-trained models
// "name": "NLLB-200 (crk_Cans)",
// "url": "https://...",
// "type": "nmt"
// }],
// "tools": [], // Other NLP tools
// "wordlists": [{ // Standardized wordlists
// "name": "Lexibank",
// "conceptCount": 200,
// "source": "lexibank"
// }],
// "treebanks": [{ // Syntactic treebanks
// "name": "UD_Korean-GSD",
// "tokens": 80000,
// "source": "universal-dependencies-2.14"
// }]
// }
// IMPORTANT: Only actual NLP/digital resources belong here.
// "This language has a WALS entry" is NOT a resource — that
// goes in databaseCoverage.

"databaseCoverage": null, // Which typological/reference databases cover this language.
// Separated from resources to avoid conflating "has a database
// entry" with "has usable NLP tooling."
// {
// "wals": true,
// "grambank": true,
// "phoible": true,
// "cldr": true,
// "lexibank": true,
// "commonVoice": true,
// "source": "derived"
// }

"corpusAvailability": null, // What text/parallel corpora exist for NLP use?
// {
// "bibleTranslation": {
// "textAvailable": true,
// "audioAvailable": true,
// "source": "bible-brain-api"
// },
// "opusCorpora": ["wikimedia", "ubuntu", "gnome"],
// "source": "multi-source"
// }

"keyboardSupport": null, // Input method / keyboard availability. When populated:
// {
// "keymanKeyboards": 3,
// // Number of Keyman keyboards available.
// "cldrKeyboard": true,
// // CLDR has keyboard layout data.
// "source": "keyman-api + cldr"
// }

"methodSupport": { // REQUIRED. Which Champollion translation methods support this
// language. Each method is an object with at minimum
// { "supported": boolean }.
"googleTranslate": { "supported": false },
"deepl": { "supported": false },
"microsoftTranslator": { "supported": false },
"libreTranslate": { "supported": false },
"nllb": { "supported": false },
// When NLLB is supported, include the code:
// { "supported": true, "code": "crk_Cans" }
"llm": { "supported": true }
// LLM is always true (quality varies by language).
// Optional: "verifiedDate": "2026-06-07" for audit trail.
},

"metricModelSupport": null, // Which MT evaluation models produce reliable scores.
// When populated:
// {
// "xlmr": "high", // "high", "medium", or "low"
// // XLM-R training representation tier.
// "africomet": false // true if AfriCOMET covers this language.
// }
// Drives automatic COMET model selection in metrics_comet.py.
// Auto-populated by enrich-metric-model-support.mjs.

"metricPlugins": null, // Which per-language metric plugin packs are available.
// When populated:
// {
// "formalityMarkers": true // Formality marker resource file exists
// // at plugins/resources/formality/{code}.json
// }
// Each key corresponds to a resource pack in
// arena/mt_eval_harness/plugins/resources/{packName}/.
// To add a new metric pack for a language, create the resource
// file and set the flag here. No code changes required.

"evalPack": null, // Evaluation dependency pack for language-specific metrics.
// When populated, declares the Python dependencies and
// post-install steps required by this language's eval standards.
// The harness uses this for dependency gating: if deps are
// missing, the harness warns the user and skips LYSS metrics
// (rather than crashing).
// When populated:
// {
// "pythonDeps": {
// "pyhfst": "pyhfst>=1.4", // PyPI package specs
// "requests": "requests>=2.28",
// "spacy": "spacy>=3.7"
// },
// "postInstall": [ // Commands to run after pip
// {
// "command": "spacy download en_core_web_md",
// "label": "spaCy English model (for LYSS-sem)"
// }
// ],
// "requiresFst": true, // true if GiellaLT FST needed
// "description": "LYSS equivalence linter + FST validation"
// }

"evalMetrics": null, // Language-specific evaluation metrics (LYSS standards).
// When populated, the harness dynamically imports these
// MetricPlugin classes from eval_standards/<lang>/ and applies
// them to every run targeting this language — regardless of
// which method (contestant) is being evaluated.
// Keyed by metric ID:
// {
// "lyss-eq": {
// "module": "eval_standards.crk.metrics",
// "class": "CrkLinterMetric",
// "description": "LYSS deterministic variant-class linter"
// },
// "lyss-sem": {
// "module": "eval_standards.crk.metrics",
// "class": "CrkSemanticMetric",
// "description": "LYSS FST-based semantic validator",
// "dependencies": ["spacy>=3.7"],
// "spacy_models": ["en_core_web_md"]
// }
// }
// Architecture: eval standards are referees, not contestants.
// They live in the harness (eval_standards/), not in method
// plugins. This ensures all methods are scored equally.
// Discovery: plugin_discovery.py reads this field via
// language_cards.get_eval_metrics() and instantiates metrics
// using importlib. Dependencies are checked against evalPack.

"omt1600": null, // Meta's OMT-1600 (One Model for Translation) coverage assessment.
// When populated:
// {
// "covered": true,
// "tier": "R1", // Meta's resource tier
// "evalMetrics": ["chrF++", "BLASER-3"],
// "notes": "Plains Cree: no web-crawled bitext..."
// }

"evalDatasets": [], // Evaluation dataset IDs available for this language.
// Example: ["flores-plus-devtest", "edtekla-dev-v1"].
// Empty means no standardized eval set exists.

"pipelineReadiness": null, // Assessment of readiness for Champollion's translation pipeline.
// When populated:
// {
// "tier": "tier-2-feasible",
// // "watch-list" — cataloged but no path to translation
// // "tier-3-cataloged" — basic metadata present
// // "tier-2-feasible" — tools exist, pipeline possible
// // "tier-1-ready" — pipeline operational
// "hasFST": true,
// "hasParallelCorpus": true,
// "hasEvalBenchmark": true,
// "blockers": ["Syllabics post-processing validation"],
// "notes": "FST-gated pipeline operational. EDTeKLA corpus..."
// }

// ═══════════════════════════════════════════════════════════════════════
// § 10. PROVENANCE & METADATA
// Where does this data come from? Who reviewed it? When was it
// generated? What's its overall quality level?
//
// This section exists to make the card auditable. Every automated
// enrichment, every human review, every source consulted should
// leave a trace here.
// ═══════════════════════════════════════════════════════════════════════

"dataSources": [], // REQUIRED. Sources consulted for this card's data.
// Can be a flat array (backwards-compatible):
// ["iso639-3-2024", "glottolog-5.3", "wikidata"]
//
// Or a structured per-field object (preferred for new cards):
// {
// "classification": ["glottolog-5.3"],
// "vitality": ["glottolog-aes-5.3", "unesco-atlas-2024"],
// "speakerEstimates": ["wikidata", "census-ca-2021"],
// "rules": ["cldr-48"],
// "methodSupport": ["google-translate-2026-06"]
// }

"supportTier": "cataloged", // Auto-derived tier summarizing the card's depth:
// "cataloged" — identity + classification only
// "emerging" — + vitality + speakerEstimates
// "developing" — + resources + methodSupport
// "supported" — full research: registers, challenges, etc.

"humanReviewed": null, // null until a qualified human reviews the card. When populated:
// {
// "reviewer": "Prof. Kenneth Jamandre",
// "affiliation": "University of the Philippines Diliman",
// "date": "2026-06-08",
// "scope": "full", // "full", "partial", "vitality-only"
// "notes": "Verified speaker count, vitality assessment,
// and contact influences for Tagalog."
// }

"notes": null, // Free-text notes about this language or this card's data quality.
// Example: "Low-resource language under active development.
// Translation pipeline uses FST-gated approach."

"firstDocumented": null, // Year of first known documentation. Negative for BCE.
// Example: -1500 (Sanskrit, ~1500 BCE), 1787 (some languages).
// Source: Glottolog CLDF.

"lastDocumented": null, // Year of last known documentation (relevant for extinct languages).
// Source: Glottolog CLDF.

"_generated": null // Auto-populated by enrichment scripts. When populated:
// {
// "by": "generate-all-cards.mjs",
// "at": "2026-06-07T12:34:56Z",
// "sources": ["iso639-3", "glottolog-5.3", "wikidata"],
// "completeness": "partial",
// // "partial" — has identity + classification + coords
// // "substantial" — + vitality + speakerEstimates + script
// // "complete" — all automatable fields populated
// "lastEnriched": "2026-06-07"
// }
}

Field Reference

§ 1. ฟิลด์เอกลักษณ์

ฟิลด์ประเภทจำเป็นทำอัตโนมัติได้แหล่งที่มา
codestringISO 639-3 registry
namestringISO 639-3 registry
nativeNamestring | nullWikidata P1705
alternateNamesstring[]Glottolog, Ethnologue
iso639_3stringISO 639-3 registry
iso639_1string | nullISO 639-1
bcp47string | nullPartialIANA subtag registry
aliasesstring[]Manual curation
isoScopestringISO 639-3 registry
isoTypestringISO 639-3 registry
macrolanguagestring | nullISO 639-3 macrolanguages.tab
extendsstring | nullManual curation

§ 2. ฟิลด์การจำแนกประเภท

ฟิลด์ประเภทจำเป็นทำอัตโนมัติได้แหล่งที่มา
glottocodestring | nullGlottolog
classificationobject | nullGlottolog
isIsolatebooleanGlottolog CLDF

§ 3. ฟิลด์ภูมิศาสตร์

ฟิลด์ประเภทจำเป็นทำอัตโนมัติได้แหล่งที่มา
macroareastring | nullGlottolog CLDF
coordinatesobject | nullGlottolog
countriesstring[]Glottolog
regionsobject[]Census, Ethnologue, manual
arealContextobject | nullCoordinates + linguistic area zones

§ 4. ฟิลด์ระบบการเขียน

ฟิลด์ประเภทจำเป็นทำอัตโนมัติได้แหล่งที่มา
scriptstring | nullWikidata P282
scriptUnicodeNamestring | nullดึงมาจาก script ผ่าน ISO 15924 → Unicode mapping
scriptsobject[]PartialWikidata, manual
dirstring | nullสามารถดึงมาจาก script ได้
scriptConverterstring | nullManual
orthographicStatusobject | nullPartialEthnologue, manual

§ 5. ฟิลด์ข้อมูลประชากรและความมีชีวิตชีวา

ฟิลด์ประเภทจำเป็นทำอัตโนมัติได้แหล่งที่มา
speakerEstimatesobject[]Wikidata, Ethnologue, census
vitalityobject | nullGlottolog AES, UNESCO

§ 5.5 ฟิลด์เอกสารและการปรากฏตัวในโลกดิจิทัล

ฟิลด์ประเภทจำเป็นทำอัตโนมัติได้แหล่งที่มา
documentationDepthobject | nullGlottolog references
digitalPresenceobject | nullWikipedia, Common Voice, Tatoeba
dialectCountnumber | nullGlottolog

§ 6. ฟิลด์ความเป็นทางการ Register และเพศ

ฟิลด์ประเภทจำเป็นทำอัตโนมัติได้แหล่งที่มา
formalityobject | nullการวิจัยทางภาษาศาสตร์
registersobject | nullการวิจัยทางภาษาศาสตร์
genderobject | nullการวิจัยทางภาษาศาสตร์
codeSwitchingobject | nullการวิจัยทางภาษาศาสตร์

§ 7. ฟิลด์โปรไฟล์ทางภาษาศาสตร์

ฟิลด์ประเภทจำเป็นทำอัตโนมัติได้แหล่งที่มา
linguisticChallengesobject | nullการวิจัยทางภาษาศาสตร์
contactInfluencesobject[]ภาษาศาสตร์ที่ตีพิมพ์แล้ว
rulesobject | nullCLDR
typologicalProfileobject | nullGrambank 1.0.3 — เติมอัตโนมัติโดย enrich-grambank-typology.mjs
phonologicalInventoryobject | nullPHOIBLE 2.0 — เติมอัตโนมัติโดย enrich-phoible-phonemes.mjs

§ 8. ฟิลด์สารานุกรม

ฟิลด์ประเภทจำเป็นทำอัตโนมัติได้แหล่งที่มา
encyclopedicobject | nullการวิจัยด้วยตนเอง
culturalAphorismobject | nullการมีส่วนร่วมของชุมชน
varietiesobject[]การวิจัยด้วยตนเอง

§ 9. ฟิลด์ทรัพยากรดิจิทัล

ฟิลด์ประเภทจำเป็นทำอัตโนมัติได้แหล่งที่มา
resourcesobject | nullPartialManual + automated
databaseCoverageobject | nullดึงมาจากการเสริมข้อมูล
corpusAvailabilityobject | nullBible Brain, OPUS, Lexibank
keyboardSupportobject | nullKeyman API, CLDR
methodSupportobjectPartialการตรวจสอบ API
metricModelSupportobject | nullXLM-R paper, AfriCOMET paper
metricPluginsobject | nullการเสริมข้อมูลการ์ด — ประกาศว่า metric plugin pack ใดบ้างที่ใช้ได้ (เช่น { formalityMarkers: true })
omt1600object | nullการประเมิน Meta
evalDatasetsstring[]Dataset registry
pipelineReadinessobject | nullPartialDerived + manual

resources.fsts[].install: รายการ FST ในออบเจกต์ resources สามารถมีซับออบเจกต์ install ที่มีฟิลด์: repo, releaseTag, assetPattern, format, maturity และ bundlePattern (ไม่บังคับ) ซึ่งแทนที่ dict แบบ hardcoded GIELLALT_FST_REGISTRY เดิม ดู get_fst_install_info() ใน language_cards.py

§ 10. ฟิลด์แหล่งที่มา

ฟิลด์ประเภทจำเป็นทำอัตโนมัติได้แหล่งที่มา
dataSourcesarray | objectAuto + manual
supportTierstringดึงมาจากความสมบูรณ์ของการ์ด
humanReviewedobject | nullผู้ตรวจสอบที่เป็นมนุษย์
notesstring | nullManual
firstDocumentednumber | nullGlottolog CLDF
lastDocumentednumber | nullGlottolog CLDF
_generatedobject | nullสคริปต์เสริมข้อมูล

นโยบายรหัสภาษา

Champollion ใช้ ISO 639-3 เป็นตัวระบุมาตรฐาน รหัสมาตรฐานอื่นๆ ถูกลงทะเบียนเป็น alias และแก้ไขเป็นรหัส ISO 639-3 ที่รันไทม์

ลำดับความสำคัญมาตรฐานตัวอย่างฟิลด์การใช้งาน
1 (มาตรฐาน)ISO 639-3crkcodeชื่อไฟล์การ์ด, config keys, API params
2 (alias)ISO 639-1iualiases[]รับได้ใน CLI แก้ไขเป็น ISO 639-3
3 (alias)BCP 47filaliases[]รับได้ใน CLI แก้ไขเป็น ISO 639-3
อ้างอิงGlottocodeplai1258glottocodeสำหรับการจำแนกเท่านั้น ไม่ใช้ที่รันไทม์

ลำดับการแก้ไข: เมื่อผู้ใช้ระบุรหัส:

  1. ตรงกับ card.code โดยตรง → พบ
  2. ตรงกับ card.aliases[] → พบ คืนการ์ดมาตรฐาน
  3. ตรงกับ card.iso639_1 → พบ (fallback)
  4. ไม่พบ → error

ประวัติการย้าย: ISO 639-1 → ISO 639-3

ก่อน v8 ชื่อไฟล์การ์ดใช้รหัส ISO 639-1 เมื่อมี (fr.json, de.json, ja.json) ในการย้ายไปใช้ 639-3 การ์ดทุกใบถูกเปลี่ยนชื่อเป็น รหัส ISO 639-3 ที่เทียบเท่า:

ก่อนหลังเหตุผล
fr.jsonfra.json639-3 เป็นมาตรฐาน
de.jsondeu.json639-3 เป็นมาตรฐาน
zh.jsoncmn.jsonMacrolanguage → individual ค่าเริ่มต้น
ar.jsonarb.jsonMacrolanguage → Modern Standard Arabic
ms.jsonzsm.jsonMacrolanguage → Standard Malay

รหัสเก่าเกิดอะไรขึ้น?

  • รหัส 639-1 เก่าอยู่ใน card.iso639_1
  • รหัส 639-1 เก่าอยู่ใน card.aliases[]
  • resolveCode("fr") คืน "fra" ที่รันไทม์ — เข้ากันได้กับเวอร์ชันก่อนหน้า
  • ผู้ใช้ยังสามารถเขียน "fr" ใน config ได้ — แก้ไขโดยอัตโนมัติ

สิ่งที่เปลี่ยนแปลงทางสถาปัตยกรรม:

  • _deepMerge() ตอนนี้ข้ามค่า null (สืบทอดจากหลัก)
  • _deepMerge() ตอนนี้มีชุดฟิลด์เอกลักษณ์ (code, extends, aliases ไม่สืบทอด)
  • formality.default ตอนนี้ดึงมาจาก register isDefault: true flags
  • การ์ด 205 ใบที่ดึงมาจาก Grambank ได้รับการแก้ไข formality.default เชิงโครงสร้าง
  • การ์ด genus/family/macrolanguage 38 ใบให้เป้าหมายการสืบทอด

กรณีพิเศษ

ภาษามือ

ภาษามือ (เช่น ASE — American Sign Language) เป็นภาษาที่ถูกต้องตามกฎหมาย พร้อมรหัส ISO 639-3 มีภูมิศาสตร์และจำนวนผู้พูด แต่:

  • script มักเป็น null (ไม่มีรูปแบบการเขียนมาตรฐาน)
  • scripts อาจรวม "Sgnw" (SignWriting) หากมีการใช้ระบบสัญลักษณ์
  • dir เป็น null
  • linguisticChallenges ควรกล่าวถึงไวยากรณ์เชิงพื้นที่ ตัวจำแนก ฯลฯ
  • gender.grammatical มักเป็น false

ภาษาโบราณและภาษาประวัติศาสตร์

ภาษาอย่างละติน (lat, isoType H) และสันสกฤต (san, isoType H) ยังคง ใช้ในบริบทเฉพาะ (พิธีกรรม วิชาการ) แต่ไม่มีเจ้าของภาษา:

  • vitality อาจระบุ "ไม่มีเจ้าของภาษา" พร้อม "trend": "stable" (ไม่ลดลง — ชุมชนที่ใช้มีเสถียรภาพ เพียงแต่มีขนาดเล็ก)
  • speakerEstimates ควรระบุว่าเป็นผู้พูด L2 ไม่ใช่ L1
  • firstDocumented / lastDocumented ระบุตำแหน่งในเวลา

ภาษาประดิษฐ์

Esperanto (epo, isoType C), Lojban ฯลฯ:

  • classification อาจชี้ไปที่ตระกูล "constructed" หรือ null
  • contactInfluences สะท้อนวัสดุต้นทาง (เช่น Esperanto ดึงมาจากโรมานซ์ เจอร์แมนิก สลาฟ)
  • vitality ผิดปกติ — ชุมชนผู้พูดกำลังเติบโตแต่ไม่มีบ้านเกิดดั้งเดิม

Macrolanguage

ภาษาอาหรับ (ara), จีน (zho), Cree (cre), Quechua (que) เป็น macrolanguage ที่ครอบคลุมภาษาแต่ละภาษาหลายภาษา:

  • isoScope: "M"
  • varieties ควรแสดงรายการภาษาแต่ละภาษาพร้อมรหัส ISO
  • methodSupport ควรสะท้อนสิ่งที่ การ์ด macrolanguage รองรับ (มักเป็นสำเนียงมาตรฐาน)
  • สำเนียงแต่ละสำเนียงควรมีการ์ดของตัวเองด้วย

ภาษาที่ไม่มีอักขรวิธีมาตรฐาน

ภาษาจำนวนมาก (โดยเฉพาะภาษาที่ถ่ายทอดทางปากเปล่า) ไม่มีระบบการเขียนมาตรฐาน หรือมีอักขรวิธีที่แข่งขันกัน:

  • script เป็น null
  • scripts เป็น []
  • dir เป็น null
  • notes ควรอธิบายสถานการณ์อักขรวิธี
  • linguisticChallenges ควรระบุว่าสิ่งนี้ส่งผลต่อ MT อย่างไร (เช่น ไม่มีข้อมูลฝึกสอน)

Diglossia

ภาษาอย่างภาษาอาหรับ (MSA กับสำเนียง) หรือ Guaraní (Jopará กับ Guaraní บริสุทธิ์):

  • codeSwitching บันทึกสถานการณ์สำเนียงผสม
  • registers สามารถเสนอ preset สำหรับระดับต่างๆ
  • varieties สามารถแสดงรายการคู่ diglossic

ประเภทอิทธิพลจากการสัมผัสภาษา

ประเภทความหมายตัวอย่าง
superstrateภาษาที่มีอำนาจเหนือกว่าถูกกำหนดให้กับชุมชนFrench → English (หลัง ค.ศ. 1066)
substrateภาษาพื้นเมืองมีอิทธิพลต่อภาษาที่ถูกกำหนดCeltic → English
adstrateภาษาเพื่อนบ้านที่มีอิทธิพลซึ่งกันและกันNorse → English
learned_borrowingการยืมผ่านการศึกษา/วิชาการLatin → English
lexical_borrowingการยืมคำศัพท์โดยตรงผ่านการสัมผัสSpanish → Filipino
relexificationการแทนที่คำศัพท์ทั้งหมดPortuguese → Papiamentu

ระดับความลึกของอิทธิพลจากการสัมผัสภาษา

ระดับความหมาย
lightคำยืมเพียงไม่กี่คำ ผลกระทบเชิงโครงสร้างน้อยมาก
moderateคำศัพท์จำนวนมากในโดเมนเฉพาะ
heavyคำศัพท์แพร่หลายและลักษณะโครงสร้างบางส่วน
structuralไวยากรณ์ ไวยากรณ์ประโยค และสัทวิทยาได้รับผลกระทบ
definingเอกลักษณ์หลักถูกกำหนดโดยการสัมผัส (creole, ภาษาผสม)

การเขียน Register Preset ที่ดี

prompt preset ที่ดี:

  • ระบุลักษณะความเป็นทางการอย่างชัดเจน (เช่น "해요체", "vous-form", "siz-form")
  • อธิบายสรรพนามหรือรูปกริยาเฉพาะที่ต้องใช้
  • ให้บริบทว่า register นี้เหมาะสมเมื่อใด
  • กล่าวถึงข้อพิจารณาเรื่อง script หากเกี่ยวข้อง

อย่า ใส่แนวทางเรื่องความครอบคลุมทางเพศใน prompt ของ preset แนวทางเรื่องเพศ ควรอยู่ใน card.gender.inclusiveGuidance — มันถูกแทรกแยกต่างหาก

❌ Bad: "Standard Thai. Professional register."
✔ Good: "Professional Thai. Use คุณ (khun) for second person, เรา (rao)
for first person when needed. Clear, concise phrasing
appropriate for digital interfaces."

ข้อตกลงการตั้งชื่อ Preset

คีย์ preset ควรสื่อความหมายและใช้ตัวพิมพ์เล็กคั่นด้วยขีดกลาง:

  • ภาษา T-V: formal-vous, informal-tu, formal-Sie, casual-du
  • ระดับการพูด: polite-haeyo, formal-hapsyo, casual-hae
  • กลาง: professional, neutral-professional
  • การสลับรหัส: taglish-professional, pure-filipino

ขั้นตอนการเสริมข้อมูล

ลำดับการประมวลผลต่อการ์ด

เมื่อเสริมข้อมูลการ์ด ให้ปรึกษาแหล่งข้อมูลตามลำดับนี้ บันทึกทุกแหล่งที่ปรึกษา แม้ว่าจะไม่มีข้อมูลส่งคืน

  1. ISO 639-3 registrycode, name, isoScope, isoType
  2. ISO 639-3 macrolanguages.tabmacrolanguage
  3. Glottolog languoid.csvglottocode, classification, coordinates, countries
  4. Glottolog CLDFmacroarea, isIsolate, firstDocumented, lastDocumented
  5. Glottolog AESvitality (สถานะการใกล้สูญพันธุ์)
  6. Wikidata SPARQLnativeName, speakerEstimates, script, scripts, dir
  7. CLDRrules (typography, plurals, capitalization)
  8. NLLB-200 / FLORES+methodSupport.nllb, evalDatasets
  9. การตรวจสอบ API → รายการ methodSupport ที่เหลือ
  10. เอกสาร ML modelmetricModelSupport (ข้อมูลฝึกสอน XLM-R, ความครอบคลุม AfriCOMET) สคริปต์: node scripts/enrich-metric-model-support.mjs

การจัดการความขัดแย้ง

เมื่อแหล่งข้อมูลไม่ตรงกัน:

  1. เก็บทั้งสอง พร้อมระบุแหล่งที่มา
  2. อย่าเฉลี่ย หรือเลือกข้าง
  3. บันทึกความแตกต่าง ในฟิลด์ note ที่เกี่ยวข้อง
  4. ให้ความสำคัญกับแหล่งข้อมูลหลักล่าสุด เฉพาะเมื่อ จำเป็น ต้องใช้ค่าเดียวสำหรับการคำนวณ

การตรวจสอบ

รัน linter หลังจากการเสริมข้อมูลหรือการแก้ไขด้วยตนเองทุกครั้ง:

node scripts/lint-language-cards.mjs # all cards
node scripts/lint-language-cards.mjs --lang crk # single card

รายการตรวจสอบ PR

เมื่อส่งการ์ดภาษาใหม่หรือที่แก้ไขแล้ว:

  • ไฟล์ชื่อ <code>.json ใน shared/language-cards/
  • ฟิลด์ระดับบนสุดทุกฟิลด์จากเทมเพลตมาตรฐานมีครบ
  • classification เติมมาจาก Glottolog (ไม่ได้สร้างด้วยตนเอง)
  • dataSources แสดงรายการแหล่งข้อมูลทั้งหมดที่ปรึกษา
  • รายการ methodSupport ตรวจสอบกับรายการภาษา API จริงแล้ว
  • รายการ contactInfluences มีแหล่งที่มาที่ตีพิมพ์แล้วหรือ citation_needed: true
  • linguisticChallenges พร้อมความท้าทายที่เกี่ยวข้องกับ MT 3–6 ข้อ (หากมีการวิจัย)
  • rules เติมมาจาก CLDR (หากมีข้อมูล locale)
  • Linter ผ่านโดยไม่มี error

เอกสารอ้างอิงระดับมืออาชีพ

มาตรฐานดูแลโดยการใช้งานของเรา
ISO 639-3SIL Internationalรหัสภาษามาตรฐาน, ความสัมพันธ์ macrolanguage
GlottologMax Planck Instituteการจำแนก, พิกัด, การใกล้สูญพันธุ์ AES
WALSMax Planck Instituteคำจำกัดความ genus, ลักษณะทางประเภทวิทยา
ISO 15924Unicode/ISOรหัส script
CLDRUnicode Consortiumข้อมูล locale, กฎพหูพจน์, typography
WikidataWikimedia Foundationจำนวนผู้พูด, endonym, ข้อมูล script
EthnologueSIL InternationalEGIDS, การประมาณจำนวนผู้พูด, DLS
UNESCO AtlasUNESCOการจำแนกการใกล้สูญพันธุ์
Katig CollectiveUP Dilimanบทสรุปภาษาฟิลิปปินส์

ดูเพิ่มเติม: ขั้นตอนการอ้างอิงการ์ดภาษา สำหรับแนวทางแหล่งข้อมูลแต่ละแหล่งโดยละเอียด