Module:category tree/poscatboiler/data/lang-specific/cu

local labels = {} local handlers = {}

- Adjectives

local adj_like_poses = {"adjective", "pronoun", "determiner", "numeral", "suffix"} for _, pos in ipairs(adj_like_poses) do	local plpos = require("Module:string utilities").pluralize(pos) labels["hard " .. plpos] = { description = " hard-stem " .. plpos .. ".",		breadcrumb = "hard", parents = , }	labels["soft " .. plpos] = { description = " soft-stem " .. plpos .. ".",		breadcrumb = "soft", parents = , }	labels[plpos .. " with short forms"] = { description = " " .. plpos .. " with short-form inflections.", breadcrumb = "with short forms", parents = , } end

- Nouns/Pronouns/Numerals

--[=[ Noun declension specifications. The top-level key is the stem class, and the value is an object containing properties of the stem class. If the stem class contains the word 'GENDER' in it, it expands into labels both for a parent category that subsumes several genders (obtained by removing the word 'GENDER' and following whitespace) as well as gender-specific children categories (obtained by replacing the word 'GENDER' with the genders specified in the `possible_genders` field). The fields of the property object for a given stem class are as follows: "most commonly". This appears in the `additional` field of the label properties. It is not used in gender-specific children categories; instead the gender of that category is used. the stem class, and gender-specific variants of the stem class (with GENDER replaced by the possible genders) are handled along with a parent category subsuming all genders. appropriate language tag and italicized. value of `singular` is used. value of `plural` is used. stem has gender-specific variants, the breadcrumb specified here is used only for the parent category, while the gender-specific child categories use the gender as the breadcrumb. If not specified, it defaults to `sortkey`. If that is also not specified, or if the breadcrumb has the value "+", the stem class (without the word 'GENDER') is used. (Use "+" when a sortkey is specified but the stem class should be used as the breadcrumb.) "nouns"). Defaults to "POS by inflection type" where POS is the part of speech. Note that gender-specific child categories do not use this, but always have the gender-subsuming parent stem class category as their parent.  (without the word 'GENDER'). Note that gender-specific child categories do nto use this, but always use the gender  as the sort key. ]=] local noun_decls = {	["hard GENDER a-stem"] = {		gender = "~feminine",		possible_genders = {"masculine", "feminine"},		singular = "<-а>",		plural = "<-ꙑ>",		breadcrumb = "+",		sortkey = "a-stem",	},	["soft GENDER a-stem"] = {		gender = "~feminine",		possible_genders = {"masculine", "feminine"},		singular = "<-ꙗ> (or <-а> after an unpaired palatal consonant), or <-ꙑни>, or sometimes <-ии>/<-ьи>",		masculine_singular = "<-ꙗ> (or <-а> after an unpaired palatal consonant), or <-ии>/<-ьи>",		plural = "<-ѩ> (or <-ѧ> after an unpaired palatal consonant)", breadcrumb = "+", sortkey = "a-stem", },	["GENDER i-stem"] = { gender = "~feminine (sometimes masculine)", possible_genders = {"masculine", "feminine"}, singular = "<-ь>", plural = "<-и> (usually <-ьѥ> or <-иѥ> when masculine)", masculine_plural = "<-ьѥ> or <-иѥ>", feminine_plural = "<-и>", },	["GENDER ī-stem"] = { gender = "~feminine (masculine when referring to a person)", possible_genders = {"masculine", "feminine"}, singular = "<-ии> or <-ьи>", plural = "<-иѭ> or <-ьѩ>", parent = "soft a-stem", },	["hard GENDER o-stem"] = { gender = "masculine or neuter", possible_genders = {"masculine", "neuter"}, singular = "<-ъ> when masculine, <-о> when neuter", masculine_singular = "<-ъ>", neuter_singular = "<-о>", plural = "<-и> when masculine, <-а> when neuter", masculine_plural = "<-и>", neuter_plural = "<-а>", breadcrumb = "+", sortkey = "o-stem", },	["soft GENDER o-stem"] = { gender = "masculine or neuter", possible_genders = {"masculine", "neuter"}, singular = "<-ь> when masculine, <-ѥ> (or <-е> after an unpaired palatal consonant) when neuter", masculine_singular = "<-ь>", neuter_singular = "<-ѥ> (or <-е> after an unpaired palatal consonant)", plural = "<-и> when masculine, <-ꙗ> (or <-а> after an unpaired palatal consonant) when neuter", masculine_plural = "<-и>", neuter_plural = "<-ꙗ> (or <-а> after an unpaired palatal consonant)", breadcrumb = "+", sortkey = "o-stem", },	["u-stem"] = { gender = "~masculine", singular = "<-ъ>", plural = "<-ове>", },	["GENDER n-stem"] = { gender = "~masculine (nouns in <-мѧ> are neuter)", possible_genders = {"masculine", "neuter"}, singular = "<-ꙑ>, <-нь>, or <-мѧ>", masculine_singular = "<-ꙑ> or <-нь>", neuter_singular = "<-мѧ>", plural = "<-не> (or <-мена> if ending in <-мѧ)>", masculine_plural = "<-не>", neuter_plural = "<-мена>", parent = "consonant-stem", },	["nt-stem"] = { gender = "~neuter", singular = "<-ѧ>", plural = "<-ѧта>", parent = "consonant-stem", },	["r-stem"] = { gender = "~feminine", singular = "<-и>", plural = "<-ери>", parent = "consonant-stem", },	["s-stem"] = { gender = "~neuter", singular = "<-о> (<-е> after a palatal consonant)", plural = "<-еса>", parent = "consonant-stem", },	["v-stem"] = { gender = "~feminine", singular = "<-ꙑ>", plural = "<-ъви>", parent = "consonant-stem", }, }
 * `gender`: The description of the gender(s) of the stem class. If preceded by ~, the description is preceded by
 * `possible_genders`: The possible genders this class occurs in. If this is specified, the word 'GENDER' must occur in
 * `singular`: The nominative singular ending. Use <...> to enclose Old Church Slavonic text; it will be given the
 * `GENDER_singular`: The nominative singular ending for the GENDER variant of this stem class. If not specified, the
 * `plural`: The nominative plural ending.
 * `GENDER_singular`: The nominative plural ending for the GENDER variant of this stem class. If not specified, the
 * `breadcrumb`: The breadcrumb for the category, appearing in the trail of breadcrumbs at the top of the page. If this
 * `parent`: The parent category. If specified, the actual category label is formed by appending the part of speech (e.g.
 * `sortkey`: The sort key used for sorting this category among its parent's children. Defaults to the stem class

for _, pos in ipairs({"nouns"}) do	local sgpos = pos:gsub("s$", "") labels["consonant-stem " .. pos] = { description = " consonant-stem " .. pos .. ".",		additional = "This is not a single declension class, but a set of related declension classes, with endings that are" .. " largely identical outside of the nominative, accusative and vocative.", breadcrumb = "consonant-stem", parents = pos .. " by inflection type", }	local function mark_ending(ending) return (ending:gsub("<(.-)>", "")) end for full_decl, spec in pairs(noun_decls) do		local most_commonly, gender = spec.gender:match("^(~)(.*)$") gender = gender or spec.gender local subgenders = spec.possible_genders local decl if subgenders then if not full_decl:find("GENDER") then error(("Internal error: Declension spec '%s' needs to have the word 'GENDER' in it, in all caps"):format(full_decl)) end decl = full_decl:gsub("GENDER ", "") else decl = full_decl end local breadcrumb = spec.breadcrumb or spec.sortkey or "+" if breadcrumb == "+" then breadcrumb = decl end labels[decl .. " " .. pos] = { description = " " .. decl .. " " .. pos .. ".",			additional = ("These %s normally end in the singular in %s; in the plural in %s; and are %s%s."):format(				pos, mark_ending(spec.singular), mark_ending(spec.plural), most_commonly and "most commonly " or "",				mark_ending(gender)), breadcrumb = breadcrumb, parents = , }		if subgenders then for _, subgender in ipairs(subgenders) do				local gender_decl = full_decl:gsub("GENDER", subgender) labels[gender_decl .. " " .. pos] = { description = " " .. gender_decl .. " " .. pos .. ".",					additional = ("These %s normally end in the singular in %s; in the plural in %s; and are %s."):format(						pos, mark_ending(spec[subgender .. "_singular"] or spec.singular),						mark_ending(spec[subgender .. "_plural"] or spec.plural), subgender), breadcrumb = subgender, parents = , }			end end end end

return {LABELS = labels, HANDLERS = handlers}