Chuyển đến nội dung chính

Đặc tả Thẻ Ngôn ngữ

Nguồn thông tin duy nhất đáng tin cậy. Tài liệu này định nghĩa cấu trúc chuẩn của mỗi thẻ ngôn ngữ. Mọi thẻ BẮT BUỘC phải chứa tất cả các trường cấp cao nhất được liệt kê ở đây, ngay cả khi giá trị là null hoặc []. Một thẻ bị thiếu trường sẽ bị coi là không hợp chuẩn. Sự đồng nhất này là cơ sở để các công cụ tự động, linter, script làm giàu dữ liệu (enrichment script) và người kiểm duyệt thủ công tin tưởng vào cấu trúc thẻ.

Nguyên tắc Thiết kế

  1. Cấu trúc đồng nhất. Tất cả hơn 8.000 thẻ đều có các trường cấp cao nhất giống nhau. Các giá trị chưa biết là null, mảng rỗng là [], đối tượng rỗng là null (không phải {}). Điều này có nghĩa là mã nguồn không bao giờ cần kiểm tra "trường này có tồn tại không?" — mà chỉ cần kiểm tra "nó đã được điền dữ liệu chưa?"

  2. Mọi thứ đều phải có nguồn. Mọi thông tin thực tế đều phải truy xuất được nguồn gốc từ một nguồn sơ cấp được đặt tên và gắn phiên bản rõ ràng. Các thông tin không có nguồn là các thông tin không thể xác minh. Trường dataSources (và các chú thích source cho từng trường trong các đối tượng con) giúp thể hiện rõ ràng nguồn gốc dữ liệu.

  3. Bảo toàn sự khác biệt. Khi các nguồn uy tín không thống nhất (Wikidata ghi nhận 50.000 người nói, Ethnologue ghi nhận 20.000), chúng tôi lưu trữ cả hai kèm theo nguồn trích dẫn. Chúng tôi không tính trung bình, không tự giải quyết hoặc chọn bên. Người dùng có thể tự đánh giá các sắc thái này.

  4. Null nghĩa là chưa biết, không phải là không áp dụng. Nếu một trường là null, điều đó có nghĩa là "chúng tôi chưa tìm thấy dữ liệu cho trường này." Nếu một trường thực sự không áp dụng (ví dụ: grammatical gender đối với ngôn ngữ ký hiệu), giá trị của trường nên giải thích điều đó: { "grammatical": false, "inclusiveGuidance": "Not applicable — ASL does not have grammatical gender." }

  5. Chỉ gộp (Merge only). Các script làm giàu dữ liệu chỉ thêm dữ liệu chứ không bao giờ ghi đè. Các giá trị do con người biên soạn sẽ được ưu tiên hơn dữ liệu tự động.


Kiến trúc Ba lớp

LớpVị tríMục đích
Thẻ ngôn ngữshared/language-cards/<code>.jsonCấu hình cho từng ngôn ngữ: danh tính, phân loại, tài nguyên, và mọi thứ khác
Thẻ chi (Genus cards)shared/language-cards/genera/<genus>.jsonCác thuộc tính runtime dùng chung cho các ngôn ngữ có liên quan (được biên soạn, không tự động tạo)
Cây ngôn ngữshared/language-cards/language-tree.jsonHệ thống phân cấp Glottolog đầy đủ — dữ liệu tham chiếu cho Lab UI và khám phá ngôn ngữ

Mô hình Kế thừa

Khi một thẻ thiết lập "extends": "family-dravidian", runtime sẽ gộp thẻ cha vào thẻ con bằng cách sử dụng _deepMerge() (trong lib/registers.js). Điều này cho phép các thẻ chi định nghĩa các văn phong (register), hệ thống mức độ trang trọng (formality system) và hướng dẫn về giới tính dùng chung để áp dụng xuống tất cả các ngôn ngữ thành viên — mà không cần sao chép dữ liệu trên hàng trăm thẻ riêng lẻ.

Ngữ nghĩa Gộp (Merge Semantics)

Giá trị conHành viLý do
nullKế thừa từ chanull nghĩa là "Tôi không định nghĩa trường này" — giá trị của cha sẽ được áp dụng
Khác nullGhi đè chaDữ liệu của con cụ thể hơn — được ưu tiên
Đối tượng lồng nhauGộp đệ quyCác trường của con sẽ ghi đè, các trường của cha được bảo toàn
MảngThay thế hoàn toànCác mảng không gộp theo từng phần tử — mảng của con sẽ được chọn

Các trường Danh tính (Không bao giờ Kế thừa)

Một số trường thuộc về chính thẻ đó và KHÔNG BAO GIỜ được kế thừa từ thẻ cha:

code, extends, _migration, aliases, iso639_1, iso639_3

Ngay cả khi thẻ cha định nghĩa aliases: ["macro-code"], thẻ con cũng sẽ KHÔNG kế thừa các bí danh (alias) đó. Các trường này luôn là giá trị riêng của thẻ con (bao gồm cả null nếu chưa được thiết lập).

Lý do: Nếu không có quy tắc này, mọi ngôn ngữ Cree sẽ kế thừa aliases: ["cre"] từ thẻ cha là vĩ ngôn ngữ (macrolanguage), khiến mọi biến thể đều trở thành bí danh của vĩ ngôn ngữ đó.

Ví dụ: Cách một Thẻ Cree được Phân giải

┌───────────────────────┐
│ 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
└───────────────────────┘

Tại thời điểm runtime, getLanguageCard("crk") trả về một đối tượng đã gộp chứa các văn phong (register) của genus-cree + các thuộc tính của family-algic (nếu có) + danh tính và siêu dữ liệu (metadata) riêng của crk.

Biểu mẫu Thẻ Chi (Genus Card Template)

Các thẻ chi nằm trong shared/language-cards/genera/ và định nghĩa các thuộc tính dùng chung cho một nhóm ngôn ngữ. Chúng tuân theo cùng một schema như các thẻ thông thường nhưng có các quy ước khác:

{
// 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,
// ...
}

Quy tắc quan trọng: Thẻ chi CHỈ được chứa dữ liệu thực sự được chia sẻ trong toàn bộ nhóm và có nguồn gốc từ các tài liệu tham chiếu uy tín. Nếu một hệ thống mức độ trang trọng khác nhau giữa các thành viên, nó phải thuộc về các thẻ riêng lẻ chứ không phải thẻ chi.

Biểu mẫu Chuẩn (Canonical Template)

Mọi thẻ BẮT BUỘC phải có cấu trúc cấp cao nhất chính xác như thế này. Schema của các đối tượng con được tài liệu hóa trong phần Tham chiếu Trường dữ liệu bên dưới.

{
// ═══════════════════════════════════════════════════════════════════════
// § 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"
// }
}

Tham chiếu Trường dữ liệu

§ 1. Các trường Danh tính

TrườngKiểu dữ liệuBắt buộcCó thể tự động hóaNguồn
codestringCơ sở đăng ký ISO 639-3
namestringCơ sở đăng ký ISO 639-3
nativeNamestring | nullWikidata P1705
alternateNamesstring[]Glottolog, Ethnologue
iso639_3stringCơ sở đăng ký ISO 639-3
iso639_1string | nullISO 639-1
bcp47string | nullMột phầnCơ sở đăng ký subtag IANA
aliasesstring[]Biên soạn thủ công
isoScopestringCơ sở đăng ký ISO 639-3
isoTypestringCơ sở đăng ký ISO 639-3
macrolanguagestring | nullISO 639-3 macrolanguages.tab
extendsstring | nullBiên soạn thủ công

§ 2. Các trường Phân loại

TrườngKiểu dữ liệuBắt buộcCó thể tự động hóaNguồn
glottocodestring | nullGlottolog
classificationobject | nullGlottolog
isIsolatebooleanGlottolog CLDF

§ 3. Các trường Địa lý

TrườngKiểu dữ liệuBắt buộcCó thể tự động hóaNguồn
macroareastring | nullGlottolog CLDF
coordinatesobject | nullGlottolog
countriesstring[]Glottolog
regionsobject[]Điều tra dân số, Ethnologue, thủ công
arealContextobject | nullTọa độ + vùng khu vực ngôn ngữ

§ 4. Các trường Hệ thống Chữ viết

TrườngKiểu dữ liệuBắt buộcCó thể tự động hóaNguồn
scriptstring | nullWikidata P282
scriptUnicodeNamestring | nullĐược suy ra từ script qua ánh xạ ISO 15924 → Unicode
scriptsobject[]Một phầnWikidata, thủ công
dirstring | nullCó thể suy ra từ chữ viết
scriptConverterstring | nullThủ công
orthographicStatusobject | nullMột phầnEthnologue, thủ công

§ 5. Các trường Nhân khẩu học & Sức sống Ngôn ngữ

TrườngKiểu dữ liệuBắt buộcCó thể tự động hóaNguồn
speakerEstimatesobject[]Wikidata, Ethnologue, điều tra dân số
vitalityobject | nullGlottolog AES, UNESCO

§ 5.5 Các trường Tài liệu & Sự hiện diện Kỹ thuật số

TrườngKiểu dữ liệuBắt buộcCó thể tự động hóaNguồn
documentationDepthobject | nullTài liệu tham khảo Glottolog
digitalPresenceobject | nullWikipedia, Common Voice, Tatoeba
dialectCountnumber | nullGlottolog

§ 6. Các trường Mức độ trang trọng, Văn phong & Giới tính

TrườngKiểu dữ liệuBắt buộcCó thể tự động hóaNguồn
formalityobject | nullNghiên cứu ngôn ngữ học
registersobject | nullNghiên cứu ngôn ngữ học
genderobject | nullNghiên cứu ngôn ngữ học
codeSwitchingobject | nullNghiên cứu ngôn ngữ học

§ 7. Các trường Hồ sơ Ngôn ngữ học

TrườngKiểu dữ liệuBắt buộcCó thể tự động hóaNguồn
linguisticChallengesobject | nullNghiên cứu ngôn ngữ học
contactInfluencesobject[]Tài liệu ngôn ngữ học đã xuất bản
rulesobject | nullCLDR
typologicalProfileobject | nullGrambank 1.0.3 — tự động điền bởi enrich-grambank-typology.mjs
phonologicalInventoryobject | nullPHOIBLE 2.0 — tự động điền bởi enrich-phoible-phonemes.mjs

§ 8. Các trường Bách khoa toàn thư

TrườngKiểu dữ liệuBắt buộcCó thể tự động hóaNguồn
encyclopedicobject | nullNghiên cứu thủ công
culturalAphorismobject | nullĐóng góp từ cộng đồng
varietiesobject[]Nghiên cứu thủ công

§ 9. Các trường Tài nguyên Kỹ thuật số

TrườngKiểu dữ liệuBắt buộcCó thể tự động hóaNguồn
resourcesobject | nullMột phầnThủ công + tự động
databaseCoverageobject | nullĐược suy ra từ quá trình làm giàu dữ liệu
corpusAvailabilityobject | nullBible Brain, OPUS, Lexibank
keyboardSupportobject | nullKeyman API, CLDR
methodSupportobjectMột phầnXác minh qua API
metricModelSupportobject | nullBài báo khoa học XLM-R, bài báo khoa học AfriCOMET
metricPluginsobject | nullLàm giàu dữ liệu thẻ — khai báo các gói plugin chỉ số nào được áp dụng (ví dụ: { formalityMarkers: true })
omt1600object | nullĐánh giá tổng hợp (Meta assessment)
evalDatasetsstring[]Cơ sở đăng ký tập dữ liệu
pipelineReadinessobject | nullMột phầnSuy diễn + thủ công

resources.fsts[].install: Các mục FST trong đối tượng resources có thể bao gồm một đối tượng con install với các trường: repo, releaseTag, assetPattern, format, maturity, và tùy chọn bundlePattern. Điều này thay thế cho từ điển được hardcode GIELLALT_FST_REGISTRY trước đây. Xem get_fst_install_info() trong language_cards.py.

§ 10. Các trường Nguồn gốc Dữ liệu

TrườngKiểu dữ liệuBắt buộcCó thể tự động hóaNguồn
dataSourcesarray | objectTự động + thủ công
supportTierstringĐược suy ra từ mức độ hoàn thiện của thẻ
humanReviewedobject | nullNgười kiểm duyệt
notesstring | nullThủ công
firstDocumentednumber | nullGlottolog CLDF
lastDocumentednumber | nullGlottolog CLDF
_generatedobject | nullScript làm giàu dữ liệu

Chính sách Mã Ngôn ngữ

Champollion sử dụng ISO 639-3 làm mã định danh chuẩn. Các mã tiêu chuẩn khác được đăng ký dưới dạng bí danh (alias) và sẽ được phân giải thành mã ISO 639-3 tại thời điểm runtime.

Độ ưu tiênTiêu chuẩnVí dụTrườngCách dùng
1 (chuẩn)ISO 639-3crkcodeTên tệp thẻ, khóa cấu hình, tham số API
2 (bí danh)ISO 639-1iualiases[]Được chấp nhận trong CLI, phân giải thành ISO 639-3
3 (bí danh)BCP 47filaliases[]Được chấp nhận trong CLI, phân giải thành ISO 639-3
Tham chiếuGlottocodeplai1258glottocodeChỉ dùng để phân loại, không dùng cho runtime

Thứ tự phân giải: Khi người dùng cung cấp một mã:

  1. Khớp trực tiếp trên card.code → tìm thấy
  2. Khớp trên card.aliases[] → tìm thấy, trả về thẻ chuẩn
  3. Khớp trên card.iso639_1 → tìm thấy (dự phòng)
  4. Không tìm thấy → báo lỗi

Lịch sử Di cư: ISO 639-1 → ISO 639-3

Trước phiên bản v8, tên tệp thẻ sử dụng mã ISO 639-1 nếu có sẵn (fr.json, de.json, ja.json). Trong đợt di cư sang 639-3, tất cả các thẻ đã được đổi tên thành mã ISO 639-3 tương đương:

TrướcSauLý do
fr.jsonfra.json639-3 là chuẩn
de.jsondeu.json639-3 là chuẩn
zh.jsoncmn.jsonVĩ ngôn ngữ → ngôn ngữ riêng lẻ mặc định
ar.jsonarb.jsonVĩ ngôn ngữ → Tiếng Ả Rập Tiêu chuẩn Hiện đại
ms.jsonzsm.jsonVĩ ngôn ngữ → Tiếng Mã Lai Tiêu chuẩn

Điều gì xảy ra với các mã cũ?

  • Mã 639-1 cũ nằm trong card.iso639_1
  • Mã 639-1 cũ nằm trong card.aliases[]
  • resolveCode("fr") trả về "fra" tại thời điểm runtime — tương thích ngược
  • Người dùng vẫn có thể viết "fr" trong cấu hình của họ — nó sẽ được phân giải một cách minh bạch

Những thay đổi về mặt kiến trúc:

  • _deepMerge() giờ đây bỏ qua các giá trị null (kế thừa từ cha)
  • _deepMerge() giờ đây đã thiết lập trường danh tính (mã, phần mở rộng, bí danh không bao giờ được kế thừa)
  • formality.default giờ đây được suy ra từ các cờ văn phong isDefault: true
  • 205 thẻ có nguồn gốc từ Grambank đã được sửa lỗi cấu trúc formality.default
  • 38 thẻ chi/họ/vĩ ngôn ngữ cung cấp các mục tiêu kế thừa

Các Trường hợp Đặc biệt

Ngôn ngữ Ký hiệu

Ngôn ngữ ký hiệu (ví dụ: ASE — Ngôn ngữ Ký hiệu Mỹ) là các ngôn ngữ hợp lệ có mã ISO 639-3. Chúng có dữ liệu địa lý và số lượng người nói nhưng:

  • script thường là null (không có dạng viết tiêu chuẩn)
  • scripts có thể bao gồm "Sgnw" (SignWriting) nếu hệ thống ký hiệu được sử dụng
  • dirnull
  • linguisticChallenges nên đề cập đến ngữ pháp không gian, từ phân loại (classifier), v.v.
  • gender.grammatical thường là false

Ngôn ngữ Cổ đại & Lịch sử

Các ngôn ngữ như tiếng Latinh (lat, isoType H) và tiếng Phạn (san, isoType H) vẫn được sử dụng trong các bối cảnh cụ thể (phụng vụ, học thuật) nhưng không có người nói bản xứ:

  • vitality có thể ghi chú "không có người nói bản xứ" với "trend": "stable" (không phải đang mai một — cộng đồng sử dụng nó ổn định, chỉ là nhỏ)
  • speakerEstimates nên lưu ý đây là những người nói L2 (ngôn ngữ thứ hai), không phải L1 (ngôn ngữ mẹ đẻ)
  • firstDocumented / lastDocumented xác định vị trí của chúng trong dòng thời gian

Ngôn ngữ Nhân tạo

Esperanto (epo, isoType C), Lojban, v.v.:

  • classification có thể trỏ đến một họ ngôn ngữ "nhân tạo" (constructed) hoặc null
  • contactInfluences phản ánh tài liệu nguồn (ví dụ: Esperanto dựa trên các ngôn ngữ Rô-man, German, Slav)
  • vitality là trường hợp bất thường — cộng đồng người nói đang phát triển nhưng không có quê hương bản xứ

Vĩ ngôn ngữ (Macrolanguages)

Tiếng Ả Rập (ara), tiếng Trung (zho), tiếng Cree (cre), tiếng Quechua (que) là các vĩ ngôn ngữ bao gồm nhiều ngôn ngữ riêng lẻ:

  • isoScope: "M"
  • varieties nên liệt kê các ngôn ngữ riêng lẻ kèm theo mã ISO của chúng
  • methodSupport nên phản ánh những gì thẻ vĩ ngôn ngữ hỗ trợ (thường là biến thể được tiêu chuẩn hóa)
  • Các biến thể riêng lẻ cũng nên có thẻ riêng của chúng

Ngôn ngữ Không có Chính tả Tiêu chuẩn

Nhiều ngôn ngữ (đặc biệt là các ngôn ngữ truyền khẩu) không có hệ thống chữ viết tiêu chuẩn, hoặc có các hệ thống chính tả cạnh tranh nhau:

  • scriptnull
  • scripts is []
  • dir is null
  • notes nên giải thích tình hình chính tả
  • linguisticChallenges nên lưu ý điều này ảnh hưởng thế nào đến dịch máy (MT) (ví dụ: không có dữ liệu huấn luyện)

Hiện tượng Song ngữ phân cực (Diglossia)

Các ngôn ngữ như tiếng Ả Rập (tiếng Ả Rập tiêu chuẩn hiện đại - MSA so với các phương ngôn) hoặc tiếng Guaraní (Jopará so với tiếng Guaraní thuần túy):

  • codeSwitching ghi nhận tình trạng biến thể hỗn hợp
  • registers có thể cung cấp các thiết lập sẵn (preset) cho các cấp độ khác nhau
  • varieties có thể liệt kê cặp song ngữ phân cực

Các loại Ảnh hưởng Tiếp xúc

LoạiÝ nghĩaVí dụ
superstrateNgôn ngữ thống trị bị áp đặt lên một cộng đồngTiếng Pháp → Tiếng Anh (sau năm 1066)
substrateNgôn ngữ bản địa ảnh hưởng đến ngôn ngữ bị áp đặtTiếng Celt → Tiếng Anh
adstrateNgôn ngữ lân cận có ảnh hưởng lẫn nhauTiếng Na Uy cổ (Norse) → Tiếng Anh
learned_borrowingTừ mượn thông qua giáo dục/học thuậtTiếng Latinh → Tiếng Anh
lexical_borrowingMượn từ vựng trực tiếp thông qua tiếp xúcTiếng Tây Ban Nha → Tiếng Filipino
relexificationThay thế toàn bộ từ vựngTiếng Bồ Đào Nha → Tiếng Papiamentu

Mức độ Ảnh hưởng Tiếp xúc

Mức độÝ nghĩa
lightMột vài từ mượn, tác động cấu trúc tối thiểu
moderateTừ vựng đáng kể trong các lĩnh vực cụ thể
heavyTừ vựng phổ biến và một số đặc điểm cấu trúc
structuralNgữ pháp, cú pháp và ngữ âm bị ảnh hưởng
definingBản sắc cốt lõi được hình thành do tiếp xúc (ngôn ngữ bồi/creole, ngôn ngữ hỗn hợp)

Cách viết các Thiết lập sẵn Văn phong Tốt

Các gợi ý thiết lập sẵn tốt:

  • Gọi tên rõ ràng đặc điểm mức độ trang trọng (ví dụ: "해요체", "vous-form", "siz-form")
  • Giải thích đại từ hoặc dạng động từ cụ thể cần sử dụng
  • Đưa ra bối cảnh khi nào văn phong này là phù hợp
  • Đề cập đến các lưu ý về chữ viết nếu có

Không đưa hướng dẫn bao hàm giới (gender-inclusive) vào gợi ý thiết lập sẵn. Hướng dẫn về giới thuộc về card.gender.inclusiveGuidance — nó được đưa vào một cách riêng biệt.

❌ 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."

Quy ước Đặt tên Thiết lập sẵn

Các khóa thiết lập sẵn (preset key) nên mang tính mô tả và sử dụng chữ thường nối bằng dấu gạch ngang (lowercase-hyphenated):

  • Các ngôn ngữ phân biệt T-V (ngôi thứ hai thân mật/trang trọng): formal-vous, informal-tu, formal-Sie, casual-du
  • Các cấp độ kính ngữ (speech level): polite-haeyo, formal-hapsyo, casual-hae
  • Trung tính: professional, neutral-professional
  • Trộn mã (code-switching): taglish-professional, pure-filipino

Quy trình Làm giàu Dữ liệu

Thứ tự Xử lý trên từng Thẻ

Khi làm giàu dữ liệu cho một thẻ, hãy tham khảo các nguồn theo thứ tự này. Hãy ghi nhận mọi nguồn đã tham khảo, ngay cả khi nguồn đó không trả về dữ liệu.

  1. Cơ sở đăng ký ISO 639-3code, 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 (trạng thái bị đe dọa)
  6. Wikidata SPARQLnativeName, speakerEstimates, script, scripts, dir
  7. CLDRrules (phép in ấn/typography, số nhiều, viết hoa)
  8. NLLB-200 / FLORES+methodSupport.nllb, evalDatasets
  9. Xác minh qua API → các mục methodSupport còn lại
  10. Các bài báo khoa học về mô hình MLmetricModelSupport (dữ liệu huấn luyện XLM-R, phạm vi bao phủ AfriCOMET) Script: node scripts/enrich-metric-model-support.mjs

Xử lý Xung đột

Khi các nguồn không thống nhất:

  1. Lưu trữ cả hai kèm theo nguồn trích dẫn
  2. KHÔNG tính trung bình hoặc chọn bên
  3. Ghi chú sự khác biệt trong trường note tương ứng
  4. Ưu tiên nguồn sơ cấp gần đây nhất chỉ khi cần một giá trị duy nhất cho việc tính toán

Xác thực

Chạy linter sau bất kỳ quá trình làm giàu dữ liệu hoặc chỉnh sửa thủ công nào:

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

Danh sách kiểm tra PR

Khi gửi một thẻ ngôn ngữ mới hoặc thẻ đã được sửa đổi:

  • Tệp được đặt tên là <code>.json trong shared/language-cards/
  • Có đầy đủ tất cả các trường cấp cao nhất từ biểu mẫu chuẩn
  • classification được điền từ Glottolog (không tự dựng thủ công)
  • dataSources liệt kê tất cả các nguồn đã tham khảo
  • Các mục methodSupport được xác minh với danh sách ngôn ngữ API thực tế
  • Các mục contactInfluences có nguồn đã xuất bản hoặc citation_needed: true
  • linguisticChallenges với 3–6 thách thức liên quan đến dịch máy (MT) (nếu đã được nghiên cứu)
  • rules được điền từ CLDR (nếu có dữ liệu locale)
  • Linter vượt qua mà không có lỗi

Tài liệu Tham chiếu Chuyên ngành

Tiêu chuẩnĐược duy trì bởiCách dùng của chúng tôi
ISO 639-3SIL InternationalMã ngôn ngữ chuẩn, mối quan hệ vĩ ngôn ngữ
GlottologMax Planck InstitutePhân loại, tọa độ, mức độ bị đe dọa theo AES
WALSMax Planck InstituteĐịnh nghĩa chi (genus), đặc điểm loại hình học
ISO 15924Unicode/ISOMã chữ viết
CLDRUnicode ConsortiumDữ liệu locale, quy tắc số nhiều, phép in ấn (typography)
WikidataWikimedia FoundationSố lượng người nói, tên tự gọi (endonym), dữ liệu chữ viết
EthnologueSIL InternationalEGIDS, ước tính người nói, DLS
UNESCO AtlasUNESCOPhân loại mức độ bị đe dọa
Katig CollectiveUP DilimanTóm tắt thông tin ngôn ngữ Philippines

Xem thêm: Quy trình Trích dẫn Thẻ Ngôn ngữ để biết hướng dẫn chi tiết cho từng nguồn.