Mô đun:headword/data
Giao diện
- Trang mô đun này thiếu trang con tài liệu. Xin hãy tạo trang tài liệu này.
- Liên kết hữu ích: trang gốc • trang con của trang gốc • liên kết • nhúng • trường hợp kiểm thử • chỗ thử
local headword_page_module = "Module:headword/page"
local list_to_set = require("Module:table").listToSet
local data = {}
------ 1. Lists which are converted into sets. ------
-- Zero-plurals (i.e. invariable plurals).
local irregular_plurals = list_to_set({
"cmavo",
"cmene",
"fu'ivla",
"gismu",
"Han tu",
"Hanja",
"Hanzi",
"Việt bính",
"kana",
"kanji",
"lujvo",
"Từ điển đàm thoại",
"Bính âm Hán ngữ",
"rafsi",
}, function(_, item)
return item
end)
-- Irregular non-zero plurals AND any regular plurals where the singular ends in "s",
-- because the module assumes that inputs ending in "s" are plurals. The singular and
-- plural both need to be added, as the module will generate a default plural if
-- the input doesn't match a key in this table.
for sg, pl in next, {
mora = "morae"
} do
irregular_plurals[sg], irregular_plurals[pl] = pl, pl
end
data.irregular_plurals = irregular_plurals
data.lemmas = list_to_set{
"abbreviations",
"acronyms",
"Tính từ",
"Danh tính từ",
"adpositions",
"Phó từ",
"Phụ tố",
"ambipositions",
"Trợ từ",
"circumfixes",
"circumpositions",
"Loại từ",
"cmavo",
"cmavo clusters",
"cmene",
"combining forms",
"Liên từ",
"Lượng từ",
"Từ hạn định",
"diacritical marks",
"digraphs",
"equative adjectives",
"fu'ivla",
"gismu",
"Hán tự",
"Han tu",
"Hanja",
"Hanzi",
"ideophones",
"Thành ngữ",
"infixes",
"initialisms",
"iteration marks",
"interfixes",
"Thán từ",
"Kana",
"Kanji",
"Chữ cái",
"ligatures",
"logograms",
"lujvo",
"morae",
"morphemes",
"non-constituents",
"Danh từ",
"numbers",
"Ký tự số đếm",
"Số",
"Số từ",
"Ký tự số",
"Trợ từ",
"Cụm từ",
"postpositions",
"postpositional phrases",
"predicatives",
"Tiền tố",
"Cụm giới từ",
"Giới từ",
"preverbs",
"pronominal adverbs",
"Đại từ",
"Danh từ riêng",
"Tục ngữ",
"Dấu câu",
"relatives",
"Gốc từ",
"Thân từ",
"Hậu tố",
"Âm tiết",
"Ký tự",
"Động từ",
}
data.nonlemmas = list_to_set{
"Biến thể hình thái phân từ chủ động",
"Phân từ chủ động",
"Tính phân từ",
"adjective case forms",
"Biến thể hình thái tính từ",
"adjective feminine forms",
"adjective plural forms",
"Biến thể hình thái phó từ",
"Phó phân từ",
"agent participles",
"Biến thể hình thái mạo từ",
"circumfix forms",
"combined forms",
"Biến thể hình thái tính từ so sánh hơn",
"Tính từ so sánh hơn",
"comparative adverb forms",
"comparative adverbs",
"conjunction forms",
"contractions",
"converbs",
"Biến thể hình thái từ hạn định so sánh hơn",
"Biến thể hình thái từ hạn định",
"Biến thể hình thái từ hạn định so sánh nhất",
"Danh từ giảm nhẹ",
"elative adjectives",
"equative adjective forms",
"equative adjectives",
"future participles",
"Động danh từ",
"infinitive forms",
"infinitives",
"interjection forms",
"Việt bính",
"Từ sai chính tả",
"negative participles",
"nominal participles",
"noun case forms",
"noun dual forms",
"Biến thể hình thái danh từ",
"noun paucal forms",
"noun plural forms",
"noun possessive forms",
"noun singulative forms",
"Biến thể hình thái số từ",
"Phân từ",
"Biến thể hình thái phân từ",
"particle forms",
"Phân từ bị động",
"Phân từ chủ động quá khứ",
"past adverbial participles",
"Phân từ quá khứ",
"Biến thể hình thái phân từ quá khứ",
"past passive participles",
"perfect active participles",
"perfect participles",
"perfect passive participles",
"Bính âm Hán ngữ",
"Số nhiều",
"postposition forms",
"Biến thể hình thái tiền tố",
"preposition contractions",
"preposition forms",
"prepositional pronouns",
"present active participles",
"present adverbial participles",
"Phân từ hiện tại",
"present passive participles",
"preverb forms",
"Biến thể hình thái đại từ",
"pronoun possessive forms",
"Biến thể hình thái danh từ riêng",
"proper noun plural forms",
"rafsi",
"Latinh hóa",
"root forms",
"singulatives",
"Biến thể hình thái hậu tố",
"Biến thể hình thái tính từ so sánh nhất",
"Tính từ so sánh nhất",
"Biến thể hình thái phó từ so sánh nhất",
"Phó từ so sánh nhất",
"Biến thể hình thái động từ",
"Danh động từ",
}
-- These langauges will not have links to separate parts of the headword.
data.no_multiword_links = list_to_set{
"zh",
}
-- These languages will not have "LANG multiword terms" categories added.
data.no_multiword_cat = list_to_set{
-------- Languages without spaces between words (sometimes spaces between phrases) --------
"blt", -- Tai Dam
"ja", -- Japanese
"khb", -- Lü
"km", -- Khmer
"lo", -- Lao
"mnw", -- Mon
"my", -- Burmese
"nan", -- Min Nan (some words in Latin script; hyphens between syllables)
"nan-hbl", -- Hokkien (some words in Latin script; hyphens between syllables)
"nod", -- Northern Thai
"ojp", -- Old Japanese
"shn", -- Shan
"sou", -- Southern Thai
"tdd", -- Tai Nüa
"th", -- Thai
"tts", -- Isan
"twh", -- Tai Dón
"txg", -- Tangut
"zh", -- Chinese (all varieties with Chinese characters)
"zkt", -- Khitan
-------- Languages with spaces between syllables --------
"ahk", -- Akha
"aou", -- A'ou
"atb", -- Zaiwa
"byk", -- Biao
"cdy", -- Chadong
--"duu", -- Drung; not sure
--"hmx-pro", -- Proto-Hmong-Mien
--"hnj", -- Green Hmong; not sure
"huq", -- Tsat
"ium", -- Iu Mien
--"lis", -- Lisu; not sure
"mtq", -- Muong
--"mww", -- White Hmong; not sure
"onb", -- Lingao
--"sit-gkh", -- Gokhy; not sure
--"swi", -- Sui; not sure
"tbq-lol-pro", -- Proto-Loloish
"tdh", -- Thulung
"ukk", -- Muak Sa-aak
"vi", -- Vietnamese
"yig", -- Wusa Nasu
"zng", -- Mang
-------- Languages with ~ with surrounding spaces used to separate variants --------
"mkh-ban-pro", -- Proto-Bahnaric
"sit-pro", -- Proto-Sino-Tibetan; listed above
-------- Other weirdnesses --------
"mul", -- Translingual; gestures, Morse code, etc.
"aot", -- Atong (India); bullet is a letter
-------- All sign languages --------
"ads",
"aed",
"aen",
"afg",
"ase",
"asf",
"asp",
"asq",
"asw",
"bfi",
"bfk",
"bog",
"bqn",
"bqy",
"bvl",
"bzs",
"cds",
"csc",
"csd",
"cse",
"csf",
"csg",
"csl",
"csn",
"csq",
"csr",
"doq",
"dse",
"dsl",
"ecs",
"esl",
"esn",
"eso",
"eth",
"fcs",
"fse",
"fsl",
"fss",
"gds",
"gse",
"gsg",
"gsm",
"gss",
"gus",
"hab",
"haf",
"hds",
"hks",
"hos",
"hps",
"hsh",
"hsl",
"icl",
"iks",
"ils",
"inl",
"ins",
"ise",
"isg",
"isr",
"jcs",
"jhs",
"jls",
"jos",
"jsl",
"jus",
"kgi",
"kvk",
"lbs",
"lls",
"lsl",
"lso",
"lsp",
"lst",
"lsy",
"lws",
"mdl",
"mfs",
"mre",
"msd",
"msr",
"mzc",
"mzg",
"mzy",
"nbs",
"ncs",
"nsi",
"nsl",
"nsp",
"nsr",
"nzs",
"okl",
"pgz",
"pks",
"prl",
"prz",
"psc",
"psd",
"psg",
"psl",
"pso",
"psp",
"psr",
"pys",
"rms",
"rsl",
"rsm",
"sdl",
"sfb",
"sfs",
"sgg",
"sgx",
"slf",
"sls",
"sqk",
"sqs",
"ssp",
"ssr",
"svk",
"swl",
"syy",
"tse",
"tsm",
"tsq",
"tss",
"tsy",
"tza",
"ugn",
"ugy",
"ukl",
"uks",
"vgt",
"vsi",
"vsl",
"vsv",
"xki",
"xml",
"xms",
"ygs",
"ysl",
"zib",
"zsl",
}
-- In these languages, the hyphen is not considered a word separator for the "multiword terms" category.
data.hyphen_not_multiword_sep = list_to_set{
"akk", -- Akkadian; hyphens between syllables
"akl", -- Aklanon; hyphens for mid-word glottal stops
"ber-pro", -- Proto-Berber; morphemes separated by hyphens
"ceb", -- Cebuano; hyphens for mid-word glottal stops
"cnk", -- Khumi Chin; hyphens used in single words
"cpi", -- Chinese Pidgin English; Chinese-derived words with hyphens between syllables
"de", -- too many false positives
"esx-esk-pro", -- hyphen used to separate morphemes
"fi", -- Finnish; hyphen used to separate components in compound words if the final and initial vowels match, respectively
"hil", -- Hiligaynon; hyphens for mid-word glottal stops
"hnn", -- Hanunoo; too many false positives
"ilo", -- Ilocano; hyphens for mid-word glottal stops
"kne", -- Kankanaey; hyphens for mid-word glottal stops
"lcp", -- Western Lawa; dash as syllable joiner
"lwl", -- Eastern Lawa; dash as syllable joiner
"mfa", -- Pattani Malay in Thai script; dash as syllable joiner
"mkh-vie-pro", -- Proto-Vietic; morphemes separated by hyphens
"msb", -- Masbatenyo; too many false positives
"tl", -- Tagalog; too many false positives
"war", -- Waray-Waray; too many false positives
"yo", -- Yoruba; hyphens used to show lengthened nasal vowels
}
-- These languages will not have "LANG masculine nouns" and similar categories added.
data.no_gender_cat = list_to_set{
-- Languages without gender but which use the gender field for other purposes
"ja",
"th",
}
data.notranslit = list_to_set{
"ams",
"az",
"bbc",
"bug",
"cdo",
"cia",
"cjm",
"cjy",
"cmn",
"cnp",
"cpi",
"cpx",
"csp",
"czh",
"czo",
"gan",
"hak",
"hnm",
"hsn",
"ja",
"kzg",
"lad",
"ltc",
"luh",
"lzh",
"mnp",
"ms",
"mul",
"mvi",
"nan",
"nan-dat",
"nan-hbl",
"nan-hlh",
"nan-lnx",
"nan-tws",
"nan-zhe",
"nan-zsh",
"och",
"oj",
"okn",
"ryn",
"rys",
"ryu",
"sh",
"sjc",
"tgt",
"th",
"tkn",
"tly",
"txg",
"und",
"vi",
"wuu",
"xug",
"yoi",
"yox",
"yue",
"za",
"zh",
"zhx-sic",
"zhx-tai",
}
-- Script codes for which a script-tagged display title will be added.
data.toBeTagged = list_to_set{
"Ahom",
"Arab",
"fa-Arab",
"glk-Arab",
"kk-Arab",
"ks-Arab",
"ku-Arab",
"mzn-Arab",
"ms-Arab",
"ota-Arab",
"pa-Arab",
"ps-Arab",
"sd-Arab",
"tt-Arab",
"ug-Arab",
"ur-Arab",
"Armi",
"Armn",
"Avst",
"Bali",
"Bamu",
"Batk",
"Beng",
"as-Beng",
"Bopo",
"Brah",
"Brai",
"Bugi",
"Buhd",
"Cakm",
"Cans",
"Cari",
"Cham",
"Cher",
"Copt",
"Cprt",
"Cyrl",
"Cyrs",
"Deva",
"Dsrt",
"Egyd",
"Egyp",
"Ethi",
"Geok",
"Geor",
"Glag",
"Goth",
"Grek",
"Polyt",
"polytonic",
"Gujr",
"Guru",
"Hang",
"Hani",
"Hano",
"Hebr",
"Hira",
"Hluw",
"Ital",
"Java",
"Kali",
"Kana",
"Khar",
"Khmr",
"Knda",
"Kthi",
"Lana",
"Laoo",
"Latn",
"Latf",
"Latg",
"Latnx",
"Latinx",
"pjt-Latn",
"Lepc",
"Limb",
"Linb",
"Lisu",
"Lyci",
"Lydi",
"Mand",
"Mani",
"Marc",
"Merc",
"Mero",
"Mlym",
"Mong",
"mnc-Mong",
"sjo-Mong",
"xwo-Mong",
"Mtei",
"Mymr",
"Narb",
"Nkoo",
"Nshu",
"Ogam",
"Olck",
"Orkh",
"Orya",
"Osma",
"Ougr",
"Palm",
"Phag",
"Phli",
"Phlv",
"Phnx",
"Plrd",
"Prti",
"Rjng",
"Runr",
"Samr",
"Sarb",
"Saur",
"Sgnw",
"Shaw",
"Shrd",
"Sinh",
"Sora",
"Sund",
"Sylo",
"Syrc",
"Tagb",
"Tale",
"Talu",
"Taml",
"Tang",
"Tavt",
"Telu",
"Tfng",
"Tglg",
"Thaa",
"Thai",
"Tibt",
"Ugar",
"Vaii",
"Xpeo",
"Xsux",
"Yiii",
"Zmth",
"Zsym",
"Ipach",
"Music",
"Rumin",
}
-- Parts of speech which will not be categorised in categories like "English terms spelled with É" if
-- the term is the character in question (e.g. the letter entry for English [[é]]). This contrasts with
-- entries like the French adjective [[m̂]], which is a one-letter word spelled with the letter.
data.pos_not_spelled_with_self = list_to_set{
"diacritical marks",
"Ký tự chữ Hán",
"Hán tự",
"Hanja",
"Hanzi",
"iteration marks",
"Kana",
"Kanji",
"letters",
"ligatures",
"logograms",
"morae",
"Ký tự số",
"Số",
"punctuation marks",
"syllables",
"Ký tự",
}
------ 2. Lists not converted into sets. ------
-- Recognized aliases for parts of speech (param 2=). Key is the short form and value is the canonical singular (not
-- pluralized) form. It is singular so that the same table can be used in [[Module:form of]] for the p=/POS= param
-- and [[Module:links]] for the pos= param.
data.pos_aliases = {
a = "Tính từ",
adj = "Tính từ",
adjective = "Tính từ",
adv = "Phó từ",
art = "Trợ từ",
det = "Từ hạn định",
cnum = "Số đếm",
compadj = "Tính từ so sánh hơn",
compadv = "Phó từ so sánh hơn",
conj = "Liên từ",
conv = "converb",
int = "Thán từ",
interj = "Thán từ",
intj = "Thán từ",
interjection = "Thán từ",
n = "Danh từ",
noun = "Danh từ",
num = "Số từ",
numeral = "Số từ",
part = "Phân từ",
pcl = "Trợ từ",
phr = "Cụm từ",
phrase = "Cụm từ",
pn = "Danh từ riêng",
postp = "postposition",
pref = "Tiền tố",
prep = "Giới từ",
preposition = "Giới từ",
pron = "Đại từ",
pronoun = "Đại từ",
prop = "Danh từ riêng",
proper = "Danh từ riêng",
propn = "Danh từ riêng",
proverb = "Tục ngữ",
onum = "Số thứ tự",
rom = "Latinh hóa",
romanization = "Latinh hóa",
suf = "Hậu tố",
supadj = "Tính từ so sánh nhất",
supadv = "Phó từ so sánh nhất",
v = "Động từ",
vb = "Động từ",
verb = "Động từ",
vi = "Nội động từ",
vt = "Ngoại động từ",
vti = "Nội và ngoại động từ",
}
-- Parts of speech for which categories like "German masculine nouns" or "Russian imperfective verbs"
-- will be generated if the headword is of the appropriate gender/number.
data.pos_for_gender_number_cat = {
["Danh từ"] = "Danh từ",
["proper nouns"] = "nouns",
["suffixes"] = "suffixes",
-- We include verbs because impf and pf are valid "genders".
["verbs"] = "verbs",
}
------ 3. Page-wide processing (so that it only needs to be done once per page). ------
data.page = require(headword_page_module).process_page()
-- Fuckme, random references to data.pagename and data.encoded_pagename are scattered throughout the codebase. FIXME!
data.pagename = data.page.pagename
data.encoded_pagename = data.page.encoded_pagename
return data