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

Hello, you have come here looking for the meaning of the word Module:category tree/poscatboiler/data/lang-specific/cs. In DICTIOUS you will not only get to know all the dictionary meanings for the word Module:category tree/poscatboiler/data/lang-specific/cs, but we will also tell you about its etymology, its characteristics and you will know how to say Module:category tree/poscatboiler/data/lang-specific/cs in singular and plural. Everything you need to know about the word Module:category tree/poscatboiler/data/lang-specific/cs you have here. The definition of the word Module:category tree/poscatboiler/data/lang-specific/cs will help you to be more precise and correct when speaking or writing your texts. Knowing the definition ofModule:category tree/poscatboiler/data/lang-specific/cs, as well as those of other words, enriches your vocabulary and provides you with more and better linguistic resources.

This module handles generating the descriptions and categorization for Czech category pages of the format "Czech LABEL" where LABEL can be any text. Examples are Category:Bulgarian conjugation 2.1 verbs and Category:Russian velar-stem neuter-form nouns. This module is part of the poscatboiler system, which is a general framework for generating the descriptions and categorization of category pages.

For more information, see Module:category tree/poscatboiler/data/lang-specific/documentation.

NOTE: If you add a new language-specific module, you must add the language code to the list at the top of Module:category tree/poscatboiler/data/lang-specific in order for the module to be recognized.


local labels = {}
local handlers = {}

local rfind = mw.ustring.find
local rmatch = mw.ustring.match


--------------------------------- 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 = {
		description = "{{{langname}}} hard-stem " .. plpos .. ".",
		breadcrumb = "hard",
		parents = {{name = plpos .. " by inflection type", sort = "hard-stem"}},
	}
	labels = {
		description = "{{{langname}}} soft-stem " .. plpos .. ".",
		breadcrumb = "soft",
		parents = {{name = plpos .. " by inflection type", sort = "soft-stem"}},
	}
	labels = {
		description = "{{{langname}}} " .. plpos .. " with short-form inflections.",
		breadcrumb = "with short forms",
		parents = {{name = plpos .. " by inflection type", sort = "short forms"}},
	}
end


--------------------------------- Nouns/Pronouns/Numerals --------------------------------

local possible_genders = {"masculine animate", "masculine inanimate", "feminine", "neuter"}

for _, pos in ipairs({"nouns", "pronouns", "numerals"}) do
	local sgpos = pos:gsub("s$", "")
	
	local function make_label(label, description, props)
		local full_label
		if rfind(label, "POS") then
			full_label = label:gsub("POS", pos)
		else
			full_label = pos .. " " .. label
		end
		local full_description
		if rfind(description, "POS") then
			full_description = description:gsub("POS", pos)
		else
			full_description = pos .. " " .. description
		end
		full_description = "Czech " .. full_description
		props.description = full_description
		if not props.breadcrumb then
			props.breadcrumb = label:gsub(" *POS *", " ")
			props.breadcrumb = mw.text.trim(props.breadcrumb)
		end
		labels = props
	end

	make_label("adjectival POS",
		"with adjectival endings.",
		{parents = {pos}}
	)

	make_label("by stem type and gender",
		"categorized by stem type and gender.",
		{parents = {name = pos .. " by inflection type", sort = "stem type and gender"}}
	)

	make_label("that change gender in the plural",
		"with a different gender in the singular vs. the plural, as determined by adjective concord.",
		{
			breadcrumb = "changing gender in the plural",
			parents = {
				{name = pos .. " by stem type and gender", sort = "changing gender in the plural"},
				{name = "irregular " .. pos, sort = "changing gender in the plural"},
			},
		}
	)

	make_label("adjectival POS by stem type and gender",
		"adjectival POS categorized by stem type and gender.",
		{
			parents = {
				{name = pos .. " by inflection type", sort = "stem type and gender"},
				{name = "adjectival " .. pos, sort = "stem type and gender"},
			}
		}
	)

	for _, gender in ipairs(possible_genders) do
		make_label(gender .. " POS by stem type",
			("%s POS categorized by stem type."):format(gender),
			{
				breadcrumb = gender,
				parents = {pos .. " by stem type and gender"},
			}
		)
		make_label(gender .. " adjectival POS by stem type",
			("%s adjectival POS categorized by stem type."):format(gender),
			{
				breadcrumb = gender,
				parents = {"adjectival " .. pos .. " by stem type and gender"},
			}
		)
		make_label("indeclinable " .. gender .. " POS",
			("indeclinable %s POS. Currently only POS with multiple declensions including at least one that is "
				.. "declinable are included."):format(gender),
			{
				breadcrumb = gender,
				parents = {"indeclinable " .. pos},
			}
		)
		make_label("mostly indeclinable " .. gender .. " POS",
			("mostly indeclinable %s POS, i.e. indeclinable in all but a few case/number combinations."
				):format(gender),
			{
				breadcrumb = "mostly indeclinable",
				parents = {"indeclinable " .. gender .. " " .. pos},
			}
		)
	end

	make_label("with quantitative vowel alternation",
		"with stem alternation between a long vowel (''á'', ''é'', ''í'', ''ou'' or ''ů'') and the corresponding " ..
		"short vowel (''a'', ''e'', ''i'', ''o'' or ''u''), depending on the form.",
		{
			additional = ("See also ]."):format(pos),
			parents = {name = pos, sort = "quantitative vowel alternation"},
		}
	)

	make_label("with í-ě alternation",
		"with stem alternation between ''í'' and ''ě'', depending on the form.",
		{
			additional = ("See also ]."):format(pos),
			parents = {name = pos, sort = "í-ě alternation"},
		}
	)

	make_label("with reducible stem",
		"with a reducible stem, where an extra vowel is inserted " ..
			"before the last stem consonant in the nominative singular and/or genitive plural.",
		{parents = {name = pos .. " by inflection type", sort = "reducible stem"}}
	)

	make_label("with multiple stems",
		"with multiple stems.",
		{parents = {name = pos .. " by inflection type", sort = "multiple stems"}}
	)

	make_label("masculine animate POS",
		"masculine animate POS, i.e. POS referring (mostly) to male beings or animals.",
		{
			breadcrumb = "animate",
			parents = {{name = "masculine " .. pos, sort = "animate"}},
		}
	)

	make_label("masculine inanimate POS",
		"masculine inanimate POS, i.e. POS referring to inanimate objects that have masculine agreement patterns.",
		{
			breadcrumb = "inanimate",
			parents = {{name = "masculine " .. pos, sort = "inanimate"}},
		}
	)

	make_label("with regular foreign declension",
		"with a foreign ending such as ''-us'', ''-os'', ''-es'', ''-um'', ''-on'' or silent ''-e'', which is dropped in " ..
		"all cases except the nominative singular and maybe the accusative singular and vocative singular.",
		{parents = {name = pos .. " by inflection type", sort = "regular foreign declension"}}
	)

	make_label("with irregular stem",
		"with an irregular stem, which occurs in all cases except the nominative singular and maybe the accusative "
		.. "singular and vocative singular.",
		{parents = {name = "irregular " .. pos, sort = "stem"}}
	)
end

local noun_stem_gender_endings = {
     = {
		              = {"a paired hard or unpaired consonant", "''-a''", "''-i'', ''-ové'' or ''-é''"},
		        = {"a velar", "''-a''", "''-i'', ''-ové'' or ''-é''"},
		          = {"''-ius'' or ''-eus''", "''-ia''", "''-іové''"},
		              = {"a paired soft or unpaired consonant", "''-e''/''-ě''", "''-i'' or ''-ové''"},
		             = {"''-l'', ''-n'' or ''-t''", "''-a'' or ''-e''/''-ě''", "''-i'' or ''-ové''"},
		                = {"''-a''", "''-y'' (''-i'' after a soft consonant)", "''-é'' or ''-ové''"},
		                = {"''-e''", "''-e''", "''-i'' or ''-ové''"},
		               = {"''-ee''", "''-eeho''", "''-eeové''"},
		             = {"''-i''/''-y''", "''-iho''/''-yho''", "''-iové''/''-yové'' or ''-i''/''-y''"},
		             = {"''-i''/''-y''", "''-ího''/''-ýho''", "''-íové''/''-ýové'' or ''-í''/''-ý''"},
		               = {"''-ie''", "''-ieho''", "''-iové'' or ''-ies''"},
		                = {"''-o''", "''-a''", "''-ové''"},
		                = {"''-u''", "''-ua''", "''-uové''"},
		            = {"''-e''/''-ě''", "''-ete''/''-ěte''", "''-ata''"},
	},
     = {
		              = {"a paired hard or unpaired consonant", "''-u'' or occasionally ''-a''", "''-y''"},
		        = {"a velar", "''-u'' or occasionally ''-a''", "''-y''"},
		          = {"''-ius''", "''-a''", "''-e''"},
		              = {"a paired soft or unpaired consonant", "''-e''", "''-e''"},
		             = {"''-l'', ''-n'' or ''-t''", "''-u'' or ''-e''", "''-e'' or ''-y''"},
		                = {"''-e''", "''-e''", "''-e''"},
		                = {"''-o''", "''-a''", "''-ové''"},
	},
    feminine = {
		              = {"''-a''", "''-y'' (''-i'' after a soft consonant)", "''-y'' (''-i'' after a soft consonant)"},
		              = {"''-e''/''-ě''", "''-e''/''-ě''", "''-e''/''-ě''"},
		             = {"''-a''", "''i'' or ''-e''/''-ě''", "''i'' or ''-e''/''-ě''"},
		  = {"a paired soft or unpaired consonant", "''-e''/''-ě''", "''-e''/''-ě''"},
		            = {"a paired soft or unpaired consonant", "''-i''", "''-i''"},
		      = {"a paired soft or unpaired consonant", "''-i'' or sometimes ''-e''/''-ě''", "''-i'' or sometimes ''-e''/''-ě''"},
		               = {"''-ea''", "''-ey'' or (if non-technical) ''-eje''",  "''-ey'' or (if non-technical) ''-eje''"},
		      = {"''-ea''", "''-ey''",  "''-ey''"},
		                = {"''-i''", "''-i'' or ''eře'' (archaic)", "nonexistent"},
		               = {"''-ia''", "''-ie''",  "''-ie''"},
		           = {"''-oa''/''-ua''", "''-oy''/''-uy''",  "''-oy''/''-uy''"},
	},
    neuter = {
		              = {"''-o''", "''-a''", "''-a''"},
		        = {"a velar + ''-o''", "''-a''", "''-a''"},
		          = {"''-io''/''-ium'', ''-eo''/''-eum'' or ''-ion''", "''-ia'' or ''-ea''",  "''-ia'' or ''-ea''"},
		              = {"''-e''/''-ě''", "''-e''/''-ě''", "''-e''/''-ě''"},
		             = {"''-í''/''-ý''", "''-í''/''-ý''", "''-í''/''-ý''"},
		            = {"''-eno'' or ''-ě''", "''-ena'' or ''-ene''", "''-ena''"},
		            = {"''-e''/''-ě''", "''-ete''/''-ěte''", "''-ata''"},
		           = {"''-ma''", "''-matu''", "''-mata''"},
	},
}

local adj_noun_stem_gender_endings = {
     = {
		              = {"''-ý''", "''-ého''", "''-í''"},
		              = {"''-í''", "''-ího''", "''-í''"},
		     = {"''-ův''", "''-ova''", "''-ovi''"},
		     = {"''-in''", "''-ina''", "''-ini''"},
	},
     = {
		              = {"''-ý''", "''-ého''", "''-é''"},
		              = {"''-í''", "''-ího''", "''-í''"},
		     = {"''-ův''", "''-ova''", "''-ovy''"},
		     = {"''-in''", "''-ina''", "''-iny''"},
	},
    feminine = {
		              = {"''-á''", "''-é''", "''-é''"},
		              = {"''-í''", "''-í''", "''-í''"},
		    = {"''-ova''", "''-ovy''", "''-ovy''"},
		    = {"''-ina''", "''-iny''", "''-iny''"},
	},
    neuter = {
		              = {"''-é''", "''-ého''", "''-á''"},
		              = {"''-í''", "''-ího''", "''-í''"},
		    = {"''-ovo''", "''-ova''", "''-ova''"},
		    = {"''-ino''", "''-ina''", "''-ina''"},
	},
}

table.insert(handlers, function(data)
	for _, gender in ipairs(possible_genders) do
		local in_ending = "in (%-+)"
		local breadcrumb
		-- check for e.g. 'Czech possessive feminine adjectival nouns in -ova'
		local stemtype, pos, ending = rmatch(data.label, "^(.-) " .. gender .. " adjectival (.*)s " .. in_ending .. "$")
		if stemtype then
			stemtype = stemtype .. ending
			breadcrumb = stemtype .. " in " .. ending
		end
		if not stemtype then
			-- check for e.g. 'Czech hard masculine animate adjectival nouns'
			stemtype, pos = rmatch(data.label, "^(.-) " .. gender .. " adjectival (.*)s$")
			breadcrumb = stemtype
		end
		if stemtype then
			if adj_noun_stem_gender_endings then
				local endings = adj_noun_stem_gender_endings
				if endings then
					local nom_s, gen_s, nom_p = unpack(endings)
					local additional =
						("This type declines like an adjective. It normally ends in %s in the nominative singular; %s in the genitive singular; and %s in the nominative plural."):
						format(nom_s, gen_s, nom_p)
					return {
						description = "Czech " .. data.label .. ".",
						additional = additional,
						breadcrumb = breadcrumb,
						parents = {
							{name = gender .. " adjectival " .. pos .. "s by stem type", sort = stemtype:gsub("%-", "")}
						},
					}
				end
			end
		end
	end

	local pos, mixed_istem_type = rmatch(data.label, "^mixed i%-stem feminine (.*)s %(type '(.*)'%)$")
	if mixed_istem_type then
		return {
			description = "Czech mixed i-stem feminine " .. pos .. "s, declined like {{m|cs|" .. mixed_istem_type .. "}}.",
			additional = "These nouns have a mixture of soft-stem and i-stem endings in the genitive singular, " ..
				"nominative/accusative/vocative plural, dative plural, instrumental plural and locative plural. The particular endings used depend on the subtype.",
			breadcrumb = mixed_istem_type,
			parents = {
				{name = "mixed i-stem feminine " .. pos .. "s", sort = mixed_istem_type}
			},
		}
	end
		
	for _, gender in ipairs(possible_genders) do
		local in_ending = "in (%-+)"
		local breadcrumb
		-- check for e.g. 'Czech technical feminine nouns in -ea'
		local stemtype, pos, ending = rmatch(data.label, "^(.-) " .. gender .. " (.*)s " .. in_ending .. "$")
		if stemtype then
			stemtype = stemtype .. ending
			breadcrumb = stemtype .. " in " .. ending
		end
		if not stemtype then
			-- check for e.g. 'Czech masculine animate nouns in -u' or 'Czech feminine nouns in -oa/-ua'
			pos, ending = rmatch(data.label, "^" .. gender .. " (.*)s " .. in_ending .. "$")
			if pos then
				stemtype = ending
				breadcrumb = " in " .. ending
			end
		end
		if not stemtype then
			-- check for e.g. 'Czech soft masculine animate nouns' or 'Czech soft zero-ending feminine nouns'
			stemtype, pos = rmatch(data.label, "^(.-) " .. gender .. " (.*)s$")
			breadcrumb = stemtype
		end
		if stemtype then
			if noun_stem_gender_endings then
				local endings = noun_stem_gender_endings
				if endings then
					local nom_s, gen_s, nom_p = unpack(endings)
					local additional =
						("This type normally ends in %s in the nominative singular; %s in the genitive singular; and %s in the nominative plural."):
						format(nom_s, gen_s, nom_p)
					return {
						description = "Czech " .. data.label .. ".",
						additional = additional,
						breadcrumb = breadcrumb,
						parents = {
							{name = gender .. " " .. pos .. "s by stem type", sort = stemtype:gsub("%-", "")}
						},
					}
				end
			end
		end
	end
end)

return {LABELS = labels, HANDLERS = handlers}