local headword_page_module = "Module:headword/page"
local list_to_set = require("Module:table").listToSet
local data = {}
------ 1. Lists which are converted into sets. ------
data.invariable = list_to_set{
"cmavo",
"cmene",
"fu'ivla",
"gismu",
"Han tu","漢字","汉字",
"hanzi","漢字","汉字",
"hanja","漢字","汉字",
"jyutping","粵語拼音","粤语拼音",
"kanji","漢字","汉字",
"lujvo",
"phrasebook",
"pinyin","拼音",
"rafsi",
"romaji","羅馬字","罗马字",
}
data.lemmas = list_to_set{
"abbreviations","縮寫","缩写",
"acronyms","首字母縮略詞","首字母缩略词",
"adjectives","形容詞","形容词",
"adnominals","連體詞",
"adpositions",
"adverbs","副詞","副词",
"affixes","綴詞","缀词",
"ambipositions",
"articles","冠詞","冠词",
"chengyu","成語","成语", -- LOCALIZATION
"circumfixes","環綴","环缀",
"circumpositions",
"classifiers","量詞","量词",
"cmavo",
"cmavo clusters",
"cmene",
"combining forms",
"conjunctions","連詞","连词",
"counters","量詞","量词",
"determiners","限定詞","限定词",
"diacritical marks","附加符號","附加符号",
"digraphs",
"equative adjectives",
"fu'ivla",
"gismu",
"Han character","漢字","汉字",
"Han tu","漢字","汉字",
"hanzi","漢字","汉字",
"hanja","漢字","汉字",
"ideophones","擬態詞",
"idioms","熟語","熟语","俗語","俗语",
"infixes","中綴","中缀",
"initialismes","首字母縮略詞","首字母缩略词",
"interfixes","間綴","间缀",
"interjections","感嘆詞","感叹词","感歎詞",
"kanji","漢字","汉字",
"letters","字母",
"ligatures","合字",
"logograms",
"lujvo",
"morphemes","詞素","词素",
"non-constituents",
"nouns","名詞","名词",
"numbers","數字","数字",
"numeral symbols","數字符號","数字符号",
"numerals","數詞","数词",
"particles","助詞","助词",
"phrases","短語","短语",
"postpositions","後置詞", "后置词",
"postpositional phrases","後置詞短語", "后置词短语",
"predicatives", "表語", "表语",
"prefixes","前綴","前缀",
"prepositional phrases","介詞短語","介词短语",
"prepositions","介詞","介词",
"preverbs",
"pronominal adverbs","代詞性副詞","代词性副词",
"pronouns","代詞","代词",
"proper nouns","專有名詞","专有名词",
"proverbs","諺語","谚语",
"punctuation marks","標點符號", "标点符号",
"relatives","關係詞",
"roots","詞根","词根",
"stems","詞幹","词干",
"suffixes","後綴","后缀",
"syllables","音節","音节",
"symbols","符號","符号",
"verbs","動詞","动词",
}
data.nonlemmas = list_to_set{
"active participle formss","主動分詞變格形","主动分词变格形",
"active participles","主動分詞","主动分词",
"adjectival participles","形容詞性分詞","形容词性分词",
"adjective case forms",
"adjective forms","形容詞形式","形容词形式","形容詞變格形","形容词变格形",
"adjective comparative forms","形容詞比較級變格形","形容词比较级变格形",
"adjective feminine forms","形容詞陰性變格形","形容词阴性变格形",
"adjective plural forms","形容詞複數變格形","形容词复数变格形",
"adverb forms","副詞形式","副词形式","副詞變格形","副词变格形",
"adverb comparative forms","副詞比較級變格形","副词比较级变格形",
"adverbial participles","副詞性分詞","副词性分词",
"agent participles",
"article forms","冠詞形式","冠词形式","冠詞變格形","冠词变格形",
"circumfix forms","環綴變格形","环缀变格形",
"combined forms",
"comparative adjective forms","形容詞比較級變格形","形容词比较级变格形",
"comparative adjectives", "形容词比较级", "形容詞比較級",
"comparative adverb forms","副詞比較級","副词比较级",
"comparative adverbs","副詞比較級變格形","副词比较级变格形",
"contractions","縮約形","缩约形",
"converbss",
"determiner comparative forms","限定詞比較級變格形","限定词比较级变格形",
"determiner forms","限定詞形式","限定词形式","限定詞變格形","限定词变格形",
"determiner superlative forms","限定詞最高級變格形","限定词最高级变格形",
"diminutive nouns","指小名詞","指小名词",
"elative adjectives",
"equative adjective forms",
"equative adjectives",
"future participles",
"gerunds","動名詞","动名词",
"infinitive forms","不定式",
"infinitives",
"interjection forms","感嘆詞形式","感叹词形式","感嘆詞變格形","感叹词变格形",
"jyutping","粵語拼音","粤语拼音",
"kanji readings","漢字讀音","汉字读音",
"misspellings","拼錯","拼错","拼寫錯誤","拼写错误",
"negative participles","否定分詞","否定分词",
"nominal participles","名詞性分詞","名词性分词",
"noun case forms",
"noun dual forms","名詞雙數形式",
"noun forms","名詞形式","名词形式","名詞變格形","名词变格形",
"noun paucal forms","名詞微數形式","名词微数形式",
"noun plural forms","名詞複數形式","名词复数形式",
"noun possessive forms","名詞所有格","名词所有格",
"noun singulative forms","名詞單數形式","名词单数形式",
"numeral forms","數詞形式","数词形式","數詞變格形","数词变格形",
"participles","分詞","分词",
"participle forms","分詞變格形","分词变格形",
"particle forms","助詞形式","助词形式","助詞變格形","助词变格形",
"passive participles","被動分詞","被动分词",
"past active participles","過去主動分詞","过去主动分词",
"past participles","過去分詞","过去分词",
"past participle forms","過去分詞變格形","过去分词变格形","過去分詞形式","过去分词形式",
"past passive participles","過去被動分詞","过去被动分词",
"perfect active participles","完成主動分詞","完成主动分词",
"perfect participles","完成分詞","完成分词",
"perfect passive participles","完成被動分詞","完成被动分词",
"pinyin","拼音",
"plural","複數","复数",
"postposition forms","後置詞變格形","后置词变格形",
"prefix forms","前綴變格形","前缀变格形",
"preposition contractions",
"preposition forms","介詞形式","介词形式","介詞變格形","介词变格形",
"prepositional pronouns","介詞性代詞","介词性代词",
"present active participles","現在主動分詞","现在主动分词",
"present participles","現在分詞","现在分词",
"present passive participles","現在被動分詞","现在被动分词",
"pronoun forms","代詞形式","代词形式","代詞變格形","代词变格形",
"pronoun possessive forms",
"proper noun forms","專有名詞形式","专有名词形式","專有名詞變格形","专有名词变格形",
"proper noun plural forms","專有名詞複數形式","专有名词复数形式",
"rafsi",
"romanization","羅馬化","罗马化",
"romaji","羅馬字","罗马字",
"root forms","詞根變格形","词根变格形",
"singulative",
"suffix forms","後綴變格形","后缀变格形",
"superlative adjective forms","形容詞最高級變格形","形容词最高级变格形",
"superlative adjectives","形容詞最高級","形容词最高级",
"superlative adverb forms","副詞最高級變格形","副词最高级变格形",
"superlative adverbs","副詞最高級","副词最高级",
"verb form","動詞形式","动词形式","動詞變位形式","动词变位形式",
"verbal noun","動名詞","动名词",
}
-- 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
"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",
"cia",
"cjm",
"cmn",
"cpi",
"hak",
"ja",
"kzg",
"lad",
"lzh",
"ms",
"mul",
"mvi",
"nan",
"nan-hbl",
"nan-hnm",
"nan-luh",
"nan-tws",
"oj",
"okn",
"ryn",
"rys",
"ryu",
"sh",
"tgt",
"th",
"tkn",
"tly",
"txg",
"und",
"vi",
"xug",
"yoi",
"yox",
"yue",
"za",
"zh",
}
-- 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",
"Han characters",
"Han tu",
"hanja",
"hanzi",
"iteration marks",
"kana",
"kanji",
"letters",
"ligatures",
"logograms",
"morae",
"numeral symbols",
"numerals",
"punctuation marks",
"syllables",
"symbols",
}
------ 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 = "adjective",
adj = "adjective",
adv = "adverb",
art = "article",
det = "determiner",
cnum = "cardinal number",
conj = "conjunction",
conv = "converb",
int = "interjection",
interj = "interjection",
intj = "interjection",
n = "noun",
num = "numeral",
part = "participle",
pcl = "particle",
phr = "phrase",
pn = "proper noun",
postp = "postposition",
pre = "preposition",
prep = "preposition",
pro = "pronoun",
pron = "pronoun",
prop = "proper noun",
proper = "proper noun",
onum = "ordinal number",
v = "verb",
vb = "verb",
vi = "intransitive verb",
vt = "transitive verb",
vti = "transitive and intransitive verb",
}
-- 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 = {
["nouns"] = "nouns",
["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