ဝိက်ရှေန်နရဳ mnwwiktionary https://mnw.wiktionary.org/wiki/%E1%80%9D%E1%80%AD%E1%80%80%E1%80%BA%E1%80%9B%E1%80%BE%E1%80%B1%E1%80%94%E1%80%BA%E1%80%94%E1%80%9B%E1%80%B3:%E1%80%99%E1%80%AF%E1%80%80%E1%80%BA%E1%80%9C%E1%80%AD%E1%80%80%E1%80%BA%E1%80%90%E1%80%99%E1%80%BA MediaWiki 1.47.0-wmf.15 case-sensitive မဳဒဳယာ တၟေင် ဓရီုကျာ ညးလွပ် ညးလွပ် ဓရီုကျာ ဝိက်ရှေန်နရဳ ဝိက်ရှေန်နရဳ ဓရီုကျာ ဝှာင် ဝှာင် ဓရီုကျာ မဳဒဳယာဝဳကဳ မဳဒဳယာဝဳကဳ ဓရီုကျာ ထာမ်ပလိက် ထာမ်ပလိက် ဓရီုကျာ ရီု ရီု ဓရီုကျာ ကဏ္ဍ ကဏ္ဍ ဓရီုကျာ အဆက်လက္ကရဴ အဆက်လက္ကရဴ ဓရီုကျာ ကာရန် ကာရန် ဓရီုကျာ အဘိဓာန် အဘိဓာန် ဓရီုကျာ ဗီုပြၚ်သိုၚ်တၟိ ဗီုပြၚ်သိုၚ်တၟိ ဓရီုကျာ TimedText TimedText talk မဝ်ဂျူ မဝ်ဂျူ ဓရီုကျာ Event Event talk ထာမ်ပလိက်:documentation 10 95 401141 395914 2026-08-13T18:04:16Z 咽頭べさ 33 咽頭べさ ပြံင်ပဆုဲလဝ် မုက်လိက် [[ထာမ်ပလိက်:Documentation]] ဇရေင် [[ထာမ်ပလိက်:documentation]] နကု မကလေင်ပညုင် 154873 wikitext text/x-wiki {{#invoke:documentation|show|hr=above}} j0s13scsii7qihzcaj44tsxynimxx68 မဝ်ဂျူ:cs-sk-headword 828 24346 401123 401114 2026-08-13T16:48:40Z 咽頭べさ 33 401123 Scribunto text/plain local export = {} local pos_functions = {} local force_cat = false -- for testing; if true, categories appear in non-mainspace pages local rfind = mw.ustring.find local require_when_needed = require("Module:require when needed") local m_table = require("Module:table") local en_utilities_module = "Module:en-utilities" local headword_utilities_module = "Module:headword utilities" local m_headword_utilities = require_when_needed(headword_utilities_module) local m_string_utilities = require_when_needed("Module:string utilities") local glossary_link = require_when_needed(headword_utilities_module, "glossary_link") local insert = table.insert local list_param = {list = true, disallow_holes = true} -- Table of all valid genders by language, mapping user-specified gender specs to canonicalized versions. local valid_gender_specs = {} local valid_genders_with_animacy = {"mfbysense", "mf", "m"} local valid_genders_without_animacy = {"f", "n", "?"} local valid_two_way_animacies = {"an", "in"} local valid_three_way_animacies = {"pr", "anml", "in"} local valid_number_suffixes = {"", "-p"} for _, lang in ipairs { "cs", "sk", "zlw-ocs", "zlw-osk" } do valid_gender_specs[lang] = {} local dest = valid_gender_specs[lang] -- The following is correct; Old Czech has three-way animacy. local animacy_src = lang == "cs" and valid_two_way_animacies or valid_three_way_animacies for _, gender in ipairs(valid_genders_without_animacy) do for _, number in ipairs(valid_number_suffixes) do local spec = gender .. number dest[spec] = spec end end for _, gender in ipairs(valid_genders_with_animacy) do for _, number in ipairs(valid_number_suffixes) do for _, animacy in ipairs(animacy_src) do local spec = gender .. "-" .. animacy .. number dest[spec] = spec end end end end -- Table of all valid aspects. local valid_aspects = m_table.listToSet { "impf", "pf", "both", "biasp", "?", } local allowed_sk_decl_patterns = m_table.listToSet { "chlap", "dievča", "dub", "gazdiná", "hrdina", "kosť", "mesto", "srdce", "stroj", "ulica", "vysvedčenie", "žena", -- In use but not in the Appendix "dlaň", "idea", "kuli", "pani", } local function track(track_id) require("Module:debug/track")("cs-sk-headword/" .. track_id) return true end local function replace_hash_with_lemma(term, lemma) -- If there is a % sign in the lemma, we have to replace it with %% so it doesn't get interpreted as a capture -- replace expression. lemma = m_string_utilities.replacement_escape(lemma) return (term:gsub("#", lemma)) -- discard second retval end local function frob_term_with_hash(term, lemma) if term:find("#") then term = replace_hash_with_lemma(term, lemma) end return term end -- Parse and insert an inflection not requiring additional processing into `data.inflections`. The raw arguments come -- from `args[field]`, which is parsed for inline modifiers. `label` is the label that the inflections are given; -- sections enclosed in <<...>> are linked to the glossary. `accel` is the accelerator form, or nil. local function parse_and_insert_inflection(data, args, field, label, accel, frob) m_headword_utilities.parse_and_insert_inflection { headdata = data, forms = args[field], paramname = field, splitchar = ",", label = label, accel = accel and {form = accel} or nil, frob = function(term) term = frob_term_with_hash(term, data.pagename) if frob then term = frob(term) end return term end, } end -- Parse and return an inflection not requiring additional processing. The raw arguments come from `args[field]`, which -- is parsed for inline modifiers. local function parse_inflection(data, paramname, forms) return m_headword_utilities.parse_term_list_with_modifiers { paramname = paramname, forms = forms, splitchar = ",", frob = function(term) return frob_term_with_hash(term, data.pagename) end, } end -- Insert the parsed inflections in `terms` (as parsed by `parse_inflection`) into `data.inflections`, with label -- `label` and optional accelerator spec `accel`. local function insert_inflection(data, terms, label, accel, no_label) m_headword_utilities.insert_inflection { headdata = data, terms = terms, label = label, no_label = no_label, accel = accel and {form = accel} or nil, } end -- The main entry point. -- This is the only function that can be invoked from a template. function export.show(frame) local iparams = { [1] = {required = true}, ["lang"] = {required = true}, ["def"] = {}, } local iargs = require("Module:parameters").process(frame.args, iparams) local args = frame:getParent().args local poscat = iargs[1] local langcode = iargs.lang if langcode ~= "cs" and langcode ~= "sk" and langcode ~= "zlw-ocs" and langcode ~= "zlw-osk" then error("This module currently only works for lang=cs, lang=sk, lang=zlw-ocs and lang=zlw-osk") end local lang = require("Module:languages").getByCode(langcode, true) local langname = lang:getCanonicalName() local def = iargs.def local parargs = frame:getParent().args local params = { ["head"] = list_param, ["id"] = {}, ["sort"] = {}, ["nolinkhead"] = {type = "boolean"}, ["json"] = {type = "boolean"}, ["pagename"] = {}, -- for testing } if pos_functions[poscat] then local posparams = pos_functions[poscat].params if type(posparams) == "function" then posparams = posparams(lang) end for key, val in pairs(posparams) do params[key] = val end end local args = require("Module:parameters").process(parargs, params) local pagename = args.pagename or mw.loadData("Module:headword/data").pagename local data = { lang = lang, langname = langname, pos_category = poscat, categories = {}, heads = args.head, genders = {}, inflections = {}, pagename = pagename, id = args.id, sort_key = args.sort, force_cat_output = force_cat, def = def, is_suffix = false, } if pagename:find("^%-") and poscat ~= "ဗီုပြၚ်အဆက်လက္ကရဴ" then data.is_suffix = true data.pos_category = "အဆက်လက္ကရဴ" -- local singular_poscat = require(en_utilities_module).singularize(poscat) -- insert(data.categories, langname .. " " .. singular_poscat .. "-forming suffixes") -- insert(data.inflections, {label = singular_poscat .. "-forming suffix"}) end if pos_functions[poscat] then pos_functions[poscat].func(args, data) end -- mw.ustring.toNFD performs decomposition, so letters that decompose -- to an ASCII vowel and a diacritic, such as é, are counted as vowels and -- do not need to be included in the pattern. if not pagename:find("[ %-]") and not rfind(mw.ustring.lower(mw.ustring.toNFD(pagename)), "[aeiouyæœø]") then -- insert(data.categories, langname .. " words spelled without vowels") end if args.json then return require("Module:JSON").toJSON(data) end return require("Module:headword").full_headword(data) end local function get_noun_params(is_proper) return function(lang) params = { [1] = {type = "genders", required = true, template_default = "?"}, ["g"] = {list = true, disallow_holes = true, replaced_by = false, instead = "use multiple comma-separated genders in |1="}, ["g_qual"] = {list = "g\1_qual", allow_holes = true, replaced_by = false, instead = "use inline modifiers on the gender(s) in |1="}, ["indecl"] = {type = "boolean"}, ["m"] = list_param, ["f"] = list_param, ["adj"] = list_param, ["pos"] = list_param, ["dim"] = list_param, ["aug"] = list_param, ["pej"] = list_param, ["dem"] = list_param, ["fdem"] = list_param, ["gen"] = list_param, ["pl"] = list_param, ["genpl"] = list_param, } if lang:getCode() == "sk" then params["decl"] = list_param end return params end end local function do_nouns(is_proper, args, data) -- Validate and canonicalize genders. local specs = valid_gender_specs[data.lang:getCode()] for _, gspec in ipairs(args[1]) do local g = gspec.spec local canon_g = specs[g] if canon_g then g = canon_g elseif g == "m" or g == "m-p" or g == "mf" or g == "mf-p" or g == "mfbysense" or g == "mfbysense-p" then error("Invalid gender: '" .. g .. "'; must specify animacy along with masculine gender") elseif data.lang:getCode() == "sk" and g:find("%-an") then error("Invalid gender: '" .. g .. "'; instead of m-an, use m-pr for people and m-anml for animals") else error("Unrecognized gender: '" .. g .. "'") end track("gender-" .. g) gspec.spec = g insert(data.genders, gspec) end if args.indecl then insert(data.inflections, {label = glossary_link("ပါ်ပါဲထောံဟွံမာန်")}) insert(data.categories, "နာမ်" .. data.langname .. "ပါ်ပါဲထောံဟွံဂွံဂမၠိုၚ်") end local decls if data.lang:getCode() == "sk" then -- Validate declension patterns and converto to Appendix links decls = parse_inflection(data, "decl", args.decl) for _, declobj in ipairs(decls) do local decl = declobj.term if not allowed_sk_decl_patterns[decl] then error("Unrecognized " .. data.langname .. " declension pattern: " .. decl) end declobj.term = ("[[အဆက်လက္ကရဴ:ဝေါဟာ%sမချူသ္ၜိုန်လဝ်ပရေၚ်လဟုတ်စှ်ေနကဵုဝေါဟာ %s|%s]]"):format(data.langname, decl, decl) end end -- Parse and insert an inflection not requiring additional processing into `data.inflections`. The raw arguments -- come from `args[field]`, which is parsed for inline modifiers. `label` is the label that the inflections are -- given, which is linked to the glossary if preceded by * (which is removed). local function handle_infl(field, label) parse_and_insert_inflection(data, args, field, label) end handle_infl("gen", "<<ဗဳဇဂကူကိုန်ဨကဝုစ်>>") handle_infl("pl", "<<မဒုၚ်ယၟုကိုန်ဗဟုဝစ်>>") handle_infl("genpl", "<<ဗဳဇဂကူကိုန်ဗဟုဝစ်>>") if decls and decls[1] then decls.label = "မချူသ္ၜိုန်လဝ်ပရေၚ်လဟုတ်စှ်ေဆေၚ်စပ်ကဵု " insert(data.inflections, decls) end handle_infl("m", "မညဳညတ်သၟတ်တးကဵုလိၚ်တြုံ") handle_infl("f", "မညဳညတ်သၟတ်တးကဵုလိၚ်ဗြဴ") handle_infl("adj", "<<relational adjective|နာမဝိသေသနဒၞာဲမဆက်စပ်>>") handle_infl("pos", "<<possessive adjective|နာမဝိသေသနဓမံက်ထ္ၜးမဒှ်တၠဒြပ်>>") handle_infl("dim", "<<လဟုတ်စှ်ေ>>") handle_infl("aug", "<<ပရေၚ်မဗပေၚ်တိုန်>>") handle_infl("pej", "<<စမ်ၜတ်ရံၚ်>>") handle_infl("dem", "<<အပၠေံရုပ်ရာ>>") handle_infl("fdem", "<<အပၠေံရုပ်ရာ>>ဣတ္တိလိၚ်") end pos_functions["နာမ်"] = { params = get_noun_params(false), func = function(args, data) return do_nouns(false, args, data) end, } pos_functions["နာမ်မကိတ်ညဳ"] = { params = get_noun_params("နာမ်မကိတ်ညဳ"), func = function(args, data) return do_nouns("နာမ်မကိတ်ညဳ", args, data) end, } pos_functions["ကြိယာ"] = { params = { ["a"] = {default = "?"}, ["pf"] = list_param, ["impf"] = list_param, }, func = function(args, data) if not valid_aspects[args.a] then error("Unrecognized aspect: '" .. args.a .. "'") end data.genders = args.a == "both" and {"biasp"} or {args.a} parse_and_insert_inflection(data, args, "pf", "ဗီုပြၚ်မက္ဍိုက်ပေၚ်") parse_and_insert_inflection(data, args, "impf", "မက္ဍိုက်ပေၚ်") end, } local function do_comparative_superlative(args, data, plpos) if args[1][1] then local comps = parse_inflection(data, {1, "comp"}, args[1]) if comps[1] and comps[1].term == "-" then if comps[2] then error("Can't specify comparatives along with '-' indicating an uncomparable adjective or adverb") end m_headword_utilities.insert_fixed_inflection { headdata = data, label = "<<ပတဝ်ပတုပ်ရံၚ်>>ဟွံမာန်", originating_term = comps[1], } insert(data.categories, plpos .. data.langname .. "မဂၠာဲပတုပ်ရံၚ်ဟွံမာန်ဂမၠိုၚ်") else local sups = parse_inflection(data, {2, "sup"}, args[2]) if not sups[1] then for _, comp in ipairs(comps) do local sup = m_table.shallowCopy(comp) -- Old Czech has naj-. sup.term = (data.lang:getCode() == "cs" and "nej" or "naj") .. sup.term insert(sups, sup) end end insert_inflection(data, comps, "<<ပတဝ်ပတုပ်ရံၚ်>>", "comparative") insert_inflection(data, sups, "<<သဒ္ဒာ>>", "superlative") insert(data.categories, plpos .. data.langname .. "ပွမပတဝ်ပတုပ်ရံၚ်ဂမၠိုၚ်") end end end pos_functions["နာမဝိသေသန"] = { params = function(lang) local params = { [1] = {list = "comp", disallow_holes = true}, [2] = {list = "sup", disallow_holes = true}, ["adv"] = list_param, ["indecl"] = {type = "boolean"}, } if lang:getCode() == "zlw-ocs" then params.short = list_param params.shortcomp = list_param params.shortsup = list_param end return params end, func = function(args, data) if args.indecl then insert(data.inflections, {label = glossary_link("ပါ်ပါဲထောံဟွံမာန်")}) insert(data.categories, "နာမဝိသေသန" .. data.langname .. "မပါ်ပါဲထောံဟွံဂွံဂမၠိုၚ်") end parse_and_insert_inflection(data, args, "short", "ဗီုပြၚ်ဓမၠေံ") do_comparative_superlative(args, data, "နာမဝိသေသန") if data.lang:getCode() == "zlw-ocs" then local shortcomps = parse_inflection(data, "shortcomp", args.shortcomp) local shortsups = parse_inflection(data, "shortsup", args.shortsup) if shortcomps[1] and not shortsups[1] then for _, shortcomp in ipairs(shortcomps) do local shortsup = m_table.shallowCopy(shortcomp) -- Old Czech has naj-. shortsup.term = "naj" .. shortsup.term insert(shortsups, shortsup) end end insert_inflection(data, shortcomps, "<<ပတဝ်ပတုပ်ရံၚ်>>ဓမၠေံ") insert_inflection(data, shortsups, "<<သဒ္ဒာ>>ဓမၠေံ") end parse_and_insert_inflection(data, args, "adv", "ကြိယာဝိသေသန") end, } pos_functions["ကြိယာဝိသေသန"] = { params = { [1] = {list = "တုဲဒှ်", disallow_holes = true}, [2] = {list = "ညိည", disallow_holes = true}, }, func = function(args, data) do_comparative_superlative(args, data, "ကြိယာဝိသေသန") end, } return export t1dykbmvpxkh62hcesygj1xz7m0co56 မဝ်ဂျူ:pt-headword 828 25859 401192 397382 2026-08-14T08:38:30Z 咽頭べさ 33 401192 Scribunto text/plain -- This module contains code for Portuguese headword templates. -- Templates covered are: -- * {{pt-noun}}, {{pt-proper noun}}; -- * {{pt-verb}}; -- * {{pt-adj}}, {{pt-adj-comp}}, {{pt-adj-sup}}; -- * {{pt-det}}; -- * {{pt-pron-adj}}; -- * {{pt-contr-adj}}; -- * {{pt-pp}}; -- * {{pt-cardinal}}; -- * {{pt-adv}}. -- See [[Module:pt-verb]] for Portuguese conjugation templates. local export = {} local pos_functions = {} local force_cat = false -- for testing; if true, categories appear in non-mainspace pages local m_strutils = require("Module:string utilities") local require_when_needed = require("Module:require when needed") local m_table = require("Module:table") local com = require("Module:pt-common") local en_utilities_module = "Module:en-utilities" local headword_utilities_module = "Module:headword utilities" local inflection_utilities_module = "Module:inflection utilities" local romut_module = "Module:romance utilities" local pt_verb_module = "Module:pt-verb" local lang = require("Module:languages").getByCode("pt") local langname = lang:getCanonicalName() local m_en_utilities = require_when_needed(en_utilities_module) local m_headword_utilities = require_when_needed(headword_utilities_module) local glossary_link = require_when_needed(headword_utilities_module, "glossary_link") local insert = table.insert local rfind = m_strutils.find local rmatch = m_strutils.match local ulower = m_strutils.lower local usub = m_strutils.sub local uupper = m_strutils.upper -- When followed by a hyphen in a hyphenated compound, the hyphen will be included with the prefix when linked. local include_hyphen_prefixes = m_table.listToSet { "ab", "afro", "anarco", "anglo", "ântero", "anti", "auto", "contra", "ex", "franco", "hiper", "infra", "inter", "intra", "macro", "micro", "neo", "pan", "pós", "pré", "pró", "proto", "sobre", "sub", "super", "vice", } ----------------------------------------------------------------------------------------- -- Utility functions -- ----------------------------------------------------------------------------------------- local function track(page) require("Module:debug/track")("pt-headword/" .. page) return true end local list_param = {list = true, disallow_holes = true} local boolean_param = {type = "boolean"} local metaphonic_label = "[[:en:Appendix:Portuguese pronunciation#Metaphony|မေတ်တာဖဝ်နေတ်]]" local function make_plural(sg, special) local pl = com.make_plural(sg, special) if not pl then error(("Internal error: Unable to generate default plural of '%s'"):format(sg)) end return pl end -- Parse and insert an inflection not requiring additional processing into `data.inflections`. The raw arguments come -- from `args[field]`, which is parsed for inline modifiers. `label` is the label that the inflections are given; -- `plpos` is the plural part of speech, used in [[Category:LANGNAME PLPOS with red links in their headword lines]]. -- `accel` is the accelerator form, or nil. local function parse_and_insert_inflection(data, args, field, label, accel, frob) m_headword_utilities.parse_and_insert_inflection { headdata = data, forms = args[field], paramname = field, splitchar = ",", include_mods = {"g"}, label = label, accel = accel and {form = accel} or nil, frob = frob, } end -- The main entry point. -- This is the only function that can be invoked from a template. function export.show(frame) local poscat = frame.args[1] or error("Part of speech has not been specified. Please pass parameter 1 to the module invocation.") local parargs = frame:getParent().args local params = { ["head"] = list_param, ["id"] = true, ["json"] = boolean_param, ["splithyph"] = boolean_param, ["nolinkhead"] = boolean_param, ["nolink"] = {type = "boolean", alias_of = "nolinkhead"}, ["abbr"] = list_param, ["pagename"] = true, -- for testing } if pos_functions[poscat] then for key, val in pairs(pos_functions[poscat].params) do params[key] = val end end local args = require("Module:parameters").process(parargs, params) local pagename = args.pagename or mw.loadData("Module:headword/data").pagename local user_specified_heads = args.head local heads = user_specified_heads if args.nolinkhead then if #heads == 0 then heads = {pagename} end else local romut = require(romut_module) local auto_linked_head = romut.add_links_to_multiword_term(pagename, args.splithyph, nil, include_hyphen_prefixes) if #heads == 0 then heads = {auto_linked_head} else for i, head in ipairs(heads) do if head:find("^~") then head = romut.apply_link_modifiers(auto_linked_head, usub(head, 2)) heads[i] = head end end end end local data = { lang = lang, pos_category = pos_functions[poscat] and pos_functions[poscat].pos_category or poscat, categories = {}, heads = heads, user_specified_heads = user_specified_heads, no_redundant_head_cat = #user_specified_heads == 0, genders = {}, inflections = {}, pagename = pagename, id = args.id, force_cat_output = force_cat, checkredlinks = pos_functions[poscat] and pos_functions[poscat].redlink_pos or true, } if pagename:find("^%-") and poscat ~= "ဗီုပြၚ်အဆက်လက္ကရဴ" then data.is_suffix = true data.pos_category = "အဆက်လက္ကရဴ" data.checkredlinks = true -- local singular_poscat = m_en_utilities.singularize(poscat) -- insert(data.categories, langname .. " " .. singular_poscat .. "-forming suffixes") -- insert(data.inflections, {label = singular_poscat .. "-forming suffix"}) end local pagename_lower = ulower(pagename) for _, ch in ipairs{"gü", "jh", "kh", "ph", "qü", "sh", "th", "tl", "ts", "tz", "wh", "zh"} do if pagename_lower:find(ch) then -- insert(data.categories, langname .. " terms spelled with " .. uupper(ch)) end end if pos_functions[poscat] then pos_functions[poscat].func(args, data) end parse_and_insert_inflection(data, args, "abbr", "နဲကဲပွမဒမၠေံ") if args.json then return require("Module:JSON").toJSON(data) end return require("Module:headword").full_headword(data) end local function replace_hash_with_lemma(term, lemma) -- If there is a % sign in the lemma, we have to replace it with %% so it doesn't get interpreted as a capture replace -- expression. lemma = lemma:gsub("%%", "%%%%") return (term:gsub("#", lemma)) end local function is_metaphonic(args, lemma) if args.nometa then return false end if args.meta then return true end -- Anything in -oso with a preceding vowel (e.g. [[gostoso]], [[curioso]]) is normally metaphonic. return rfind(lemma, com.V .. ".*oso$") end ----------------------------------------------------------------------------------------- -- Nouns -- ----------------------------------------------------------------------------------------- local allowed_genders = m_table.listToSet( {"m", "f", "mf", "mfbysense", "mfequiv", "gneut", "n", "m-p", "f-p", "mf-p", "mfbysense-p", "mfequiv-p", "gneut-p", "n-p", "?", "?-p"} ) local function validate_genders(genders) for _, g in ipairs(genders) do if type(g) == "table" then g = g.spec end if not allowed_genders[g] then error("Unrecognized gender: " .. g) end end end local function do_noun(args, data, is_proper) local is_plurale_tantum = false local has_singular = false local category_plpos = data.checkredlinks if category_plpos == true then category_plpos = data.pos_category end local category_pos = m_en_utilities.singularize(category_plpos) validate_genders(args[1]) data.genders = args[1] local saw_m = false local saw_f = false local saw_gneut = false local gender_for_irreg_ending -- Check for specific genders and pluralia tantum. for _, g in ipairs(args[1]) do if type(g) == "table" then g = g.spec end if g:find("-p$") then is_plurale_tantum = true else has_singular = true if g == "m" or g == "mf" or g == "mfbysense" then saw_m = true end if g == "f" or g == "mf" or g == "mfbysense" then saw_f = true end if g == "gneut" then saw_gneut = true end end end if saw_m and saw_f then gender_for_irreg_ending = "mf" elseif saw_f then gender_for_irreg_ending = "f" else gender_for_irreg_ending = "m" end local lemma = data.pagename local plurals = {} local function insert_noun_inflection(terms, label, accel) m_headword_utilities.insert_inflection { headdata = data, terms = terms, label = label, accel = accel and {form = accel} or nil, } end if is_plurale_tantum and not has_singular then if args[2][1] then error("Can't specify plurals of plurale tantum " .. category_pos) end insert(data.inflections, {label = glossary_link("ပါဲနူကိုန်ဗဟုဝစ်")}) else plurals = m_headword_utilities.parse_term_list_with_modifiers { paramname = {2, "pl"}, forms = args[2], splitchar = ",", } -- Check for special plural signals local mode = nil local pl1 = plurals[1] if pl1 and #pl1.term == 1 then mode = pl1.term if mode == "?" or mode == "!" or mode == "-" or mode == "~" then pl1.term = nil if next(pl1) then error(("Can't specify inline modifiers with plural code '%s'"):format(mode)) end table.remove(plurals, 1) -- Remove the mode parameter elseif mode ~= "+" and mode ~= "#" then error(("Unexpected plural code '%s'"):format(mode)) end end if is_plurale_tantum then -- both singular and plural insert(data.inflections, {label = "ပါဲနူကိုန်ဗဟုဝစ်" .. glossary_link("လ္ၚဵုလ္ၚဵု") .. ", in variation"}) end if mode == "?" then -- Plural is unknown insert(data.categories, category_plpos .. langname .. "မနွံကဵုကိုန်ဗဟုဝစ်ဟွံတီကၠး ဝါ ဟွံချိုတ်ပၠိုတ်ဂမၠိုၚ်") elseif mode == "!" then -- Plural is not attested insert(data.inflections, {label = "ကိုန်ဗဟုဝစ်မပြာကတ်ဟွံသေၚ်"}) insert(data.categories, category_plpos .. langname .. "မနွံကဵုကိုန်ဗဟုဝစ်ဟွံဒးစုတ်စရၚ်စေဝ်စၞောန်ဂမၠိုၚ်") if plurals[1] then error("Can't specify any plurals along with unattested plural code '!'") end elseif mode == "-" then -- Uncountable noun; may occasionally have a plural insert(data.categories, category_plpos .. langname .. "မတော်ဟွံဂွံဂမၠိုၚ်") -- If plural forms were given explicitly, then show "usually" if plurals[1] then insert(data.inflections, {label = "ဗွဲတၟေၚ်" .. glossary_link("မတော်ဟွံမာန်")}) insert(data.categories, category_plpos .. langname .. "မတော်ဂွံဂမၠိုၚ်") else insert(data.inflections, {label = glossary_link("မတော်ဟွံမာန်")}) end else -- Countable or mixed countable/uncountable if not plurals[1] and not is_proper then plurals[1] = {term = "+"} end if mode == "~" then -- Mixed countable/uncountable noun, always has a plural insert(data.inflections, {label = glossary_link("မတော်မာန်") .. " and " .. glossary_link("မတော်ဟွံမာန်")}) insert(data.categories, category_plpos .. langname .. "မတော်ဟွံဂွံဂမၠိုၚ်") insert(data.categories, category_plpos .. langname .. "မတော်ဂွံဂမၠိုၚ်") elseif plurals[1] then -- Countable nouns insert(data.categories, category_plpos .. langname .. "မတော်ဂွံဂမၠိုၚ်") else -- Uncountable nouns insert(data.categories, category_plpos .. langname .. "မတော်ဟွံဂွံဂမၠိုၚ်") end end -- Gather plurals, handling requests for default plurals. local has_default_or_hash = false for _, pl in ipairs(plurals) do if pl.term:find("^%+") or pl.term:find("#") then has_default_or_hash = true break end end if has_default_or_hash then for _, pl in ipairs(plurals) do if pl.term == "+" then pl.term = make_plural(lemma) elseif pl.term:find("^%+") then pl.term = require(romut_module).get_special_indicator(pl.term) pl.term = make_plural(lemma, pl.term) else pl.term = replace_hash_with_lemma(pl.term, lemma) end end end local pl1 = plurals[1] if pl1 and not plurals[2] and pl1.term == lemma then insert(data.inflections, {label = glossary_link("invariable"), q = pl1.q, qq = pl1.qq, l = pl1.l, ll = pl1.ll, refs = pl1.refs }) insert(data.categories, category_plpos .. langname .. "မနွံမဂၠိုၚ်ကဵုကိုန်ဗဟုဝစ်ဂမၠိုၚ်") else insert_noun_inflection(plurals, "ကိုန်ဗဟုဝစ်", "p") end if plurals[2] then -- insert(data.categories, langname .. " " .. category_plpos .. " with multiple plurals") end end -- Gather masculines/feminines. For each one, generate the corresponding plural. `field` is the name of the field -- containing the masculine or feminine forms (normally "m" or "f"); `inflect` is a function of one or two arguments -- to generate the default masculine or feminine from the lemma (the arguments are the lemma and optionally a -- "special" flag to indicate how to handle multiword lemmas, and the function is normally make_feminine or -- make_masculine from [[Module:pt-common]]); and `default_plurals` is a list into which the corresponding default -- plurals of the gathered or generated masculine or feminine forms are stored. local function handle_mf(field, inflect, default_plurals) local specials = {} -- Tracks the specific plural indicators for each entry in a multi-item list local term_index = 0 local mfs = m_headword_utilities.parse_term_list_with_modifiers { paramname = field, forms = args[field], splitchar = ",", frob = function(term) term_index = term_index + 1 if term == "+" then -- Generate default masculine/feminine. term = inflect(lemma) else term = replace_hash_with_lemma(term, lemma) end local special = require(romut_module).get_special_indicator(term) if special then specials[term_index] = special -- Store indicator unique to this specific item's index term = inflect(lemma, special) end return term end } for i, mf in ipairs(mfs) do local plobj = m_table.shallowCopy(mf) local term_special = specials[i] -- Retrieve indicator matching this exact singular's index plobj.term = make_plural(mf.term, term_special) -- Add an accelerator for each masculine/feminine plural whose lemma is the corresponding singular, so that -- the accelerated entry that is generated has a definition that looks like -- # {{plural of|pt|MFSING}} plobj.accel = {form = "p", lemma = mf.term} insert(default_plurals, plobj) end return mfs end local feminine_plurals = {} local feminines = handle_mf("f", com.make_feminine, feminine_plurals) local masculine_plurals = {} local masculines = handle_mf("m", com.make_masculine, masculine_plurals) local function handle_mf_plural(mfplfield, default_plurals, singulars) local mfpl = m_headword_utilities.parse_term_list_with_modifiers { paramname = mfplfield, forms = args[mfplfield], splitchar = ",", } if is_plurale_tantum then return mfpl end local new_mfpls = {} local saw_plus for i, mfpl in ipairs(mfpl) do local accel if #mfpl == #singulars then -- If same number of overriding masculine/feminine plurals as singulars, assume each plural goes with -- the corresponding singular and use each corresponding singular as the lemma in the accelerator. The -- generated entry will have -- # {{plural of|pt|SINGULAR}} -- as the definition. accel = {form = "p", lemma = singulars[i].term} else accel = nil end if mfpl.term == "+" then -- We should never see + twice. If we do, it will lead to problems since we overwrite the values of -- default_plurals the first time around. if saw_plus then error(("Saw + twice when handling %s="):format(mfplfield)) end saw_plus = true if not default_plurals[1] then -- FIXME: Can this happen? Not in corresponding Spanish code and the old Portuguese code tried to -- handle this condition by generating the default plural from the lemma. error("Internal error: Something wrong, no generated default m/f plurals at this stage") end for _, defpl in ipairs(default_plurals) do -- defpl is already a table and has an accel field m_headword_utilities.combine_termobj_qualifiers_labels(defpl, mfpl) insert(new_mfpls, defpl) end elseif mfpl.term:find("^%+") then mfpl.term = require(romut_module).get_special_indicator(mfpl.term) for _, mf in ipairs(singulars) do local mfplobj = m_table.shallowCopy(mfpl) mfplobj.term = make_plural(mf.term, mfpl.term) mfplobj.accel = accel m_headword_utilities.combine_termobj_qualifiers_labels(mfplobj, mf) insert(new_mfpls, mfplobj) end else mfpl.accel = accel mfpl.term = replace_hash_with_lemma(mfpl.term, lemma) insert(new_mfpls, mfpl) end end return new_mfpls end if args.fpl[1] then -- Override any existing feminine plurals. feminine_plurals = handle_mf_plural("fpl", feminine_plurals, feminines) end if args.mpl[1] then -- Override any existing masculine plurals. masculine_plurals = handle_mf_plural("mpl", masculine_plurals, masculines) end local function parse_and_insert_noun_inflection(field, label, accel) parse_and_insert_inflection(data, args, field, label, accel) end insert_noun_inflection(feminines, "ဣတ္တိလိၚ်", "f") insert_noun_inflection(feminine_plurals, "ကိုန်ဗဟုဝစ်ဣတ္တိလိၚ်") insert_noun_inflection(masculines, "ပုလ္လိၚ်") insert_noun_inflection(masculine_plurals, "ကိုန်ဗဟုဝစ်ပုလ္လိၚ်") if is_metaphonic(args, lemma) then insert(data.inflections, {label = metaphonic_label}) -- insert(data.categories, langname .. " " .. category_plpos .. " with metaphony") end parse_and_insert_noun_inflection("dim", "လဟုတ်စှ်ေ") parse_and_insert_noun_inflection("aug", "ပရေၚ်မဖပေၚ်တိုန်") parse_and_insert_noun_inflection("pej", "စမ်ၜတ်ရံၚ်") parse_and_insert_noun_inflection("dem", "အပၠေံရုပ်ရာ") parse_and_insert_noun_inflection("fdem", "အပၠေံရုပ်ရာဣတ္တိလိၚ်") -- Maybe add category 'Portuguese nouns with irregular gender' (or similar) local irreg_gender_lemma = com.rsub(lemma, " .*", "") -- only look at first word if (rfind(irreg_gender_lemma, "[^ã]o$") and (gender_for_irreg_ending == "f" or gender_for_irreg_ending == "mf")) or (irreg_gender_lemma:find("a$") and (gender_for_irreg_ending == "m" or gender_for_irreg_ending == "mf")) then -- insert(data.categories, langname .. " " .. category_plpos .. " with irregular gender") end end local function get_noun_params(is_proper) return { [1] = {list = "g", disallow_holes = true, required = not is_proper, default = "?", type = "genders", flatten = true}, [2] = {list = "pl", disallow_holes = true}, ["m"] = list_param, ["f"] = list_param, ["mpl"] = list_param, ["fpl"] = list_param, ["dim"] = list_param, --diminutive(s) ["aug"] = list_param, --diminutive(s) ["pej"] = list_param, --pejorative(s) ["dem"] = list_param, --demonym(s) ["fdem"] = list_param, --female demonym(s) ["meta"] = boolean_param, -- metaphonic ["nometa"] = boolean_param, -- explicitly not metaphonic } end pos_functions["နာမ်"] = { params = get_noun_params(), func = do_noun, } pos_functions["နာမ်မကိတ်ညဳ"] = { params = get_noun_params("is proper"), func = function(args, data) do_noun(args, data, "is proper noun") end, } ----------------------------------------------------------------------------------------- -- Pronouns -- ----------------------------------------------------------------------------------------- local function do_pronoun(args, data) local lemma = data.pagename validate_genders(args[1]) data.genders = args[1] local function do_inflection(field, label, accel) parse_and_insert_inflection(data, args, field, label, accel) end do_inflection("m", "ပုလ္လိၚ်") do_inflection("f", "ဣတ္တိလိၚ်") do_inflection("sg", "ကိုန်ဨကဝုစ်") do_inflection("pl", "ကိုန်ဗဟုဝစ်") do_inflection("mpl", "ကိုန်ဗဟုဝစ်ပုလ္လိၚ်") do_inflection("fpl", "ကိုန်ဗဟုဝစ်ဣတ္တိလိၚ်") do_inflection("n", "နပုလ္လိၚ်") end local function get_pronoun_params() local params = { [1] = {list = "g", disallow_holes = true, type = "genders", flatten = true}, --gender(s) ["m"] = list_param, --masculine form(s) ["f"] = list_param, --feminine form(s) ["sg"] = list_param, --singular form(s) ["pl"] = list_param, --plural form(s) ["mpl"] = list_param, --masculine plural form(s) ["fpl"] = list_param, --feminine plural form(s) ["n"] = list_param, --neuter form(s) } return params end pos_functions["သဗ္ဗနာမ်"] = { params = get_pronoun_params(), func = do_pronoun, } ----------------------------------------------------------------------------------------- -- Adjectives -- ----------------------------------------------------------------------------------------- -- Handle comparatives and superlatives for adjectives and adverbs, including user-specified comparatives and -- superlatives, default-requested comparatives/superlatives using '+', autogenerated comparatives/superlatives, -- and hascomp=. Code is the same for adjectives and adverbs. local function handle_adj_adv_comp(args, data, plpos, is_adv) local lemma = data.pagename local stem if is_adv then stem = com.rsub(lemma, "mente$", "") else stem = lemma end local function insert_inflection(terms, label, accel) m_headword_utilities.insert_inflection { headdata = data, terms = terms, label = label, accel = accel and {form = accel} or nil, } end local function make_absolute_superlative(special) if is_adv then return com.make_adverbial_absolute_superlative(stem, special) else return com.make_absolute_superlative(stem, special) end end -- Maybe autogenerate default comparative/superlative. local comp, sup if args.comp and args.sup then-- comp= and sup= were given as options to the user -- If no comp, but a non-default sup given, then add the default comparative/superlative. -- This is useful when an absolute superlative is given. comp = m_headword_utilities.parse_term_list_with_modifiers { paramname = "တုဲဒှ်", forms = args.comp, splitchar = ",", } sup = m_headword_utilities.parse_term_list_with_modifiers { paramname = "ညိည", forms = args.sup, splitchar = ",", } local saw_sup_plus = false if not comp[1] and sup[1] then for _, supval in ipairs(sup) do if supval.term == "+" then saw_sup_plus = true end end if not saw_sup_plus then comp = {{term = "+"}} insert(sup, 1, {term = "+"}) end end -- If comp=+, use default comparative 'mais ...', and set a default superlative if unspecified. local saw_comp_plus = false for _, compval in ipairs(comp) do if compval.term == "+" then saw_comp_plus = true compval.term = "[[mais]] [[" .. lemma .. "]]" end end if saw_comp_plus and not sup[1] then sup = {{term = "+"}} end -- If sup=+ (possibly from comp=+), use default superlative 'o mais ...'. Also handle absolute superlatives. for _, supval in ipairs(sup) do if supval.term == "+" then supval.term = "[[o]] [[mais]] [[" .. lemma .. "]]" elseif supval.term == "+abs" then supval.term = make_absolute_superlative() elseif rfind(supval.term, "^%+abs:") then local sp = rmatch(supval.term, "^%+abs:(.*)$") supval.term = make_absolute_superlative(sp) end end end if args.hascomp then if args.hascomp == "both" then insert(data.inflections, {label = "မတော်မာန်" .. glossary_link("အရာမွဲမွဲသာ်")}) insert(data.categories, plpos .. langname .. "မတော်ဂွံဂမၠိုၚ်") insert(data.categories, plpos .. langname .. "မတော်ဟွံဂွံဂမၠိုၚ်") else local hascomp = require("Module:yesno")(args.hascomp) if hascomp == true then insert(data.inflections, {label = glossary_link("မတော်မာန်")}) insert(data.categories, plpos .. langname .. "မတော်ဂွံဂမၠိုၚ်") elseif hascomp == false then insert(data.inflections, {label = "မတော်မာန်" .. glossary_link("ဟွံသေၚ်")}) insert(data.categories, plpos .. langname .. "မတော်ဟွံဂွံဂမၠိုၚ်") else error("Unrecognized value for hascomp=: " .. args.hascomp) end end elseif comp and comp[1] or sup and sup[1] then insert(data.inflections, {label = glossary_link("ပတဝ်ပတုပ်ရံၚ်")}) insert(data.categories, plpos .. langname .. "ပွမပတဝ်ပတုပ်ရံၚ်ဂမၠိုၚ်") end insert_inflection(comp, "ပတဝ်ပတုပ်ရံၚ်") insert_inflection(sup, "သဒ္ဒာ") end local function do_adjective(args, data, is_superlative) local feminines = {} local masculine_plurals = {} local feminine_plurals = {} -- Use "participle" not "past participle" for categories such as 'invariable participles' local category_plpos = data.checkredlinks if category_plpos == true then category_plpos = data.pos_category end local category_pos = m_en_utilities.singularize(category_plpos) if args.sp then local romut = require(romut_module) if not romut.allowed_special_indicators[args.sp] then local indicators = {} for indic, _ in pairs(romut.allowed_special_indicators) do insert(indicators, "'" .. indic .. "'") end table.sort(indicators) error("Special inflection indicator beginning can only be " .. mw.text.listToText(indicators) .. ": " .. args.sp) end end local lemma = data.pagename local function fetch_inflections(field) local retval = m_headword_utilities.parse_term_list_with_modifiers { paramname = field, forms = args[field], splitchar = ",", } if not retval[1] then return {{term = "+"}} end return retval end local function insert_inflection(terms, label, accel) m_headword_utilities.insert_inflection { headdata = data, terms = terms, label = label, accel = accel and {form = accel} or nil, } end if args.short then insert(data.inflections, {label = "[[:en:Appendix:Portuguese verbs#Participles|လုပ်ကၠောန်စွံလဝ်ဓမၠေံ]]"}) end if args.inv then -- invariable adjective insert(data.inflections, {label = glossary_link("ပြံၚ်လှာဲဟွံမာန်")}) insert(data.categories, category_plpos .. langname .. "မပါ်ပါဲထောံဟွံဂွံဂမၠိုၚ်") if args.sp or args.f[1] or args.pl[1] or args.mpl[1] or args.fpl[1] then error("Can't specify inflections with an invariable " .. category_pos) end elseif args.fonly then -- feminine-only if args.f[1] then error("Can't specify explicit feminines with feminine-only " .. category_pos) end if args.pl[1] then error("Can't specify explicit plurals with feminine-only " .. category_pos .. ", use fpl=") end if args.mpl[1] then error("Can't specify explicit masculine plurals with feminine-only " .. category_pos) end local argsfpl = fetch_inflections("fpl") for _, fpl in ipairs(argsfpl) do if fpl.term == "+" then fpl.term = make_plural(lemma, args.sp) else fpl.term = replace_hash_with_lemma(fpl.term, lemma) end insert(feminine_plurals, fpl) end insert(data.inflections, {label = "ပါဲနူ-ဣတ္တိလိၚ်"}) insert_inflection(feminine_plurals, "ကိုန်ဗဟုဝစ်ဣတ္တိလိၚ်", "f|p") else -- Gather feminines. for _, f in ipairs(fetch_inflections("f")) do if f.term == "+" then -- Generate default feminine. f.term = com.make_feminine(lemma, args.sp) else f.term = replace_hash_with_lemma(f.term, lemma) end insert(feminines, f) end local fem_like_lemma = #feminines == 1 and feminines[1].term == lemma and not m_headword_utilities.termobj_has_qualifiers_or_labels(feminines[1]) if fem_like_lemma then -- insert(data.categories, langname .. " epicene " .. category_plpos) end local mpl_field = "mpl" local fpl_field = "fpl" if args.pl[1] then if args.mpl[1] or args.fpl[1] then error("Can't specify both pl= and mpl=/fpl=") end mpl_field = "pl" fpl_field = "pl" end local argsmpl = fetch_inflections(mpl_field) local argsfpl = fetch_inflections(fpl_field) for _, mpl in ipairs(argsmpl) do if mpl.term == "+" then -- Generate default masculine plural. mpl.term = make_plural(lemma, args.sp) else mpl.term = replace_hash_with_lemma(mpl.term, lemma) end insert(masculine_plurals, mpl) end for _, fpl in ipairs(argsfpl) do if fpl.term == "+" then for _, f in ipairs(feminines) do -- Generate default feminine plural; f is a table. local fplobj = m_table.shallowCopy(fpl) fplobj.term = make_plural(f.term, args.sp) m_headword_utilities.combine_termobj_qualifiers_labels(fplobj, f) insert(feminine_plurals, fplobj) end else fpl.term = replace_hash_with_lemma(fpl.term, lemma) insert(feminine_plurals, fpl) end end local fem_pl_like_masc_pl = masculine_plurals[1] and feminine_plurals[1] and m_table.deepEquals(masculine_plurals, feminine_plurals) local masc_pl_like_lemma = #masculine_plurals == 1 and masculine_plurals[1].term == lemma and not m_headword_utilities.termobj_has_qualifiers_or_labels(masculine_plurals[1]) if fem_like_lemma and fem_pl_like_masc_pl and masc_pl_like_lemma then -- actually invariable insert(data.inflections, {label = glossary_link("ပြံၚ်လှာဲဟွံမာန်")}) insert(data.categories, category_plpos .. langname .. "နကဵုပါ်ပါဲထောံဟွံမာန်ဂမၠိုၚ်") else -- Make sure there are feminines given and not same as lemma. if not fem_like_lemma then insert_inflection(feminines, "ဣတ္တိလိၚ်", "f|s") elseif args.gneut then data.genders = {"gneut"} else data.genders = {"mf"} end if fem_pl_like_masc_pl then if args.gneut then insert_inflection(masculine_plurals, "ကိုန်ဗဟုဝစ်", "p") else -- This is how the Spanish module works. -- insert_inflection(masculine_plurals, "masculine and feminine plural", "p") insert_inflection(masculine_plurals, "ကိုန်ဗဟုဝစ်", "p") end else insert_inflection(masculine_plurals, "ကိုန်ဗဟုဝစ်ပုလ္လိၚ်", "m|p") insert_inflection(feminine_plurals, "ကိုန်ဗဟုဝစ်ဣတ္တိလိၚ်", "f|p") end end end local function parse_and_insert_adj_inflection(field, label, accel, frob) parse_and_insert_inflection(data, args, field, label, accel, frob) end parse_and_insert_adj_inflection("n", "နပုလ္လိၚ်") handle_adj_adv_comp(args, data, category_plpos, false) parse_and_insert_adj_inflection("dim", "လဟုတ်စှ်ေ", nil, function(term) if term == "+" then term = com.make_diminutive(lemma) elseif term:find("^%+") then term = require(romut_module).get_special_indicator(term) term = com.make_diminutive(lemma, term) end return term end) parse_and_insert_adj_inflection("aug", "ပရေၚ်ဇၞော်မောဝ်တိုန်", nil, function(term) if term == "+" then term = com.make_augmentative(lemma) elseif term:find("^%+") then term = require(romut_module).get_special_indicator(term) term = com.make_augmentative(lemma, term) end return term end) if is_metaphonic(args, lemma) then insert(data.inflections, {label = metaphonic_label}) -- insert(data.categories, langname .. " " .. category_plpos .. " with metaphony") end if args.irreg and is_superlative then -- insert(data.categories, langname .. " irregular superlative " .. category_plpos) end end local function get_adjective_params(adjtype) local params = { ["inv"] = boolean_param, --invariable ["sp"] = true, -- special indicator: "first", "first-last", etc. ["f"] = list_param, --feminine form(s) ["pl"] = list_param, --plural override(s) ["mpl"] = list_param, --masculine plural override(s) ["fpl"] = list_param, --feminine plural override(s) ["meta"] = boolean_param, -- metaphonic ["nometa"] = boolean_param, -- explicitly not metaphonic } if adjtype == "base" then params["comp"] = list_param --comparative(s) params["sup"] = list_param --superlative(s) params["dim"] = list_param --diminutive(s) params["aug"] = list_param --augmentative(s) params["fonly"] = boolean_param -- feminine only params["gneut"] = boolean_param -- gender-neutral adjective e.g. [[latine]] (FIXME: do these exist in Portuguese?) params["hascomp"] = true -- has comparative end if adjtype == "part" then params["short"] = boolean_param -- short participle end if adjtype == "sup" then params["irreg"] = boolean_param end if adjtype == "pron" or adjtype == "contr" then params["n"] = list_param --neuter form(s) end return params end pos_functions["နာမဝိသေသန"] = { params = get_adjective_params("base"), func = do_adjective, } pos_functions["နာမဝိသေသနပတုပ်ရံၚ်"] = { params = get_adjective_params("comp"), func = do_adjective, pos_category = "နာမဝိသေသန", } pos_functions["သဒ္ဒာနာမဝိသေသန"] = { params = get_adjective_params("sup"), func = function(args, data) do_adjective(args, data, "is superlative") end, pos_category = "နာမဝိသေသန", } pos_functions["လုပ်ကၠောန်စွံလဝ်နကဵုအတိက်"] = { params = get_adjective_params("part"), func = do_adjective, redlink_pos = "လုပ်ကၠောန်စွံလဝ်", } pos_functions["ဖျေံလဝ်သန္နိဋ္ဌာန်"] = { params = get_adjective_params("det"), func = do_adjective, } pos_functions["adjective-like pronouns"] = { params = get_adjective_params("pron"), func = do_adjective, pos_category = "သဗ္ဗနာမ်", } pos_functions["adjective-like contractions"] = { params = get_adjective_params("contr"), func = do_adjective, pos_category = "သမ္ဗန္ဓ", } ----------------------------------------------------------------------------------------- -- Adverbs -- ----------------------------------------------------------------------------------------- local function do_adverb(args, data) handle_adj_adv_comp(args, data, "ကြိယာဝိသေသန", "is adv") end local function get_adverb_params(advtype) local params = {} if advtype == "base" then params["တုဲဒှ်"] = list_param --comparative(s) params["ညိည"] = list_param --superlative(s) params["hascomp"] = true -- has comparative end return params end pos_functions["ကြိယာဝိသေသန"] = { params = get_adverb_params("base"), func = do_adverb, } pos_functions["ကြိယာဝိသေသနပတုပ်ရံၚ်"] = { params = get_adverb_params("comp"), func = do_adverb, pos_category = "adverbs", } pos_functions["သဒ္ဒာကြိယာဝိသေသန"] = { params = get_adverb_params("sup"), func = do_adverb, pos_category = "adverbs", } ----------------------------------------------------------------------------------------- -- Verbs -- ----------------------------------------------------------------------------------------- pos_functions["ကြိယာ"] = { params = { [1] = true, ["pres"] = list_param, --present ["pres_qual"] = {list = "pres\1_qual", allow_holes = true}, ["pres3s"] = list_param, --third-singular present ["pres3s_qual"] = {list = "pres3s\1_qual", allow_holes = true}, ["pret"] = list_param, --preterite ["pret_qual"] = {list = "pret\1_qual", allow_holes = true}, ["part"] = list_param, --participle ["part_qual"] = {list = "part\1_qual", allow_holes = true}, ["short_part"] = list_param, --short participle ["short_part_qual"] = {list = "short_part\1_qual", allow_holes = true}, ["noautolinktext"] = boolean_param, ["noautolinkverb"] = boolean_param, ["attn"] = boolean_param, }, func = function(args, data, frame) local preses, preses_3s, prets, parts, short_parts if args.attn then -- insert(data.categories, "Requests for attention concerning " .. langname) return end local pt_verb = require(pt_verb_module) local alternant_multiword_spec = pt_verb.do_generate_forms(args, "pt-verb", data.heads[1]) local specforms = alternant_multiword_spec.forms local function slot_exists(slot) return specforms[slot] and #specforms[slot] > 0 end local function do_finite(slot_tense, label_tense) -- Use pres_3s if it exists and pres_1s doesn't exist (e.g. impersonal verbs); similarly for pres_3p -- (only3p verbs); but fall back to pres_1s if neither pres_1s nor pres_3s nor pres_3p exist (e.g. -- [[empedernir]]). local has_1s = slot_exists(slot_tense .. "_1s") local has_3s = slot_exists(slot_tense .. "_3s") local has_3p = slot_exists(slot_tense .. "_3p") if has_1s or (not has_3s and not has_3p) then return { slot = slot_tense .. "_1s", label = ("ကိုန်ဨကဝုစ်ပူဂဵုပထမ %s"):format(label_tense), }, true elseif has_3s then return { slot = slot_tense .. "_3s", label = ("ကိုန်ဨကဝုစ်ပူဂဵုတတိယ %s"):format(label_tense), }, false else return { slot = slot_tense .. "_3p", label = ("ကိုန်ဗဟုဝစ်ပူဂဵုတတိယ %s"):format(label_tense), }, false end end local did_pres_1s preses, did_pres_1s = do_finite("pres", "ပစ္စုပ္ပန်") preses_3s = { slot = "pres_3s", label = "ကိုန်ဨကဝုစ်ပစ္စုပ္ပန်ပူဂဵုတတိယ", } prets = do_finite("pret", "မပြဟ်လောန်") parts = { slot = "pp_ms", label = "လုပ်ကၠောန်စွံလဝ်နကဵုအတိက်", } short_parts = { slot = "short_pp_ms", label = "လုပ်ကၠောန်စွံလဝ်နကဵုအတိက်ဓမၠေံ", } if args.pres[1] or args.pres3s[1] or args.pret[1] or args.part[1] or args.short_part[1] then track("verb-old-multiarg") end local function strip_brackets(qualifiers) if not qualifiers then return nil end local stripped_qualifiers = {} for _, qualifier in ipairs(qualifiers) do local stripped_qualifier = qualifier:match("^%[(.*)%]$") if not stripped_qualifier then error("Internal error: Qualifier should be surrounded by brackets at this stage: " .. qualifier) end insert(stripped_qualifiers, stripped_qualifier) end return stripped_qualifiers end local function do_verb_form(args, qualifiers, slot_desc, skip_if_empty) local forms local to_insert if #args == 0 then forms = specforms[slot_desc.slot] if not forms or #forms == 0 then if skip_if_empty then return end forms = {{form = "-"}} end elseif #args == 1 and args[1] == "-" then forms = {{form = "-"}} else forms = {} for i, arg in ipairs(args) do local qual = qualifiers[i] if qual then -- FIXME: It's annoying we have to add brackets and strip them out later. The inflection -- code adds all footnotes with brackets around them; we should change this. qual = {"[" .. qual .. "]"} end local form = arg if not args.noautolinkverb then -- [[Module:inflection utilities]] already loaded by [[Module:pt-verb]] form = require(inflection_utilities_module).add_links(form) end insert(forms, {form = form, footnotes = qual}) end end if forms[1].form == "-" then to_insert = {label = "no " .. slot_desc.label} else local into_table = {label = slot_desc.label} for _, form in ipairs(forms) do local qualifiers = strip_brackets(form.footnotes) -- Strip redundant brackets surrounding entire form. These may get generated e.g. -- if we use the angle bracket notation with a single word. local stripped_form = rmatch(form.form, "^%[%[([^%[%]]*)%]%]$") or form.form stripped_form = pt_verb.remove_variant_codes(stripped_form) -- Don't include accelerators if brackets remain in form, as the result will be wrong. -- FIXME: For now, don't include accelerators. We should use the new {{pt-verb form of}} once -- implemented. -- local this_accel = not stripped_form:find("%[%[") and accel or nil local this_accel = nil insert(into_table, {term = stripped_form, q = qualifiers, accel = this_accel}) end to_insert = into_table end insert(data.inflections, to_insert) end local skip_pres_if_empty if alternant_multiword_spec.no_pres1_and_sub then insert(data.inflections, {label = "ကိုန်ဨကဝုစ်ပစ္စုပ္ပန်ပူဂဵုပထမဟွံသေၚ်"}) insert(data.inflections, {label = "အရေဝ်နိဒါန်ပစ္စုပ္ပန်ဟွံသေၚ်"}) end if alternant_multiword_spec.no_pres_stressed then insert(data.inflections, {label = "မသ္ပစၞောန်ပစ္စုပ္ပန်ကဆံၚ်ဇြိုဟ်နက်ဟွံသေၚ် ဝါ အရေဝ်နိဒါန်"}) skip_pres_if_empty = true end if alternant_multiword_spec.only3s then insert(data.inflections, {label = glossary_link("ဟၟဲကဵုပစ္စဲပူဂဵု")}) elseif alternant_multiword_spec.only3sp then insert(data.inflections, {label = "ပါဲနူပူဂဵုတတိယ"}) elseif alternant_multiword_spec.only3p then insert(data.inflections, {label = "ပါဲနူကိုန်ဗဟုဝစ်ပူဂဵုတတိယ"}) end local has_vowel_alt if alternant_multiword_spec.vowel_alt then for _, vowel_alt in ipairs(alternant_multiword_spec.vowel_alt) do if vowel_alt ~= "+" and vowel_alt ~= "í" and vowel_alt ~= "ú" then has_vowel_alt = true break end end end do_verb_form(args.pres, args.pres_qual, preses, skip_pres_if_empty) -- We want to include both the pres_1s and pres_3s if there is a vowel alternation in the present singular. But -- we don't want to redundantly include the pres_3s if we already included it. if did_pres_1s and has_vowel_alt then do_verb_form(args.pres3s, args.pres3s_qual, preses_3s, skip_pres_if_empty) end do_verb_form(args.pret, args.pret_qual, prets) do_verb_form(args.part, args.part_qual, parts) do_verb_form(args.short_part, args.short_part_qual, short_parts, "skip if empty") -- Add categories. for _, cat in ipairs(alternant_multiword_spec.categories) do insert(data.categories, cat) end -- If the user didn't explicitly specify head=, or specified exactly one head (not 2+) and we were able to -- incorporate any links in that head into the 1= specification, use the infinitive generated by -- [[Module:pt-verb]] in place of the user-specified or auto-generated head. This was copied from -- [[Module:it-headword]], where doing this gets accents marked on the verb(s). We don't have accents marked on -- the verb but by doing this we do get any footnotes on the infinitive propagated here. Don't do this if the -- user gave multiple heads or gave a head with a multiword-linked verbal expression such as Italian -- '[[dare esca]] [[al]] [[fuoco]]' (FIXME: give Portuguese equivalent). if #data.user_specified_heads == 0 or ( #data.user_specified_heads == 1 and alternant_multiword_spec.incorporated_headword_head_into_lemma ) then data.heads = {} for _, lemma_obj in ipairs(alternant_multiword_spec.forms.infinitive_linked) do local quals, refs = require(inflection_utilities_module). convert_footnotes_to_qualifiers_and_references(lemma_obj.footnotes) insert(data.heads, {term = lemma_obj.form, q = quals, refs = refs}) end end end } ----------------------------------------------------------------------------------------- -- Suffix forms -- ----------------------------------------------------------------------------------------- pos_functions["ဗီုပြၚ်အဆက်လက္ကရဴ"] = { params = { [1] = {required = true, list = true, disallow_holes = true}, ["g"] = {list = true, disallow_holes = true, type = "genders", flatten = true}, }, func = function(args, data) validate_genders(args.g) data.genders = args.g local suffix_type = {} for _, typ in ipairs(args[1]) do insert(suffix_type, typ .. "-forming suffix") end insert(data.inflections, {label = "non-lemma form of " .. m_table.serialCommaJoin(suffix_type, {conj = "or"})}) end, } return export gf8cb3sfjabr0bvuuha1gcn4o44fkid ထာမ်ပလိက်:rfinfl 10 58211 401212 75900 2026-08-14T11:24:18Z 咽頭べさ 33 401212 wikitext text/x-wiki {{#invoke:checkparams|error}}<!-- Validate template parameters --><p style="font-size: smaller">နွံပၟိက်{{#if:{{{2|}}}|{{{2}}}|ပွမ}}လုပ်ညံၚ် [[:ကဏ္ဍ:ထာမ်ပလိက်{{langname|{{{1<noinclude>|und</noinclude>}}}}}အပြံၚ်အလှာဲပ္တဝ်ထ္ၜးပမာဏ{{#switch:{{{2|}}}|proper noun=နာမ်|participle=နာမဝိသေသန|#default={{{2|}}}}}ဂမၠိုၚ်|ထာမ်ပလိက်အပြံၚ်အလှာဲပ္တဝ်ထ္ၜးပမာဏဂမၠိုၚ်]]{{#if:{{{3|}}}|&#32;(''{{{3}}})''}}။</p><!-- --><includeonly><!-- -->{{#if:{{{nocat|}}}||<!-- --><!-- -->}}<!-- --></includeonly><!-- --><noinclude>{{documentation}}</noinclude> a991l359vt84zw7pps3qf2dx0hgm4e3 401214 401212 2026-08-14T11:28:39Z 咽頭べさ 33 401214 wikitext text/x-wiki {{#invoke:checkparams|error}}<!-- Validate template parameters --><p style="font-size: smaller">နွံပၟိက်{{#if:{{{2|}}}|{{{2}}}|ပွမ}}လုပ်ညံၚ် [[:ကဏ္ဍ:ထာမ်ပလိက်{{langname|{{{1<noinclude>|und</noinclude>}}}}}အပြံၚ်အလှာဲပ္တဝ်ထ္ၜးပမာဏ{{#switch:{{{2|}}}|noun=နာမ်|proper noun=နာမ်|participle=နာမဝိသေသန|#default={{{2|}}}}}ဂမၠိုၚ်|ထာမ်ပလိက်အပြံၚ်အလှာဲပ္တဝ်ထ္ၜးပမာဏဂမၠိုၚ်]]{{#if:{{{3|}}}|&#32;(''{{{3}}})''}}။</p><!-- --><includeonly><!-- -->{{#if:{{{nocat|}}}||<!-- --><!-- -->}}<!-- --></includeonly><!-- --><noinclude>{{documentation}}</noinclude> 737kpvtfb33si3gbrovehzgriolint8 ထာမ်ပလိက်:documentation/documentation 10 119999 401143 395916 2026-08-13T18:04:16Z 咽頭べさ 33 咽頭べさ ပြံင်ပဆုဲလဝ် မုက်လိက် [[ထာမ်ပလိက်:Documentation/documentation]] ဇရေင် [[ထာမ်ပလိက်:documentation/documentation]] နကု မကလေင်ပညုင် 155140 wikitext text/x-wiki {{documentation subpage}} {{uses lua|Module:documentation}} __NOTOC__ This template automatically displays a documentation section like you are seeing now. The content of this section comes from a subpage named {{cd|<var>page</var>/documentation}}; e.g. the documentation for [[Template:affix]] is located on the page named {{cd|Template:affix/documentation}}. In order for this documentation to be displayed, templates must manually invoke {{tl|documentation}} inside of a {{cd|<nowiki><noinclude>...</noinclude></nowiki>}} section; see [[#Usage]] below. (However, {{tl|documentation}} is automatically invoked on module and JavaScript pages. The mechanism implementing this is described in more detail in the documentation for [[Module:documentation]], which implements the {{tl|documentation}} template.) ==Usage== <var>template code</var> <var>...</var>{{wt|noinclude}}{{temp|documentation}}{{wt|/noinclude}} or {{wt|onlyinclude}}template code . . .{{wt|/onlyinclude}} {{temp|documentation}} The most common practice is to place the {{temp|documentation}} template in {{wt|noinclude}} tags. Alternatively, the template code itself can be wrapped in {{wt|onlyinclude}} tags and the {{temp|documentation}} template should be outside of those tags. Both of these methods ensure that the documentation is not transcluded onto other pages as part of the template. In order to place the template itself in a category, or supply interwiki links, put those categories and interwiki links on the documentation page, inside {{wt|includeonly}} tags. If the documentation page contains {{wt|includeonly}} or {{wt|noinclude}} tags as part of the documentation, use {{tl|wikitag}} or replace {{cd|<}} with {{cd|&amp;lt;}}. == Functions == If the documentation page doesn't exist, the "edit" link includes a [[mw:Manual:Creating pages with preloaded text|preload]] parameter so that clicking it will pre-fill the edit form with a stub documentation page. == Rationale == Use of this template allows templates to be protected where necessary, while allowing anyone to edit the documentation, categories, and interwiki links. In addition, [[ဝိက်ရှေန်နရဳ:မဝ်ဂျူဂမၠိုၚ်|modules]] strictly require documentation pages as they cannot be categorized or documented any other way, so it makes sense to handle templates likewise. == See also == *[[Help:Documenting templates]] <includeonly> [[ကဏ္ဍ:ထာမ်ပလိက်စရၚ်မချူသမ္တီလဝ်ဂမၠိုၚ်]] </includeonly> lx6ccrohs466b2m5359fzc370vz9won ထာမ်ပလိက်:sv-decl-noun 10 295546 401216 396179 2026-08-14T11:35:43Z 咽頭べさ 33 401216 wikitext text/x-wiki {{#invoke:checkparams|warn}}<!-- Validate template parameters -->{{inflection-table-top|title=မလဟုတ်စှ်ေဆေၚ်စပ်ကဵု {{m|sv|{{{base|{{pagename}}}}}}} {{{definitions|}}}|tall=yes|palette=indigo}} ! class="outer" | ! ! [[nominative|မဒုၚ်ယၟု]] ! [[genitive|ဗဳဇဂကူ]] |- ! rowspan="2" class="outer" | ကိုန်ဨကဝုစ် ! [[indefinite|မချိုတ်ပၠိုတ်]] | {{l|sv|accel-form=indef{{!}}nom{{!}}s|{{{1}}}}} | {{l|sv|accel-form=indef{{!}}gen{{!}}s|{{{5}}}}} |- ! [[definite|မချိုတ်ပၠိုတ်]] | {{l|sv|accel-form=def{{!}}nom{{!}}s|{{{2}}}}} | {{l|sv|accel-form=def{{!}}gen{{!}}s|{{{6}}}}} |- ! rowspan="2" class="outer" | ကိုန်ဗဟုဝစ် ! ဟွံချိုတ်ပၠိုတ် | {{#if:{{{uncountable|}}}|&mdash;|{{l|sv|accel-form=indef{{!}}nom{{!}}p|{{{3}}}}}}} | {{#if:{{{uncountable|}}}|&mdash;|{{l|sv|accel-form=indef{{!}}gen{{!}}p|{{{7}}}}}}} |- ! မချိုတ်ပၠိုတ် | {{#if:{{{uncountable|}}}|&mdash;|{{l|sv|accel-form=def{{!}}nom{{!}}p|{{{4}}}}}}} | {{#if:{{{uncountable|}}}|&mdash;|{{l|sv|accel-form=def{{!}}gen{{!}}p|{{{8}}}}}}} {{inflection-table-bottom}}<noinclude>{{documentation}}</noinclude> ehrkaqkko4hqxz3kutf1u1oy6iwxd7u မဝ်ဂျူ:sk-noun 828 295618 401117 401116 2026-08-13T12:03:57Z OctraBot 279 401117 Scribunto text/plain --[=[ This module contains functions for creating inflection tables for Slovak nouns. ]=]-- local export = {} -- Within this module, declensions are the functions that do the actual -- declension by creating the forms of a basic noun. -- They are defined further down. --local lemma = "Bratislava" local declensions = {} local lang = require("Module:languages").getByCode("sk") local m_table = require("Module:table") local m_links = require("Module:links") local m_adj = require("Module:sk-adjective") local m_inflection_table = require("Module:inflection-table") local allowed_genders = { "m-pr", "m-anml", "m-in", "f", "n" } local allowed_genders_set = m_table.listToSet(allowed_genders) local hard_consonants = {"d", "t", "n", "l", "h", "ch", "k", "g"} local soft_consonants = {"ď", "ť", "ň", "ľ", "ž", "š", "č", "dž", "c", "dz", "j"} local ambiguous_consonants = {"b", "m", "p", "r", "s", "v", "z", "f"} local hard_consonants_set = m_table.listToSet(hard_consonants) local soft_consonants_set = m_table.listToSet(soft_consonants) local ambiguous_consonants_set = m_table.listToSet(ambiguous_consonants) local consonants = m_table.append(hard_consonants, soft_consonants, ambiguous_consonants) local consonants_set = m_table.listToSet(consonants) local short_vowels = {"a", "e", "i", "o", "u", "y", "ä", "ö", "ü"} local long_vowels = {"á", "é", "í", "ó", "ú", "ý", "ő", "ű"} local diphthongs = {"ia", "ie", "iu", "ô"} local short_vowels_set = m_table.listToSet(short_vowels) local long_vowels_set = m_table.listToSet(long_vowels) local diphthongs_set = m_table.listToSet(diphthongs) local vowels = m_table.append(short_vowels, long_vowels) local vowels_set = m_table.listToSet(vowels) local obstruents = {"p", "t", "k", "b", "d", "g", "f", "s", "š", "ch", "z", "ž", "č", "dž"} --"v" removed?? local sonorants = {"m", "n", "l", "r", "ʋ", "v"} --"v" added?? local obstruents_set = m_table.listToSet(obstruents) local sonorants_set = m_table.listToSet(sonorants) local bigraphs = {"ch", "dz", "dž"} local bigraphs_set = m_table.listToSet(bigraphs) local prepositions = {"bez", "bezo", "cez", "cezo", "do", "k", "ku", "medzi", "na", "nad", "nado", "o", "do", "okrem", "po", "pod", "podo", "pre", "pred", "predo", "pri", "proti", "naproti", "oproti", "s", "so", "skrz", "u", "v", "vo", "z", "zo", "za"} -- Add more prepositions as needed local prepositions_set = m_table.listToSet(prepositions) local conjunctions = {"a"} -- Add more conjunctions as needed local conjunctions_set = m_table.listToSet(conjunctions) -- The main entry point. -- This is the only function that can be invoked from a template. function export.show(frame) local args = frame:getParent().args NAMESPACE = mw.title.getCurrentTitle().nsText if NAMESPACE == "" then PAGENAME = mw.loadData("Module:headword/data").pagename else if args["pagename"] then PAGENAME = args["pagename"] -- TEST: lemma else error("Pagename not specified") end end GENDER = check_gender(args[1]) NUMBER = args["n"] TYPE = args["t"] GEN_ENDING = args["g"] PLURAL = args["pl"] PLURAL2 = args["pl2"] PRONUNCIATION = args["p"] local genitive = args[2] local category = "" -- Check if PAGENAME is a multiword expression if not mw.ustring.find(PAGENAME, " ") then -- Single-word expression, handle as usual PATTERN = determine_pattern(PAGENAME, genitive) -- Category if NAMESPACE == "" then if PATTERN == "indeclinable" then category = "[[ကဏ္ဍ:နာမ်သလဝ်ဝေန်နဳယျာနကဵုပါ်ပါဲထောံဟွံမာန်ဂမၠိုၚ်|" .. PAGENAME .. "]]" elseif PATTERN == "irregular" then category = "[[ကဏ္ဍ:နာမ်ကိုန်ဨကဝုစ်သလဝ်ဝေန်နဳယျာဂမၠိုၚ်|" .. PAGENAME .. "]]" elseif PATTERN == "adjective" then category = "[[ကဏ္ဍ:နာမ်မဆေၚ်စပ်ကဵုနာမဝိသေသနသလဝ်ဝေန်နဳယျာဂမၠိုၚ်|" .. PAGENAME .. "]]" else category = "[[ကဏ္ဍ:ဝေါဟာသလဝ်ဝေန်နဳယျာမၞုံကဵုဝေါဟာ " .. PATTERN .. " မလဟုတ်စှ်ေဂမၠိုၚ်|" .. PAGENAME .. "]]" end if GENDER == "m-anml" then category = category .. "[[ကဏ္ဍ:ဝေါဟာသလဝ်ဝေန်နဳယျာမၞုံကဵုဝေါဟာ chlap မလဟုတ်စှ်ေဂမၠိုၚ်|" .. PAGENAME .. "]]" end if PAGENAME == "cól" then category = category .. "[[ကဏ္ဍ:ဝေါဟာသလဝ်ဝေန်နဳယျာမၞုံကဵုဝေါဟာ dub မလဟုတ်စှ်ေဂမၠိုၚ်|" .. PAGENAME .. "]]" end end local forms, title -- Find out if there are more genitive stems and if so, process them if genitive then if mw.ustring.find(genitive, "/") then forms, title = decline_with_more_stems(genitive) else forms, title = declensions[PATTERN](PAGENAME, genitive) normalize_forms(forms) end else forms, title = declensions[PATTERN](PAGENAME, genitive) normalize_forms(forms) end specified_by_user(forms, args) return make_table(forms, title) .. category end -- Multiword expressions -- Category if NAMESPACE == "" then category = "[[ကဏ္ဍ:ဝေါဟာသလဝ်ဝေန်နဳယျာမဂၠိုၚ်ကဵုမအရေဝ်ဂမၠိုၚ်|" .. PAGENAME .. "]]" end -- Split into words local units, gen_units = split_into_units(PAGENAME, genitive) -- Process each unit to generate forms local combined_forms = generate_combined_forms(units, gen_units) -- Add forms specified by the user specified_by_user(combined_forms, args) -- Generate the final title and table local title = "မလဟုတ်စှ်ေဆေၚ်စပ်ကဵု ''" .. PAGENAME .. "'' (multiword term)" return make_table(combined_forms, title) .. category end --[=[ Declension functions ]=]-- declensions["chlap"] = function(word, genitive) local forms = {} local syllable_count, syllables = split_into_syllables(word) local mobile_removed = false -- Tracks if a mobile vowel was removed local words_with_mobile = {"kmotor", "švagor", "svokor", "lotor", "obor", "Uhor", "pochábeľ", "väzeň", "učeň", "posol", "diabol", "blázon", "Turek", "fanúšek", "center", "hypochonder", "Kafer", "neger", "gangster", "kapor", "zubor", "bobor", "orol", "pes" } local surn_ech_always_declined = {"Čech", "Plech", "Pech", "Štech", "Vojtech"} -- Determine the stem by removing mobile vowels if applicable local stem = word if (matches_any(word, words_with_mobile) or ends_with_any(word, {"ec", "ček", "íček", "ok"})) and not (TYPE == "surn" and (ends_with_any(word, {"[aeiouyáéíóúýäöüőű]ček", "[aeiouyáéíóúýäöüőű]čok"}) or syllable_count == 1)) and not matches_any(word, {"otrok"}) then stem = remove_mobile_vowel(word) mobile_removed = true -- Mark mobile vowel as removed end -- Adjust specific stems based on predefined mappings stem = ({["švec"] = "ševc", ["žnec"] = "ženc"})[word] or stem -- Remove certain endings for words ending with "us", "os", "es" and "o" if ends_with(word, "[uoea]s") then stem = mw.ustring.sub(word, 1, -3) end if ends_with(word, "o") then stem = remove_last_char(word) end -- Override if a specific argument is given if genitive and NUMBER ~= "pl" then stem = remove_last_char(genitive) if mw.ustring.sub(word, 1, -3) .. get_last_char(word) == remove_last_char(genitive) then mobile_removed = true end end -- Title for the declension table local title = "Declension of ''" .. word .. "'' <br>(pattern " .. pattern_link("chlap") .. ")" if TYPE == "surn" then if ends_with(word, "a[iy]") then title = "မလဟုတ်စှ်ေဆေၚ်စပ်ကဵု ''" .. word .. "'' <br>(pattern " .. pattern_link("chlap") .. " or " .. pattern_link("kuli") .. ")" elseif ends_with_any(word, {"ých", "ech"}) and not matches_any(word, surn_ech_always_declined) then title = "Declension of ''" .. word .. "'' <br>(pattern " .. pattern_link("chlap") .. " or indeclinable)" end end -- Helper variables for analyzing the last and penultimate characters local ultimate, penultimate = get_last_letters(stem) local first = get_first_char(word) -- Determine alternative dative and locative for some nouns if matches_any(word, {"človek", "pán", "čert", "diabol", "vlk", "pes", "Boh", "boh", "otec", "syn", "duch", "Kristus", "don", "šor"}) then set_forms(forms, {"dat_sg2", "loc_sg2"}, {stem .. "u", stem .. "u"}) end local nom_pl = "i" if PLURAL then if mw.ustring.find(PLURAL, "/") then local endings = {} for part in mw.ustring.gmatch(PLURAL, "[^/]+") do table.insert(endings, part) end nom_pl = endings[1] for i = 2, 4 do if endings[i] then set_forms(forms, {"nom_pl" .. i}, {append_ending(stem, endings[i])}) else break end end else nom_pl = PLURAL end elseif (ends_with_any(word, {"fil", "fób", "graf", "nóm"}) and not matches_any(word, {"xylograf", "typograf"})) or matches_any(word, {"cynik", "epik", "klasik", "stoik", "Brit", "Búr", "Gal", "Ír", "Dór", "Italik", "Ión", "Nór", "cár", "lodivod", "odkundes", "starík", "muž", "svat", "apoštol", "augur", "bán", "bogomil", "buržuj", "don", "druid", "eféb", "famulus", "héros", "man", "posol" }) then set_forms(forms, {"nom_pl2"}, {append_ending(stem, "ovia")}) elseif (ends_with_any(word, {"[^c]h", "g", "ček", "ek", "ik", "čik", "ok", "o", "duch"}) and word ~= "pes") or matches_any(word, {"otec", "syn", "ujec", "strýc", "svák", "svokor", "tesť", "švagor", "zať", "kmotor", "ded", "kmeť", "pobratim", "otčim", "zlosyn", "princ", "Bask", "Frank", "Ind", "Ink", "Kurd", "Dák", "Čudo", "Fríz", "Azték", "Asýr", "Etrusk", "Kazach", "Kašub", "odľud", "člen", "zved", "hňup", "cicerone"}) or (ends_with(word, "ch") and TYPE == "loan") or (ends_with_any(word, {"us", "es"}) and genitive ~= word .. "a") or matches_any(TYPE, {"comp-deverb", "surn", "name"}) or PLURAL == "ovia" then nom_pl = "ovia" if TYPE == "surn" then append_second_plural(forms, stem .. "ovci", stem .. "ovcov", stem .. "ovcom", stem .. "ovcov", stem .. "ovcoch", stem .. "ovcami") end elseif ends_with(word, "teľ") or (ends_with(word, "an") and is_capital(first)) or matches_any(word, {"občan", "dedinčan", "mešťan", "zeman", "ostrovan", "krajan", "dolňan", "horňan", "južan", "severan", "rodič", "dedič", "brat", "hosť", "manžel", "exmanžel", "sused", "žid", "Žid", "kresťan", "nekresťan", "pohan"}) then nom_pl = "ia" if word == "pohan" then set_forms(forms, {"nom_pl2"}, {append_ending(stem, "i")}) end end -- Determine instrumental plural ending local ins_pl = "mi" -- Default instrumental plural ending is "mi" if ultimate == "m" or mobile_removed or ends_with_any(word, {"o", "ius"}) or matches_any(word, {"hosť", "tesť", "Kopt"}) --obstruents_set[penultimate] and obstruents_set[ultimate] then ins_pl = "ami" end -- Populate forms table with singular and plural endings append_endings(forms, word, stem, "a", "ovi", "a", "ovi", "om", nom_pl, append_ending(stem, "ov"), "om", "ov", "och", ins_pl ) -- Surnames ending with -ých, -ech, -ai, -ay if TYPE == "surn" then if ends_with_any(word, {"ých", "ech"}) and not matches_any(word, surn_ech_always_declined) then append_alternative_singular(forms, word, word, word, word, word) append_alternative_plural(forms, word, word, word, word, word, word) elseif ends_with(word, "a[iy]") then append_alternative_singular(forms, word .. "ho", word .. "mu", word .. "ho", word .. "m", word .. "m") set_forms(forms, {"ins_pl2"}, {word .. "ami"}) end end -- Exceptions if word == "človek" then set_forms(forms, {"nom_pl", "gen_pl", "dat_pl", "acc_pl", "loc_pl", "ins_pl"}, {"ľudia", "ľudí", "ľuďom", "ľudí", "ľuďoch", "ľuďmi"} ) elseif word == "héros" then set_forms(forms, {"gen_sg", "dat_sg", "acc_sg", "loc_sg", "ins_sg", "nom_pl", "gen_pl", "dat_pl", "acc_pl", "loc_pl", "ins_pl", "gen_sg2", "dat_sg2", "acc_sg2", "loc_sg2", "ins_sg2", "nom_pl2", "gen_pl2", "dat_pl2", "acc_pl2", "loc_pl2", "ins_pl2"}, {"hérosa", "hérosovi", "hérosa", "hérosovi", "hérosom", "hérosi", "hérosov", "hérosom", "hérosov", "hérosoch", "hérosmi", "héroa", "héroovi", "héroa", "héroovi", "héroom", "héroovia", "héroov", "héroom", "héroov", "hérooch", "héroami"} ) end -- Vocative if matches_any(word, {"syn", "sváko", "švagor", "kmotor", "brat", "synko", "synáčik", "pán", "chlapec", "priateľ", "majster", "Boh", "boh", "Pán", "Syn", "Duch", "Ježiš", "Ježiško", "Kristus", "Spasiteľ", "Vykupiteľ", "Stvoriteľ", "Premožiteľ", "Kráľ", "Hospodin", "baránok", "Baránok", "tešiteľ", "Tešiteľ", "hriešnik", "protivník", "kresťan", "otec", "Otec", "chlap", "človek"}) then voc_stem = stem if word == "synáčik" then voc_stem = "synáčk" end if word == "pán" then voc_stem = "pan" end if word == "Pán" then voc_stem = "Pan" end if ends_with_any(word, {"teľ", "o"}) or matches_any(word, {"syn", "Syn", "Duch", "Ježiš", "Kráľ", "hriešnik", "synáčik", "baránok", "Baránok"}) then set_forms(forms, {"voc_sg"}, {append_ending(voc_stem, "u")}) else if ends_with_any(voc_stem, {"k", "c"}) then voc_stem = remove_last_char(voc_stem) .. "č" elseif ends_with(voc_stem, "h") then voc_stem = remove_last_char(voc_stem) .. "ž" end set_forms(forms, {"voc_sg"}, {append_ending(voc_stem, "e")}) end if not matches_any(word, {"človek", "pán", "brat"}) then set_forms(forms, {"voc_sg2"}, {word}) elseif word == "brat" then set_forms(forms, {"voc_sg2", "voc_sg3"}, {"bratu", "brat"}) end end return forms, title -- Return forms table and title for declension end declensions["hrdina"] = function(word, genitive) local forms = {} local title = "မလဟုတ်စှ်ေဆေၚ်စပ်ကဵု ''" .. word .. "'' <br>(pattern " .. pattern_link("hrdina") .. ")" local stem = remove_suffix(word, "a") if ends_with(word, "[oeě]") then stem = remove_last_char(word) if ends_with(word, "ě") and ends_with(stem, "[dtnl]") then stem = soften_last_consonant(stem) end end local nom_pl_ending = "ovia" if ends_with_any(word, {"ista", "ita"}) or (ends_with(word, "ta") and TYPE == "loan") then nom_pl_ending = "i" end local ins_pl_ending = "ami" if ends_with(word, "[aeiouyáéíóúýäöüőű]ta") and TYPE == "loan" then ins_pl_ending = "mi" end append_endings(forms, word, stem, "u", "ovi", "u", "ovi", "om", nom_pl_ending, stem .. "ov", "om", "ov", "och", ins_pl_ending ) if TYPE == "surn" then append_second_plural(forms, stem .. "ovci", stem .. "ovcov", stem .. "ovcom", stem .. "ovcov", stem .. "ovcoch", stem .. "ovcami") end if word == "buržoa" then set_forms(forms, {"dat_sg", "loc_sg", "ins_sg", "nom_pl", "gen_pl", "dat_pl", "acc_pl", "loc_pl"}, {"buržuovi", "buržuovi", "buržuom", "buržuovia", "buržuov", "buržuom", "buržuov", "buržuoch"} ) end return forms, title end declensions["kuli"] = function(word, genitive) local forms = {} local stem = word local title = "မလဟုတ်စှ်ေဆေၚ်စပ်ကဵု ''" .. word .. "'' <br>(pattern " .. pattern_link("kuli") .. ")" append_endings(forms, word, stem, "ho", "mu", "ho", "m", "m", "ovia", stem .. "ov", "om", "ov", "och", "ami" ) if TYPE == "surn" then append_second_plural(forms, stem .. "ovci", stem .. "ovcov", stem .. "ovcom", stem .. "ovcov", stem .. "ovcoch", stem .. "ovcami") end return forms, title end declensions["dub"] = function(word, genitive) local forms = {} local mobile_removed = false -- Tracks if a mobile vowel was removed local words_with_mobile = {"priemysel", "počet", "ocot", "bahor", "chrbát", "ker", "cukor", "uhor", "vietor", "víchor", "vôdor", "kotol", "kapor", "zubor", "bobor", "orol", "pes", "mozog", "uhol"} local syllable_count, syllables = split_into_syllables(word) -- Determine the stem by removing mobile vowels if applicable local stem = word if (matches_any(word, words_with_mobile) or (ends_with_any(word, {"íček", "ýček", "ok"}) and syllable_count ~= 1)) and not matches_any(word, {"polrok", "nárok", "zákrok", "rozkrok"}) then stem = remove_mobile_vowel(word) mobile_removed = true -- Mark mobile vowel as removed end -- Adjust specific stems based on predefined mappings stem = ({["mráz"] = "mraz", ["vietor"] = "vetr", ["kôl"] = "kol", ["stôl"] = "stol", ["vôl"] = "vol", ["chlieb"] = "chleb", ["ensemble"] = "ensembl"})[word] or stem -- Remove certain endings for words ending with "us", "os", "es" and "o" if (ends_with(word, "[uoe]s") and TYPE == "loan") or ends_with(word, "izmus") then stem = mw.ustring.sub(word, 1, -3) end if ends_with(word, "o") then stem = remove_last_char(word) end -- Pluralia tantum if NUMBER == "pl" then stem = remove_suffix(word, "y") end -- Override if a specific argument is given if genitive and NUMBER ~= "pl" then stem = remove_last_char(genitive) if stem == remove_last_char(remove_last_char(word)) .. get_last_char(word) then mobile_removed = true elseif stem == word then mobile_removed = false end end -- Set "mobile_removed" if genitive was set by the user if ends_with(word, "e[lr]") and ends_with(stem, "[^e][lr]") then mobile_removed = true end -- Title for the declension table local title = "မလဟုတ်စှ်ေဆေၚ်စပ်ကဵု ''" .. word .. "'' <br>(pattern " .. pattern_link("dub") .. ")" if GENDER == "m-anml" then if matches_any(word, {"vták", "vlk", "pes"}) then title = "မလဟုတ်စှ်ေဆေၚ်စပ်ကဵု ''" .. word .. "'' <br>(patterns " .. pattern_link("chlap") .. " <small>(singular, plural 1)</small> and " .. pattern_link("dub") .. " <small>(plural 2)</small>)" elseif PLURAL2 then title = "မလဟုတ်စှ်ေဆေၚ်စပ်ကဵု ''" .. word .. "'' <br>(patterns " .. pattern_link("chlap") .. " <small>(singular, plural 2)</small> and " .. pattern_link("dub") .. " <small>(plural 1)</small>)" else title = "မလဟုတ်စှ်ေဆေၚ်စပ်ကဵု ''" .. word .. "'' <br>(patterns " .. pattern_link("chlap") .. " <small>(singular)</small> and " .. pattern_link("dub") .. " <small>(plural)</small>)" end end -- Helper variables for analyzing the last and penultimate characters local ultimate, penultimate = get_last_letters(stem) local first = get_first_char(word) -- Determine genitive singular ending local gen_sg = "a" if (matches_any(TYPE, {"abstr", "comp-deverb", "material", "collect", "loan"}) or matches_any(GEN_ENDING, {"u", "u/a"}) or ends_with_any(word, {"izmus", "x"}) or (ends_with(word, "m") and not is_capital(first)) or (ends_with(word, "z") and is_capital(first))) and not matches_any(GEN_ENDING, {"a", "a/u"}) then gen_sg = "u" end -- Override genitive singular ending if a specific argument is given if genitive then gen_sg = get_last_char(genitive) end -- Determine locative singular ending based on specific suffixes and patterns local loc_sg = "e" if ends_with_any(word, {"k", "g", "h", "ch"}) or (ends_with(word, "i[ue]s") and TYPE == "loan") then loc_sg = "u" elseif (ends_with(word, "ér") or (ends_with(word, "ál") and not matches_any(word, {"bál", "paškál", "paušál", "šál", "škandál", "žurnál"})) or matches_any(word, {"Alžír", "klavír", "apríl", "jún", "júl"})) then loc_sg = "i" end -- Determine genitive plural ending local gen_pl = stem .. "ov" -- Default genitive plural ending is "ov" -- Adjust genitive plural for specific place names and patterns if is_capital(first) and (ends_with_any(word, {"any", "íky", "áky", "iaky"}) or matches_any(word, {"Krompachy", "Kubachy", "Veľbachy", "Spišské Vlachy", "Žabokreky", "Čechy", "Brezolupy", "Bruty", "Rakoľuby", "Rakúsy", "Prusy", "Veľaty", "Piešťany", "Bieščary"})) then local gen_stem = remove_last_char(word) -- Remove last character to get the base stem local syllable_count, syllables = split_into_syllables(gen_stem) local last_syllable = syllables[1] local penultimate_syllable = syllables[2] or "" -- Lengthen the vowel if the penultimate syllable is short, otherwise use unchanged stem if is_long(penultimate_syllable) then gen_pl = gen_stem else gen_pl = remove_suffix(gen_stem, last_syllable) .. lengthen_vowel(last_syllable) end end -- Special cases for genitive plural of specific words if word == "čas" then gen_pl = "čias" elseif word == "raz" then gen_pl = "ráz" end -- Determine instrumental plural ending local ins_pl = "mi" -- Default instrumental plural ending is "mi" if ultimate == "m" or mobile_removed or ends_with_any(word, {"o", "ius", "eus"}) or (penultimate == "m" and consonants_set[ultimate]) then ins_pl = "ami" end -- Doublets for instrumental plural if matches_any(word, {"schod", "schody", "fúz", "fúzy", "roh", "rohy", "paroh", "parohy", "čary", "orech"}) then set_forms(forms, {"ins_pl2"}, {stem .. "ami"}) elseif matches_any(word, {"zub", "dol", "most", "prst", "piest", "necht"}) then ins_pl = "ami" set_forms(forms, {"ins_pl2"}, {stem .. "mi"}) end -- Populate forms table with singular and plural endings append_endings(forms, word, stem, gen_sg, "u", nil, loc_sg, "om", "y", gen_pl, "om", nil, "och", ins_pl ) -- Alternative genitive ending if GEN_ENDING == "a/u" then set_forms(forms, {"gen_sg2"}, {stem .. "u"}) elseif GEN_ENDING == "u/a" then set_forms(forms, {"gen_sg2"}, {stem .. "a"}) end -- Exceptions if matches_any(word, {"sen", "dol"}) then set_forms(forms, {"loc_pl2"}, {stem .. "ách"}) elseif word == "čas" then set_forms(forms, {"gen_pl2"}, {"časov"}) end -- Animal nouns if GENDER == "m-anml" then append_animal_singular(forms, stem) if matches_any(word, {"vták", "vlk", "pes"}) or PLURAL2 then local forms2, title2 = declensions["chlap"](word, stem .. gen_sg) append_second_plural(forms, forms2["nom_pl"], forms2["gen_pl"], forms2["dat_pl"], forms2["acc_pl"], forms2["loc_pl"], forms2["ins_pl"]) if matches_any(word, {"vták", "vlk", "pes"}) then switch_plural_forms(forms) --changes the prefered forms -- Determine alternative dative and locative for some nouns if matches_any(word, {"vlk", "pes"}) then set_forms(forms, {"dat_sg2", "loc_sg2"}, {stem .. "u", stem .. "u"}) end end end end return forms, title -- Return forms table and title for declension end declensions["stroj"] = function(word, genitive) local forms = {} local mobile_removed = false -- Tracks if a mobile vowel was removed local words_with_no_mobile = {"kúpeľ", "červeň", "kameň", "jačmeň", "koreň", "prameň", "prsteň", "jeleň"} local first = get_first_char(word) -- Determine the stem by removing mobile vowels if applicable local stem = word if (ends_with_any(word, {"ec", "iec", "[^ti]eľ", "oľ", "[^i]eň", "eť", "[^i]er", "el"}) or (ends_with(word, "ac") and (is_capital(first) or word == "desaterac"))) and not matches_any(word, words_with_no_mobile) then stem = remove_mobile_vowel(word) mobile_removed = true -- Mark mobile vowel as removed end -- Adjust specific stems based on predefined mappings stem = ({["dážď"] = "dažď", ["kôš"] = "koš", ["nôž"] = "nož", ["kôň"] = "koň", ["timbre"] = "timbr"})[word] or stem -- Pluralia tantum if NUMBER == "pl" then stem = remove_suffix(word, "e") end -- Override if a specific argument is given if genitive and NUMBER ~= "pl" then stem = remove_last_char(genitive) if stem == remove_last_char(remove_last_char(word)) .. get_last_char(word) then mobile_removed = true elseif stem == word then mobile_removed = false end end -- Set "mobile_removed" if genitive was set by the user if ends_with(word, "e[lr]") and ends_with(stem, "[^e][lr]") then mobile_removed = true end -- Title for the declension table local title = "မလဟုတ်စှ်ေဆေၚ်စပ်ကဵု ''" .. word .. "'' <br>(pattern " .. pattern_link("stroj") .. ")" if GENDER == "m-anml" then if PLURAL2 then title = "မလဟုတ်စှ်ေဆေၚ်စပ်ကဵု ''" .. word .. "'' <br>(patterns " .. pattern_link("chlap") .. " <small>(singular, plural 2)</small> and " .. pattern_link("stroj") .. " <small>(plural 1)</small>)" else title = "မလဟုတ်စှ်ေဆေၚ်စပ်ကဵု ''" .. word .. "'' <br>(patterns " .. pattern_link("chlap") .. " <small>(singular)</small> and " .. pattern_link("stroj") .. " <small>(plural)</small>)" end elseif word == "cól" then title = "မလဟုတ်စှ်ေဆေၚ်စပ်ကဵု ''" .. word .. "'' <br>(pattern " .. pattern_link("stroj") .. " or " .. pattern_link("dub") .. ")" end -- Helper variables for analyzing the last and penultimate characters local ultimate, penultimate = get_last_letters(stem) local first = get_first_char(word) -- Determine genitive singular ending local gen_sg = "a" if ((matches_any(TYPE, {"abstr", "material"}) or matches_any(GEN_ENDING, {"u", "u/a"})) and not matches_any(word, {"jačmeň", "kameň", "olej", "loj", "vývoj", "rozvoj"})) and not matches_any(GEN_ENDING, {"a", "a/u"}) then gen_sg = "u" end -- Override genitive singular ending if a specific argument is given if genitive then gen_sg = get_last_char(genitive) end -- Determine genitive plural ending local gen_pl = stem .. "ov" -- Default genitive plural ending is "ov" -- Adjust genitive plural for specific place names and patterns if is_capital(first) and (ends_with_any(word, {"áre", "iare"}) or word == "Tlmače") then local gen_stem = remove_last_char(word) -- Remove last character to get the base stem local syllable_count, syllables = split_into_syllables(gen_stem) local last_syllable = syllables[1] local penultimate_syllable = syllables[2] or "" -- Lengthen the vowel if the penultimate syllable is short, otherwise use unchanged stem if is_long(penultimate_syllable) then gen_pl = gen_stem else gen_pl = remove_suffix(gen_stem, last_syllable) .. lengthen_vowel(last_syllable) end end -- Special cases for genitive plural of specific words if word == "Ladce" then gen_pl = "Ladiec" elseif word == "Vráble" then gen_pl = "Vrábeľ" elseif word == "peniaze" then gen_pl = "peňazí" elseif matches_any(word, {"deň", "kôň", "groš"}) then gen_pl = append_ending(stem, "í") end -- Determine instrumental plural ending local ins_pl = "mi" -- Default instrumental plural ending is "mi" if mobile_removed or (obstruents_set[penultimate] and obstruents_set[ultimate]) then ins_pl = "ami" end -- Populate forms table with singular and plural endings append_endings(forms, word, stem, gen_sg, "u", nil, "i", "om", "e", gen_pl, "om", nil, "och", ins_pl ) -- Alternative genitive ending if GEN_ENDING == "a/u" then set_forms(forms, {"gen_sg2"}, {stem .. "u"}) elseif GEN_ENDING == "u/a" then set_forms(forms, {"gen_sg2"}, {stem .. "a"}) end -- Exceptions if matches_any(word, {"deň", "poldeň"}) then set_forms(forms, {"nom_pl", "acc_pl", "loc_sg2"}, {append_ending(stem, "i"), append_ending(stem, "i"), append_ending(stem, "e")} ) elseif word == "ďateľ" then set_forms(forms, {"gen_sg2", "dat_sg2", "loc_sg2", "ins_sg2", "nom_pl2", "gen_pl2", "dat_pl2", "acc_pl2", "loc_pl2", "ins_pl2"}, {"ďatľa", "ďatľovi", "ďatľovi", "ďatľom", "ďatle", "ďatľov", "ďatľom", "ďatle", "ďatľoch", "ďatľami"} ) elseif word == "cól" then set_forms(forms, {"loc_sg2", "nom_pl2", "acc_pl2"}, {"cóle", "cóly", "cóly"} ) end -- Animal nouns if GENDER == "m-anml" then append_animal_singular(forms, stem) if PLURAL2 then local forms2, title2 = declensions["chlap"](word, stem .. gen_sg) append_second_plural(forms, forms2["nom_pl"], forms2["gen_pl"], forms2["dat_pl"], forms2["acc_pl"], forms2["loc_pl"], forms2["ins_pl"]) end end return forms, title -- Return forms table and title for declension end declensions["žena"] = function(word, genitive) local forms = {} local stem = remove_suffix(word, "a") local title = "မလဟုတ်စှ်ေဆေၚ်စပ်ကဵု ''" .. word .. "'' <br>(pattern " .. pattern_link("žena") .. ")" if ends_with(word, "ea") then title = "မလဟုတ်စှ်ေဆေၚ်စပ်ကဵု ''" .. word .. "'' <br>(pattern " .. pattern_link("žena") .. ", loanword ending with ''-ea'')" end -- Pluralia tantum or genitive if NUMBER == "pl" then stem = remove_suffix(word, "y") end if genitive and NUMBER ~= "pl" then stem = remove_suffix(genitive, "y") end -- Split into syllables local gen_pl = "" local syllable_count, syllables = split_into_syllables(stem) local word_syllable_count, word_syllables = split_into_syllables(word) -- Get the last and second-to-last syllables for rule checks local last_syllable = syllables[1] local penultimate_syllable = syllables[2] or "" local word_penultimate_syllable = word_syllables[2] or "" local ultimate, penultimate = get_last_letters(stem) -- 1. Add a vowel between the last two consonants of a cluster at the end of the stem if ends_with_consonant_cluster(last_syllable) or word_syllable_count == 1 then if (ultimate == "k" and not matches_any(word, {"banka"})) or (ultimate == "b" and (TYPE == "der" or not sonorants_set[penultimate])) or sonorants_set[ultimate] or matches_any(word, {"farba", "karta", "buchta", "astma"}) or (obstruents_set[penultimate] and ultimate == "v") then if penultimate ~= "j" and (word_syllable_count == 1 or is_short(word_penultimate_syllable)) then gen_pl = harden_last_consonant(remove_suffix(stem, ultimate)) .. "ie" .. ultimate if matches_any(word, {"handra", "perla", "metla", "slivka", "tehla", "vidly", "karta", "kvapka", "stovka", "doska"}) then gen_pl = remove_suffix(stem, ultimate) .. "á" .. ultimate set_forms(forms, {"gen_pl2"}, {harden_last_consonant(remove_suffix(stem, ultimate)) .. "ie" .. ultimate}) end if matches_any(word, {"jamka", "kvapka"}) then set_forms(forms, {"gen_pl2"}, {remove_suffix(stem, ultimate) .. "ô" .. ultimate}) end if matches_any(word, {"astma"}) then set_forms(forms, {"gen_pl2"}, {stem .. "í"}) end elseif obstruents_set[ultimate] and (is_long(word_penultimate_syllable) or penultimate == "j") then gen_pl = remove_suffix(stem, ultimate) .. "o" .. ultimate elseif (sonorants_set[ultimate] or ultimate == "v") and (is_long(word_penultimate_syllable) or penultimate == "j") then gen_pl = remove_suffix(stem, ultimate) .. "e" .. ultimate if penultimate ~= "j" then set_forms(forms, {"gen_pl2"}, {remove_suffix(stem, ultimate) .. "ie" .. ultimate}) end end end end -- 2. Add "í" if stem ends with a vowel or a soft consonant if gen_pl == "" and (vowels_set[ultimate] or matches_any(word, {"medaila", "pera", "kanva", "panva", "skepsa", "nuansa"})) then gen_pl = stem .. "í" if matches_any(word, {"nuansa"}) then set_forms(forms, {"gen_pl2"}, {remove_suffix(stem, last_syllable) .. lengthen_vowel(last_syllable)}) end end -- 3. Return the stem with no change if conditions match if gen_pl == "" and (is_long(penultimate_syllable) or ends_with_any(stem, {"tvor", "ov"}) or mw.ustring.match(last_syllable, "[Jj][eo]") or (TYPE == "loan" and matches_any(get_vowel(last_syllable), {"e", "o"}))) then gen_pl = stem end -- 4. Logic to use the lengthened vowel if conditions match if gen_pl == "" and (not (ends_with_consonant_cluster(last_syllable) or vowels_set[ultimate]) or (ends_with_consonant_cluster(last_syllable) and sonorants_set[penultimate] and obstruents_set[ultimate]) or (ends_with_consonant_cluster(last_syllable) and matches_any(penultimate, {"c", "s", "z", "š", "ž", "p"}) and matches_any(ultimate, {"t", "d"}))) and not matches_any(word, {"šachta", "mzda"}) then gen_pl = remove_suffix(stem, last_syllable) .. lengthen_vowel(last_syllable) if mw.ustring.find(stem, "au[bcčdďfghjklľmnňpqrsštťvwxzž]$") then gen_pl = remove_suffix(stem, "a" .. last_syllable) .. "á" .. last_syllable end end -- 5. long -á- instead of -ia- for some loanwords if matches_any(word, {"pyžama", "šachta"}) then gen_pl = (word == "pyžama") and "pyžám" or "šácht" if word == "šachta" then set_forms(forms, {"gen_pl2"}, {"šachiet"}) end end -- 6. Exceptions if word == "mzda" then gen_pl = "miezd" end if gen_pl == "" then gen_pl = stem end local dat_pl, loc_pl if is_long(word_penultimate_syllable) then dat_pl, loc_pl = "am", "ach" else dat_pl, loc_pl = "ám", "ách" end local dat_sg, loc_sg if ultimate == "e" then dat_sg, loc_sg = "i", "i" else dat_sg, loc_sg = "e", "e" end append_endings(forms, word, stem, "y", dat_sg, "u", loc_sg, "ou", "y", gen_pl, dat_pl, nil, loc_pl, "ami" ) if matches_any(word, {"zora", "žiara", "žiabra"}) then set_forms(forms, {"nom_pl", "acc_pl"}, {stem .. "e", stem .. "e"} ) end return forms, title end declensions["gazdiná"] = function(word, genitive) local forms = {} local stem = remove_suffix(word, "á") local title = "မလဟုတ်စှ်ေဆေၚ်စပ်ကဵု ''" .. word .. "'' <br>(pattern " .. pattern_link("gazdiná") .. ")" local syllable_count, syllables = split_into_syllables(stem) local last_syllable = syllables[1] local gen_pl = "" if ends_with_consonant_cluster(last_syllable) then gen_pl = mw.ustring.sub(stem, 1, -2) .. "ien" else gen_pl = remove_suffix(stem, last_syllable) .. lengthen_vowel(last_syllable) end append_endings(forms, word, stem, "ej", "ej", "ú", "ej", "ou", "é", gen_pl, "ám", nil, "ách", "ami" ) return forms, title end declensions["ulica"] = function(word, genitive) local forms = {} local stem = remove_suffix(word, "a") local title = "မလဟုတ်စှ်ေဆေၚ်စပ်ကဵု ''" .. word .. "'' <br>(pattern " .. pattern_link("ulica") .. ")" -- Pluralia tantum if NUMBER == "pl" then stem = remove_suffix(word, "e") if ends_with_any(stem, {"d", "t", "n", "l"}) then stem = soften_last_consonant(stem) end end -- Split into syllables local gen_pl = "" local syllable_count, syllables = split_into_syllables(stem) local word_syllable_count, word_syllables = split_into_syllables(word) -- Get the last and second-to-last syllables for rule checks local last_syllable = syllables[1] local penultimate_syllable = syllables[2] or "" local word_penultimate_syllable = word_syllables[2] or "" local ultimate, penultimate = get_last_letters(stem) local first = get_first_char(word) -- 1. Add a vowel between the last two consonants of a cluster at the end of the stem if ends_with_consonant_cluster(last_syllable) then if (is_capital(first) and ends_with(word, "ce")) or matches_any(word, {"dverce", "ovca", "fakľa", "drumbľa", "husle", "jasle", "kachle", "hrable", "šabľa", "mašľa", "žemľa", "ríbezľa", "čerešňa", "sukňa", "višňa"}) then gen_pl = harden_last_consonant(remove_suffix(stem, ultimate)) .. "ie" .. ultimate if matches_any(word, {"drumbľa", "husle", "jasle", "kachle", "hrable", "šabľa", "mašľa", "žemľa", "ríbezľa", "čerešňa", "sukňa", "višňa"}) then set_forms(forms, {"gen_pl2"}, {append_ending(stem, "í")}) end end end -- 2. Add "í" if stem ends with a vowel or a soft consonant if gen_pl == "" and (matches_any(ultimate, {"dz", "dž", "ž", "ť", "ď", "j", "i", "y"}) or ends_with_any(word, {"nca", "oľa", "ôľa", "aľa", "ša", "ča"}) or matches_any(word, {"liace", "pasca", "páľa", "trúbeľa", "mrľa", "konope", "večera", "rozopra"}) or (matches_any(ultimate, {"ľ"}) and consonants_set[penultimate]) or (matches_any(ultimate, {"ň"}) and penultimate ~= "y")) and not matches_any(word, {"papuča", "priča", "hrča", "paprča", "garniža", "fakľa", "skriňa", "sviňa", "abatiša", "čaša", "fľaša", "Krkonoše", "ríša", "skrýša"}) then gen_pl = append_ending(stem, "í") end -- 3. Logic to use the lengthened vowel if conditions match if gen_pl == "" and not ends_with_consonant_cluster(last_syllable) and not vowels_set[ultimate] and ((ends_with(word, "ca") and TYPE ~= "der") or ends_with_any(word, {"yňa", "uľa"}) or matches_any(word, {"papuča", "priča", "hrča", "chvíľa", "míľa", "košeľa", "nedeľa", "guľa", "hoľa", "homoľa", "skriňa", "sviňa", "abatiša", "čaša", "fľaša", "Krkonoše", "ríša", "skrýša", "garniža", "Hybe", "dvere", "kuša", "moruša"})) then if is_long(penultimate_syllable) then gen_pl = stem else gen_pl = remove_suffix(stem, last_syllable) .. lengthen_vowel(last_syllable) if matches_any(word, {"homoľa", "kuša", "moruša", "hrča", "paprča", "guľa", "hoľa"}) then set_forms(forms, {"gen_pl2"}, {append_ending(stem, "í")}) end end end if gen_pl == "" then gen_pl = stem end local dat_pl, loc_pl if ends_with_any(stem, {"i", "y"}) or word == "pizza" then dat_pl, loc_pl = "ám", "ách" elseif is_long(word_penultimate_syllable) or ends_with(stem, "j") then dat_pl, loc_pl = "am", "ach" else dat_pl, loc_pl = "iam", "iach" end append_endings(forms, word, stem, "e", "i", "u", "i", "ou", "e", gen_pl, dat_pl, nil, loc_pl, "ami" ) if word == "rozopra" then set_forms(forms, {"dat_pl2", "loc_pl2"}, {"rozoprám", "rozoprách"} ) elseif word == "dvere" then set_forms(forms, {"dat_pl", "loc_pl", "gen_pl2", "ins_pl2"}, {"dverám", "dverách", "dverí", "dvermi"} ) end return forms, title end declensions["irregular"] = function(word, genitive) local forms = {} local title = "မလဟုတ်စှ်ေဆေၚ်စပ်ကဵု ''" .. word .. "'' (irregular)" if matches_any(word, {"mať", "mater", "mati"}) then local stem = "mater" append_endings(forms, word, stem, "e", "i", "", "i", "ou", "e", stem .. "í", "iam", "e", "iach", "ami" ) local accusative = (word == "mater") and {"mater", "mať"} or {"mať", "mater"} set_forms(forms, {"acc_sg", "acc_sg2"}, accusative) elseif ends_with(word, "pani") then local stem = remove_suffix(word, "ni") .. "ň" append_endings(forms, word, stem, "ej", "ej", "iu", "ej", "ou", "ie", stem .. "í", "iam", nil, "iach", "iami" ) end return forms, title end declensions["dlaň"] = function(word, genitive) local forms = {} local words_with_mobile_vowel = {"faloš", "osuheľ", "siheľ", "myseľ"} local stem if genitive then stem = remove_suffix(genitive, "e") elseif matches_any(word, words_with_mobile_vowel) or ends_with(word, "eň") then stem = remove_mobile_vowel(word) else stem = word end local title = "မလဟုတ်စှ်ေဆေၚ်စပ်ကဵု ''" .. word .. "'' <br>(pattern " .. pattern_link("dlaň") .. ")" local syllable_count, syllables = split_into_syllables(word) local last_syllable = syllables[1] local penultimate_syllable = syllables[2] or "" local last_char = get_last_char(word) local dat_pl, loc_pl if is_long(penultimate_syllable) or last_char == "j" then dat_pl, loc_pl = "am", "ach" elseif word == "kader" then dat_pl, loc_pl = "ám", "ách" else dat_pl, loc_pl = "iam", "iach" end append_endings(forms, word, stem, "e", "i", nil, "i", "ou", "e", append_ending(stem, "í"), dat_pl, nil, loc_pl, "ami" ) if matches_any(word, {"myseľ", "tvár", "hneď", "raž"}) then set_forms(forms, {"gen_sg2"}, {append_ending(stem, "i")}) end return forms, title end declensions["kosť"] = function(word, genitive) local forms = {} local words_with_mobile_vowel = {"voš", "lož", "Ves", "ves", "cirkev", "reďkev"} local stem = (matches_any(word, words_with_mobile_vowel)) and remove_mobile_vowel(word) or word if word == "česť" then stem = "cť" end local title = "မလဟုတ်စှ်ေဆေၚ်စပ်ကဵု ''" .. word .. "'' <br>(pattern " .. pattern_link("kosť") .. ")" append_endings(forms, word, stem, "i", "i", nil, "i", "ou", "i", append_ending(stem, "í"), "iam", nil, "iach", "ami" ) if word == "hrsť" then set_forms(forms, {"nom_pl", "acc_pl"}, {"hrste", "hrste"} ) elseif word == "lesť" then append_alternative_singular(forms, "ľsti", "ľsti", nil, "ľsti", "ľsťou") append_alternative_plural(forms, "ľsti", "ľstí", "ľstiam", nil, "ľstiach", "ľsťami") elseif matches_any(word, {"cirkev", "reďkev"}) then set_forms(forms, {"dat_pl", "loc_pl"}, {stem .. "ám", stem .. "ách"} ) end return forms, title end declensions["mesto"] = function(word, genitive) local forms = {} local ultimate, penultimate = get_last_letters(word) local special_type = "" local stem = remove_suffix(word, "o") if penultimate == "u" and ultimate == "m" then stem = remove_suffix(word, "um") special_type = ", of Latin origin ending with ''-um''" elseif penultimate == "o" and ultimate == "n" then stem = remove_suffix(word, "on") special_type = ", of Greek origin ending with ''-on''" elseif penultimate == "m" and ultimate == "ä" then stem = remove_suffix(word, "ä") .. "en" special_type = ", archaic type ending with ''-mä''" end -- Pluralia tantum if NUMBER == "pl" then stem = remove_suffix(word, ultimate) end local title = "မလဟုတ်စှ်ေဆေၚ်စပ်ကဵု ''" .. word .. "'' <br>(pattern " .. pattern_link("mesto") .. special_type .. ")" local stem_ultimate, stem_penultimate = get_last_letters(stem) local loc_sg = "e" if vowels_set[stem_ultimate] or matches_any(stem_ultimate, {"k", "g", "ch", "h"}) then loc_sg = "u" elseif matches_any(word, {"vnútro", "nebo"}) then loc_sg = "i" end -- Split into syllables local gen_pl = "" local syllable_count, syllables = split_into_syllables(stem) local word_syllable_count, word_syllables = split_into_syllables(word) -- Get the last and second-to-last syllables for rule checks local last_syllable = syllables[1] local penultimate_syllable = syllables[2] or "" local word_penultimate_syllable = word_syllables[2] or "" -- 1. Add a vowel between the last two consonants of a cluster at the end of the stem if ends_with_consonant_cluster(last_syllable) then if matches_any(word, {"jedlo", "predjedlo", "jutro", "vrecko", "brvno"}) then if matches_any(word, {"jedlo", "predjedlo", "jutro"}) then gen_pl = remove_suffix(stem, stem_ultimate) .. "á" .. stem_ultimate else gen_pl = remove_suffix(stem, stem_ultimate) .. "ie" .. stem_ultimate set_forms(forms, {"gen_pl2"}, {remove_suffix(stem, stem_ultimate) .. "á" .. stem_ultimate}) end elseif sonorants_set[stem_ultimate] or ends_with_any(last_syllable, {"stv", "ctv", "íčk", "ečk", "očk"}) or TYPE == "dim" then if stem_penultimate ~= "j" and (word_syllable_count == 1 or ends_with_any(last_syllable, {"stv", "ctv"}) or is_short(word_penultimate_syllable)) then gen_pl = remove_suffix(stem, stem_ultimate) .. "ie" .. stem_ultimate elseif obstruents_set[stem_ultimate] and (is_long(word_penultimate_syllable) or stem_penultimate == "j") then gen_pl = remove_suffix(stem, stem_ultimate) .. "o" .. stem_ultimate elseif sonorants_set[stem_ultimate] and (is_long(word_penultimate_syllable) or stem_penultimate == "j") then gen_pl = remove_suffix(stem, stem_ultimate) .. "e" .. stem_ultimate if stem_penultimate ~= "j" then set_forms(forms, {"gen_pl2"}, {remove_suffix(stem, stem_ultimate) .. "ie" .. stem_ultimate}) end end end end -- 2. Add "í" if stem ends with a vowel or a soft consonant if gen_pl == "" and (vowels_set[stem_ultimate] or soft_consonants_set[stem_ultimate]) then gen_pl = stem .. "í" end -- 3. Return the stem with no change if conditions match if gen_pl == "" and (is_long(penultimate_syllable) or ends_with_any(stem, {"vojsk", "ov"}) or (TYPE == "loan" and matches_any(get_vowel(last_syllable), {"e", "o"}))) then gen_pl = stem end -- 4. Logic to use the lengthened vowel if conditions match if gen_pl == "" and (not (ends_with_consonant_cluster(last_syllable) or vowels_set[stem_ultimate]) or (ends_with_consonant_cluster(last_syllable) and obstruents_set[stem_ultimate])) then gen_pl = remove_suffix(stem, last_syllable) .. lengthen_vowel(last_syllable) end local nom_pl = "á" if NUMBER == "pl" then nom_pl = ultimate end if gen_pl == "" then gen_pl = stem end if (is_long(word_penultimate_syllable) or word == "jojo") and not ends_with(word, "ium") then append_endings(forms, word, stem, "a", "u", nil, loc_sg, "om", "a", gen_pl, "am", nil, "ach", "ami" ) else append_endings(forms, word, stem, "a", "u", nil, loc_sg, "om", nom_pl, gen_pl, "ám", nil, "ách", "ami" ) end if matches_any(word, {"oko", "ucho"}) then local pl_stem = (word == "oko") and "oč" or "uš" append_second_plural(forms, pl_stem .. "i", pl_stem .. "í", pl_stem .. "iam", nil, pl_stem .. "iach", pl_stem .. "ami") switch_plural_forms(forms) --changes the prefered forms set_forms(forms, {"gen_pl2"}, {pl_stem .. "ú"} ) elseif word == "nebo" then set_forms(forms, {"nom_pl", "nom_pl2", "gen_pl", "dat_pl", "dat_pl2", "acc_pl", "acc_pl2", "loc_pl", "loc_pl2", "ins_pl"}, {"nebesá", "nebesia", "nebies", "nebesám", "nebesiam", "nebesá", "nebesia", "nebesách", "nebesiach", "nebesami"} ) end return forms, title end declensions["srdce"] = function(word, genitive) local forms = {} local stem = remove_suffix(word, "e") if ends_with(word, "ě") then stem = remove_suffix(word, "ě") end local title = "မလဟုတ်စှ်ေဆေၚ်စပ်ကဵု ''" .. word .. "'' <br>(pattern " .. pattern_link("srdce") .. ")" if NUMBER == "pl" then if ends_with(word, "ia") then stem = remove_suffix(word, "ia") else stem = remove_suffix(word, "a") end end if ends_with(stem, "[dtnl]") then stem = soften_last_consonant(stem) end -- Split into syllables local gen_pl = "" local syllable_count, syllables = split_into_syllables(stem) local word_syllable_count, word_syllables = split_into_syllables(word) -- Get the last and second-to-last syllables for rule checks local last_syllable = syllables[1] local penultimate_syllable = syllables[2] or "" local word_penultimate_syllable = word_syllables[2] or "" local last_char = get_last_char(stem) local stem_ultimate, stem_penultimate = get_last_letters(stem) -- 1 & 2. Lengthen the last syllable's vowel if conditions apply, -- otherwise leave the stem unchanged if penultimate syllable is long if not ends_with_consonant_cluster(last_syllable) or (ends_with(word, "ce") and matches_any(get_vowel(word_penultimate_syllable), {"r", "l"}) and TYPE ~= "dim") or ends_with(word, "ište") then if is_long(penultimate_syllable) then gen_pl = stem -- If penultimate syllable of the stem is long, use the stem unchanged else -- Otherwise, lengthen the last syllable's vowel gen_pl = remove_suffix(stem, last_syllable) .. lengthen_vowel(last_syllable) end end -- 3. Add a vowel between the last two consonants if the conditions apply if gen_pl == "" and (word == "citoslovce" or word == "vajce" or ends_with(word, "ce")) then if stem_penultimate ~= "j" and is_short(word_penultimate_syllable) then gen_pl = remove_suffix(stem, stem_ultimate) .. "ie" .. stem_ultimate elseif is_long(word_penultimate_syllable) or stem_penultimate == "j" then gen_pl = remove_suffix(stem, stem_ultimate) .. "e" .. stem_ultimate end end -- 4. Add "í" to the stem for specific words if matches_any(word, {"more", "oje", "pole", "lože"}) then gen_pl = harden_last_consonant(stem) .. "í" end -- Fallback: if none of the rules apply, return the original stem if gen_pl == "" then gen_pl = stem end if is_long(word_penultimate_syllable) or ends_with(stem, "j") then append_endings(forms, word, stem, "a", "u", nil, "i", "om", "a", gen_pl, "am", nil, "ach", "ami" ) else append_endings(forms, word, stem, "a", "u", nil, "i", "om", "ia", gen_pl, "iam", nil, "iach", "ami" ) end return forms, title end declensions["vysvedčenie"] = function(word, genitive) local forms = {} local stem = remove_suffix(word, "ie") if ends_with(word, "í") then stem = remove_suffix(word, "í") end local title = "မလဟုတ်စှ်ေဆေၚ်စပ်ကဵု ''" .. word .. "'' <br>(pattern " .. pattern_link("vysvedčenie") .. ")" append_endings(forms, word, stem, "ia", "iu", nil, "í", "ím", "ia", stem .. "í", "iam", nil, "iach", "iami" ) if word == "storočie" then append_second_plural(forms, "stáročia", "stáročí", "stáročiam", nil, "stáročiach", "stáročiami") end return forms, title end declensions["dievča"] = function(word, genitive) local forms = {} local stem = remove_suffix(word, "a") if ends_with(word, "ä") then stem = remove_suffix(word, "ä") end local ending = get_last_char(word) local title = "မလဟုတ်စှ်ေဆေၚ်စပ်ကဵု ''" .. word .. "'' <br>(pattern " .. pattern_link("dievča") .. ")" local gen_pl = "" local syllable_count, syllables = split_into_syllables(word) local last_syllable = syllables[1] local penultimate_syllable = syllables[2] or "" if is_long(penultimate_syllable) then gen_pl = stem .. ending .. "t" else gen_pl = append_ending(stem, "iat") end append_endings(forms, word, stem, ending .. "ťa", ending .. "ťu", nil, ending .. "ti", ending .. "ťom", ending .. "tá", gen_pl, ending .. "tám", nil, ending .. "tách", ending .. "tami" ) local pl_stem = harden_last_consonant(stem) append_second_plural(forms, pl_stem .. "ence", pl_stem .. "eniec", pl_stem .. "encom", nil, pl_stem .. "encoch", pl_stem .. "encami") if matches_any(word, {"kura", "strídža", "drumblence", "gajdence", "deťúrence"}) then switch_plural_forms(forms) --changes the prefered forms unset_alt_forms(forms) elseif matches_any(word, {"páža", "knieža", "kurča", "plánča", "pôrča", "zviera", "pachoľa", "mláďa", "dúpä", "chlápä", "žieňa", "nemluvňa"}) then unset_alt_forms(forms) elseif matches_any(word, {"prasa", "teľa", "šteňa"}) then local pl_stem = (word == "šteňa") and "šten" or stem append_second_plural(forms, pl_stem .. "ce", append_ending(pl_stem, "iec"), pl_stem .. "com", nil, pl_stem .. "coch", pl_stem .. "cami") switch_plural_forms(forms) --changes the prefered forms elseif word == "dieťa" then set_forms(forms, {"nom_pl", "gen_pl", "dat_pl", "acc_pl", "loc_pl", "ins_pl"}, {"deti", "detí", "deťom", "deti", "deťoch", "deťmi"} ) unset_alt_forms(forms) end return forms, title end declensions["နာမဝိသေသန"] = function(word, genitive) local forms = {} local title = "မလဟုတ်စှ်ေဆေၚ်စပ်ကဵု ''" .. word .. "'' (adjective declension)" local ultimate, penultimate = get_last_letters(word) local lemma_form = word if NUMBER == "pl" then if ends_with(word, "é") then lemma_form = remove_suffix(word, "é") .. "ý" elseif ends_with(word, "ie") then lemma_form = remove_suffix(word, "ie") .. "í" elseif ends_with_any(word, {"ove", "ine"}) then lemma_form = remove_suffix(word, "e") elseif ends_with(word, "e") then lemma_form = remove_suffix(word, "e") .. "y" elseif ends_with(word, "í") and not soft_consonants_set[penultimate] then lemma_form = remove_suffix(word, "í") .. "ý" elseif ends_with(word, "i") and not soft_consonants_set[penultimate] then lemma_form = remove_suffix(word, "i") .. "y" end else if GENDER == "f" or GENDER == "n" then if ends_with_any(word, {"á", "é"}) then lemma_form = remove_last_char(word) .. "ý" elseif ends_with_any(word, {"ia", "ie"}) then lemma_form = remove_suffix(remove_last_char(word), "i") .. "í" elseif ends_with_any(word, {"ova", "ovo", "ina", "ino"}) then lemma_form = remove_last_char(word) elseif ends_with_any(word, {"a", "e"}) then lemma_form = remove_last_char(word) .. "y" end end end local forms_raw = m_adj.do_generate_forms({pagename=lemma_form}, "adjective").forms set_forms(forms, {"nom_sg"}, {forms_raw["nom_" .. get_first_char(GENDER)][1].form} ) -- Singular if GENDER == "f" then set_forms(forms, {"gen_sg", "dat_sg", "loc_sg", "ins_sg"}, { forms_raw["gen_f"][1].form, forms_raw["dat_f"][1].form, forms_raw["loc_f"][1].form, forms_raw["ins_f"][1].form } ) else set_forms(forms, {"gen_sg", "dat_sg", "loc_sg", "ins_sg"}, { forms_raw["gen_mn"][1].form, forms_raw["dat_mn"][1].form, forms_raw["loc_mn"][1].form, forms_raw["ins_mn"][1].form } ) end -- special accusative singular if GENDER == "m-pr" or GENDER == "m-anml" then set_forms(forms, {"acc_sg"}, {forms_raw["acc_m_an"][1].form} ) elseif GENDER == "m-in" then set_forms(forms, {"acc_sg"}, {forms_raw["acc_m_in"][1].form} ) else set_forms(forms, {"acc_sg"}, {forms_raw["acc_" .. get_first_char(GENDER)][1].form} ) end -- Plural set_forms(forms, {"gen_pl", "dat_pl", "loc_pl", "ins_pl"}, { forms_raw["gen_p"][1].form, forms_raw["dat_p"][1].form, forms_raw["loc_p"][1].form, forms_raw["ins_p"][1].form } ) if GENDER == "m-pr" then set_forms(forms, {"nom_pl", "acc_sg", "acc_pl"}, {forms_raw["nom_mp_an"][1].form, forms_raw["acc_m_an"][1].form, forms_raw["acc_mp_an"][1].form} ) else set_forms(forms, {"nom_pl", "acc_pl"}, {forms_raw["nom_fnp"][1].form, forms_raw["acc_fnp"][1].form} ) end return forms, title end declensions["indeclinable"] = function(word, genitive) local forms = {} local title = "မလဟုတ်စှ်ေဆေၚ်စပ်ကဵု ''" .. word .. "'' (indeclinable)" local cases = {"nom", "gen", "dat", "acc", "loc", "ins"} -- List of cases local numbers = {"sg", "pl"} for _, case in ipairs(cases) do for _, number in ipairs(numbers) do local form_key = case .. "_" .. number forms[form_key] = word end end -- Surnames ending with -ů, -eje, -oje and -ovie if TYPE == "surn" and ends_with_any(word, {"ů", "eje", "e", "oje", "ovie"}) then append_second_plural(forms, word .. "ovci", word .. "ovcov", word .. "ovcom", word .. "ovcov", word .. "ovcoch", word .. "ovcami") end return forms, title end --[=[ Partial declination functions ]=]-- function check_gender(gender) if gender == nil then return error("No gender entered. Please pass one of these values as parameter 1: m-pr, m-anml, m-in, f, n.") elseif allowed_genders_set[gender] then return gender else return error("Unknown gender. Please pass one of these values as parameter 1: m-pr, m-anml, m-in, f, n.") end end function determine_pattern(word, genitive) local pattern local phon_word = (PRONUNCIATION) and PRONUNCIATION or word local ultimate, penultimate = get_last_letters(phon_word) local first = get_first_char(phon_word) local dlan_endings = m_table.listToSet({"ň", "č", "ž", "ľ", "ď", "j", "š", "m", "z", "dz", "x"}) local dlan_exceptions_neg = m_table.listToSet({"reč", "seč", "lož", "beľ", "soľ", "mlaď", "meď", "myš", "voš"}) local dlan_exceptions_pos = m_table.listToSet({"obec", "pec", "čelusť", "kysť", "päsť", "Provence"}) local dlan_end_with_r_t = m_table.listToSet({"kader", "neter", "šír", "tvár", "činovať", "drobäť", "droboť", "hať", "hrochoť", "Hrochoť", "hrsť", "inovať", "labuť", "niť", "obeť", "paruť", "pažiť", "pečať", "perepúť", "perleť", "peruť", "pípeť", "plť", "postať", "prť", "púť", "sieť", "sihoť", "stať", "štvrť", "trať", "úvrať", "vňať", "violeť", "záhať", "žlť"}) local stroj_exceptions_pos = {"timbre", "cól", "gáfor", "hámor", "kôpor", "kufor", "Pôtor", "šiator", "pedál", "sandál", "kanál", "peniaz", "daniel"} local stroj_exceptions_neg = {"nesvár", "nešvár", "pár", "suchopár", "svár", "ker"} if matches_any(ultimate, {"r", "l"}) and penultimate == "e" and not ends_with(phon_word, "ier") and genitive == nil then genitive = phon_word .. "a" end if mw.ustring.find(phon_word, " ") or word == genitive then return "indeclinable" end if NUMBER == "pl" then if matches_any(ultimate, {"é", "i", "í"}) or (ultimate == "e" and ends_with(genitive, "ch")) then pattern = "adjective" elseif GENDER == "m-in" then if ultimate == "y" then pattern = "dub" else pattern = "stroj" end elseif GENDER == "f" then if ultimate == "y" then pattern = "žena" else pattern = "ulica" end elseif GENDER == "n" then if ultimate == "á" then pattern = "mesto" elseif penultimate == "i" and ultimate == "a" then pattern = "srdce" else if soft_consonants_set[penultimate] then pattern = "srdce" else pattern = "mesto" end end end else if GENDER == "m-pr" then if (matches_any(ultimate, {"y", "ý", "i", "í"}) and not ends_with_any(genitive, {"[yií]ho", "a"}) and not (TYPE == "surn" and matches_any(penultimate .. ultimate, {"ay", "ai"}))) or (matches_any(penultimate .. ultimate, {"ov", "in"}) and ends_with_any(genitive, {"ovho", "inho"})) then pattern = "နာမဝိသေသန" elseif ultimate == "a" or (TYPE == "surn" and matches_any(ultimate, {"e", "ě"}) and (penultimate .. ultimate == "ně" or ends_with(genitive, "u"))) then pattern = "hrdina" elseif (matches_any(ultimate, {"i", "í", "y", "e", "é", "ä"}) or (TYPE == "name" and matches_any(ultimate, {"ü", "ö", "ő"})) or matches_any(phon_word, {"Hrabě", "Poupě"})) and not (TYPE == "surn" and (ends_with_any(phon_word, {"ay", "ai", "eje", "oje", "ovie"}) or ends_with(genitive, "a"))) then pattern = "kuli" elseif TYPE == "surn" and ends_with_any(phon_word, {"ů", "eje", "oje", "ovie"}) then pattern = "indeclinable" else pattern = "chlap" end elseif GENDER == "m-in" or GENDER == "m-anml" then if matches_any(ultimate, {"y", "ý", "i", "í"}) or (matches_any(penultimate .. ultimate, {"ov", "in"}) and ends_with(genitive, "ho")) then pattern = "နာမဝိသေသန" elseif (soft_consonants_set[ultimate] or (matches_any(ultimate, {"r", "l"}) and penultimate == "e" and (ends_with(genitive, "[^e][rl]a"))) or ends_with_any(phon_word, {"ár", "iar", "ier"}) or matches_any(phon_word, stroj_exceptions_pos)) and not matches_any(phon_word, stroj_exceptions_neg) then pattern = "stroj" else pattern = "dub" end elseif GENDER == "f" then if matches_any(phon_word, {"gazdiná", "švagriná", "testiná", "ujčiná", "stryná", "kňažná", "kráľovná", "cisárovná", "cárovná", "šľachtičná", "princezná" }) then pattern = "gazdiná" elseif ultimate == "a" and not ends_with(genitive, "ej") then if soft_consonants_set[penultimate] or matches_any(penultimate, {"i", "y"}) or matches_any(phon_word, {"rozopra", "konopa", "večera"}) then pattern = "ulica" else pattern = "žena" end elseif matches_any(ultimate, {"a", "á"}) or (ends_with_any(phon_word, {"ova", "ina"}) and ends_with(genitive, "ej")) then pattern = "adjective" elseif ends_with(phon_word, "pani") or matches_any(phon_word, {"Mať", "mať", "mater", "mati"}) then pattern = "irregular" else if not dlan_exceptions_neg[phon_word] and (dlan_endings[ultimate] or dlan_exceptions_pos[phon_word] or dlan_end_with_r_t[phon_word] or (penultimate == "š" and ultimate == "ť" and not is_capital(first))) then pattern = "dlaň" else pattern = "kosť" end end if genitive then local g_ultimate = get_last_char(genitive) if g_ultimate == "y" then pattern = "žena" elseif g_ultimate == "i" then pattern = "kosť" end end elseif GENDER == "n" then if (ultimate == "o" or (penultimate == "u" and ultimate == "m") or (penultimate == "o" and ultimate == "n") or (penultimate == "m" and ultimate == "ä")) and not ends_with(genitive, "ho") then pattern = "mesto" elseif (penultimate == "i" and ultimate == "e") or ultimate == "í" then pattern = "vysvedčenie" elseif (ultimate == "e" or ultimate == "ě") and not ends_with(genitive, "ho") then pattern = "srdce" elseif matches_any(ultimate, {"a", "ä"}) then pattern = "dievča" elseif matches_any(ultimate, {"e", "é"}) or ends_with_any(phon_word, {"ovo", "ino"}) then pattern = "နာမဝိသေသန" else pattern = "indeclinable" end end end return pattern end function append_ending(stem1, ending) if matches_any(get_first_char(ending), {"e", "i", "é", "í"}) then return harden_last_consonant(stem1) .. ending else return stem1 .. ending end end function append_endings(forms, word, stem, end2, end3, end4, end5, end6, end7, gen_pl, end9, end10, end11, end12) forms["nom_sg"] = word forms["gen_sg"] = append_ending(stem, end2) forms["dat_sg"] = append_ending(stem, end3) if GENDER == "m-pr" or (GENDER == "f" and (ends_with_any(word, {"pani", "a", "á"}) or matches_any(word, {"Mať", "mať", "mater", "mati"}))) then forms["acc_sg"] = append_ending(stem, end4) else forms["acc_sg"] = word end forms["loc_sg"] = append_ending(stem, end5) forms["ins_sg"] = append_ending(stem, end6) local nom_pl = stem if ends_with_any(stem, {"k", "ch"}) and matches_any(GENDER, {"m-pr", "m-anml"}) and end7 == "i" then if ends_with(stem, "k") then nom_pl = remove_suffix(stem, "k") .. "c" else nom_pl = remove_suffix(stem, "ch") .. "s" end end forms["nom_pl"] = append_ending(nom_pl, end7) forms["gen_pl"] = gen_pl forms["dat_pl"] = append_ending(stem, end9) if GENDER == "m-pr" or end10 or (GENDER == "f" and (ends_with_any(word, {"pani"}) or matches_any(word, {"Mať", "mať", "mater", "mati"}))) then forms["acc_pl"] = append_ending(stem, end10) else forms["acc_pl"] = forms["nom_pl"] end forms["loc_pl"] = append_ending(stem, end11) forms["ins_pl"] = append_ending(stem, end12) end function set_forms(forms, indices, values) for i = 1, #indices do forms[indices[i]] = values[i] end end function switch_plural_forms(forms) local indices = {"nom_pl", "gen_pl", "dat_pl", "acc_pl", "loc_pl", "ins_pl"} for _, index in ipairs(indices) do forms[index], forms[index .. "_alt"] = forms[index .. "_alt"], forms[index] end end function unset_alt_forms(forms) for key in pairs(forms) do if mw.ustring.find(key, "_alt$") then forms[key] = nil end end end function append_alternative_singular(forms, form2, form3, form4, form5, form6) forms["gen_sg2"] = (forms["gen_sg"] ~= form2) and form2 forms["dat_sg2"] = (forms["dat_sg"] ~= form3) and form3 if matches_any(GENDER, {"m-pr", "m-anml"}) or (GENDER == "f" and (ends_with_any(word, {"pani", "a", "á"}) or matches_any(word, {"Mať", "mať", "mater", "mati"}))) then forms["acc_sg2"] = (forms["acc_sg"] ~= form4) and form4 end forms["loc_sg2"] = (forms["loc_sg"] ~= form5) and form5 forms["ins_sg2"] = (forms["ins_sg"] ~= form6) and form6 end function append_alternative_plural(forms, form1, form2, form3, form4, form5, form6) forms["nom_pl2"] = (forms["nom_pl"] ~= form2) and form1 forms["gen_pl2"] = (forms["gen_pl"] ~= form2) and form2 forms["dat_pl2"] = (forms["dat_pl"] ~= form2) and form3 if form4 ~= nil and forms["acc_pl"] ~= form4 then forms["acc_pl2"] = form4 elseif forms["acc_pl"] ~= form1 then forms["acc_pl2"] = form1 end forms["loc_pl2"] = (forms["loc_pl"] ~= form2) and form5 forms["ins_pl2"] = (forms["ins_pl"] ~= form2) and form6 end function append_second_plural(forms, form1, form2, form3, form4, form5, form6) forms["nom_pl_alt"] = form1 forms["gen_pl_alt"] = form2 forms["dat_pl_alt"] = form3 if form4 ~= nil then forms["acc_pl_alt"] = form4 else forms["acc_pl_alt"] = forms["nom_pl_alt"] end forms["loc_pl_alt"] = form5 forms["ins_pl_alt"] = form6 end function append_animal_singular(forms, stem) set_forms(forms, {"gen_sg", "dat_sg", "acc_sg", "loc_sg"}, { append_ending(stem, "a"), append_ending(stem, "ovi"), append_ending(stem, "a"), append_ending(stem, "ovi") } ) end function get_last_char(str) local last = mw.ustring.sub(str, -1, -1) return last end function get_first_char(str) local first = mw.ustring.sub(str, 1, 1) return first end function remove_last_char(str) local stem = mw.ustring.sub(str, 1, -2) return stem end function is_capital(str) return mw.ustring.find(str, "[A-Z]") end function get_last_letters(word) local ultimate = get_last_char(word) local penultimate = get_last_char(remove_last_char(word)) local antepenultimate = get_last_char(remove_last_char(remove_last_char(word))) if (penultimate == "c" and ultimate == "h") or (penultimate == "d" and (ultimate == "z" or ultimate == "ž")) then ultimate = penultimate .. ultimate penultimate = antepenultimate antepenultimate = get_last_char(remove_last_char(remove_last_char(remove_last_char(word)))) end if (antepenultimate == "c" and penultimate == "h") or (antepenultimate == "d" and (penultimate == "z" or penultimate == "ž")) then penultimate = antepenultimate .. penultimate end if penultimate == "v" and consonants_set[ultimate] and not matches_any(ultimate, {"r", "l", "ŕ", "ĺ"}) then penultimate = "ʋ" end return ultimate, penultimate end function ends_with(word, suffix) -- Check if suffix matches the end of word word = (word ~= nil) and word or "" return mw.ustring.find(word, suffix .. "$") ~= nil end function ends_with_any(word, suffixes) for _, suffix in ipairs(suffixes) do if ends_with(word, suffix) then return true -- Return true if any suffix matches end end return false -- Return false if no suffix matches end function matches_any(value, list) for _, item in ipairs(list) do if value == item then return true end end return false end function get_vowel(syllable) -- Define patterns for diphthongs and vowels local diphthong_pattern = "ia|ie|iu|ô" local vowel_pattern = "[aeiouyáéíóúýäöőüű]" local syllabic_consonant_pattern = "[rl]" -- Check for a diphthong first local diphthong = mw.ustring.match(syllable, diphthong_pattern) if diphthong then return diphthong end -- Check for a single vowel local vowel = mw.ustring.match(syllable, vowel_pattern) if vowel then return vowel end -- Check for a syllabic consonant if no vowel is found local syllabic_consonant = mw.ustring.match(syllable, syllabic_consonant_pattern) if syllabic_consonant then return syllabic_consonant end return nil -- Return nil if no vowel or syllabic consonant is found end -- Function to split a word into characters and bigraphs function split_into_letter_units(word) local units = {} local i_word = 1 local i_pron = 1 local word_len = mw.ustring.len(word) local pron_len = PRONUNCIATION and mw.ustring.len(PRONUNCIATION) or 0 while i_word <= word_len do local two_char = mw.ustring.sub(word, i_word, i_word + 1) -- Check if PRONUNCIATION forbids combining here local combine_forbidden = false if PRONUNCIATION then -- Advance pronunciation pointer to skip slashes until it aligns with actual letters -- We only block combination if the *next* character in PRON is a slash while i_pron <= pron_len and mw.ustring.sub(PRONUNCIATION, i_pron, i_pron) == "/" do i_pron = i_pron + 1 end -- Look ahead: is the *next* pronunciation char a slash? if i_pron < pron_len then local next_ch = mw.ustring.sub(PRONUNCIATION, i_pron + 1, i_pron + 1) if next_ch == "/" then combine_forbidden = true end end end -- Normal combination if allowed if not combine_forbidden and (bigraphs_set[two_char] or diphthongs_set[two_char]) then table.insert(units, two_char) i_word = i_word + 2 i_pron = i_pron + 2 -- move pronunciation index along with it else -- Fallback: single character local char = mw.ustring.sub(word, i_word, i_word) table.insert(units, char) i_word = i_word + 1 i_pron = i_pron + 1 end end return units end -- check if a unit is a vowel or syllabic element function is_vowel(unit, prev_unit, next_unit) if diphthongs_set[unit] then return true end if vowels_set[unit] then return true end -- Check if 'r' or 'l' are syllabic (preceded and followed by consonants) if matches_any(unit, {"r", "ŕ", "l", "ĺ"}) and prev_unit and next_unit and not (vowels_set[prev_unit] or vowels_set[next_unit] or diphthongs_set[prev_unit] or diphthongs_set[next_unit]) then return true end return false end -- Function to split a word into syllables according to Slovak rules function split_into_syllables(word) local units = split_into_letter_units(word) local syllables = {} local current_syllable = "" local i = 1 local length = #units local first_vowel_found = false -- Flag to indicate when the first vowel has been encountered -- Iterate over the units in the word while i <= length do local unit = units[i] local next_unit = i < length and units[i + 1] or nil local previous_unit = i > 1 and units[i - 1] or nil local is_current_vowel = is_vowel(unit, previous_unit, next_unit) -- If we haven't encountered the first vowel, keep adding to the first syllable if not first_vowel_found then current_syllable = current_syllable .. unit if is_current_vowel then first_vowel_found = true -- Mark that the first vowel has been found end else if is_current_vowel then -- If a vowel is encountered after the first vowel has been found, finalize the current syllable if current_syllable ~= "" and is_vowel(previous_unit, nil, nil) then table.insert(syllables, current_syllable) current_syllable = "" end current_syllable = current_syllable .. unit else -- Handling consonants between vowels local consonant_cluster = unit -- Collect any consecutive consonants into a cluster local j = i + 1 while j <= length and not is_vowel(units[j], units[j - 1], units[j + 1]) do consonant_cluster = consonant_cluster .. units[j] j = j + 1 end local consonant_count = mw.ustring.len(consonant_cluster) if next_unit and is_vowel(next_unit, unit, units[j]) then -- Apply syllable rules based on the number of consonants in the cluster if consonant_count == 1 then -- Rule 3: Single consonant goes to the next syllable table.insert(syllables, current_syllable) -- End the current syllable without the consonant current_syllable = consonant_cluster -- Start the next syllable with the consonant elseif consonant_count == 2 then -- Rule 4: Two consonants split between syllables current_syllable = current_syllable .. mw.ustring.sub(consonant_cluster, 1, 1) table.insert(syllables, current_syllable) current_syllable = mw.ustring.sub(consonant_cluster, 2, 2) else -- Rule 5: Three or more consonants - first goes with current syllable, rest with next current_syllable = current_syllable .. mw.ustring.sub(consonant_cluster, 1, 1) table.insert(syllables, current_syllable) current_syllable = mw.ustring.sub(consonant_cluster, 2) end i = j - 1 -- Adjust the index to skip the processed consonants else current_syllable = current_syllable .. unit end end end i = i + 1 end -- Add any remaining characters as the final syllable if #current_syllable > 0 then table.insert(syllables, current_syllable) end -- Reverse the syllables array for the requested output order local reversed_syllables = {} for j = #syllables, 1, -1 do reversed_syllables[#reversed_syllables + 1] = syllables[j] end -- Return the count of syllables and the reversed syllable array return #syllables, reversed_syllables end function is_long(syllable) return mw.ustring.find(syllable, "[áéíóúýôĺŕ]") ~= nil or mw.ustring.find(syllable, "i[aeu]") ~= nil end function is_short(syllable) return not is_long(syllable) end local function get_last_consonant_before_vowel(syllable) local vowel = get_vowel(syllable) -- If there is no vowel in the syllable, return false if not vowel then return false end -- Find the position of the vowel in the syllable local vowel_pos = mw.ustring.find(syllable, vowel) -- Loop backwards from the position of the vowel to find the last consonant for i = vowel_pos - 1, 1, -1 do local char = mw.ustring.sub(syllable, i, i) if not mw.ustring.find(char, "[aeiouáéíóúýôä]") then return char -- Return the last consonant before the vowel end end return false -- Return false if no consonant is found before the vowel end -- Function to lengthen the last vowel in a syllable if it’s not already long function lengthen_vowel(syllable) if is_long(syllable) then return syllable -- Return as-is if the syllable is already long end local lengthening_map = { ["a"] = "á", ["i"] = "í", ["y"] = "ý", ["u"] = "ú", ["ä"] = "ia", ["e"] = "ie", ["o"] = "ô" } local cons_map = { ["ď"] = "d", ["ť"] = "t", ["ň"] = "n", ["ľ"] = "l" } -- Check for regular vowels first and replace if found for vowel, long_vowel in pairs(lengthening_map) do if mw.ustring.find(syllable, vowel) then -- if there is a soft consonant before "a", it becomes "ia" instead of "á" local last_cons = get_last_consonant_before_vowel(syllable) or "" if soft_consonants_set[last_cons] and last_cons ~= "j" and vowel == "a" then long_vowel = "ia" end -- if a or ä changes into "ia", the previous consonant should be written as hard if matches_any(vowel, {"ä", "a"}) and matches_any(last_cons, {"ď", "ť", "ň", "ľ"}) then syllable = mw.ustring.gsub(syllable, last_cons .. vowel, cons_map[last_cons] .. vowel, 1) end syllable = mw.ustring.gsub(syllable, vowel, long_vowel, 1) return syllable -- Return immediately after replacing a regular vowel end end -- Only replace "r" and "l" if no other vowels were found if not mw.ustring.find(syllable, "[aeiouyáéíóúýôä]") then syllable = mw.ustring.gsub(syllable, "r", "ŕ") syllable = mw.ustring.gsub(syllable, "l", "ĺ") end return syllable end -- Helper function to determine if the syllable ends with a consonant cluster function ends_with_consonant_cluster(last_syllable) local last_char = get_last_char(last_syllable) local second_last_char = mw.ustring.sub(last_syllable, -2, -2) local third_last_char = mw.ustring.sub(last_syllable, -3, -3) local last_two_chars = mw.ustring.sub(last_syllable, -2) -- Check if the syllable contains any regular vowels local has_vowel = mw.ustring.find(last_syllable, "[aeiouyáéíóúýôä]") if has_vowel then -- If the last two characters form a digraph, check the third-last character for a cluster if bigraphs_set[last_two_chars] then return not vowels_set[third_last_char] else -- If no digraph, just check the last two characters return not (vowels_set[last_char] or vowels_set[second_last_char] or diphthongs_set[last_char] or diphthongs_set[second_last_char]) end else -- No regular vowel; treat `r` or `l` as syllabic if either is in the last two characters if matches_any(last_char, {'ŕ', 'ĺ'}) or matches_any(second_last_char, {'ŕ', 'ĺ'}) then return false elseif mw.ustring.find(last_syllable, "[bcčdďfghjkľmnňpqsštťvwxzž][rl][bcčdďfghjkľmnňpqysštťvwxzž][rl]$") then return true else -- No syllabic `r` or `l`, so both characters are treated as consonants return not vowels_set[last_char] and not vowels_set[second_last_char] end end end function remove_mobile_vowel(word) local units = split_into_letter_units(word) -- Split word into units for i = #units, 1, -1 do local unit = units[i] if matches_any(unit, {"e", "ie", "o", "i", "á"}) then -- Remove the mobile vowel unit and reassemble the word table.remove(units, i) return table.concat(units) end end return word -- Return the original word if no mobile vowel is found end function soften_last_consonant(str) local consonants_t = { ["c"] = "č", ["d"] = "ď", ["l"] = "ľ", ["n"] = "ň", ["s"] = "š", ["t"] = "ť", ["z"] = "ž" } local last_char = get_last_char(str) -- Check if the last character is in consonants_t and replace if needed return consonants_t[last_char] and remove_last_char(str) .. consonants_t[last_char] or str end function harden_last_consonant(str) local soft_to_hard = { ["ď"] = "d", ["ť"] = "t", ["ň"] = "n", ["ľ"] = "l" } local last_char = get_last_char(str) -- Check if the last character is a soft consonant and replace if needed return soft_to_hard[last_char] and remove_last_char(str) .. soft_to_hard[last_char] or str end function remove_suffix(form, suffix) if mw.ustring.find(form, suffix .. "$") then local length = mw.ustring.len(suffix) return mw.ustring.sub(form, 1, -length-1) end return form end function pattern_link(pattern) return "''[[Appendix:Slovak declension pattern " .. pattern .. "|" .. pattern .. "]]''" end function decline_with_more_stems(genitive) local genitives = {} for part in mw.ustring.gmatch(genitive, "[^/]+") do table.insert(genitives, part) end local forms, title = declensions[PATTERN](PAGENAME, genitives[1]) normalize_forms(forms) local forms2, title2 = declensions[PATTERN](PAGENAME, genitives[2]) normalize_forms(forms2) append_alternative_singular(forms, forms2["gen_sg"], forms2["dat_sg"], forms2["acc_sg"], forms2["loc_sg"], forms2["ins_sg"]) append_alternative_plural(forms, forms2["nom_pl"], forms2["gen_pl"], forms2["dat_pl"], forms2["acc_pl"], forms2["loc_pl"], forms2["ins_pl"]) return forms, title end function split_into_units(expression, genitive) -- Split the original expression into words local words = {} for word in mw.ustring.gmatch(expression, "%S+") do table.insert(words, word) end -- Split the genitive phrase into words, if provided local gen_words = {} if genitive then for word in mw.ustring.gmatch(genitive, "%S+") do table.insert(gen_words, word) end -- Check if the genitive phrase has the same structure as the original if #gen_words ~= #words then error("Genitive phrase must have the same number of words as the original expression.") end end -- Combine words into units, grouping prepositional phrases for both expressions local units = {} local gen_units = {} local i = 1 while i <= #words do if prepositions_set[words[i]] and words[i + 1] then -- Combine preposition with the following words as one unit local phrase = words[i] local gen_phrase = genitive and gen_words[i] or nil i = i + 1 while i <= #words do phrase = phrase .. " " .. words[i] if genitive then gen_phrase = gen_phrase .. " " .. gen_words[i] end if i == #words then table.insert(units, phrase) if genitive then table.insert(gen_units, gen_phrase) end end i = i + 1 end else -- Add standalone word as a unit table.insert(units, words[i]) if genitive then table.insert(gen_units, gen_words[i]) end i = i + 1 end end -- Return both units and genitive units return units, gen_units end function generate_combined_forms(units, gen_units) -- Process each unit to generate forms local all_forms = {} local patterns = "" for i = 1, #units do local unit = units[i] local gen_unit = gen_units[i] if conjunctions_set[unit] or unit == gen_unit then -- Conjunctions are indeclinable local forms = declensions["indeclinable"](unit, gen_unit) table.insert(all_forms, forms) else -- Decline each unit using determine_pattern and declensions local pattern = determine_pattern(unit, gen_unit) local forms, title = declensions[pattern](unit, gen_unit) normalize_forms(forms) table.insert(all_forms, forms) end end -- Combine forms into a single forms table local combined_forms = {} local cases = {"nom", "gen", "dat", "acc", "loc", "ins"} local numbers = {"sg", "pl"} -- check if vocative and plural 2 forms are necessary for _, forms in ipairs(all_forms) do if forms["voc_sg"] and #cases == 6 then table.insert(cases, "voc") end if forms["nom_pl_alt"] and #numbers == 2 then table.insert(numbers, "pl_alt") end end for _, case in ipairs(cases) do for _, number in ipairs(numbers) do local form_key = case .. "_" .. number local combined_form, highest_index = {}, 1 -- Gather primary and numbered alternative forms (e.g., gen_sg2, gen_sg3) for _, forms in ipairs(all_forms) do local primary_form = forms[form_key] or forms["nom_" .. number] or forms[case .. "_pl"] table.insert(combined_form, primary_form) -- Check the highest alternative index for alt_index = 2, 4 do local alt_key = form_key .. alt_index if forms[alt_key] then highest_index = alt_index end end end -- Combine primary forms combined_forms[form_key] = mw.ustring.gsub(table.concat(combined_form, " "), "^%s+", "") -- Combine alternative forms if present if highest_index > 1 then for alt_index = 2, highest_index do -- Check and add numbered alternative forms local alt_key = form_key .. alt_index alt_form = {} for _, forms in ipairs(all_forms) do local primary_form = forms[form_key] or forms["nom_" .. number] if forms[alt_key] then table.insert(alt_form, forms[alt_key]) else table.insert(alt_form, primary_form) end end combined_forms[alt_key] = mw.ustring.gsub(table.concat(alt_form, " "), "^%s+", "") end end end end return combined_forms end function normalize_forms(forms) -- Step 1: Remove forms based on NUMBER if NUMBER == "sg" then for key in pairs(forms) do if mw.ustring.find(key, "_pl") then forms[key] = nil -- Remove plural forms if "n" is "sg" end end elseif NUMBER == "pl" then for key in pairs(forms) do if mw.ustring.find(key, "_sg") then forms[key] = nil -- Remove singular forms if "n" is "pl" end end end -- Step 2: Ensure all mandatory indices are set local cases = {"nom", "gen", "dat", "acc", "loc", "ins"} local numbers = {"sg", "pl"} for _, case in ipairs(cases) do for _, number in ipairs(numbers) do local form_key = case .. "_" .. number if not forms[form_key] then forms[form_key] = "&mdash;" -- Set missing forms to &mdash; end end end -- Step 3: Create missing _pl_alt indices if at least one exists local has_alt_plural = false for key in pairs(forms) do if mw.ustring.find(key, "_pl_alt") then has_alt_plural = true break end end if has_alt_plural then for _, case in ipairs(cases) do local form_key_alt = case .. "_pl_alt" if not forms[form_key_alt] then forms[form_key_alt] = "&mdash;" -- Create missing _pl_alt forms end end end -- Step 4: Create vocative plural forms if voc_sg exists if forms["voc_sg"] then forms["voc_pl"] = forms["nom_pl"] -- Set voc_pl to nom_pl if has_alt_plural then forms["voc_pl_alt"] = forms["nom_pl_alt"] -- Set voc_pl_alt to nom_pl_alt if it exists end end end function specified_by_user(forms, args) local cases = {nom = true, gen = true, dat = true, acc = true, voc = true, loc = true, ins = true} local numbers = {sg = true, pl = true} for key, value in pairs(args) do -- Match the pattern "<case>_<number><optional digit>" using mw.ustring.match local case, number, optional_digit = mw.ustring.match(key, "^(%a%a%a)_(%a%a)(%d?)$") -- Check if it matches the cases and numbers you want if case and cases[case] and number and numbers[number] then forms[key] = make_link(value, case .. "|" .. get_first_char(number)) end end end function make_link(link, accel_form) local new_link = link -- If link is not empty, valid, and not "&mdash;", create the full link if link ~= "" and link and link ~= "&mdash;" then new_link = m_links.full_link({lang = lang, term = link, accel = {form = accel_form}}) end return new_link end function make_table_header(title) return m_inflection_table.make_top{ title = title, palette = 'blue', tall = 'yes' } end function make_simple_row(forms, case, mnw_case) local case_code = mw.ustring.sub(case, 1, 3) local row = "<tr><th>" .. mnw_case .. "</th>" -- Singular if NUMBER ~= "pl" then row = row .. "<td><span lang=\"sk\">" .. make_link(forms[case_code .. "_sg"], case_code .. "|s") .. "</span>" -- Loop to check and display secondary singular forms in the same cell for i = 2, 4 do local form_key = case_code .. "_sg" .. i if not forms[form_key] then break -- Exit loop if form doesn't exist end row = row .. ",<br /><span lang=\"sk\">" .. make_link(forms[form_key], case_code .. "|s") .. "</span>" end row = row .. "</td>" end -- Plural if NUMBER ~= "sg" then -- Primary plural form row = row .. "<td><span lang=\"sk\">" .. make_link(forms[case_code .. "_pl"], case_code .. "|p") .. "</span>" -- Loop to check and display secondary plural forms in the same cell for i = 2, 4 do local form_key = case_code .. "_pl" .. i if not forms[form_key] then break -- Exit loop if form doesn't exist end row = row .. ",<br /><span lang=\"sk\">" .. make_link(forms[form_key], case_code .. "|p") .. "</span>" end row = row .. "</td>" -- Check for alternative plural and add it in a separate cell if forms[case_code .. "_pl_alt"] then row = row .. "<td><span lang=\"sk\">" .. make_link(forms[case_code .. "_pl_alt"], case_code .. "|p") .. "</span></td>" end end row = row .. "</tr>" return row end function make_table_header2(forms) local tr_open = "<tr><th></th>" local singular = "<th>ကိုန်ဨကဝုစ်</th>" local plural = "<th>ကိုန်ဗဟုဝစ်</th>" local plural1 = "<th>ကိုန်ဗဟုဝစ် ၁</th>" local plural2 = "<th>ကိုန်ဗဟုဝစ် ၂</th>" local tr_close = "</tr>" local alt_plural = false if forms["nom_pl_alt"] or forms["gen_pl_alt"] or forms["dat_pl_alt"] or forms["acc_pl_alt"] or forms["loc_pl_alt"] or forms["ins_pl_alt"] then alt_plural = true end local header if NUMBER == "sg" then header = tr_open .. singular .. tr_close elseif NUMBER == "pl" then if alt_plural then header = tr_open .. plural1 .. plural2 .. tr_close else header = tr_open .. plural .. tr_close end elseif alt_plural then header = tr_open .. singular .. plural1 .. plural2 .. tr_close else header = tr_open .. singular .. plural .. tr_close end return header end function make_table_footer() return '\n' .. m_inflection_table.make_bottom{} end -- Make the table function make_table(forms, title) for key, form in pairs(forms) do -- check for empty strings and nil's if form == "" or not form then forms[key] = "&mdash;" end end local final = make_table_header(title) final = final .. make_table_header2(forms) final = final .. make_simple_row(forms, "nominative", "မဒုၚ်ယၟု") final = final .. make_simple_row(forms, "genitive", "ဗဳဇဂကူ") final = final .. make_simple_row(forms, "dative", "ပြကမ္မကာရက") final = final .. make_simple_row(forms, "accusative", "ကမ္မကာရက") if forms["voc_sg"] then final = final .. make_simple_row(forms, "vocative", "ပရေၚ်ဂယိုၚ်လမျီု") end final = final .. make_simple_row(forms, "locative", "ခၞံဗဒှ်ဌာန်မတန်တဴ") final = final .. make_simple_row(forms, "instrumental", "တိၚ်တိုက်ကပေါတ်ကွိၚ်ကွိုက်") final = final .. make_table_footer() return final end return export 2njsra3w8x5zl22g07kbsvsczi0l3z7 401118 401117 2026-08-13T13:11:16Z 咽頭べさ 33 401118 Scribunto text/plain --[=[ This module contains functions for creating inflection tables for Slovak nouns. ]=]-- local export = {} -- Within this module, declensions are the functions that do the actual -- declension by creating the forms of a basic noun. -- They are defined further down. --local lemma = "Bratislava" local declensions = {} local lang = require("Module:languages").getByCode("sk") local m_table = require("Module:table") local m_links = require("Module:links") local m_adj = require("Module:sk-adjective") local m_inflection_table = require("Module:inflection-table") local allowed_genders = { "m-pr", "m-anml", "m-in", "f", "n" } local allowed_genders_set = m_table.listToSet(allowed_genders) local hard_consonants = {"d", "t", "n", "l", "h", "ch", "k", "g"} local soft_consonants = {"ď", "ť", "ň", "ľ", "ž", "š", "č", "dž", "c", "dz", "j"} local ambiguous_consonants = {"b", "m", "p", "r", "s", "v", "z", "f"} local hard_consonants_set = m_table.listToSet(hard_consonants) local soft_consonants_set = m_table.listToSet(soft_consonants) local ambiguous_consonants_set = m_table.listToSet(ambiguous_consonants) local consonants = m_table.append(hard_consonants, soft_consonants, ambiguous_consonants) local consonants_set = m_table.listToSet(consonants) local short_vowels = {"a", "e", "i", "o", "u", "y", "ä", "ö", "ü"} local long_vowels = {"á", "é", "í", "ó", "ú", "ý", "ő", "ű"} local diphthongs = {"ia", "ie", "iu", "ô"} local short_vowels_set = m_table.listToSet(short_vowels) local long_vowels_set = m_table.listToSet(long_vowels) local diphthongs_set = m_table.listToSet(diphthongs) local vowels = m_table.append(short_vowels, long_vowels) local vowels_set = m_table.listToSet(vowels) local obstruents = {"p", "t", "k", "b", "d", "g", "f", "s", "š", "ch", "z", "ž", "č", "dž"} --"v" removed?? local sonorants = {"m", "n", "l", "r", "ʋ", "v"} --"v" added?? local obstruents_set = m_table.listToSet(obstruents) local sonorants_set = m_table.listToSet(sonorants) local bigraphs = {"ch", "dz", "dž"} local bigraphs_set = m_table.listToSet(bigraphs) local prepositions = {"bez", "bezo", "cez", "cezo", "do", "k", "ku", "medzi", "na", "nad", "nado", "o", "do", "okrem", "po", "pod", "podo", "pre", "pred", "predo", "pri", "proti", "naproti", "oproti", "s", "so", "skrz", "u", "v", "vo", "z", "zo", "za"} -- Add more prepositions as needed local prepositions_set = m_table.listToSet(prepositions) local conjunctions = {"a"} -- Add more conjunctions as needed local conjunctions_set = m_table.listToSet(conjunctions) -- The main entry point. -- This is the only function that can be invoked from a template. function export.show(frame) local args = frame:getParent().args NAMESPACE = mw.title.getCurrentTitle().nsText if NAMESPACE == "" then PAGENAME = mw.loadData("Module:headword/data").pagename else if args["pagename"] then PAGENAME = args["pagename"] -- TEST: lemma else error("Pagename not specified") end end GENDER = check_gender(args[1]) NUMBER = args["n"] TYPE = args["t"] GEN_ENDING = args["g"] PLURAL = args["pl"] PLURAL2 = args["pl2"] PRONUNCIATION = args["p"] local genitive = args[2] local category = "" -- Check if PAGENAME is a multiword expression if not mw.ustring.find(PAGENAME, " ") then -- Single-word expression, handle as usual PATTERN = determine_pattern(PAGENAME, genitive) -- Category if NAMESPACE == "" then if PATTERN == "indeclinable" then category = "[[ကဏ္ဍ:နာမ်သၠဝ်ဝေန်နဳယျာနကဵုပါ်ပါဲထောံဟွံမာန်ဂမၠိုၚ်|" .. PAGENAME .. "]]" elseif PATTERN == "irregular" then category = "[[ကဏ္ဍ:နာမ်ကိုန်ဨကဝုစ်သၠဝ်ဝေန်နဳယျာဂမၠိုၚ်|" .. PAGENAME .. "]]" elseif PATTERN == "adjective" then category = "[[ကဏ္ဍ:နာမ်မဆေၚ်စပ်ကဵုနာမဝိသေသနသၠဝ်ဝေန်နဳယျာဂမၠိုၚ်|" .. PAGENAME .. "]]" else category = "[[ကဏ္ဍ:ဝေါဟာသၠဝ်ဝေန်နဳယျာမၞုံကဵုဝေါဟာ " .. PATTERN .. " မလဟုတ်စှ်ေဂမၠိုၚ်|" .. PAGENAME .. "]]" end if GENDER == "m-anml" then category = category .. "[[ကဏ္ဍ:ဝေါဟာသၠဝ်ဝေန်နဳယျာမၞုံကဵုဝေါဟာ chlap မလဟုတ်စှ်ေဂမၠိုၚ်|" .. PAGENAME .. "]]" end if PAGENAME == "cól" then category = category .. "[[ကဏ္ဍ:ဝေါဟာသၠဝ်ဝေန်နဳယျာမၞုံကဵုဝေါဟာ dub မလဟုတ်စှ်ေဂမၠိုၚ်|" .. PAGENAME .. "]]" end end local forms, title -- Find out if there are more genitive stems and if so, process them if genitive then if mw.ustring.find(genitive, "/") then forms, title = decline_with_more_stems(genitive) else forms, title = declensions[PATTERN](PAGENAME, genitive) normalize_forms(forms) end else forms, title = declensions[PATTERN](PAGENAME, genitive) normalize_forms(forms) end specified_by_user(forms, args) return make_table(forms, title) .. category end -- Multiword expressions -- Category if NAMESPACE == "" then category = "[[ကဏ္ဍ:ဝေါဟာသၠဝ်ဝေန်နဳယျာမဂၠိုၚ်ကဵုမအရေဝ်ဂမၠိုၚ်|" .. PAGENAME .. "]]" end -- Split into words local units, gen_units = split_into_units(PAGENAME, genitive) -- Process each unit to generate forms local combined_forms = generate_combined_forms(units, gen_units) -- Add forms specified by the user specified_by_user(combined_forms, args) -- Generate the final title and table local title = "မလဟုတ်စှ်ေဆေၚ်စပ်ကဵု ''" .. PAGENAME .. "'' (multiword term)" return make_table(combined_forms, title) .. category end --[=[ Declension functions ]=]-- declensions["chlap"] = function(word, genitive) local forms = {} local syllable_count, syllables = split_into_syllables(word) local mobile_removed = false -- Tracks if a mobile vowel was removed local words_with_mobile = {"kmotor", "švagor", "svokor", "lotor", "obor", "Uhor", "pochábeľ", "väzeň", "učeň", "posol", "diabol", "blázon", "Turek", "fanúšek", "center", "hypochonder", "Kafer", "neger", "gangster", "kapor", "zubor", "bobor", "orol", "pes" } local surn_ech_always_declined = {"Čech", "Plech", "Pech", "Štech", "Vojtech"} -- Determine the stem by removing mobile vowels if applicable local stem = word if (matches_any(word, words_with_mobile) or ends_with_any(word, {"ec", "ček", "íček", "ok"})) and not (TYPE == "surn" and (ends_with_any(word, {"[aeiouyáéíóúýäöüőű]ček", "[aeiouyáéíóúýäöüőű]čok"}) or syllable_count == 1)) and not matches_any(word, {"otrok"}) then stem = remove_mobile_vowel(word) mobile_removed = true -- Mark mobile vowel as removed end -- Adjust specific stems based on predefined mappings stem = ({["švec"] = "ševc", ["žnec"] = "ženc"})[word] or stem -- Remove certain endings for words ending with "us", "os", "es" and "o" if ends_with(word, "[uoea]s") then stem = mw.ustring.sub(word, 1, -3) end if ends_with(word, "o") then stem = remove_last_char(word) end -- Override if a specific argument is given if genitive and NUMBER ~= "pl" then stem = remove_last_char(genitive) if mw.ustring.sub(word, 1, -3) .. get_last_char(word) == remove_last_char(genitive) then mobile_removed = true end end -- Title for the declension table local title = "မလဟုတ်စှ်ေဆေၚ်စပ်ကဵု ''" .. word .. "'' <br>(pattern " .. pattern_link("chlap") .. ")" if TYPE == "surn" then if ends_with(word, "a[iy]") then title = "မလဟုတ်စှ်ေဆေၚ်စပ်ကဵု ''" .. word .. "'' <br>(pattern " .. pattern_link("chlap") .. " or " .. pattern_link("kuli") .. ")" elseif ends_with_any(word, {"ých", "ech"}) and not matches_any(word, surn_ech_always_declined) then title = "မလဟုတ်စှ်ေဆေၚ်စပ်ကဵု ''" .. word .. "'' <br>(pattern " .. pattern_link("chlap") .. " or indeclinable)" end end -- Helper variables for analyzing the last and penultimate characters local ultimate, penultimate = get_last_letters(stem) local first = get_first_char(word) -- Determine alternative dative and locative for some nouns if matches_any(word, {"človek", "pán", "čert", "diabol", "vlk", "pes", "Boh", "boh", "otec", "syn", "duch", "Kristus", "don", "šor"}) then set_forms(forms, {"dat_sg2", "loc_sg2"}, {stem .. "u", stem .. "u"}) end local nom_pl = "i" if PLURAL then if mw.ustring.find(PLURAL, "/") then local endings = {} for part in mw.ustring.gmatch(PLURAL, "[^/]+") do table.insert(endings, part) end nom_pl = endings[1] for i = 2, 4 do if endings[i] then set_forms(forms, {"nom_pl" .. i}, {append_ending(stem, endings[i])}) else break end end else nom_pl = PLURAL end elseif (ends_with_any(word, {"fil", "fób", "graf", "nóm"}) and not matches_any(word, {"xylograf", "typograf"})) or matches_any(word, {"cynik", "epik", "klasik", "stoik", "Brit", "Búr", "Gal", "Ír", "Dór", "Italik", "Ión", "Nór", "cár", "lodivod", "odkundes", "starík", "muž", "svat", "apoštol", "augur", "bán", "bogomil", "buržuj", "don", "druid", "eféb", "famulus", "héros", "man", "posol" }) then set_forms(forms, {"nom_pl2"}, {append_ending(stem, "ovia")}) elseif (ends_with_any(word, {"[^c]h", "g", "ček", "ek", "ik", "čik", "ok", "o", "duch"}) and word ~= "pes") or matches_any(word, {"otec", "syn", "ujec", "strýc", "svák", "svokor", "tesť", "švagor", "zať", "kmotor", "ded", "kmeť", "pobratim", "otčim", "zlosyn", "princ", "Bask", "Frank", "Ind", "Ink", "Kurd", "Dák", "Čudo", "Fríz", "Azték", "Asýr", "Etrusk", "Kazach", "Kašub", "odľud", "člen", "zved", "hňup", "cicerone"}) or (ends_with(word, "ch") and TYPE == "loan") or (ends_with_any(word, {"us", "es"}) and genitive ~= word .. "a") or matches_any(TYPE, {"comp-deverb", "surn", "name"}) or PLURAL == "ovia" then nom_pl = "ovia" if TYPE == "surn" then append_second_plural(forms, stem .. "ovci", stem .. "ovcov", stem .. "ovcom", stem .. "ovcov", stem .. "ovcoch", stem .. "ovcami") end elseif ends_with(word, "teľ") or (ends_with(word, "an") and is_capital(first)) or matches_any(word, {"občan", "dedinčan", "mešťan", "zeman", "ostrovan", "krajan", "dolňan", "horňan", "južan", "severan", "rodič", "dedič", "brat", "hosť", "manžel", "exmanžel", "sused", "žid", "Žid", "kresťan", "nekresťan", "pohan"}) then nom_pl = "ia" if word == "pohan" then set_forms(forms, {"nom_pl2"}, {append_ending(stem, "i")}) end end -- Determine instrumental plural ending local ins_pl = "mi" -- Default instrumental plural ending is "mi" if ultimate == "m" or mobile_removed or ends_with_any(word, {"o", "ius"}) or matches_any(word, {"hosť", "tesť", "Kopt"}) --obstruents_set[penultimate] and obstruents_set[ultimate] then ins_pl = "ami" end -- Populate forms table with singular and plural endings append_endings(forms, word, stem, "a", "ovi", "a", "ovi", "om", nom_pl, append_ending(stem, "ov"), "om", "ov", "och", ins_pl ) -- Surnames ending with -ých, -ech, -ai, -ay if TYPE == "surn" then if ends_with_any(word, {"ých", "ech"}) and not matches_any(word, surn_ech_always_declined) then append_alternative_singular(forms, word, word, word, word, word) append_alternative_plural(forms, word, word, word, word, word, word) elseif ends_with(word, "a[iy]") then append_alternative_singular(forms, word .. "ho", word .. "mu", word .. "ho", word .. "m", word .. "m") set_forms(forms, {"ins_pl2"}, {word .. "ami"}) end end -- Exceptions if word == "človek" then set_forms(forms, {"nom_pl", "gen_pl", "dat_pl", "acc_pl", "loc_pl", "ins_pl"}, {"ľudia", "ľudí", "ľuďom", "ľudí", "ľuďoch", "ľuďmi"} ) elseif word == "héros" then set_forms(forms, {"gen_sg", "dat_sg", "acc_sg", "loc_sg", "ins_sg", "nom_pl", "gen_pl", "dat_pl", "acc_pl", "loc_pl", "ins_pl", "gen_sg2", "dat_sg2", "acc_sg2", "loc_sg2", "ins_sg2", "nom_pl2", "gen_pl2", "dat_pl2", "acc_pl2", "loc_pl2", "ins_pl2"}, {"hérosa", "hérosovi", "hérosa", "hérosovi", "hérosom", "hérosi", "hérosov", "hérosom", "hérosov", "hérosoch", "hérosmi", "héroa", "héroovi", "héroa", "héroovi", "héroom", "héroovia", "héroov", "héroom", "héroov", "hérooch", "héroami"} ) end -- Vocative if matches_any(word, {"syn", "sváko", "švagor", "kmotor", "brat", "synko", "synáčik", "pán", "chlapec", "priateľ", "majster", "Boh", "boh", "Pán", "Syn", "Duch", "Ježiš", "Ježiško", "Kristus", "Spasiteľ", "Vykupiteľ", "Stvoriteľ", "Premožiteľ", "Kráľ", "Hospodin", "baránok", "Baránok", "tešiteľ", "Tešiteľ", "hriešnik", "protivník", "kresťan", "otec", "Otec", "chlap", "človek"}) then voc_stem = stem if word == "synáčik" then voc_stem = "synáčk" end if word == "pán" then voc_stem = "pan" end if word == "Pán" then voc_stem = "Pan" end if ends_with_any(word, {"teľ", "o"}) or matches_any(word, {"syn", "Syn", "Duch", "Ježiš", "Kráľ", "hriešnik", "synáčik", "baránok", "Baránok"}) then set_forms(forms, {"voc_sg"}, {append_ending(voc_stem, "u")}) else if ends_with_any(voc_stem, {"k", "c"}) then voc_stem = remove_last_char(voc_stem) .. "č" elseif ends_with(voc_stem, "h") then voc_stem = remove_last_char(voc_stem) .. "ž" end set_forms(forms, {"voc_sg"}, {append_ending(voc_stem, "e")}) end if not matches_any(word, {"človek", "pán", "brat"}) then set_forms(forms, {"voc_sg2"}, {word}) elseif word == "brat" then set_forms(forms, {"voc_sg2", "voc_sg3"}, {"bratu", "brat"}) end end return forms, title -- Return forms table and title for declension end declensions["hrdina"] = function(word, genitive) local forms = {} local title = "မလဟုတ်စှ်ေဆေၚ်စပ်ကဵု ''" .. word .. "'' <br>(pattern " .. pattern_link("hrdina") .. ")" local stem = remove_suffix(word, "a") if ends_with(word, "[oeě]") then stem = remove_last_char(word) if ends_with(word, "ě") and ends_with(stem, "[dtnl]") then stem = soften_last_consonant(stem) end end local nom_pl_ending = "ovia" if ends_with_any(word, {"ista", "ita"}) or (ends_with(word, "ta") and TYPE == "loan") then nom_pl_ending = "i" end local ins_pl_ending = "ami" if ends_with(word, "[aeiouyáéíóúýäöüőű]ta") and TYPE == "loan" then ins_pl_ending = "mi" end append_endings(forms, word, stem, "u", "ovi", "u", "ovi", "om", nom_pl_ending, stem .. "ov", "om", "ov", "och", ins_pl_ending ) if TYPE == "surn" then append_second_plural(forms, stem .. "ovci", stem .. "ovcov", stem .. "ovcom", stem .. "ovcov", stem .. "ovcoch", stem .. "ovcami") end if word == "buržoa" then set_forms(forms, {"dat_sg", "loc_sg", "ins_sg", "nom_pl", "gen_pl", "dat_pl", "acc_pl", "loc_pl"}, {"buržuovi", "buržuovi", "buržuom", "buržuovia", "buržuov", "buržuom", "buržuov", "buržuoch"} ) end return forms, title end declensions["kuli"] = function(word, genitive) local forms = {} local stem = word local title = "မလဟုတ်စှ်ေဆေၚ်စပ်ကဵု ''" .. word .. "'' <br>(pattern " .. pattern_link("kuli") .. ")" append_endings(forms, word, stem, "ho", "mu", "ho", "m", "m", "ovia", stem .. "ov", "om", "ov", "och", "ami" ) if TYPE == "surn" then append_second_plural(forms, stem .. "ovci", stem .. "ovcov", stem .. "ovcom", stem .. "ovcov", stem .. "ovcoch", stem .. "ovcami") end return forms, title end declensions["dub"] = function(word, genitive) local forms = {} local mobile_removed = false -- Tracks if a mobile vowel was removed local words_with_mobile = {"priemysel", "počet", "ocot", "bahor", "chrbát", "ker", "cukor", "uhor", "vietor", "víchor", "vôdor", "kotol", "kapor", "zubor", "bobor", "orol", "pes", "mozog", "uhol"} local syllable_count, syllables = split_into_syllables(word) -- Determine the stem by removing mobile vowels if applicable local stem = word if (matches_any(word, words_with_mobile) or (ends_with_any(word, {"íček", "ýček", "ok"}) and syllable_count ~= 1)) and not matches_any(word, {"polrok", "nárok", "zákrok", "rozkrok"}) then stem = remove_mobile_vowel(word) mobile_removed = true -- Mark mobile vowel as removed end -- Adjust specific stems based on predefined mappings stem = ({["mráz"] = "mraz", ["vietor"] = "vetr", ["kôl"] = "kol", ["stôl"] = "stol", ["vôl"] = "vol", ["chlieb"] = "chleb", ["ensemble"] = "ensembl"})[word] or stem -- Remove certain endings for words ending with "us", "os", "es" and "o" if (ends_with(word, "[uoe]s") and TYPE == "loan") or ends_with(word, "izmus") then stem = mw.ustring.sub(word, 1, -3) end if ends_with(word, "o") then stem = remove_last_char(word) end -- Pluralia tantum if NUMBER == "pl" then stem = remove_suffix(word, "y") end -- Override if a specific argument is given if genitive and NUMBER ~= "pl" then stem = remove_last_char(genitive) if stem == remove_last_char(remove_last_char(word)) .. get_last_char(word) then mobile_removed = true elseif stem == word then mobile_removed = false end end -- Set "mobile_removed" if genitive was set by the user if ends_with(word, "e[lr]") and ends_with(stem, "[^e][lr]") then mobile_removed = true end -- Title for the declension table local title = "မလဟုတ်စှ်ေဆေၚ်စပ်ကဵု ''" .. word .. "'' <br>(pattern " .. pattern_link("dub") .. ")" if GENDER == "m-anml" then if matches_any(word, {"vták", "vlk", "pes"}) then title = "မလဟုတ်စှ်ေဆေၚ်စပ်ကဵု ''" .. word .. "'' <br>(patterns " .. pattern_link("chlap") .. " <small>(singular, plural 1)</small> and " .. pattern_link("dub") .. " <small>(plural 2)</small>)" elseif PLURAL2 then title = "မလဟုတ်စှ်ေဆေၚ်စပ်ကဵု ''" .. word .. "'' <br>(patterns " .. pattern_link("chlap") .. " <small>(singular, plural 2)</small> and " .. pattern_link("dub") .. " <small>(plural 1)</small>)" else title = "မလဟုတ်စှ်ေဆေၚ်စပ်ကဵု ''" .. word .. "'' <br>(patterns " .. pattern_link("chlap") .. " <small>(singular)</small> and " .. pattern_link("dub") .. " <small>(plural)</small>)" end end -- Helper variables for analyzing the last and penultimate characters local ultimate, penultimate = get_last_letters(stem) local first = get_first_char(word) -- Determine genitive singular ending local gen_sg = "a" if (matches_any(TYPE, {"abstr", "comp-deverb", "material", "collect", "loan"}) or matches_any(GEN_ENDING, {"u", "u/a"}) or ends_with_any(word, {"izmus", "x"}) or (ends_with(word, "m") and not is_capital(first)) or (ends_with(word, "z") and is_capital(first))) and not matches_any(GEN_ENDING, {"a", "a/u"}) then gen_sg = "u" end -- Override genitive singular ending if a specific argument is given if genitive then gen_sg = get_last_char(genitive) end -- Determine locative singular ending based on specific suffixes and patterns local loc_sg = "e" if ends_with_any(word, {"k", "g", "h", "ch"}) or (ends_with(word, "i[ue]s") and TYPE == "loan") then loc_sg = "u" elseif (ends_with(word, "ér") or (ends_with(word, "ál") and not matches_any(word, {"bál", "paškál", "paušál", "šál", "škandál", "žurnál"})) or matches_any(word, {"Alžír", "klavír", "apríl", "jún", "júl"})) then loc_sg = "i" end -- Determine genitive plural ending local gen_pl = stem .. "ov" -- Default genitive plural ending is "ov" -- Adjust genitive plural for specific place names and patterns if is_capital(first) and (ends_with_any(word, {"any", "íky", "áky", "iaky"}) or matches_any(word, {"Krompachy", "Kubachy", "Veľbachy", "Spišské Vlachy", "Žabokreky", "Čechy", "Brezolupy", "Bruty", "Rakoľuby", "Rakúsy", "Prusy", "Veľaty", "Piešťany", "Bieščary"})) then local gen_stem = remove_last_char(word) -- Remove last character to get the base stem local syllable_count, syllables = split_into_syllables(gen_stem) local last_syllable = syllables[1] local penultimate_syllable = syllables[2] or "" -- Lengthen the vowel if the penultimate syllable is short, otherwise use unchanged stem if is_long(penultimate_syllable) then gen_pl = gen_stem else gen_pl = remove_suffix(gen_stem, last_syllable) .. lengthen_vowel(last_syllable) end end -- Special cases for genitive plural of specific words if word == "čas" then gen_pl = "čias" elseif word == "raz" then gen_pl = "ráz" end -- Determine instrumental plural ending local ins_pl = "mi" -- Default instrumental plural ending is "mi" if ultimate == "m" or mobile_removed or ends_with_any(word, {"o", "ius", "eus"}) or (penultimate == "m" and consonants_set[ultimate]) then ins_pl = "ami" end -- Doublets for instrumental plural if matches_any(word, {"schod", "schody", "fúz", "fúzy", "roh", "rohy", "paroh", "parohy", "čary", "orech"}) then set_forms(forms, {"ins_pl2"}, {stem .. "ami"}) elseif matches_any(word, {"zub", "dol", "most", "prst", "piest", "necht"}) then ins_pl = "ami" set_forms(forms, {"ins_pl2"}, {stem .. "mi"}) end -- Populate forms table with singular and plural endings append_endings(forms, word, stem, gen_sg, "u", nil, loc_sg, "om", "y", gen_pl, "om", nil, "och", ins_pl ) -- Alternative genitive ending if GEN_ENDING == "a/u" then set_forms(forms, {"gen_sg2"}, {stem .. "u"}) elseif GEN_ENDING == "u/a" then set_forms(forms, {"gen_sg2"}, {stem .. "a"}) end -- Exceptions if matches_any(word, {"sen", "dol"}) then set_forms(forms, {"loc_pl2"}, {stem .. "ách"}) elseif word == "čas" then set_forms(forms, {"gen_pl2"}, {"časov"}) end -- Animal nouns if GENDER == "m-anml" then append_animal_singular(forms, stem) if matches_any(word, {"vták", "vlk", "pes"}) or PLURAL2 then local forms2, title2 = declensions["chlap"](word, stem .. gen_sg) append_second_plural(forms, forms2["nom_pl"], forms2["gen_pl"], forms2["dat_pl"], forms2["acc_pl"], forms2["loc_pl"], forms2["ins_pl"]) if matches_any(word, {"vták", "vlk", "pes"}) then switch_plural_forms(forms) --changes the prefered forms -- Determine alternative dative and locative for some nouns if matches_any(word, {"vlk", "pes"}) then set_forms(forms, {"dat_sg2", "loc_sg2"}, {stem .. "u", stem .. "u"}) end end end end return forms, title -- Return forms table and title for declension end declensions["stroj"] = function(word, genitive) local forms = {} local mobile_removed = false -- Tracks if a mobile vowel was removed local words_with_no_mobile = {"kúpeľ", "červeň", "kameň", "jačmeň", "koreň", "prameň", "prsteň", "jeleň"} local first = get_first_char(word) -- Determine the stem by removing mobile vowels if applicable local stem = word if (ends_with_any(word, {"ec", "iec", "[^ti]eľ", "oľ", "[^i]eň", "eť", "[^i]er", "el"}) or (ends_with(word, "ac") and (is_capital(first) or word == "desaterac"))) and not matches_any(word, words_with_no_mobile) then stem = remove_mobile_vowel(word) mobile_removed = true -- Mark mobile vowel as removed end -- Adjust specific stems based on predefined mappings stem = ({["dážď"] = "dažď", ["kôš"] = "koš", ["nôž"] = "nož", ["kôň"] = "koň", ["timbre"] = "timbr"})[word] or stem -- Pluralia tantum if NUMBER == "pl" then stem = remove_suffix(word, "e") end -- Override if a specific argument is given if genitive and NUMBER ~= "pl" then stem = remove_last_char(genitive) if stem == remove_last_char(remove_last_char(word)) .. get_last_char(word) then mobile_removed = true elseif stem == word then mobile_removed = false end end -- Set "mobile_removed" if genitive was set by the user if ends_with(word, "e[lr]") and ends_with(stem, "[^e][lr]") then mobile_removed = true end -- Title for the declension table local title = "မလဟုတ်စှ်ေဆေၚ်စပ်ကဵု ''" .. word .. "'' <br>(pattern " .. pattern_link("stroj") .. ")" if GENDER == "m-anml" then if PLURAL2 then title = "မလဟုတ်စှ်ေဆေၚ်စပ်ကဵု ''" .. word .. "'' <br>(patterns " .. pattern_link("chlap") .. " <small>(singular, plural 2)</small> and " .. pattern_link("stroj") .. " <small>(plural 1)</small>)" else title = "မလဟုတ်စှ်ေဆေၚ်စပ်ကဵု ''" .. word .. "'' <br>(patterns " .. pattern_link("chlap") .. " <small>(singular)</small> and " .. pattern_link("stroj") .. " <small>(plural)</small>)" end elseif word == "cól" then title = "မလဟုတ်စှ်ေဆေၚ်စပ်ကဵု ''" .. word .. "'' <br>(pattern " .. pattern_link("stroj") .. " or " .. pattern_link("dub") .. ")" end -- Helper variables for analyzing the last and penultimate characters local ultimate, penultimate = get_last_letters(stem) local first = get_first_char(word) -- Determine genitive singular ending local gen_sg = "a" if ((matches_any(TYPE, {"abstr", "material"}) or matches_any(GEN_ENDING, {"u", "u/a"})) and not matches_any(word, {"jačmeň", "kameň", "olej", "loj", "vývoj", "rozvoj"})) and not matches_any(GEN_ENDING, {"a", "a/u"}) then gen_sg = "u" end -- Override genitive singular ending if a specific argument is given if genitive then gen_sg = get_last_char(genitive) end -- Determine genitive plural ending local gen_pl = stem .. "ov" -- Default genitive plural ending is "ov" -- Adjust genitive plural for specific place names and patterns if is_capital(first) and (ends_with_any(word, {"áre", "iare"}) or word == "Tlmače") then local gen_stem = remove_last_char(word) -- Remove last character to get the base stem local syllable_count, syllables = split_into_syllables(gen_stem) local last_syllable = syllables[1] local penultimate_syllable = syllables[2] or "" -- Lengthen the vowel if the penultimate syllable is short, otherwise use unchanged stem if is_long(penultimate_syllable) then gen_pl = gen_stem else gen_pl = remove_suffix(gen_stem, last_syllable) .. lengthen_vowel(last_syllable) end end -- Special cases for genitive plural of specific words if word == "Ladce" then gen_pl = "Ladiec" elseif word == "Vráble" then gen_pl = "Vrábeľ" elseif word == "peniaze" then gen_pl = "peňazí" elseif matches_any(word, {"deň", "kôň", "groš"}) then gen_pl = append_ending(stem, "í") end -- Determine instrumental plural ending local ins_pl = "mi" -- Default instrumental plural ending is "mi" if mobile_removed or (obstruents_set[penultimate] and obstruents_set[ultimate]) then ins_pl = "ami" end -- Populate forms table with singular and plural endings append_endings(forms, word, stem, gen_sg, "u", nil, "i", "om", "e", gen_pl, "om", nil, "och", ins_pl ) -- Alternative genitive ending if GEN_ENDING == "a/u" then set_forms(forms, {"gen_sg2"}, {stem .. "u"}) elseif GEN_ENDING == "u/a" then set_forms(forms, {"gen_sg2"}, {stem .. "a"}) end -- Exceptions if matches_any(word, {"deň", "poldeň"}) then set_forms(forms, {"nom_pl", "acc_pl", "loc_sg2"}, {append_ending(stem, "i"), append_ending(stem, "i"), append_ending(stem, "e")} ) elseif word == "ďateľ" then set_forms(forms, {"gen_sg2", "dat_sg2", "loc_sg2", "ins_sg2", "nom_pl2", "gen_pl2", "dat_pl2", "acc_pl2", "loc_pl2", "ins_pl2"}, {"ďatľa", "ďatľovi", "ďatľovi", "ďatľom", "ďatle", "ďatľov", "ďatľom", "ďatle", "ďatľoch", "ďatľami"} ) elseif word == "cól" then set_forms(forms, {"loc_sg2", "nom_pl2", "acc_pl2"}, {"cóle", "cóly", "cóly"} ) end -- Animal nouns if GENDER == "m-anml" then append_animal_singular(forms, stem) if PLURAL2 then local forms2, title2 = declensions["chlap"](word, stem .. gen_sg) append_second_plural(forms, forms2["nom_pl"], forms2["gen_pl"], forms2["dat_pl"], forms2["acc_pl"], forms2["loc_pl"], forms2["ins_pl"]) end end return forms, title -- Return forms table and title for declension end declensions["žena"] = function(word, genitive) local forms = {} local stem = remove_suffix(word, "a") local title = "မလဟုတ်စှ်ေဆေၚ်စပ်ကဵု ''" .. word .. "'' <br>(pattern " .. pattern_link("žena") .. ")" if ends_with(word, "ea") then title = "မလဟုတ်စှ်ေဆေၚ်စပ်ကဵု ''" .. word .. "'' <br>(pattern " .. pattern_link("žena") .. ", loanword ending with ''-ea'')" end -- Pluralia tantum or genitive if NUMBER == "pl" then stem = remove_suffix(word, "y") end if genitive and NUMBER ~= "pl" then stem = remove_suffix(genitive, "y") end -- Split into syllables local gen_pl = "" local syllable_count, syllables = split_into_syllables(stem) local word_syllable_count, word_syllables = split_into_syllables(word) -- Get the last and second-to-last syllables for rule checks local last_syllable = syllables[1] local penultimate_syllable = syllables[2] or "" local word_penultimate_syllable = word_syllables[2] or "" local ultimate, penultimate = get_last_letters(stem) -- 1. Add a vowel between the last two consonants of a cluster at the end of the stem if ends_with_consonant_cluster(last_syllable) or word_syllable_count == 1 then if (ultimate == "k" and not matches_any(word, {"banka"})) or (ultimate == "b" and (TYPE == "der" or not sonorants_set[penultimate])) or sonorants_set[ultimate] or matches_any(word, {"farba", "karta", "buchta", "astma"}) or (obstruents_set[penultimate] and ultimate == "v") then if penultimate ~= "j" and (word_syllable_count == 1 or is_short(word_penultimate_syllable)) then gen_pl = harden_last_consonant(remove_suffix(stem, ultimate)) .. "ie" .. ultimate if matches_any(word, {"handra", "perla", "metla", "slivka", "tehla", "vidly", "karta", "kvapka", "stovka", "doska"}) then gen_pl = remove_suffix(stem, ultimate) .. "á" .. ultimate set_forms(forms, {"gen_pl2"}, {harden_last_consonant(remove_suffix(stem, ultimate)) .. "ie" .. ultimate}) end if matches_any(word, {"jamka", "kvapka"}) then set_forms(forms, {"gen_pl2"}, {remove_suffix(stem, ultimate) .. "ô" .. ultimate}) end if matches_any(word, {"astma"}) then set_forms(forms, {"gen_pl2"}, {stem .. "í"}) end elseif obstruents_set[ultimate] and (is_long(word_penultimate_syllable) or penultimate == "j") then gen_pl = remove_suffix(stem, ultimate) .. "o" .. ultimate elseif (sonorants_set[ultimate] or ultimate == "v") and (is_long(word_penultimate_syllable) or penultimate == "j") then gen_pl = remove_suffix(stem, ultimate) .. "e" .. ultimate if penultimate ~= "j" then set_forms(forms, {"gen_pl2"}, {remove_suffix(stem, ultimate) .. "ie" .. ultimate}) end end end end -- 2. Add "í" if stem ends with a vowel or a soft consonant if gen_pl == "" and (vowels_set[ultimate] or matches_any(word, {"medaila", "pera", "kanva", "panva", "skepsa", "nuansa"})) then gen_pl = stem .. "í" if matches_any(word, {"nuansa"}) then set_forms(forms, {"gen_pl2"}, {remove_suffix(stem, last_syllable) .. lengthen_vowel(last_syllable)}) end end -- 3. Return the stem with no change if conditions match if gen_pl == "" and (is_long(penultimate_syllable) or ends_with_any(stem, {"tvor", "ov"}) or mw.ustring.match(last_syllable, "[Jj][eo]") or (TYPE == "loan" and matches_any(get_vowel(last_syllable), {"e", "o"}))) then gen_pl = stem end -- 4. Logic to use the lengthened vowel if conditions match if gen_pl == "" and (not (ends_with_consonant_cluster(last_syllable) or vowels_set[ultimate]) or (ends_with_consonant_cluster(last_syllable) and sonorants_set[penultimate] and obstruents_set[ultimate]) or (ends_with_consonant_cluster(last_syllable) and matches_any(penultimate, {"c", "s", "z", "š", "ž", "p"}) and matches_any(ultimate, {"t", "d"}))) and not matches_any(word, {"šachta", "mzda"}) then gen_pl = remove_suffix(stem, last_syllable) .. lengthen_vowel(last_syllable) if mw.ustring.find(stem, "au[bcčdďfghjklľmnňpqrsštťvwxzž]$") then gen_pl = remove_suffix(stem, "a" .. last_syllable) .. "á" .. last_syllable end end -- 5. long -á- instead of -ia- for some loanwords if matches_any(word, {"pyžama", "šachta"}) then gen_pl = (word == "pyžama") and "pyžám" or "šácht" if word == "šachta" then set_forms(forms, {"gen_pl2"}, {"šachiet"}) end end -- 6. Exceptions if word == "mzda" then gen_pl = "miezd" end if gen_pl == "" then gen_pl = stem end local dat_pl, loc_pl if is_long(word_penultimate_syllable) then dat_pl, loc_pl = "am", "ach" else dat_pl, loc_pl = "ám", "ách" end local dat_sg, loc_sg if ultimate == "e" then dat_sg, loc_sg = "i", "i" else dat_sg, loc_sg = "e", "e" end append_endings(forms, word, stem, "y", dat_sg, "u", loc_sg, "ou", "y", gen_pl, dat_pl, nil, loc_pl, "ami" ) if matches_any(word, {"zora", "žiara", "žiabra"}) then set_forms(forms, {"nom_pl", "acc_pl"}, {stem .. "e", stem .. "e"} ) end return forms, title end declensions["gazdiná"] = function(word, genitive) local forms = {} local stem = remove_suffix(word, "á") local title = "မလဟုတ်စှ်ေဆေၚ်စပ်ကဵု ''" .. word .. "'' <br>(pattern " .. pattern_link("gazdiná") .. ")" local syllable_count, syllables = split_into_syllables(stem) local last_syllable = syllables[1] local gen_pl = "" if ends_with_consonant_cluster(last_syllable) then gen_pl = mw.ustring.sub(stem, 1, -2) .. "ien" else gen_pl = remove_suffix(stem, last_syllable) .. lengthen_vowel(last_syllable) end append_endings(forms, word, stem, "ej", "ej", "ú", "ej", "ou", "é", gen_pl, "ám", nil, "ách", "ami" ) return forms, title end declensions["ulica"] = function(word, genitive) local forms = {} local stem = remove_suffix(word, "a") local title = "မလဟုတ်စှ်ေဆေၚ်စပ်ကဵု ''" .. word .. "'' <br>(pattern " .. pattern_link("ulica") .. ")" -- Pluralia tantum if NUMBER == "pl" then stem = remove_suffix(word, "e") if ends_with_any(stem, {"d", "t", "n", "l"}) then stem = soften_last_consonant(stem) end end -- Split into syllables local gen_pl = "" local syllable_count, syllables = split_into_syllables(stem) local word_syllable_count, word_syllables = split_into_syllables(word) -- Get the last and second-to-last syllables for rule checks local last_syllable = syllables[1] local penultimate_syllable = syllables[2] or "" local word_penultimate_syllable = word_syllables[2] or "" local ultimate, penultimate = get_last_letters(stem) local first = get_first_char(word) -- 1. Add a vowel between the last two consonants of a cluster at the end of the stem if ends_with_consonant_cluster(last_syllable) then if (is_capital(first) and ends_with(word, "ce")) or matches_any(word, {"dverce", "ovca", "fakľa", "drumbľa", "husle", "jasle", "kachle", "hrable", "šabľa", "mašľa", "žemľa", "ríbezľa", "čerešňa", "sukňa", "višňa"}) then gen_pl = harden_last_consonant(remove_suffix(stem, ultimate)) .. "ie" .. ultimate if matches_any(word, {"drumbľa", "husle", "jasle", "kachle", "hrable", "šabľa", "mašľa", "žemľa", "ríbezľa", "čerešňa", "sukňa", "višňa"}) then set_forms(forms, {"gen_pl2"}, {append_ending(stem, "í")}) end end end -- 2. Add "í" if stem ends with a vowel or a soft consonant if gen_pl == "" and (matches_any(ultimate, {"dz", "dž", "ž", "ť", "ď", "j", "i", "y"}) or ends_with_any(word, {"nca", "oľa", "ôľa", "aľa", "ša", "ča"}) or matches_any(word, {"liace", "pasca", "páľa", "trúbeľa", "mrľa", "konope", "večera", "rozopra"}) or (matches_any(ultimate, {"ľ"}) and consonants_set[penultimate]) or (matches_any(ultimate, {"ň"}) and penultimate ~= "y")) and not matches_any(word, {"papuča", "priča", "hrča", "paprča", "garniža", "fakľa", "skriňa", "sviňa", "abatiša", "čaša", "fľaša", "Krkonoše", "ríša", "skrýša"}) then gen_pl = append_ending(stem, "í") end -- 3. Logic to use the lengthened vowel if conditions match if gen_pl == "" and not ends_with_consonant_cluster(last_syllable) and not vowels_set[ultimate] and ((ends_with(word, "ca") and TYPE ~= "der") or ends_with_any(word, {"yňa", "uľa"}) or matches_any(word, {"papuča", "priča", "hrča", "chvíľa", "míľa", "košeľa", "nedeľa", "guľa", "hoľa", "homoľa", "skriňa", "sviňa", "abatiša", "čaša", "fľaša", "Krkonoše", "ríša", "skrýša", "garniža", "Hybe", "dvere", "kuša", "moruša"})) then if is_long(penultimate_syllable) then gen_pl = stem else gen_pl = remove_suffix(stem, last_syllable) .. lengthen_vowel(last_syllable) if matches_any(word, {"homoľa", "kuša", "moruša", "hrča", "paprča", "guľa", "hoľa"}) then set_forms(forms, {"gen_pl2"}, {append_ending(stem, "í")}) end end end if gen_pl == "" then gen_pl = stem end local dat_pl, loc_pl if ends_with_any(stem, {"i", "y"}) or word == "pizza" then dat_pl, loc_pl = "ám", "ách" elseif is_long(word_penultimate_syllable) or ends_with(stem, "j") then dat_pl, loc_pl = "am", "ach" else dat_pl, loc_pl = "iam", "iach" end append_endings(forms, word, stem, "e", "i", "u", "i", "ou", "e", gen_pl, dat_pl, nil, loc_pl, "ami" ) if word == "rozopra" then set_forms(forms, {"dat_pl2", "loc_pl2"}, {"rozoprám", "rozoprách"} ) elseif word == "dvere" then set_forms(forms, {"dat_pl", "loc_pl", "gen_pl2", "ins_pl2"}, {"dverám", "dverách", "dverí", "dvermi"} ) end return forms, title end declensions["irregular"] = function(word, genitive) local forms = {} local title = "မလဟုတ်စှ်ေဆေၚ်စပ်ကဵု ''" .. word .. "'' (irregular)" if matches_any(word, {"mať", "mater", "mati"}) then local stem = "mater" append_endings(forms, word, stem, "e", "i", "", "i", "ou", "e", stem .. "í", "iam", "e", "iach", "ami" ) local accusative = (word == "mater") and {"mater", "mať"} or {"mať", "mater"} set_forms(forms, {"acc_sg", "acc_sg2"}, accusative) elseif ends_with(word, "pani") then local stem = remove_suffix(word, "ni") .. "ň" append_endings(forms, word, stem, "ej", "ej", "iu", "ej", "ou", "ie", stem .. "í", "iam", nil, "iach", "iami" ) end return forms, title end declensions["dlaň"] = function(word, genitive) local forms = {} local words_with_mobile_vowel = {"faloš", "osuheľ", "siheľ", "myseľ"} local stem if genitive then stem = remove_suffix(genitive, "e") elseif matches_any(word, words_with_mobile_vowel) or ends_with(word, "eň") then stem = remove_mobile_vowel(word) else stem = word end local title = "မလဟုတ်စှ်ေဆေၚ်စပ်ကဵု ''" .. word .. "'' <br>(pattern " .. pattern_link("dlaň") .. ")" local syllable_count, syllables = split_into_syllables(word) local last_syllable = syllables[1] local penultimate_syllable = syllables[2] or "" local last_char = get_last_char(word) local dat_pl, loc_pl if is_long(penultimate_syllable) or last_char == "j" then dat_pl, loc_pl = "am", "ach" elseif word == "kader" then dat_pl, loc_pl = "ám", "ách" else dat_pl, loc_pl = "iam", "iach" end append_endings(forms, word, stem, "e", "i", nil, "i", "ou", "e", append_ending(stem, "í"), dat_pl, nil, loc_pl, "ami" ) if matches_any(word, {"myseľ", "tvár", "hneď", "raž"}) then set_forms(forms, {"gen_sg2"}, {append_ending(stem, "i")}) end return forms, title end declensions["kosť"] = function(word, genitive) local forms = {} local words_with_mobile_vowel = {"voš", "lož", "Ves", "ves", "cirkev", "reďkev"} local stem = (matches_any(word, words_with_mobile_vowel)) and remove_mobile_vowel(word) or word if word == "česť" then stem = "cť" end local title = "မလဟုတ်စှ်ေဆေၚ်စပ်ကဵု ''" .. word .. "'' <br>(pattern " .. pattern_link("kosť") .. ")" append_endings(forms, word, stem, "i", "i", nil, "i", "ou", "i", append_ending(stem, "í"), "iam", nil, "iach", "ami" ) if word == "hrsť" then set_forms(forms, {"nom_pl", "acc_pl"}, {"hrste", "hrste"} ) elseif word == "lesť" then append_alternative_singular(forms, "ľsti", "ľsti", nil, "ľsti", "ľsťou") append_alternative_plural(forms, "ľsti", "ľstí", "ľstiam", nil, "ľstiach", "ľsťami") elseif matches_any(word, {"cirkev", "reďkev"}) then set_forms(forms, {"dat_pl", "loc_pl"}, {stem .. "ám", stem .. "ách"} ) end return forms, title end declensions["mesto"] = function(word, genitive) local forms = {} local ultimate, penultimate = get_last_letters(word) local special_type = "" local stem = remove_suffix(word, "o") if penultimate == "u" and ultimate == "m" then stem = remove_suffix(word, "um") special_type = ", of Latin origin ending with ''-um''" elseif penultimate == "o" and ultimate == "n" then stem = remove_suffix(word, "on") special_type = ", of Greek origin ending with ''-on''" elseif penultimate == "m" and ultimate == "ä" then stem = remove_suffix(word, "ä") .. "en" special_type = ", archaic type ending with ''-mä''" end -- Pluralia tantum if NUMBER == "pl" then stem = remove_suffix(word, ultimate) end local title = "မလဟုတ်စှ်ေဆေၚ်စပ်ကဵု ''" .. word .. "'' <br>(pattern " .. pattern_link("mesto") .. special_type .. ")" local stem_ultimate, stem_penultimate = get_last_letters(stem) local loc_sg = "e" if vowels_set[stem_ultimate] or matches_any(stem_ultimate, {"k", "g", "ch", "h"}) then loc_sg = "u" elseif matches_any(word, {"vnútro", "nebo"}) then loc_sg = "i" end -- Split into syllables local gen_pl = "" local syllable_count, syllables = split_into_syllables(stem) local word_syllable_count, word_syllables = split_into_syllables(word) -- Get the last and second-to-last syllables for rule checks local last_syllable = syllables[1] local penultimate_syllable = syllables[2] or "" local word_penultimate_syllable = word_syllables[2] or "" -- 1. Add a vowel between the last two consonants of a cluster at the end of the stem if ends_with_consonant_cluster(last_syllable) then if matches_any(word, {"jedlo", "predjedlo", "jutro", "vrecko", "brvno"}) then if matches_any(word, {"jedlo", "predjedlo", "jutro"}) then gen_pl = remove_suffix(stem, stem_ultimate) .. "á" .. stem_ultimate else gen_pl = remove_suffix(stem, stem_ultimate) .. "ie" .. stem_ultimate set_forms(forms, {"gen_pl2"}, {remove_suffix(stem, stem_ultimate) .. "á" .. stem_ultimate}) end elseif sonorants_set[stem_ultimate] or ends_with_any(last_syllable, {"stv", "ctv", "íčk", "ečk", "očk"}) or TYPE == "dim" then if stem_penultimate ~= "j" and (word_syllable_count == 1 or ends_with_any(last_syllable, {"stv", "ctv"}) or is_short(word_penultimate_syllable)) then gen_pl = remove_suffix(stem, stem_ultimate) .. "ie" .. stem_ultimate elseif obstruents_set[stem_ultimate] and (is_long(word_penultimate_syllable) or stem_penultimate == "j") then gen_pl = remove_suffix(stem, stem_ultimate) .. "o" .. stem_ultimate elseif sonorants_set[stem_ultimate] and (is_long(word_penultimate_syllable) or stem_penultimate == "j") then gen_pl = remove_suffix(stem, stem_ultimate) .. "e" .. stem_ultimate if stem_penultimate ~= "j" then set_forms(forms, {"gen_pl2"}, {remove_suffix(stem, stem_ultimate) .. "ie" .. stem_ultimate}) end end end end -- 2. Add "í" if stem ends with a vowel or a soft consonant if gen_pl == "" and (vowels_set[stem_ultimate] or soft_consonants_set[stem_ultimate]) then gen_pl = stem .. "í" end -- 3. Return the stem with no change if conditions match if gen_pl == "" and (is_long(penultimate_syllable) or ends_with_any(stem, {"vojsk", "ov"}) or (TYPE == "loan" and matches_any(get_vowel(last_syllable), {"e", "o"}))) then gen_pl = stem end -- 4. Logic to use the lengthened vowel if conditions match if gen_pl == "" and (not (ends_with_consonant_cluster(last_syllable) or vowels_set[stem_ultimate]) or (ends_with_consonant_cluster(last_syllable) and obstruents_set[stem_ultimate])) then gen_pl = remove_suffix(stem, last_syllable) .. lengthen_vowel(last_syllable) end local nom_pl = "á" if NUMBER == "pl" then nom_pl = ultimate end if gen_pl == "" then gen_pl = stem end if (is_long(word_penultimate_syllable) or word == "jojo") and not ends_with(word, "ium") then append_endings(forms, word, stem, "a", "u", nil, loc_sg, "om", "a", gen_pl, "am", nil, "ach", "ami" ) else append_endings(forms, word, stem, "a", "u", nil, loc_sg, "om", nom_pl, gen_pl, "ám", nil, "ách", "ami" ) end if matches_any(word, {"oko", "ucho"}) then local pl_stem = (word == "oko") and "oč" or "uš" append_second_plural(forms, pl_stem .. "i", pl_stem .. "í", pl_stem .. "iam", nil, pl_stem .. "iach", pl_stem .. "ami") switch_plural_forms(forms) --changes the prefered forms set_forms(forms, {"gen_pl2"}, {pl_stem .. "ú"} ) elseif word == "nebo" then set_forms(forms, {"nom_pl", "nom_pl2", "gen_pl", "dat_pl", "dat_pl2", "acc_pl", "acc_pl2", "loc_pl", "loc_pl2", "ins_pl"}, {"nebesá", "nebesia", "nebies", "nebesám", "nebesiam", "nebesá", "nebesia", "nebesách", "nebesiach", "nebesami"} ) end return forms, title end declensions["srdce"] = function(word, genitive) local forms = {} local stem = remove_suffix(word, "e") if ends_with(word, "ě") then stem = remove_suffix(word, "ě") end local title = "မလဟုတ်စှ်ေဆေၚ်စပ်ကဵု ''" .. word .. "'' <br>(pattern " .. pattern_link("srdce") .. ")" if NUMBER == "pl" then if ends_with(word, "ia") then stem = remove_suffix(word, "ia") else stem = remove_suffix(word, "a") end end if ends_with(stem, "[dtnl]") then stem = soften_last_consonant(stem) end -- Split into syllables local gen_pl = "" local syllable_count, syllables = split_into_syllables(stem) local word_syllable_count, word_syllables = split_into_syllables(word) -- Get the last and second-to-last syllables for rule checks local last_syllable = syllables[1] local penultimate_syllable = syllables[2] or "" local word_penultimate_syllable = word_syllables[2] or "" local last_char = get_last_char(stem) local stem_ultimate, stem_penultimate = get_last_letters(stem) -- 1 & 2. Lengthen the last syllable's vowel if conditions apply, -- otherwise leave the stem unchanged if penultimate syllable is long if not ends_with_consonant_cluster(last_syllable) or (ends_with(word, "ce") and matches_any(get_vowel(word_penultimate_syllable), {"r", "l"}) and TYPE ~= "dim") or ends_with(word, "ište") then if is_long(penultimate_syllable) then gen_pl = stem -- If penultimate syllable of the stem is long, use the stem unchanged else -- Otherwise, lengthen the last syllable's vowel gen_pl = remove_suffix(stem, last_syllable) .. lengthen_vowel(last_syllable) end end -- 3. Add a vowel between the last two consonants if the conditions apply if gen_pl == "" and (word == "citoslovce" or word == "vajce" or ends_with(word, "ce")) then if stem_penultimate ~= "j" and is_short(word_penultimate_syllable) then gen_pl = remove_suffix(stem, stem_ultimate) .. "ie" .. stem_ultimate elseif is_long(word_penultimate_syllable) or stem_penultimate == "j" then gen_pl = remove_suffix(stem, stem_ultimate) .. "e" .. stem_ultimate end end -- 4. Add "í" to the stem for specific words if matches_any(word, {"more", "oje", "pole", "lože"}) then gen_pl = harden_last_consonant(stem) .. "í" end -- Fallback: if none of the rules apply, return the original stem if gen_pl == "" then gen_pl = stem end if is_long(word_penultimate_syllable) or ends_with(stem, "j") then append_endings(forms, word, stem, "a", "u", nil, "i", "om", "a", gen_pl, "am", nil, "ach", "ami" ) else append_endings(forms, word, stem, "a", "u", nil, "i", "om", "ia", gen_pl, "iam", nil, "iach", "ami" ) end return forms, title end declensions["vysvedčenie"] = function(word, genitive) local forms = {} local stem = remove_suffix(word, "ie") if ends_with(word, "í") then stem = remove_suffix(word, "í") end local title = "မလဟုတ်စှ်ေဆေၚ်စပ်ကဵု ''" .. word .. "'' <br>(pattern " .. pattern_link("vysvedčenie") .. ")" append_endings(forms, word, stem, "ia", "iu", nil, "í", "ím", "ia", stem .. "í", "iam", nil, "iach", "iami" ) if word == "storočie" then append_second_plural(forms, "stáročia", "stáročí", "stáročiam", nil, "stáročiach", "stáročiami") end return forms, title end declensions["dievča"] = function(word, genitive) local forms = {} local stem = remove_suffix(word, "a") if ends_with(word, "ä") then stem = remove_suffix(word, "ä") end local ending = get_last_char(word) local title = "မလဟုတ်စှ်ေဆေၚ်စပ်ကဵု ''" .. word .. "'' <br>(pattern " .. pattern_link("dievča") .. ")" local gen_pl = "" local syllable_count, syllables = split_into_syllables(word) local last_syllable = syllables[1] local penultimate_syllable = syllables[2] or "" if is_long(penultimate_syllable) then gen_pl = stem .. ending .. "t" else gen_pl = append_ending(stem, "iat") end append_endings(forms, word, stem, ending .. "ťa", ending .. "ťu", nil, ending .. "ti", ending .. "ťom", ending .. "tá", gen_pl, ending .. "tám", nil, ending .. "tách", ending .. "tami" ) local pl_stem = harden_last_consonant(stem) append_second_plural(forms, pl_stem .. "ence", pl_stem .. "eniec", pl_stem .. "encom", nil, pl_stem .. "encoch", pl_stem .. "encami") if matches_any(word, {"kura", "strídža", "drumblence", "gajdence", "deťúrence"}) then switch_plural_forms(forms) --changes the prefered forms unset_alt_forms(forms) elseif matches_any(word, {"páža", "knieža", "kurča", "plánča", "pôrča", "zviera", "pachoľa", "mláďa", "dúpä", "chlápä", "žieňa", "nemluvňa"}) then unset_alt_forms(forms) elseif matches_any(word, {"prasa", "teľa", "šteňa"}) then local pl_stem = (word == "šteňa") and "šten" or stem append_second_plural(forms, pl_stem .. "ce", append_ending(pl_stem, "iec"), pl_stem .. "com", nil, pl_stem .. "coch", pl_stem .. "cami") switch_plural_forms(forms) --changes the prefered forms elseif word == "dieťa" then set_forms(forms, {"nom_pl", "gen_pl", "dat_pl", "acc_pl", "loc_pl", "ins_pl"}, {"deti", "detí", "deťom", "deti", "deťoch", "deťmi"} ) unset_alt_forms(forms) end return forms, title end declensions["နာမဝိသေသန"] = function(word, genitive) local forms = {} local title = "မလဟုတ်စှ်ေဆေၚ်စပ်ကဵု ''" .. word .. "'' (adjective declension)" local ultimate, penultimate = get_last_letters(word) local lemma_form = word if NUMBER == "pl" then if ends_with(word, "é") then lemma_form = remove_suffix(word, "é") .. "ý" elseif ends_with(word, "ie") then lemma_form = remove_suffix(word, "ie") .. "í" elseif ends_with_any(word, {"ove", "ine"}) then lemma_form = remove_suffix(word, "e") elseif ends_with(word, "e") then lemma_form = remove_suffix(word, "e") .. "y" elseif ends_with(word, "í") and not soft_consonants_set[penultimate] then lemma_form = remove_suffix(word, "í") .. "ý" elseif ends_with(word, "i") and not soft_consonants_set[penultimate] then lemma_form = remove_suffix(word, "i") .. "y" end else if GENDER == "f" or GENDER == "n" then if ends_with_any(word, {"á", "é"}) then lemma_form = remove_last_char(word) .. "ý" elseif ends_with_any(word, {"ia", "ie"}) then lemma_form = remove_suffix(remove_last_char(word), "i") .. "í" elseif ends_with_any(word, {"ova", "ovo", "ina", "ino"}) then lemma_form = remove_last_char(word) elseif ends_with_any(word, {"a", "e"}) then lemma_form = remove_last_char(word) .. "y" end end end local forms_raw = m_adj.do_generate_forms({pagename=lemma_form}, "adjective").forms set_forms(forms, {"nom_sg"}, {forms_raw["nom_" .. get_first_char(GENDER)][1].form} ) -- Singular if GENDER == "f" then set_forms(forms, {"gen_sg", "dat_sg", "loc_sg", "ins_sg"}, { forms_raw["gen_f"][1].form, forms_raw["dat_f"][1].form, forms_raw["loc_f"][1].form, forms_raw["ins_f"][1].form } ) else set_forms(forms, {"gen_sg", "dat_sg", "loc_sg", "ins_sg"}, { forms_raw["gen_mn"][1].form, forms_raw["dat_mn"][1].form, forms_raw["loc_mn"][1].form, forms_raw["ins_mn"][1].form } ) end -- special accusative singular if GENDER == "m-pr" or GENDER == "m-anml" then set_forms(forms, {"acc_sg"}, {forms_raw["acc_m_an"][1].form} ) elseif GENDER == "m-in" then set_forms(forms, {"acc_sg"}, {forms_raw["acc_m_in"][1].form} ) else set_forms(forms, {"acc_sg"}, {forms_raw["acc_" .. get_first_char(GENDER)][1].form} ) end -- Plural set_forms(forms, {"gen_pl", "dat_pl", "loc_pl", "ins_pl"}, { forms_raw["gen_p"][1].form, forms_raw["dat_p"][1].form, forms_raw["loc_p"][1].form, forms_raw["ins_p"][1].form } ) if GENDER == "m-pr" then set_forms(forms, {"nom_pl", "acc_sg", "acc_pl"}, {forms_raw["nom_mp_an"][1].form, forms_raw["acc_m_an"][1].form, forms_raw["acc_mp_an"][1].form} ) else set_forms(forms, {"nom_pl", "acc_pl"}, {forms_raw["nom_fnp"][1].form, forms_raw["acc_fnp"][1].form} ) end return forms, title end declensions["indeclinable"] = function(word, genitive) local forms = {} local title = "မလဟုတ်စှ်ေဆေၚ်စပ်ကဵု ''" .. word .. "'' (indeclinable)" local cases = {"nom", "gen", "dat", "acc", "loc", "ins"} -- List of cases local numbers = {"sg", "pl"} for _, case in ipairs(cases) do for _, number in ipairs(numbers) do local form_key = case .. "_" .. number forms[form_key] = word end end -- Surnames ending with -ů, -eje, -oje and -ovie if TYPE == "surn" and ends_with_any(word, {"ů", "eje", "e", "oje", "ovie"}) then append_second_plural(forms, word .. "ovci", word .. "ovcov", word .. "ovcom", word .. "ovcov", word .. "ovcoch", word .. "ovcami") end return forms, title end --[=[ Partial declination functions ]=]-- function check_gender(gender) if gender == nil then return error("No gender entered. Please pass one of these values as parameter 1: m-pr, m-anml, m-in, f, n.") elseif allowed_genders_set[gender] then return gender else return error("Unknown gender. Please pass one of these values as parameter 1: m-pr, m-anml, m-in, f, n.") end end function determine_pattern(word, genitive) local pattern local phon_word = (PRONUNCIATION) and PRONUNCIATION or word local ultimate, penultimate = get_last_letters(phon_word) local first = get_first_char(phon_word) local dlan_endings = m_table.listToSet({"ň", "č", "ž", "ľ", "ď", "j", "š", "m", "z", "dz", "x"}) local dlan_exceptions_neg = m_table.listToSet({"reč", "seč", "lož", "beľ", "soľ", "mlaď", "meď", "myš", "voš"}) local dlan_exceptions_pos = m_table.listToSet({"obec", "pec", "čelusť", "kysť", "päsť", "Provence"}) local dlan_end_with_r_t = m_table.listToSet({"kader", "neter", "šír", "tvár", "činovať", "drobäť", "droboť", "hať", "hrochoť", "Hrochoť", "hrsť", "inovať", "labuť", "niť", "obeť", "paruť", "pažiť", "pečať", "perepúť", "perleť", "peruť", "pípeť", "plť", "postať", "prť", "púť", "sieť", "sihoť", "stať", "štvrť", "trať", "úvrať", "vňať", "violeť", "záhať", "žlť"}) local stroj_exceptions_pos = {"timbre", "cól", "gáfor", "hámor", "kôpor", "kufor", "Pôtor", "šiator", "pedál", "sandál", "kanál", "peniaz", "daniel"} local stroj_exceptions_neg = {"nesvár", "nešvár", "pár", "suchopár", "svár", "ker"} if matches_any(ultimate, {"r", "l"}) and penultimate == "e" and not ends_with(phon_word, "ier") and genitive == nil then genitive = phon_word .. "a" end if mw.ustring.find(phon_word, " ") or word == genitive then return "indeclinable" end if NUMBER == "pl" then if matches_any(ultimate, {"é", "i", "í"}) or (ultimate == "e" and ends_with(genitive, "ch")) then pattern = "adjective" elseif GENDER == "m-in" then if ultimate == "y" then pattern = "dub" else pattern = "stroj" end elseif GENDER == "f" then if ultimate == "y" then pattern = "žena" else pattern = "ulica" end elseif GENDER == "n" then if ultimate == "á" then pattern = "mesto" elseif penultimate == "i" and ultimate == "a" then pattern = "srdce" else if soft_consonants_set[penultimate] then pattern = "srdce" else pattern = "mesto" end end end else if GENDER == "m-pr" then if (matches_any(ultimate, {"y", "ý", "i", "í"}) and not ends_with_any(genitive, {"[yií]ho", "a"}) and not (TYPE == "surn" and matches_any(penultimate .. ultimate, {"ay", "ai"}))) or (matches_any(penultimate .. ultimate, {"ov", "in"}) and ends_with_any(genitive, {"ovho", "inho"})) then pattern = "နာမဝိသေသန" elseif ultimate == "a" or (TYPE == "surn" and matches_any(ultimate, {"e", "ě"}) and (penultimate .. ultimate == "ně" or ends_with(genitive, "u"))) then pattern = "hrdina" elseif (matches_any(ultimate, {"i", "í", "y", "e", "é", "ä"}) or (TYPE == "name" and matches_any(ultimate, {"ü", "ö", "ő"})) or matches_any(phon_word, {"Hrabě", "Poupě"})) and not (TYPE == "surn" and (ends_with_any(phon_word, {"ay", "ai", "eje", "oje", "ovie"}) or ends_with(genitive, "a"))) then pattern = "kuli" elseif TYPE == "surn" and ends_with_any(phon_word, {"ů", "eje", "oje", "ovie"}) then pattern = "indeclinable" else pattern = "chlap" end elseif GENDER == "m-in" or GENDER == "m-anml" then if matches_any(ultimate, {"y", "ý", "i", "í"}) or (matches_any(penultimate .. ultimate, {"ov", "in"}) and ends_with(genitive, "ho")) then pattern = "နာမဝိသေသန" elseif (soft_consonants_set[ultimate] or (matches_any(ultimate, {"r", "l"}) and penultimate == "e" and (ends_with(genitive, "[^e][rl]a"))) or ends_with_any(phon_word, {"ár", "iar", "ier"}) or matches_any(phon_word, stroj_exceptions_pos)) and not matches_any(phon_word, stroj_exceptions_neg) then pattern = "stroj" else pattern = "dub" end elseif GENDER == "f" then if matches_any(phon_word, {"gazdiná", "švagriná", "testiná", "ujčiná", "stryná", "kňažná", "kráľovná", "cisárovná", "cárovná", "šľachtičná", "princezná" }) then pattern = "gazdiná" elseif ultimate == "a" and not ends_with(genitive, "ej") then if soft_consonants_set[penultimate] or matches_any(penultimate, {"i", "y"}) or matches_any(phon_word, {"rozopra", "konopa", "večera"}) then pattern = "ulica" else pattern = "žena" end elseif matches_any(ultimate, {"a", "á"}) or (ends_with_any(phon_word, {"ova", "ina"}) and ends_with(genitive, "ej")) then pattern = "adjective" elseif ends_with(phon_word, "pani") or matches_any(phon_word, {"Mať", "mať", "mater", "mati"}) then pattern = "irregular" else if not dlan_exceptions_neg[phon_word] and (dlan_endings[ultimate] or dlan_exceptions_pos[phon_word] or dlan_end_with_r_t[phon_word] or (penultimate == "š" and ultimate == "ť" and not is_capital(first))) then pattern = "dlaň" else pattern = "kosť" end end if genitive then local g_ultimate = get_last_char(genitive) if g_ultimate == "y" then pattern = "žena" elseif g_ultimate == "i" then pattern = "kosť" end end elseif GENDER == "n" then if (ultimate == "o" or (penultimate == "u" and ultimate == "m") or (penultimate == "o" and ultimate == "n") or (penultimate == "m" and ultimate == "ä")) and not ends_with(genitive, "ho") then pattern = "mesto" elseif (penultimate == "i" and ultimate == "e") or ultimate == "í" then pattern = "vysvedčenie" elseif (ultimate == "e" or ultimate == "ě") and not ends_with(genitive, "ho") then pattern = "srdce" elseif matches_any(ultimate, {"a", "ä"}) then pattern = "dievča" elseif matches_any(ultimate, {"e", "é"}) or ends_with_any(phon_word, {"ovo", "ino"}) then pattern = "နာမဝိသေသန" else pattern = "indeclinable" end end end return pattern end function append_ending(stem1, ending) if matches_any(get_first_char(ending), {"e", "i", "é", "í"}) then return harden_last_consonant(stem1) .. ending else return stem1 .. ending end end function append_endings(forms, word, stem, end2, end3, end4, end5, end6, end7, gen_pl, end9, end10, end11, end12) forms["nom_sg"] = word forms["gen_sg"] = append_ending(stem, end2) forms["dat_sg"] = append_ending(stem, end3) if GENDER == "m-pr" or (GENDER == "f" and (ends_with_any(word, {"pani", "a", "á"}) or matches_any(word, {"Mať", "mať", "mater", "mati"}))) then forms["acc_sg"] = append_ending(stem, end4) else forms["acc_sg"] = word end forms["loc_sg"] = append_ending(stem, end5) forms["ins_sg"] = append_ending(stem, end6) local nom_pl = stem if ends_with_any(stem, {"k", "ch"}) and matches_any(GENDER, {"m-pr", "m-anml"}) and end7 == "i" then if ends_with(stem, "k") then nom_pl = remove_suffix(stem, "k") .. "c" else nom_pl = remove_suffix(stem, "ch") .. "s" end end forms["nom_pl"] = append_ending(nom_pl, end7) forms["gen_pl"] = gen_pl forms["dat_pl"] = append_ending(stem, end9) if GENDER == "m-pr" or end10 or (GENDER == "f" and (ends_with_any(word, {"pani"}) or matches_any(word, {"Mať", "mať", "mater", "mati"}))) then forms["acc_pl"] = append_ending(stem, end10) else forms["acc_pl"] = forms["nom_pl"] end forms["loc_pl"] = append_ending(stem, end11) forms["ins_pl"] = append_ending(stem, end12) end function set_forms(forms, indices, values) for i = 1, #indices do forms[indices[i]] = values[i] end end function switch_plural_forms(forms) local indices = {"nom_pl", "gen_pl", "dat_pl", "acc_pl", "loc_pl", "ins_pl"} for _, index in ipairs(indices) do forms[index], forms[index .. "_alt"] = forms[index .. "_alt"], forms[index] end end function unset_alt_forms(forms) for key in pairs(forms) do if mw.ustring.find(key, "_alt$") then forms[key] = nil end end end function append_alternative_singular(forms, form2, form3, form4, form5, form6) forms["gen_sg2"] = (forms["gen_sg"] ~= form2) and form2 forms["dat_sg2"] = (forms["dat_sg"] ~= form3) and form3 if matches_any(GENDER, {"m-pr", "m-anml"}) or (GENDER == "f" and (ends_with_any(word, {"pani", "a", "á"}) or matches_any(word, {"Mať", "mať", "mater", "mati"}))) then forms["acc_sg2"] = (forms["acc_sg"] ~= form4) and form4 end forms["loc_sg2"] = (forms["loc_sg"] ~= form5) and form5 forms["ins_sg2"] = (forms["ins_sg"] ~= form6) and form6 end function append_alternative_plural(forms, form1, form2, form3, form4, form5, form6) forms["nom_pl2"] = (forms["nom_pl"] ~= form2) and form1 forms["gen_pl2"] = (forms["gen_pl"] ~= form2) and form2 forms["dat_pl2"] = (forms["dat_pl"] ~= form2) and form3 if form4 ~= nil and forms["acc_pl"] ~= form4 then forms["acc_pl2"] = form4 elseif forms["acc_pl"] ~= form1 then forms["acc_pl2"] = form1 end forms["loc_pl2"] = (forms["loc_pl"] ~= form2) and form5 forms["ins_pl2"] = (forms["ins_pl"] ~= form2) and form6 end function append_second_plural(forms, form1, form2, form3, form4, form5, form6) forms["nom_pl_alt"] = form1 forms["gen_pl_alt"] = form2 forms["dat_pl_alt"] = form3 if form4 ~= nil then forms["acc_pl_alt"] = form4 else forms["acc_pl_alt"] = forms["nom_pl_alt"] end forms["loc_pl_alt"] = form5 forms["ins_pl_alt"] = form6 end function append_animal_singular(forms, stem) set_forms(forms, {"gen_sg", "dat_sg", "acc_sg", "loc_sg"}, { append_ending(stem, "a"), append_ending(stem, "ovi"), append_ending(stem, "a"), append_ending(stem, "ovi") } ) end function get_last_char(str) local last = mw.ustring.sub(str, -1, -1) return last end function get_first_char(str) local first = mw.ustring.sub(str, 1, 1) return first end function remove_last_char(str) local stem = mw.ustring.sub(str, 1, -2) return stem end function is_capital(str) return mw.ustring.find(str, "[A-Z]") end function get_last_letters(word) local ultimate = get_last_char(word) local penultimate = get_last_char(remove_last_char(word)) local antepenultimate = get_last_char(remove_last_char(remove_last_char(word))) if (penultimate == "c" and ultimate == "h") or (penultimate == "d" and (ultimate == "z" or ultimate == "ž")) then ultimate = penultimate .. ultimate penultimate = antepenultimate antepenultimate = get_last_char(remove_last_char(remove_last_char(remove_last_char(word)))) end if (antepenultimate == "c" and penultimate == "h") or (antepenultimate == "d" and (penultimate == "z" or penultimate == "ž")) then penultimate = antepenultimate .. penultimate end if penultimate == "v" and consonants_set[ultimate] and not matches_any(ultimate, {"r", "l", "ŕ", "ĺ"}) then penultimate = "ʋ" end return ultimate, penultimate end function ends_with(word, suffix) -- Check if suffix matches the end of word word = (word ~= nil) and word or "" return mw.ustring.find(word, suffix .. "$") ~= nil end function ends_with_any(word, suffixes) for _, suffix in ipairs(suffixes) do if ends_with(word, suffix) then return true -- Return true if any suffix matches end end return false -- Return false if no suffix matches end function matches_any(value, list) for _, item in ipairs(list) do if value == item then return true end end return false end function get_vowel(syllable) -- Define patterns for diphthongs and vowels local diphthong_pattern = "ia|ie|iu|ô" local vowel_pattern = "[aeiouyáéíóúýäöőüű]" local syllabic_consonant_pattern = "[rl]" -- Check for a diphthong first local diphthong = mw.ustring.match(syllable, diphthong_pattern) if diphthong then return diphthong end -- Check for a single vowel local vowel = mw.ustring.match(syllable, vowel_pattern) if vowel then return vowel end -- Check for a syllabic consonant if no vowel is found local syllabic_consonant = mw.ustring.match(syllable, syllabic_consonant_pattern) if syllabic_consonant then return syllabic_consonant end return nil -- Return nil if no vowel or syllabic consonant is found end -- Function to split a word into characters and bigraphs function split_into_letter_units(word) local units = {} local i_word = 1 local i_pron = 1 local word_len = mw.ustring.len(word) local pron_len = PRONUNCIATION and mw.ustring.len(PRONUNCIATION) or 0 while i_word <= word_len do local two_char = mw.ustring.sub(word, i_word, i_word + 1) -- Check if PRONUNCIATION forbids combining here local combine_forbidden = false if PRONUNCIATION then -- Advance pronunciation pointer to skip slashes until it aligns with actual letters -- We only block combination if the *next* character in PRON is a slash while i_pron <= pron_len and mw.ustring.sub(PRONUNCIATION, i_pron, i_pron) == "/" do i_pron = i_pron + 1 end -- Look ahead: is the *next* pronunciation char a slash? if i_pron < pron_len then local next_ch = mw.ustring.sub(PRONUNCIATION, i_pron + 1, i_pron + 1) if next_ch == "/" then combine_forbidden = true end end end -- Normal combination if allowed if not combine_forbidden and (bigraphs_set[two_char] or diphthongs_set[two_char]) then table.insert(units, two_char) i_word = i_word + 2 i_pron = i_pron + 2 -- move pronunciation index along with it else -- Fallback: single character local char = mw.ustring.sub(word, i_word, i_word) table.insert(units, char) i_word = i_word + 1 i_pron = i_pron + 1 end end return units end -- check if a unit is a vowel or syllabic element function is_vowel(unit, prev_unit, next_unit) if diphthongs_set[unit] then return true end if vowels_set[unit] then return true end -- Check if 'r' or 'l' are syllabic (preceded and followed by consonants) if matches_any(unit, {"r", "ŕ", "l", "ĺ"}) and prev_unit and next_unit and not (vowels_set[prev_unit] or vowels_set[next_unit] or diphthongs_set[prev_unit] or diphthongs_set[next_unit]) then return true end return false end -- Function to split a word into syllables according to Slovak rules function split_into_syllables(word) local units = split_into_letter_units(word) local syllables = {} local current_syllable = "" local i = 1 local length = #units local first_vowel_found = false -- Flag to indicate when the first vowel has been encountered -- Iterate over the units in the word while i <= length do local unit = units[i] local next_unit = i < length and units[i + 1] or nil local previous_unit = i > 1 and units[i - 1] or nil local is_current_vowel = is_vowel(unit, previous_unit, next_unit) -- If we haven't encountered the first vowel, keep adding to the first syllable if not first_vowel_found then current_syllable = current_syllable .. unit if is_current_vowel then first_vowel_found = true -- Mark that the first vowel has been found end else if is_current_vowel then -- If a vowel is encountered after the first vowel has been found, finalize the current syllable if current_syllable ~= "" and is_vowel(previous_unit, nil, nil) then table.insert(syllables, current_syllable) current_syllable = "" end current_syllable = current_syllable .. unit else -- Handling consonants between vowels local consonant_cluster = unit -- Collect any consecutive consonants into a cluster local j = i + 1 while j <= length and not is_vowel(units[j], units[j - 1], units[j + 1]) do consonant_cluster = consonant_cluster .. units[j] j = j + 1 end local consonant_count = mw.ustring.len(consonant_cluster) if next_unit and is_vowel(next_unit, unit, units[j]) then -- Apply syllable rules based on the number of consonants in the cluster if consonant_count == 1 then -- Rule 3: Single consonant goes to the next syllable table.insert(syllables, current_syllable) -- End the current syllable without the consonant current_syllable = consonant_cluster -- Start the next syllable with the consonant elseif consonant_count == 2 then -- Rule 4: Two consonants split between syllables current_syllable = current_syllable .. mw.ustring.sub(consonant_cluster, 1, 1) table.insert(syllables, current_syllable) current_syllable = mw.ustring.sub(consonant_cluster, 2, 2) else -- Rule 5: Three or more consonants - first goes with current syllable, rest with next current_syllable = current_syllable .. mw.ustring.sub(consonant_cluster, 1, 1) table.insert(syllables, current_syllable) current_syllable = mw.ustring.sub(consonant_cluster, 2) end i = j - 1 -- Adjust the index to skip the processed consonants else current_syllable = current_syllable .. unit end end end i = i + 1 end -- Add any remaining characters as the final syllable if #current_syllable > 0 then table.insert(syllables, current_syllable) end -- Reverse the syllables array for the requested output order local reversed_syllables = {} for j = #syllables, 1, -1 do reversed_syllables[#reversed_syllables + 1] = syllables[j] end -- Return the count of syllables and the reversed syllable array return #syllables, reversed_syllables end function is_long(syllable) return mw.ustring.find(syllable, "[áéíóúýôĺŕ]") ~= nil or mw.ustring.find(syllable, "i[aeu]") ~= nil end function is_short(syllable) return not is_long(syllable) end local function get_last_consonant_before_vowel(syllable) local vowel = get_vowel(syllable) -- If there is no vowel in the syllable, return false if not vowel then return false end -- Find the position of the vowel in the syllable local vowel_pos = mw.ustring.find(syllable, vowel) -- Loop backwards from the position of the vowel to find the last consonant for i = vowel_pos - 1, 1, -1 do local char = mw.ustring.sub(syllable, i, i) if not mw.ustring.find(char, "[aeiouáéíóúýôä]") then return char -- Return the last consonant before the vowel end end return false -- Return false if no consonant is found before the vowel end -- Function to lengthen the last vowel in a syllable if it’s not already long function lengthen_vowel(syllable) if is_long(syllable) then return syllable -- Return as-is if the syllable is already long end local lengthening_map = { ["a"] = "á", ["i"] = "í", ["y"] = "ý", ["u"] = "ú", ["ä"] = "ia", ["e"] = "ie", ["o"] = "ô" } local cons_map = { ["ď"] = "d", ["ť"] = "t", ["ň"] = "n", ["ľ"] = "l" } -- Check for regular vowels first and replace if found for vowel, long_vowel in pairs(lengthening_map) do if mw.ustring.find(syllable, vowel) then -- if there is a soft consonant before "a", it becomes "ia" instead of "á" local last_cons = get_last_consonant_before_vowel(syllable) or "" if soft_consonants_set[last_cons] and last_cons ~= "j" and vowel == "a" then long_vowel = "ia" end -- if a or ä changes into "ia", the previous consonant should be written as hard if matches_any(vowel, {"ä", "a"}) and matches_any(last_cons, {"ď", "ť", "ň", "ľ"}) then syllable = mw.ustring.gsub(syllable, last_cons .. vowel, cons_map[last_cons] .. vowel, 1) end syllable = mw.ustring.gsub(syllable, vowel, long_vowel, 1) return syllable -- Return immediately after replacing a regular vowel end end -- Only replace "r" and "l" if no other vowels were found if not mw.ustring.find(syllable, "[aeiouyáéíóúýôä]") then syllable = mw.ustring.gsub(syllable, "r", "ŕ") syllable = mw.ustring.gsub(syllable, "l", "ĺ") end return syllable end -- Helper function to determine if the syllable ends with a consonant cluster function ends_with_consonant_cluster(last_syllable) local last_char = get_last_char(last_syllable) local second_last_char = mw.ustring.sub(last_syllable, -2, -2) local third_last_char = mw.ustring.sub(last_syllable, -3, -3) local last_two_chars = mw.ustring.sub(last_syllable, -2) -- Check if the syllable contains any regular vowels local has_vowel = mw.ustring.find(last_syllable, "[aeiouyáéíóúýôä]") if has_vowel then -- If the last two characters form a digraph, check the third-last character for a cluster if bigraphs_set[last_two_chars] then return not vowels_set[third_last_char] else -- If no digraph, just check the last two characters return not (vowels_set[last_char] or vowels_set[second_last_char] or diphthongs_set[last_char] or diphthongs_set[second_last_char]) end else -- No regular vowel; treat `r` or `l` as syllabic if either is in the last two characters if matches_any(last_char, {'ŕ', 'ĺ'}) or matches_any(second_last_char, {'ŕ', 'ĺ'}) then return false elseif mw.ustring.find(last_syllable, "[bcčdďfghjkľmnňpqsštťvwxzž][rl][bcčdďfghjkľmnňpqysštťvwxzž][rl]$") then return true else -- No syllabic `r` or `l`, so both characters are treated as consonants return not vowels_set[last_char] and not vowels_set[second_last_char] end end end function remove_mobile_vowel(word) local units = split_into_letter_units(word) -- Split word into units for i = #units, 1, -1 do local unit = units[i] if matches_any(unit, {"e", "ie", "o", "i", "á"}) then -- Remove the mobile vowel unit and reassemble the word table.remove(units, i) return table.concat(units) end end return word -- Return the original word if no mobile vowel is found end function soften_last_consonant(str) local consonants_t = { ["c"] = "č", ["d"] = "ď", ["l"] = "ľ", ["n"] = "ň", ["s"] = "š", ["t"] = "ť", ["z"] = "ž" } local last_char = get_last_char(str) -- Check if the last character is in consonants_t and replace if needed return consonants_t[last_char] and remove_last_char(str) .. consonants_t[last_char] or str end function harden_last_consonant(str) local soft_to_hard = { ["ď"] = "d", ["ť"] = "t", ["ň"] = "n", ["ľ"] = "l" } local last_char = get_last_char(str) -- Check if the last character is a soft consonant and replace if needed return soft_to_hard[last_char] and remove_last_char(str) .. soft_to_hard[last_char] or str end function remove_suffix(form, suffix) if mw.ustring.find(form, suffix .. "$") then local length = mw.ustring.len(suffix) return mw.ustring.sub(form, 1, -length-1) end return form end function pattern_link(pattern) return "''[[Appendix:Slovak declension pattern " .. pattern .. "|" .. pattern .. "]]''" end function decline_with_more_stems(genitive) local genitives = {} for part in mw.ustring.gmatch(genitive, "[^/]+") do table.insert(genitives, part) end local forms, title = declensions[PATTERN](PAGENAME, genitives[1]) normalize_forms(forms) local forms2, title2 = declensions[PATTERN](PAGENAME, genitives[2]) normalize_forms(forms2) append_alternative_singular(forms, forms2["gen_sg"], forms2["dat_sg"], forms2["acc_sg"], forms2["loc_sg"], forms2["ins_sg"]) append_alternative_plural(forms, forms2["nom_pl"], forms2["gen_pl"], forms2["dat_pl"], forms2["acc_pl"], forms2["loc_pl"], forms2["ins_pl"]) return forms, title end function split_into_units(expression, genitive) -- Split the original expression into words local words = {} for word in mw.ustring.gmatch(expression, "%S+") do table.insert(words, word) end -- Split the genitive phrase into words, if provided local gen_words = {} if genitive then for word in mw.ustring.gmatch(genitive, "%S+") do table.insert(gen_words, word) end -- Check if the genitive phrase has the same structure as the original if #gen_words ~= #words then error("Genitive phrase must have the same number of words as the original expression.") end end -- Combine words into units, grouping prepositional phrases for both expressions local units = {} local gen_units = {} local i = 1 while i <= #words do if prepositions_set[words[i]] and words[i + 1] then -- Combine preposition with the following words as one unit local phrase = words[i] local gen_phrase = genitive and gen_words[i] or nil i = i + 1 while i <= #words do phrase = phrase .. " " .. words[i] if genitive then gen_phrase = gen_phrase .. " " .. gen_words[i] end if i == #words then table.insert(units, phrase) if genitive then table.insert(gen_units, gen_phrase) end end i = i + 1 end else -- Add standalone word as a unit table.insert(units, words[i]) if genitive then table.insert(gen_units, gen_words[i]) end i = i + 1 end end -- Return both units and genitive units return units, gen_units end function generate_combined_forms(units, gen_units) -- Process each unit to generate forms local all_forms = {} local patterns = "" for i = 1, #units do local unit = units[i] local gen_unit = gen_units[i] if conjunctions_set[unit] or unit == gen_unit then -- Conjunctions are indeclinable local forms = declensions["indeclinable"](unit, gen_unit) table.insert(all_forms, forms) else -- Decline each unit using determine_pattern and declensions local pattern = determine_pattern(unit, gen_unit) local forms, title = declensions[pattern](unit, gen_unit) normalize_forms(forms) table.insert(all_forms, forms) end end -- Combine forms into a single forms table local combined_forms = {} local cases = {"nom", "gen", "dat", "acc", "loc", "ins"} local numbers = {"sg", "pl"} -- check if vocative and plural 2 forms are necessary for _, forms in ipairs(all_forms) do if forms["voc_sg"] and #cases == 6 then table.insert(cases, "voc") end if forms["nom_pl_alt"] and #numbers == 2 then table.insert(numbers, "pl_alt") end end for _, case in ipairs(cases) do for _, number in ipairs(numbers) do local form_key = case .. "_" .. number local combined_form, highest_index = {}, 1 -- Gather primary and numbered alternative forms (e.g., gen_sg2, gen_sg3) for _, forms in ipairs(all_forms) do local primary_form = forms[form_key] or forms["nom_" .. number] or forms[case .. "_pl"] table.insert(combined_form, primary_form) -- Check the highest alternative index for alt_index = 2, 4 do local alt_key = form_key .. alt_index if forms[alt_key] then highest_index = alt_index end end end -- Combine primary forms combined_forms[form_key] = mw.ustring.gsub(table.concat(combined_form, " "), "^%s+", "") -- Combine alternative forms if present if highest_index > 1 then for alt_index = 2, highest_index do -- Check and add numbered alternative forms local alt_key = form_key .. alt_index alt_form = {} for _, forms in ipairs(all_forms) do local primary_form = forms[form_key] or forms["nom_" .. number] if forms[alt_key] then table.insert(alt_form, forms[alt_key]) else table.insert(alt_form, primary_form) end end combined_forms[alt_key] = mw.ustring.gsub(table.concat(alt_form, " "), "^%s+", "") end end end end return combined_forms end function normalize_forms(forms) -- Step 1: Remove forms based on NUMBER if NUMBER == "sg" then for key in pairs(forms) do if mw.ustring.find(key, "_pl") then forms[key] = nil -- Remove plural forms if "n" is "sg" end end elseif NUMBER == "pl" then for key in pairs(forms) do if mw.ustring.find(key, "_sg") then forms[key] = nil -- Remove singular forms if "n" is "pl" end end end -- Step 2: Ensure all mandatory indices are set local cases = {"nom", "gen", "dat", "acc", "loc", "ins"} local numbers = {"sg", "pl"} for _, case in ipairs(cases) do for _, number in ipairs(numbers) do local form_key = case .. "_" .. number if not forms[form_key] then forms[form_key] = "&mdash;" -- Set missing forms to &mdash; end end end -- Step 3: Create missing _pl_alt indices if at least one exists local has_alt_plural = false for key in pairs(forms) do if mw.ustring.find(key, "_pl_alt") then has_alt_plural = true break end end if has_alt_plural then for _, case in ipairs(cases) do local form_key_alt = case .. "_pl_alt" if not forms[form_key_alt] then forms[form_key_alt] = "&mdash;" -- Create missing _pl_alt forms end end end -- Step 4: Create vocative plural forms if voc_sg exists if forms["voc_sg"] then forms["voc_pl"] = forms["nom_pl"] -- Set voc_pl to nom_pl if has_alt_plural then forms["voc_pl_alt"] = forms["nom_pl_alt"] -- Set voc_pl_alt to nom_pl_alt if it exists end end end function specified_by_user(forms, args) local cases = {nom = true, gen = true, dat = true, acc = true, voc = true, loc = true, ins = true} local numbers = {sg = true, pl = true} for key, value in pairs(args) do -- Match the pattern "<case>_<number><optional digit>" using mw.ustring.match local case, number, optional_digit = mw.ustring.match(key, "^(%a%a%a)_(%a%a)(%d?)$") -- Check if it matches the cases and numbers you want if case and cases[case] and number and numbers[number] then forms[key] = make_link(value, case .. "|" .. get_first_char(number)) end end end function make_link(link, accel_form) local new_link = link -- If link is not empty, valid, and not "&mdash;", create the full link if link ~= "" and link and link ~= "&mdash;" then new_link = m_links.full_link({lang = lang, term = link, accel = {form = accel_form}}) end return new_link end function make_table_header(title) return m_inflection_table.make_top{ title = title, palette = 'blue', tall = 'yes' } end function make_simple_row(forms, case, mnw_case) local case_code = mw.ustring.sub(case, 1, 3) local row = "<tr><th>" .. mnw_case .. "</th>" -- Singular if NUMBER ~= "pl" then row = row .. "<td><span lang=\"sk\">" .. make_link(forms[case_code .. "_sg"], case_code .. "|s") .. "</span>" -- Loop to check and display secondary singular forms in the same cell for i = 2, 4 do local form_key = case_code .. "_sg" .. i if not forms[form_key] then break -- Exit loop if form doesn't exist end row = row .. ",<br /><span lang=\"sk\">" .. make_link(forms[form_key], case_code .. "|s") .. "</span>" end row = row .. "</td>" end -- Plural if NUMBER ~= "sg" then -- Primary plural form row = row .. "<td><span lang=\"sk\">" .. make_link(forms[case_code .. "_pl"], case_code .. "|p") .. "</span>" -- Loop to check and display secondary plural forms in the same cell for i = 2, 4 do local form_key = case_code .. "_pl" .. i if not forms[form_key] then break -- Exit loop if form doesn't exist end row = row .. ",<br /><span lang=\"sk\">" .. make_link(forms[form_key], case_code .. "|p") .. "</span>" end row = row .. "</td>" -- Check for alternative plural and add it in a separate cell if forms[case_code .. "_pl_alt"] then row = row .. "<td><span lang=\"sk\">" .. make_link(forms[case_code .. "_pl_alt"], case_code .. "|p") .. "</span></td>" end end row = row .. "</tr>" return row end function make_table_header2(forms) local tr_open = "<tr><th></th>" local singular = "<th>ကိုန်ဨကဝုစ်</th>" local plural = "<th>ကိုန်ဗဟုဝစ်</th>" local plural1 = "<th>ကိုန်ဗဟုဝစ် ၁</th>" local plural2 = "<th>ကိုန်ဗဟုဝစ် ၂</th>" local tr_close = "</tr>" local alt_plural = false if forms["nom_pl_alt"] or forms["gen_pl_alt"] or forms["dat_pl_alt"] or forms["acc_pl_alt"] or forms["loc_pl_alt"] or forms["ins_pl_alt"] then alt_plural = true end local header if NUMBER == "sg" then header = tr_open .. singular .. tr_close elseif NUMBER == "pl" then if alt_plural then header = tr_open .. plural1 .. plural2 .. tr_close else header = tr_open .. plural .. tr_close end elseif alt_plural then header = tr_open .. singular .. plural1 .. plural2 .. tr_close else header = tr_open .. singular .. plural .. tr_close end return header end function make_table_footer() return '\n' .. m_inflection_table.make_bottom{} end -- Make the table function make_table(forms, title) for key, form in pairs(forms) do -- check for empty strings and nil's if form == "" or not form then forms[key] = "&mdash;" end end local final = make_table_header(title) final = final .. make_table_header2(forms) final = final .. make_simple_row(forms, "nominative", "မဒုၚ်ယၟု") final = final .. make_simple_row(forms, "genitive", "ဗဳဇဂကူ") final = final .. make_simple_row(forms, "dative", "ပြကမ္မကာရက") final = final .. make_simple_row(forms, "accusative", "ကမ္မကာရက") if forms["voc_sg"] then final = final .. make_simple_row(forms, "vocative", "ပရေၚ်ဂယိုၚ်လမျီု") end final = final .. make_simple_row(forms, "locative", "ခၞံဗဒှ်ဌာန်မတန်တဴ") final = final .. make_simple_row(forms, "instrumental", "တိၚ်တိုက်ကပေါတ်ကွိၚ်ကွိုက်") final = final .. make_table_footer() return final end return export 9f7xreb3l440v5a0lq3fqw2ovsqfsz6 401121 401118 2026-08-13T16:38:34Z 咽頭べさ 33 401121 Scribunto text/plain --[=[ This module contains functions for creating inflection tables for Slovak nouns. ]=]-- local export = {} -- Within this module, declensions are the functions that do the actual -- declension by creating the forms of a basic noun. -- They are defined further down. --local lemma = "Bratislava" local declensions = {} local lang = require("Module:languages").getByCode("sk") local m_table = require("Module:table") local m_links = require("Module:links") local m_adj = require("Module:sk-adjective") local m_inflection_table = require("Module:inflection-table") local allowed_genders = { "m-pr", "m-anml", "m-in", "f", "n" } local allowed_genders_set = m_table.listToSet(allowed_genders) local hard_consonants = {"d", "t", "n", "l", "h", "ch", "k", "g"} local soft_consonants = {"ď", "ť", "ň", "ľ", "ž", "š", "č", "dž", "c", "dz", "j"} local ambiguous_consonants = {"b", "m", "p", "r", "s", "v", "z", "f"} local hard_consonants_set = m_table.listToSet(hard_consonants) local soft_consonants_set = m_table.listToSet(soft_consonants) local ambiguous_consonants_set = m_table.listToSet(ambiguous_consonants) local consonants = m_table.append(hard_consonants, soft_consonants, ambiguous_consonants) local consonants_set = m_table.listToSet(consonants) local short_vowels = {"a", "e", "i", "o", "u", "y", "ä", "ö", "ü"} local long_vowels = {"á", "é", "í", "ó", "ú", "ý", "ő", "ű"} local diphthongs = {"ia", "ie", "iu", "ô"} local short_vowels_set = m_table.listToSet(short_vowels) local long_vowels_set = m_table.listToSet(long_vowels) local diphthongs_set = m_table.listToSet(diphthongs) local vowels = m_table.append(short_vowels, long_vowels) local vowels_set = m_table.listToSet(vowels) local obstruents = {"p", "t", "k", "b", "d", "g", "f", "s", "š", "ch", "z", "ž", "č", "dž"} --"v" removed?? local sonorants = {"m", "n", "l", "r", "ʋ", "v"} --"v" added?? local obstruents_set = m_table.listToSet(obstruents) local sonorants_set = m_table.listToSet(sonorants) local bigraphs = {"ch", "dz", "dž"} local bigraphs_set = m_table.listToSet(bigraphs) local prepositions = {"bez", "bezo", "cez", "cezo", "do", "k", "ku", "medzi", "na", "nad", "nado", "o", "do", "okrem", "po", "pod", "podo", "pre", "pred", "predo", "pri", "proti", "naproti", "oproti", "s", "so", "skrz", "u", "v", "vo", "z", "zo", "za"} -- Add more prepositions as needed local prepositions_set = m_table.listToSet(prepositions) local conjunctions = {"a"} -- Add more conjunctions as needed local conjunctions_set = m_table.listToSet(conjunctions) -- The main entry point. -- This is the only function that can be invoked from a template. function export.show(frame) local args = frame:getParent().args NAMESPACE = mw.title.getCurrentTitle().nsText if NAMESPACE == "" then PAGENAME = mw.loadData("Module:headword/data").pagename else if args["pagename"] then PAGENAME = args["pagename"] -- TEST: lemma else error("Pagename not specified") end end GENDER = check_gender(args[1]) NUMBER = args["n"] TYPE = args["t"] GEN_ENDING = args["g"] PLURAL = args["pl"] PLURAL2 = args["pl2"] PRONUNCIATION = args["p"] local genitive = args[2] local category = "" -- Check if PAGENAME is a multiword expression if not mw.ustring.find(PAGENAME, " ") then -- Single-word expression, handle as usual PATTERN = determine_pattern(PAGENAME, genitive) -- Category if NAMESPACE == "" then if PATTERN == "indeclinable" then category = "[[ကဏ္ဍ:နာမ်သၠဝ်ဝေန်နဳယျာနကဵုပါ်ပါဲထောံဟွံမာန်ဂမၠိုၚ်|" .. PAGENAME .. "]]" elseif PATTERN == "irregular" then category = "[[ကဏ္ဍ:နာမ်ကိုန်ဨကဝုစ်သၠဝ်ဝေန်နဳယျာဂမၠိုၚ်|" .. PAGENAME .. "]]" elseif PATTERN == "adjective" then category = "[[ကဏ္ဍ:နာမ်မဆေၚ်စပ်ကဵုနာမဝိသေသနသၠဝ်ဝေန်နဳယျာဂမၠိုၚ်|" .. PAGENAME .. "]]" else category = "[[ကဏ္ဍ:ဝေါဟာသၠဝ်ဝေန်နဳယျာမၞုံကဵုဝေါဟာ " .. PATTERN .. " မလဟုတ်စှ်ေဂမၠိုၚ်|" .. PAGENAME .. "]]" end if GENDER == "m-anml" then category = category .. "[[ကဏ္ဍ:ဝေါဟာသၠဝ်ဝေန်နဳယျာမၞုံကဵုဝေါဟာ chlap မလဟုတ်စှ်ေဂမၠိုၚ်|" .. PAGENAME .. "]]" end if PAGENAME == "cól" then category = category .. "[[ကဏ္ဍ:ဝေါဟာသၠဝ်ဝေန်နဳယျာမၞုံကဵုဝေါဟာ dub မလဟုတ်စှ်ေဂမၠိုၚ်|" .. PAGENAME .. "]]" end end local forms, title -- Find out if there are more genitive stems and if so, process them if genitive then if mw.ustring.find(genitive, "/") then forms, title = decline_with_more_stems(genitive) else forms, title = declensions[PATTERN](PAGENAME, genitive) normalize_forms(forms) end else forms, title = declensions[PATTERN](PAGENAME, genitive) normalize_forms(forms) end specified_by_user(forms, args) return make_table(forms, title) .. category end -- Multiword expressions -- Category if NAMESPACE == "" then category = "[[ကဏ္ဍ:ဝေါဟာသၠဝ်ဝေန်နဳယျာမဂၠိုၚ်ကဵုမအရေဝ်ဂမၠိုၚ်|" .. PAGENAME .. "]]" end -- Split into words local units, gen_units = split_into_units(PAGENAME, genitive) -- Process each unit to generate forms local combined_forms = generate_combined_forms(units, gen_units) -- Add forms specified by the user specified_by_user(combined_forms, args) -- Generate the final title and table local title = "မလဟုတ်စှ်ေဆေၚ်စပ်ကဵု ''" .. PAGENAME .. "'' (multiword term)" return make_table(combined_forms, title) .. category end --[=[ Declension functions ]=]-- declensions["chlap"] = function(word, genitive) local forms = {} local syllable_count, syllables = split_into_syllables(word) local mobile_removed = false -- Tracks if a mobile vowel was removed local words_with_mobile = {"kmotor", "švagor", "svokor", "lotor", "obor", "Uhor", "pochábeľ", "väzeň", "učeň", "posol", "diabol", "blázon", "Turek", "fanúšek", "center", "hypochonder", "Kafer", "neger", "gangster", "kapor", "zubor", "bobor", "orol", "pes" } local surn_ech_always_declined = {"Čech", "Plech", "Pech", "Štech", "Vojtech"} -- Determine the stem by removing mobile vowels if applicable local stem = word if (matches_any(word, words_with_mobile) or ends_with_any(word, {"ec", "ček", "íček", "ok"})) and not (TYPE == "surn" and (ends_with_any(word, {"[aeiouyáéíóúýäöüőű]ček", "[aeiouyáéíóúýäöüőű]čok"}) or syllable_count == 1)) and not matches_any(word, {"otrok"}) then stem = remove_mobile_vowel(word) mobile_removed = true -- Mark mobile vowel as removed end -- Adjust specific stems based on predefined mappings stem = ({["švec"] = "ševc", ["žnec"] = "ženc"})[word] or stem -- Remove certain endings for words ending with "us", "os", "es" and "o" if ends_with(word, "[uoea]s") then stem = mw.ustring.sub(word, 1, -3) end if ends_with(word, "o") then stem = remove_last_char(word) end -- Override if a specific argument is given if genitive and NUMBER ~= "pl" then stem = remove_last_char(genitive) if mw.ustring.sub(word, 1, -3) .. get_last_char(word) == remove_last_char(genitive) then mobile_removed = true end end -- Title for the declension table local title = "မလဟုတ်စှ်ေဆေၚ်စပ်ကဵု ''" .. word .. "'' <br>(pattern " .. pattern_link("chlap") .. ")" if TYPE == "surn" then if ends_with(word, "a[iy]") then title = "မလဟုတ်စှ်ေဆေၚ်စပ်ကဵု ''" .. word .. "'' <br>(pattern " .. pattern_link("chlap") .. " or " .. pattern_link("kuli") .. ")" elseif ends_with_any(word, {"ých", "ech"}) and not matches_any(word, surn_ech_always_declined) then title = "မလဟုတ်စှ်ေဆေၚ်စပ်ကဵု ''" .. word .. "'' <br>(pattern " .. pattern_link("chlap") .. " or indeclinable)" end end -- Helper variables for analyzing the last and penultimate characters local ultimate, penultimate = get_last_letters(stem) local first = get_first_char(word) -- Determine alternative dative and locative for some nouns if matches_any(word, {"človek", "pán", "čert", "diabol", "vlk", "pes", "Boh", "boh", "otec", "syn", "duch", "Kristus", "don", "šor"}) then set_forms(forms, {"dat_sg2", "loc_sg2"}, {stem .. "u", stem .. "u"}) end local nom_pl = "i" if PLURAL then if mw.ustring.find(PLURAL, "/") then local endings = {} for part in mw.ustring.gmatch(PLURAL, "[^/]+") do table.insert(endings, part) end nom_pl = endings[1] for i = 2, 4 do if endings[i] then set_forms(forms, {"nom_pl" .. i}, {append_ending(stem, endings[i])}) else break end end else nom_pl = PLURAL end elseif (ends_with_any(word, {"fil", "fób", "graf", "nóm"}) and not matches_any(word, {"xylograf", "typograf"})) or matches_any(word, {"cynik", "epik", "klasik", "stoik", "Brit", "Búr", "Gal", "Ír", "Dór", "Italik", "Ión", "Nór", "cár", "lodivod", "odkundes", "starík", "muž", "svat", "apoštol", "augur", "bán", "bogomil", "buržuj", "don", "druid", "eféb", "famulus", "héros", "man", "posol" }) then set_forms(forms, {"nom_pl2"}, {append_ending(stem, "ovia")}) elseif (ends_with_any(word, {"[^c]h", "g", "ček", "ek", "ik", "čik", "ok", "o", "duch"}) and word ~= "pes") or matches_any(word, {"otec", "syn", "ujec", "strýc", "svák", "svokor", "tesť", "švagor", "zať", "kmotor", "ded", "kmeť", "pobratim", "otčim", "zlosyn", "princ", "Bask", "Frank", "Ind", "Ink", "Kurd", "Dák", "Čudo", "Fríz", "Azték", "Asýr", "Etrusk", "Kazach", "Kašub", "odľud", "člen", "zved", "hňup", "cicerone"}) or (ends_with(word, "ch") and TYPE == "loan") or (ends_with_any(word, {"us", "es"}) and genitive ~= word .. "a") or matches_any(TYPE, {"comp-deverb", "surn", "name"}) or PLURAL == "ovia" then nom_pl = "ovia" if TYPE == "surn" then append_second_plural(forms, stem .. "ovci", stem .. "ovcov", stem .. "ovcom", stem .. "ovcov", stem .. "ovcoch", stem .. "ovcami") end elseif ends_with(word, "teľ") or (ends_with(word, "an") and is_capital(first)) or matches_any(word, {"občan", "dedinčan", "mešťan", "zeman", "ostrovan", "krajan", "dolňan", "horňan", "južan", "severan", "rodič", "dedič", "brat", "hosť", "manžel", "exmanžel", "sused", "žid", "Žid", "kresťan", "nekresťan", "pohan"}) then nom_pl = "ia" if word == "pohan" then set_forms(forms, {"nom_pl2"}, {append_ending(stem, "i")}) end end -- Determine instrumental plural ending local ins_pl = "mi" -- Default instrumental plural ending is "mi" if ultimate == "m" or mobile_removed or ends_with_any(word, {"o", "ius"}) or matches_any(word, {"hosť", "tesť", "Kopt"}) --obstruents_set[penultimate] and obstruents_set[ultimate] then ins_pl = "ami" end -- Populate forms table with singular and plural endings append_endings(forms, word, stem, "a", "ovi", "a", "ovi", "om", nom_pl, append_ending(stem, "ov"), "om", "ov", "och", ins_pl ) -- Surnames ending with -ých, -ech, -ai, -ay if TYPE == "surn" then if ends_with_any(word, {"ých", "ech"}) and not matches_any(word, surn_ech_always_declined) then append_alternative_singular(forms, word, word, word, word, word) append_alternative_plural(forms, word, word, word, word, word, word) elseif ends_with(word, "a[iy]") then append_alternative_singular(forms, word .. "ho", word .. "mu", word .. "ho", word .. "m", word .. "m") set_forms(forms, {"ins_pl2"}, {word .. "ami"}) end end -- Exceptions if word == "človek" then set_forms(forms, {"nom_pl", "gen_pl", "dat_pl", "acc_pl", "loc_pl", "ins_pl"}, {"ľudia", "ľudí", "ľuďom", "ľudí", "ľuďoch", "ľuďmi"} ) elseif word == "héros" then set_forms(forms, {"gen_sg", "dat_sg", "acc_sg", "loc_sg", "ins_sg", "nom_pl", "gen_pl", "dat_pl", "acc_pl", "loc_pl", "ins_pl", "gen_sg2", "dat_sg2", "acc_sg2", "loc_sg2", "ins_sg2", "nom_pl2", "gen_pl2", "dat_pl2", "acc_pl2", "loc_pl2", "ins_pl2"}, {"hérosa", "hérosovi", "hérosa", "hérosovi", "hérosom", "hérosi", "hérosov", "hérosom", "hérosov", "hérosoch", "hérosmi", "héroa", "héroovi", "héroa", "héroovi", "héroom", "héroovia", "héroov", "héroom", "héroov", "hérooch", "héroami"} ) end -- Vocative if matches_any(word, {"syn", "sváko", "švagor", "kmotor", "brat", "synko", "synáčik", "pán", "chlapec", "priateľ", "majster", "Boh", "boh", "Pán", "Syn", "Duch", "Ježiš", "Ježiško", "Kristus", "Spasiteľ", "Vykupiteľ", "Stvoriteľ", "Premožiteľ", "Kráľ", "Hospodin", "baránok", "Baránok", "tešiteľ", "Tešiteľ", "hriešnik", "protivník", "kresťan", "otec", "Otec", "chlap", "človek"}) then voc_stem = stem if word == "synáčik" then voc_stem = "synáčk" end if word == "pán" then voc_stem = "pan" end if word == "Pán" then voc_stem = "Pan" end if ends_with_any(word, {"teľ", "o"}) or matches_any(word, {"syn", "Syn", "Duch", "Ježiš", "Kráľ", "hriešnik", "synáčik", "baránok", "Baránok"}) then set_forms(forms, {"voc_sg"}, {append_ending(voc_stem, "u")}) else if ends_with_any(voc_stem, {"k", "c"}) then voc_stem = remove_last_char(voc_stem) .. "č" elseif ends_with(voc_stem, "h") then voc_stem = remove_last_char(voc_stem) .. "ž" end set_forms(forms, {"voc_sg"}, {append_ending(voc_stem, "e")}) end if not matches_any(word, {"človek", "pán", "brat"}) then set_forms(forms, {"voc_sg2"}, {word}) elseif word == "brat" then set_forms(forms, {"voc_sg2", "voc_sg3"}, {"bratu", "brat"}) end end return forms, title -- Return forms table and title for declension end declensions["hrdina"] = function(word, genitive) local forms = {} local title = "မလဟုတ်စှ်ေဆေၚ်စပ်ကဵု ''" .. word .. "'' <br>(pattern " .. pattern_link("hrdina") .. ")" local stem = remove_suffix(word, "a") if ends_with(word, "[oeě]") then stem = remove_last_char(word) if ends_with(word, "ě") and ends_with(stem, "[dtnl]") then stem = soften_last_consonant(stem) end end local nom_pl_ending = "ovia" if ends_with_any(word, {"ista", "ita"}) or (ends_with(word, "ta") and TYPE == "loan") then nom_pl_ending = "i" end local ins_pl_ending = "ami" if ends_with(word, "[aeiouyáéíóúýäöüőű]ta") and TYPE == "loan" then ins_pl_ending = "mi" end append_endings(forms, word, stem, "u", "ovi", "u", "ovi", "om", nom_pl_ending, stem .. "ov", "om", "ov", "och", ins_pl_ending ) if TYPE == "surn" then append_second_plural(forms, stem .. "ovci", stem .. "ovcov", stem .. "ovcom", stem .. "ovcov", stem .. "ovcoch", stem .. "ovcami") end if word == "buržoa" then set_forms(forms, {"dat_sg", "loc_sg", "ins_sg", "nom_pl", "gen_pl", "dat_pl", "acc_pl", "loc_pl"}, {"buržuovi", "buržuovi", "buržuom", "buržuovia", "buržuov", "buržuom", "buržuov", "buržuoch"} ) end return forms, title end declensions["kuli"] = function(word, genitive) local forms = {} local stem = word local title = "မလဟုတ်စှ်ေဆေၚ်စပ်ကဵု ''" .. word .. "'' <br>(pattern " .. pattern_link("kuli") .. ")" append_endings(forms, word, stem, "ho", "mu", "ho", "m", "m", "ovia", stem .. "ov", "om", "ov", "och", "ami" ) if TYPE == "surn" then append_second_plural(forms, stem .. "ovci", stem .. "ovcov", stem .. "ovcom", stem .. "ovcov", stem .. "ovcoch", stem .. "ovcami") end return forms, title end declensions["dub"] = function(word, genitive) local forms = {} local mobile_removed = false -- Tracks if a mobile vowel was removed local words_with_mobile = {"priemysel", "počet", "ocot", "bahor", "chrbát", "ker", "cukor", "uhor", "vietor", "víchor", "vôdor", "kotol", "kapor", "zubor", "bobor", "orol", "pes", "mozog", "uhol"} local syllable_count, syllables = split_into_syllables(word) -- Determine the stem by removing mobile vowels if applicable local stem = word if (matches_any(word, words_with_mobile) or (ends_with_any(word, {"íček", "ýček", "ok"}) and syllable_count ~= 1)) and not matches_any(word, {"polrok", "nárok", "zákrok", "rozkrok"}) then stem = remove_mobile_vowel(word) mobile_removed = true -- Mark mobile vowel as removed end -- Adjust specific stems based on predefined mappings stem = ({["mráz"] = "mraz", ["vietor"] = "vetr", ["kôl"] = "kol", ["stôl"] = "stol", ["vôl"] = "vol", ["chlieb"] = "chleb", ["ensemble"] = "ensembl"})[word] or stem -- Remove certain endings for words ending with "us", "os", "es" and "o" if (ends_with(word, "[uoe]s") and TYPE == "loan") or ends_with(word, "izmus") then stem = mw.ustring.sub(word, 1, -3) end if ends_with(word, "o") then stem = remove_last_char(word) end -- Pluralia tantum if NUMBER == "pl" then stem = remove_suffix(word, "y") end -- Override if a specific argument is given if genitive and NUMBER ~= "pl" then stem = remove_last_char(genitive) if stem == remove_last_char(remove_last_char(word)) .. get_last_char(word) then mobile_removed = true elseif stem == word then mobile_removed = false end end -- Set "mobile_removed" if genitive was set by the user if ends_with(word, "e[lr]") and ends_with(stem, "[^e][lr]") then mobile_removed = true end -- Title for the declension table local title = "မလဟုတ်စှ်ေဆေၚ်စပ်ကဵု ''" .. word .. "'' <br>(pattern " .. pattern_link("dub") .. ")" if GENDER == "m-anml" then if matches_any(word, {"vták", "vlk", "pes"}) then title = "မလဟုတ်စှ်ေဆေၚ်စပ်ကဵု ''" .. word .. "'' <br>(patterns " .. pattern_link("chlap") .. " <small>(singular, plural 1)</small> and " .. pattern_link("dub") .. " <small>(plural 2)</small>)" elseif PLURAL2 then title = "မလဟုတ်စှ်ေဆေၚ်စပ်ကဵု ''" .. word .. "'' <br>(patterns " .. pattern_link("chlap") .. " <small>(singular, plural 2)</small> and " .. pattern_link("dub") .. " <small>(plural 1)</small>)" else title = "မလဟုတ်စှ်ေဆေၚ်စပ်ကဵု ''" .. word .. "'' <br>(patterns " .. pattern_link("chlap") .. " <small>(singular)</small> and " .. pattern_link("dub") .. " <small>(plural)</small>)" end end -- Helper variables for analyzing the last and penultimate characters local ultimate, penultimate = get_last_letters(stem) local first = get_first_char(word) -- Determine genitive singular ending local gen_sg = "a" if (matches_any(TYPE, {"abstr", "comp-deverb", "material", "collect", "loan"}) or matches_any(GEN_ENDING, {"u", "u/a"}) or ends_with_any(word, {"izmus", "x"}) or (ends_with(word, "m") and not is_capital(first)) or (ends_with(word, "z") and is_capital(first))) and not matches_any(GEN_ENDING, {"a", "a/u"}) then gen_sg = "u" end -- Override genitive singular ending if a specific argument is given if genitive then gen_sg = get_last_char(genitive) end -- Determine locative singular ending based on specific suffixes and patterns local loc_sg = "e" if ends_with_any(word, {"k", "g", "h", "ch"}) or (ends_with(word, "i[ue]s") and TYPE == "loan") then loc_sg = "u" elseif (ends_with(word, "ér") or (ends_with(word, "ál") and not matches_any(word, {"bál", "paškál", "paušál", "šál", "škandál", "žurnál"})) or matches_any(word, {"Alžír", "klavír", "apríl", "jún", "júl"})) then loc_sg = "i" end -- Determine genitive plural ending local gen_pl = stem .. "ov" -- Default genitive plural ending is "ov" -- Adjust genitive plural for specific place names and patterns if is_capital(first) and (ends_with_any(word, {"any", "íky", "áky", "iaky"}) or matches_any(word, {"Krompachy", "Kubachy", "Veľbachy", "Spišské Vlachy", "Žabokreky", "Čechy", "Brezolupy", "Bruty", "Rakoľuby", "Rakúsy", "Prusy", "Veľaty", "Piešťany", "Bieščary"})) then local gen_stem = remove_last_char(word) -- Remove last character to get the base stem local syllable_count, syllables = split_into_syllables(gen_stem) local last_syllable = syllables[1] local penultimate_syllable = syllables[2] or "" -- Lengthen the vowel if the penultimate syllable is short, otherwise use unchanged stem if is_long(penultimate_syllable) then gen_pl = gen_stem else gen_pl = remove_suffix(gen_stem, last_syllable) .. lengthen_vowel(last_syllable) end end -- Special cases for genitive plural of specific words if word == "čas" then gen_pl = "čias" elseif word == "raz" then gen_pl = "ráz" end -- Determine instrumental plural ending local ins_pl = "mi" -- Default instrumental plural ending is "mi" if ultimate == "m" or mobile_removed or ends_with_any(word, {"o", "ius", "eus"}) or (penultimate == "m" and consonants_set[ultimate]) then ins_pl = "ami" end -- Doublets for instrumental plural if matches_any(word, {"schod", "schody", "fúz", "fúzy", "roh", "rohy", "paroh", "parohy", "čary", "orech"}) then set_forms(forms, {"ins_pl2"}, {stem .. "ami"}) elseif matches_any(word, {"zub", "dol", "most", "prst", "piest", "necht"}) then ins_pl = "ami" set_forms(forms, {"ins_pl2"}, {stem .. "mi"}) end -- Populate forms table with singular and plural endings append_endings(forms, word, stem, gen_sg, "u", nil, loc_sg, "om", "y", gen_pl, "om", nil, "och", ins_pl ) -- Alternative genitive ending if GEN_ENDING == "a/u" then set_forms(forms, {"gen_sg2"}, {stem .. "u"}) elseif GEN_ENDING == "u/a" then set_forms(forms, {"gen_sg2"}, {stem .. "a"}) end -- Exceptions if matches_any(word, {"sen", "dol"}) then set_forms(forms, {"loc_pl2"}, {stem .. "ách"}) elseif word == "čas" then set_forms(forms, {"gen_pl2"}, {"časov"}) end -- Animal nouns if GENDER == "m-anml" then append_animal_singular(forms, stem) if matches_any(word, {"vták", "vlk", "pes"}) or PLURAL2 then local forms2, title2 = declensions["chlap"](word, stem .. gen_sg) append_second_plural(forms, forms2["nom_pl"], forms2["gen_pl"], forms2["dat_pl"], forms2["acc_pl"], forms2["loc_pl"], forms2["ins_pl"]) if matches_any(word, {"vták", "vlk", "pes"}) then switch_plural_forms(forms) --changes the prefered forms -- Determine alternative dative and locative for some nouns if matches_any(word, {"vlk", "pes"}) then set_forms(forms, {"dat_sg2", "loc_sg2"}, {stem .. "u", stem .. "u"}) end end end end return forms, title -- Return forms table and title for declension end declensions["stroj"] = function(word, genitive) local forms = {} local mobile_removed = false -- Tracks if a mobile vowel was removed local words_with_no_mobile = {"kúpeľ", "červeň", "kameň", "jačmeň", "koreň", "prameň", "prsteň", "jeleň"} local first = get_first_char(word) -- Determine the stem by removing mobile vowels if applicable local stem = word if (ends_with_any(word, {"ec", "iec", "[^ti]eľ", "oľ", "[^i]eň", "eť", "[^i]er", "el"}) or (ends_with(word, "ac") and (is_capital(first) or word == "desaterac"))) and not matches_any(word, words_with_no_mobile) then stem = remove_mobile_vowel(word) mobile_removed = true -- Mark mobile vowel as removed end -- Adjust specific stems based on predefined mappings stem = ({["dážď"] = "dažď", ["kôš"] = "koš", ["nôž"] = "nož", ["kôň"] = "koň", ["timbre"] = "timbr"})[word] or stem -- Pluralia tantum if NUMBER == "pl" then stem = remove_suffix(word, "e") end -- Override if a specific argument is given if genitive and NUMBER ~= "pl" then stem = remove_last_char(genitive) if stem == remove_last_char(remove_last_char(word)) .. get_last_char(word) then mobile_removed = true elseif stem == word then mobile_removed = false end end -- Set "mobile_removed" if genitive was set by the user if ends_with(word, "e[lr]") and ends_with(stem, "[^e][lr]") then mobile_removed = true end -- Title for the declension table local title = "မလဟုတ်စှ်ေဆေၚ်စပ်ကဵု ''" .. word .. "'' <br>(pattern " .. pattern_link("stroj") .. ")" if GENDER == "m-anml" then if PLURAL2 then title = "မလဟုတ်စှ်ေဆေၚ်စပ်ကဵု ''" .. word .. "'' <br>(patterns " .. pattern_link("chlap") .. " <small>(singular, plural 2)</small> and " .. pattern_link("stroj") .. " <small>(plural 1)</small>)" else title = "မလဟုတ်စှ်ေဆေၚ်စပ်ကဵု ''" .. word .. "'' <br>(patterns " .. pattern_link("chlap") .. " <small>(singular)</small> and " .. pattern_link("stroj") .. " <small>(plural)</small>)" end elseif word == "cól" then title = "မလဟုတ်စှ်ေဆေၚ်စပ်ကဵု ''" .. word .. "'' <br>(pattern " .. pattern_link("stroj") .. " or " .. pattern_link("dub") .. ")" end -- Helper variables for analyzing the last and penultimate characters local ultimate, penultimate = get_last_letters(stem) local first = get_first_char(word) -- Determine genitive singular ending local gen_sg = "a" if ((matches_any(TYPE, {"abstr", "material"}) or matches_any(GEN_ENDING, {"u", "u/a"})) and not matches_any(word, {"jačmeň", "kameň", "olej", "loj", "vývoj", "rozvoj"})) and not matches_any(GEN_ENDING, {"a", "a/u"}) then gen_sg = "u" end -- Override genitive singular ending if a specific argument is given if genitive then gen_sg = get_last_char(genitive) end -- Determine genitive plural ending local gen_pl = stem .. "ov" -- Default genitive plural ending is "ov" -- Adjust genitive plural for specific place names and patterns if is_capital(first) and (ends_with_any(word, {"áre", "iare"}) or word == "Tlmače") then local gen_stem = remove_last_char(word) -- Remove last character to get the base stem local syllable_count, syllables = split_into_syllables(gen_stem) local last_syllable = syllables[1] local penultimate_syllable = syllables[2] or "" -- Lengthen the vowel if the penultimate syllable is short, otherwise use unchanged stem if is_long(penultimate_syllable) then gen_pl = gen_stem else gen_pl = remove_suffix(gen_stem, last_syllable) .. lengthen_vowel(last_syllable) end end -- Special cases for genitive plural of specific words if word == "Ladce" then gen_pl = "Ladiec" elseif word == "Vráble" then gen_pl = "Vrábeľ" elseif word == "peniaze" then gen_pl = "peňazí" elseif matches_any(word, {"deň", "kôň", "groš"}) then gen_pl = append_ending(stem, "í") end -- Determine instrumental plural ending local ins_pl = "mi" -- Default instrumental plural ending is "mi" if mobile_removed or (obstruents_set[penultimate] and obstruents_set[ultimate]) then ins_pl = "ami" end -- Populate forms table with singular and plural endings append_endings(forms, word, stem, gen_sg, "u", nil, "i", "om", "e", gen_pl, "om", nil, "och", ins_pl ) -- Alternative genitive ending if GEN_ENDING == "a/u" then set_forms(forms, {"gen_sg2"}, {stem .. "u"}) elseif GEN_ENDING == "u/a" then set_forms(forms, {"gen_sg2"}, {stem .. "a"}) end -- Exceptions if matches_any(word, {"deň", "poldeň"}) then set_forms(forms, {"nom_pl", "acc_pl", "loc_sg2"}, {append_ending(stem, "i"), append_ending(stem, "i"), append_ending(stem, "e")} ) elseif word == "ďateľ" then set_forms(forms, {"gen_sg2", "dat_sg2", "loc_sg2", "ins_sg2", "nom_pl2", "gen_pl2", "dat_pl2", "acc_pl2", "loc_pl2", "ins_pl2"}, {"ďatľa", "ďatľovi", "ďatľovi", "ďatľom", "ďatle", "ďatľov", "ďatľom", "ďatle", "ďatľoch", "ďatľami"} ) elseif word == "cól" then set_forms(forms, {"loc_sg2", "nom_pl2", "acc_pl2"}, {"cóle", "cóly", "cóly"} ) end -- Animal nouns if GENDER == "m-anml" then append_animal_singular(forms, stem) if PLURAL2 then local forms2, title2 = declensions["chlap"](word, stem .. gen_sg) append_second_plural(forms, forms2["nom_pl"], forms2["gen_pl"], forms2["dat_pl"], forms2["acc_pl"], forms2["loc_pl"], forms2["ins_pl"]) end end return forms, title -- Return forms table and title for declension end declensions["žena"] = function(word, genitive) local forms = {} local stem = remove_suffix(word, "a") local title = "မလဟုတ်စှ်ေဆေၚ်စပ်ကဵု ''" .. word .. "'' <br>(pattern " .. pattern_link("žena") .. ")" if ends_with(word, "ea") then title = "မလဟုတ်စှ်ေဆေၚ်စပ်ကဵု ''" .. word .. "'' <br>(pattern " .. pattern_link("žena") .. ", loanword ending with ''-ea'')" end -- Pluralia tantum or genitive if NUMBER == "pl" then stem = remove_suffix(word, "y") end if genitive and NUMBER ~= "pl" then stem = remove_suffix(genitive, "y") end -- Split into syllables local gen_pl = "" local syllable_count, syllables = split_into_syllables(stem) local word_syllable_count, word_syllables = split_into_syllables(word) -- Get the last and second-to-last syllables for rule checks local last_syllable = syllables[1] local penultimate_syllable = syllables[2] or "" local word_penultimate_syllable = word_syllables[2] or "" local ultimate, penultimate = get_last_letters(stem) -- 1. Add a vowel between the last two consonants of a cluster at the end of the stem if ends_with_consonant_cluster(last_syllable) or word_syllable_count == 1 then if (ultimate == "k" and not matches_any(word, {"banka"})) or (ultimate == "b" and (TYPE == "der" or not sonorants_set[penultimate])) or sonorants_set[ultimate] or matches_any(word, {"farba", "karta", "buchta", "astma"}) or (obstruents_set[penultimate] and ultimate == "v") then if penultimate ~= "j" and (word_syllable_count == 1 or is_short(word_penultimate_syllable)) then gen_pl = harden_last_consonant(remove_suffix(stem, ultimate)) .. "ie" .. ultimate if matches_any(word, {"handra", "perla", "metla", "slivka", "tehla", "vidly", "karta", "kvapka", "stovka", "doska"}) then gen_pl = remove_suffix(stem, ultimate) .. "á" .. ultimate set_forms(forms, {"gen_pl2"}, {harden_last_consonant(remove_suffix(stem, ultimate)) .. "ie" .. ultimate}) end if matches_any(word, {"jamka", "kvapka"}) then set_forms(forms, {"gen_pl2"}, {remove_suffix(stem, ultimate) .. "ô" .. ultimate}) end if matches_any(word, {"astma"}) then set_forms(forms, {"gen_pl2"}, {stem .. "í"}) end elseif obstruents_set[ultimate] and (is_long(word_penultimate_syllable) or penultimate == "j") then gen_pl = remove_suffix(stem, ultimate) .. "o" .. ultimate elseif (sonorants_set[ultimate] or ultimate == "v") and (is_long(word_penultimate_syllable) or penultimate == "j") then gen_pl = remove_suffix(stem, ultimate) .. "e" .. ultimate if penultimate ~= "j" then set_forms(forms, {"gen_pl2"}, {remove_suffix(stem, ultimate) .. "ie" .. ultimate}) end end end end -- 2. Add "í" if stem ends with a vowel or a soft consonant if gen_pl == "" and (vowels_set[ultimate] or matches_any(word, {"medaila", "pera", "kanva", "panva", "skepsa", "nuansa"})) then gen_pl = stem .. "í" if matches_any(word, {"nuansa"}) then set_forms(forms, {"gen_pl2"}, {remove_suffix(stem, last_syllable) .. lengthen_vowel(last_syllable)}) end end -- 3. Return the stem with no change if conditions match if gen_pl == "" and (is_long(penultimate_syllable) or ends_with_any(stem, {"tvor", "ov"}) or mw.ustring.match(last_syllable, "[Jj][eo]") or (TYPE == "loan" and matches_any(get_vowel(last_syllable), {"e", "o"}))) then gen_pl = stem end -- 4. Logic to use the lengthened vowel if conditions match if gen_pl == "" and (not (ends_with_consonant_cluster(last_syllable) or vowels_set[ultimate]) or (ends_with_consonant_cluster(last_syllable) and sonorants_set[penultimate] and obstruents_set[ultimate]) or (ends_with_consonant_cluster(last_syllable) and matches_any(penultimate, {"c", "s", "z", "š", "ž", "p"}) and matches_any(ultimate, {"t", "d"}))) and not matches_any(word, {"šachta", "mzda"}) then gen_pl = remove_suffix(stem, last_syllable) .. lengthen_vowel(last_syllable) if mw.ustring.find(stem, "au[bcčdďfghjklľmnňpqrsštťvwxzž]$") then gen_pl = remove_suffix(stem, "a" .. last_syllable) .. "á" .. last_syllable end end -- 5. long -á- instead of -ia- for some loanwords if matches_any(word, {"pyžama", "šachta"}) then gen_pl = (word == "pyžama") and "pyžám" or "šácht" if word == "šachta" then set_forms(forms, {"gen_pl2"}, {"šachiet"}) end end -- 6. Exceptions if word == "mzda" then gen_pl = "miezd" end if gen_pl == "" then gen_pl = stem end local dat_pl, loc_pl if is_long(word_penultimate_syllable) then dat_pl, loc_pl = "am", "ach" else dat_pl, loc_pl = "ám", "ách" end local dat_sg, loc_sg if ultimate == "e" then dat_sg, loc_sg = "i", "i" else dat_sg, loc_sg = "e", "e" end append_endings(forms, word, stem, "y", dat_sg, "u", loc_sg, "ou", "y", gen_pl, dat_pl, nil, loc_pl, "ami" ) if matches_any(word, {"zora", "žiara", "žiabra"}) then set_forms(forms, {"nom_pl", "acc_pl"}, {stem .. "e", stem .. "e"} ) end return forms, title end declensions["gazdiná"] = function(word, genitive) local forms = {} local stem = remove_suffix(word, "á") local title = "မလဟုတ်စှ်ေဆေၚ်စပ်ကဵု ''" .. word .. "'' <br>(pattern " .. pattern_link("gazdiná") .. ")" local syllable_count, syllables = split_into_syllables(stem) local last_syllable = syllables[1] local gen_pl = "" if ends_with_consonant_cluster(last_syllable) then gen_pl = mw.ustring.sub(stem, 1, -2) .. "ien" else gen_pl = remove_suffix(stem, last_syllable) .. lengthen_vowel(last_syllable) end append_endings(forms, word, stem, "ej", "ej", "ú", "ej", "ou", "é", gen_pl, "ám", nil, "ách", "ami" ) return forms, title end declensions["ulica"] = function(word, genitive) local forms = {} local stem = remove_suffix(word, "a") local title = "မလဟုတ်စှ်ေဆေၚ်စပ်ကဵု ''" .. word .. "'' <br>(pattern " .. pattern_link("ulica") .. ")" -- Pluralia tantum if NUMBER == "pl" then stem = remove_suffix(word, "e") if ends_with_any(stem, {"d", "t", "n", "l"}) then stem = soften_last_consonant(stem) end end -- Split into syllables local gen_pl = "" local syllable_count, syllables = split_into_syllables(stem) local word_syllable_count, word_syllables = split_into_syllables(word) -- Get the last and second-to-last syllables for rule checks local last_syllable = syllables[1] local penultimate_syllable = syllables[2] or "" local word_penultimate_syllable = word_syllables[2] or "" local ultimate, penultimate = get_last_letters(stem) local first = get_first_char(word) -- 1. Add a vowel between the last two consonants of a cluster at the end of the stem if ends_with_consonant_cluster(last_syllable) then if (is_capital(first) and ends_with(word, "ce")) or matches_any(word, {"dverce", "ovca", "fakľa", "drumbľa", "husle", "jasle", "kachle", "hrable", "šabľa", "mašľa", "žemľa", "ríbezľa", "čerešňa", "sukňa", "višňa"}) then gen_pl = harden_last_consonant(remove_suffix(stem, ultimate)) .. "ie" .. ultimate if matches_any(word, {"drumbľa", "husle", "jasle", "kachle", "hrable", "šabľa", "mašľa", "žemľa", "ríbezľa", "čerešňa", "sukňa", "višňa"}) then set_forms(forms, {"gen_pl2"}, {append_ending(stem, "í")}) end end end -- 2. Add "í" if stem ends with a vowel or a soft consonant if gen_pl == "" and (matches_any(ultimate, {"dz", "dž", "ž", "ť", "ď", "j", "i", "y"}) or ends_with_any(word, {"nca", "oľa", "ôľa", "aľa", "ša", "ča"}) or matches_any(word, {"liace", "pasca", "páľa", "trúbeľa", "mrľa", "konope", "večera", "rozopra"}) or (matches_any(ultimate, {"ľ"}) and consonants_set[penultimate]) or (matches_any(ultimate, {"ň"}) and penultimate ~= "y")) and not matches_any(word, {"papuča", "priča", "hrča", "paprča", "garniža", "fakľa", "skriňa", "sviňa", "abatiša", "čaša", "fľaša", "Krkonoše", "ríša", "skrýša"}) then gen_pl = append_ending(stem, "í") end -- 3. Logic to use the lengthened vowel if conditions match if gen_pl == "" and not ends_with_consonant_cluster(last_syllable) and not vowels_set[ultimate] and ((ends_with(word, "ca") and TYPE ~= "der") or ends_with_any(word, {"yňa", "uľa"}) or matches_any(word, {"papuča", "priča", "hrča", "chvíľa", "míľa", "košeľa", "nedeľa", "guľa", "hoľa", "homoľa", "skriňa", "sviňa", "abatiša", "čaša", "fľaša", "Krkonoše", "ríša", "skrýša", "garniža", "Hybe", "dvere", "kuša", "moruša"})) then if is_long(penultimate_syllable) then gen_pl = stem else gen_pl = remove_suffix(stem, last_syllable) .. lengthen_vowel(last_syllable) if matches_any(word, {"homoľa", "kuša", "moruša", "hrča", "paprča", "guľa", "hoľa"}) then set_forms(forms, {"gen_pl2"}, {append_ending(stem, "í")}) end end end if gen_pl == "" then gen_pl = stem end local dat_pl, loc_pl if ends_with_any(stem, {"i", "y"}) or word == "pizza" then dat_pl, loc_pl = "ám", "ách" elseif is_long(word_penultimate_syllable) or ends_with(stem, "j") then dat_pl, loc_pl = "am", "ach" else dat_pl, loc_pl = "iam", "iach" end append_endings(forms, word, stem, "e", "i", "u", "i", "ou", "e", gen_pl, dat_pl, nil, loc_pl, "ami" ) if word == "rozopra" then set_forms(forms, {"dat_pl2", "loc_pl2"}, {"rozoprám", "rozoprách"} ) elseif word == "dvere" then set_forms(forms, {"dat_pl", "loc_pl", "gen_pl2", "ins_pl2"}, {"dverám", "dverách", "dverí", "dvermi"} ) end return forms, title end declensions["irregular"] = function(word, genitive) local forms = {} local title = "မလဟုတ်စှ်ေဆေၚ်စပ်ကဵု ''" .. word .. "'' (irregular)" if matches_any(word, {"mať", "mater", "mati"}) then local stem = "mater" append_endings(forms, word, stem, "e", "i", "", "i", "ou", "e", stem .. "í", "iam", "e", "iach", "ami" ) local accusative = (word == "mater") and {"mater", "mať"} or {"mať", "mater"} set_forms(forms, {"acc_sg", "acc_sg2"}, accusative) elseif ends_with(word, "pani") then local stem = remove_suffix(word, "ni") .. "ň" append_endings(forms, word, stem, "ej", "ej", "iu", "ej", "ou", "ie", stem .. "í", "iam", nil, "iach", "iami" ) end return forms, title end declensions["dlaň"] = function(word, genitive) local forms = {} local words_with_mobile_vowel = {"faloš", "osuheľ", "siheľ", "myseľ"} local stem if genitive then stem = remove_suffix(genitive, "e") elseif matches_any(word, words_with_mobile_vowel) or ends_with(word, "eň") then stem = remove_mobile_vowel(word) else stem = word end local title = "မလဟုတ်စှ်ေဆေၚ်စပ်ကဵု ''" .. word .. "'' <br>(pattern " .. pattern_link("dlaň") .. ")" local syllable_count, syllables = split_into_syllables(word) local last_syllable = syllables[1] local penultimate_syllable = syllables[2] or "" local last_char = get_last_char(word) local dat_pl, loc_pl if is_long(penultimate_syllable) or last_char == "j" then dat_pl, loc_pl = "am", "ach" elseif word == "kader" then dat_pl, loc_pl = "ám", "ách" else dat_pl, loc_pl = "iam", "iach" end append_endings(forms, word, stem, "e", "i", nil, "i", "ou", "e", append_ending(stem, "í"), dat_pl, nil, loc_pl, "ami" ) if matches_any(word, {"myseľ", "tvár", "hneď", "raž"}) then set_forms(forms, {"gen_sg2"}, {append_ending(stem, "i")}) end return forms, title end declensions["kosť"] = function(word, genitive) local forms = {} local words_with_mobile_vowel = {"voš", "lož", "Ves", "ves", "cirkev", "reďkev"} local stem = (matches_any(word, words_with_mobile_vowel)) and remove_mobile_vowel(word) or word if word == "česť" then stem = "cť" end local title = "မလဟုတ်စှ်ေဆေၚ်စပ်ကဵု ''" .. word .. "'' <br>(pattern " .. pattern_link("kosť") .. ")" append_endings(forms, word, stem, "i", "i", nil, "i", "ou", "i", append_ending(stem, "í"), "iam", nil, "iach", "ami" ) if word == "hrsť" then set_forms(forms, {"nom_pl", "acc_pl"}, {"hrste", "hrste"} ) elseif word == "lesť" then append_alternative_singular(forms, "ľsti", "ľsti", nil, "ľsti", "ľsťou") append_alternative_plural(forms, "ľsti", "ľstí", "ľstiam", nil, "ľstiach", "ľsťami") elseif matches_any(word, {"cirkev", "reďkev"}) then set_forms(forms, {"dat_pl", "loc_pl"}, {stem .. "ám", stem .. "ách"} ) end return forms, title end declensions["mesto"] = function(word, genitive) local forms = {} local ultimate, penultimate = get_last_letters(word) local special_type = "" local stem = remove_suffix(word, "o") if penultimate == "u" and ultimate == "m" then stem = remove_suffix(word, "um") special_type = ", of Latin origin ending with ''-um''" elseif penultimate == "o" and ultimate == "n" then stem = remove_suffix(word, "on") special_type = ", of Greek origin ending with ''-on''" elseif penultimate == "m" and ultimate == "ä" then stem = remove_suffix(word, "ä") .. "en" special_type = ", archaic type ending with ''-mä''" end -- Pluralia tantum if NUMBER == "pl" then stem = remove_suffix(word, ultimate) end local title = "မလဟုတ်စှ်ေဆေၚ်စပ်ကဵု ''" .. word .. "'' <br>(pattern " .. pattern_link("mesto") .. special_type .. ")" local stem_ultimate, stem_penultimate = get_last_letters(stem) local loc_sg = "e" if vowels_set[stem_ultimate] or matches_any(stem_ultimate, {"k", "g", "ch", "h"}) then loc_sg = "u" elseif matches_any(word, {"vnútro", "nebo"}) then loc_sg = "i" end -- Split into syllables local gen_pl = "" local syllable_count, syllables = split_into_syllables(stem) local word_syllable_count, word_syllables = split_into_syllables(word) -- Get the last and second-to-last syllables for rule checks local last_syllable = syllables[1] local penultimate_syllable = syllables[2] or "" local word_penultimate_syllable = word_syllables[2] or "" -- 1. Add a vowel between the last two consonants of a cluster at the end of the stem if ends_with_consonant_cluster(last_syllable) then if matches_any(word, {"jedlo", "predjedlo", "jutro", "vrecko", "brvno"}) then if matches_any(word, {"jedlo", "predjedlo", "jutro"}) then gen_pl = remove_suffix(stem, stem_ultimate) .. "á" .. stem_ultimate else gen_pl = remove_suffix(stem, stem_ultimate) .. "ie" .. stem_ultimate set_forms(forms, {"gen_pl2"}, {remove_suffix(stem, stem_ultimate) .. "á" .. stem_ultimate}) end elseif sonorants_set[stem_ultimate] or ends_with_any(last_syllable, {"stv", "ctv", "íčk", "ečk", "očk"}) or TYPE == "dim" then if stem_penultimate ~= "j" and (word_syllable_count == 1 or ends_with_any(last_syllable, {"stv", "ctv"}) or is_short(word_penultimate_syllable)) then gen_pl = remove_suffix(stem, stem_ultimate) .. "ie" .. stem_ultimate elseif obstruents_set[stem_ultimate] and (is_long(word_penultimate_syllable) or stem_penultimate == "j") then gen_pl = remove_suffix(stem, stem_ultimate) .. "o" .. stem_ultimate elseif sonorants_set[stem_ultimate] and (is_long(word_penultimate_syllable) or stem_penultimate == "j") then gen_pl = remove_suffix(stem, stem_ultimate) .. "e" .. stem_ultimate if stem_penultimate ~= "j" then set_forms(forms, {"gen_pl2"}, {remove_suffix(stem, stem_ultimate) .. "ie" .. stem_ultimate}) end end end end -- 2. Add "í" if stem ends with a vowel or a soft consonant if gen_pl == "" and (vowels_set[stem_ultimate] or soft_consonants_set[stem_ultimate]) then gen_pl = stem .. "í" end -- 3. Return the stem with no change if conditions match if gen_pl == "" and (is_long(penultimate_syllable) or ends_with_any(stem, {"vojsk", "ov"}) or (TYPE == "loan" and matches_any(get_vowel(last_syllable), {"e", "o"}))) then gen_pl = stem end -- 4. Logic to use the lengthened vowel if conditions match if gen_pl == "" and (not (ends_with_consonant_cluster(last_syllable) or vowels_set[stem_ultimate]) or (ends_with_consonant_cluster(last_syllable) and obstruents_set[stem_ultimate])) then gen_pl = remove_suffix(stem, last_syllable) .. lengthen_vowel(last_syllable) end local nom_pl = "á" if NUMBER == "pl" then nom_pl = ultimate end if gen_pl == "" then gen_pl = stem end if (is_long(word_penultimate_syllable) or word == "jojo") and not ends_with(word, "ium") then append_endings(forms, word, stem, "a", "u", nil, loc_sg, "om", "a", gen_pl, "am", nil, "ach", "ami" ) else append_endings(forms, word, stem, "a", "u", nil, loc_sg, "om", nom_pl, gen_pl, "ám", nil, "ách", "ami" ) end if matches_any(word, {"oko", "ucho"}) then local pl_stem = (word == "oko") and "oč" or "uš" append_second_plural(forms, pl_stem .. "i", pl_stem .. "í", pl_stem .. "iam", nil, pl_stem .. "iach", pl_stem .. "ami") switch_plural_forms(forms) --changes the prefered forms set_forms(forms, {"gen_pl2"}, {pl_stem .. "ú"} ) elseif word == "nebo" then set_forms(forms, {"nom_pl", "nom_pl2", "gen_pl", "dat_pl", "dat_pl2", "acc_pl", "acc_pl2", "loc_pl", "loc_pl2", "ins_pl"}, {"nebesá", "nebesia", "nebies", "nebesám", "nebesiam", "nebesá", "nebesia", "nebesách", "nebesiach", "nebesami"} ) end return forms, title end declensions["srdce"] = function(word, genitive) local forms = {} local stem = remove_suffix(word, "e") if ends_with(word, "ě") then stem = remove_suffix(word, "ě") end local title = "မလဟုတ်စှ်ေဆေၚ်စပ်ကဵု ''" .. word .. "'' <br>(pattern " .. pattern_link("srdce") .. ")" if NUMBER == "pl" then if ends_with(word, "ia") then stem = remove_suffix(word, "ia") else stem = remove_suffix(word, "a") end end if ends_with(stem, "[dtnl]") then stem = soften_last_consonant(stem) end -- Split into syllables local gen_pl = "" local syllable_count, syllables = split_into_syllables(stem) local word_syllable_count, word_syllables = split_into_syllables(word) -- Get the last and second-to-last syllables for rule checks local last_syllable = syllables[1] local penultimate_syllable = syllables[2] or "" local word_penultimate_syllable = word_syllables[2] or "" local last_char = get_last_char(stem) local stem_ultimate, stem_penultimate = get_last_letters(stem) -- 1 & 2. Lengthen the last syllable's vowel if conditions apply, -- otherwise leave the stem unchanged if penultimate syllable is long if not ends_with_consonant_cluster(last_syllable) or (ends_with(word, "ce") and matches_any(get_vowel(word_penultimate_syllable), {"r", "l"}) and TYPE ~= "dim") or ends_with(word, "ište") then if is_long(penultimate_syllable) then gen_pl = stem -- If penultimate syllable of the stem is long, use the stem unchanged else -- Otherwise, lengthen the last syllable's vowel gen_pl = remove_suffix(stem, last_syllable) .. lengthen_vowel(last_syllable) end end -- 3. Add a vowel between the last two consonants if the conditions apply if gen_pl == "" and (word == "citoslovce" or word == "vajce" or ends_with(word, "ce")) then if stem_penultimate ~= "j" and is_short(word_penultimate_syllable) then gen_pl = remove_suffix(stem, stem_ultimate) .. "ie" .. stem_ultimate elseif is_long(word_penultimate_syllable) or stem_penultimate == "j" then gen_pl = remove_suffix(stem, stem_ultimate) .. "e" .. stem_ultimate end end -- 4. Add "í" to the stem for specific words if matches_any(word, {"more", "oje", "pole", "lože"}) then gen_pl = harden_last_consonant(stem) .. "í" end -- Fallback: if none of the rules apply, return the original stem if gen_pl == "" then gen_pl = stem end if is_long(word_penultimate_syllable) or ends_with(stem, "j") then append_endings(forms, word, stem, "a", "u", nil, "i", "om", "a", gen_pl, "am", nil, "ach", "ami" ) else append_endings(forms, word, stem, "a", "u", nil, "i", "om", "ia", gen_pl, "iam", nil, "iach", "ami" ) end return forms, title end declensions["vysvedčenie"] = function(word, genitive) local forms = {} local stem = remove_suffix(word, "ie") if ends_with(word, "í") then stem = remove_suffix(word, "í") end local title = "မလဟုတ်စှ်ေဆေၚ်စပ်ကဵု ''" .. word .. "'' <br>(pattern " .. pattern_link("vysvedčenie") .. ")" append_endings(forms, word, stem, "ia", "iu", nil, "í", "ím", "ia", stem .. "í", "iam", nil, "iach", "iami" ) if word == "storočie" then append_second_plural(forms, "stáročia", "stáročí", "stáročiam", nil, "stáročiach", "stáročiami") end return forms, title end declensions["dievča"] = function(word, genitive) local forms = {} local stem = remove_suffix(word, "a") if ends_with(word, "ä") then stem = remove_suffix(word, "ä") end local ending = get_last_char(word) local title = "မလဟုတ်စှ်ေဆေၚ်စပ်ကဵု ''" .. word .. "'' <br>(pattern " .. pattern_link("dievča") .. ")" local gen_pl = "" local syllable_count, syllables = split_into_syllables(word) local last_syllable = syllables[1] local penultimate_syllable = syllables[2] or "" if is_long(penultimate_syllable) then gen_pl = stem .. ending .. "t" else gen_pl = append_ending(stem, "iat") end append_endings(forms, word, stem, ending .. "ťa", ending .. "ťu", nil, ending .. "ti", ending .. "ťom", ending .. "tá", gen_pl, ending .. "tám", nil, ending .. "tách", ending .. "tami" ) local pl_stem = harden_last_consonant(stem) append_second_plural(forms, pl_stem .. "ence", pl_stem .. "eniec", pl_stem .. "encom", nil, pl_stem .. "encoch", pl_stem .. "encami") if matches_any(word, {"kura", "strídža", "drumblence", "gajdence", "deťúrence"}) then switch_plural_forms(forms) --changes the prefered forms unset_alt_forms(forms) elseif matches_any(word, {"páža", "knieža", "kurča", "plánča", "pôrča", "zviera", "pachoľa", "mláďa", "dúpä", "chlápä", "žieňa", "nemluvňa"}) then unset_alt_forms(forms) elseif matches_any(word, {"prasa", "teľa", "šteňa"}) then local pl_stem = (word == "šteňa") and "šten" or stem append_second_plural(forms, pl_stem .. "ce", append_ending(pl_stem, "iec"), pl_stem .. "com", nil, pl_stem .. "coch", pl_stem .. "cami") switch_plural_forms(forms) --changes the prefered forms elseif word == "dieťa" then set_forms(forms, {"nom_pl", "gen_pl", "dat_pl", "acc_pl", "loc_pl", "ins_pl"}, {"deti", "detí", "deťom", "deti", "deťoch", "deťmi"} ) unset_alt_forms(forms) end return forms, title end declensions["နာမဝိသေသန"] = function(word, genitive) local forms = {} local title = "မလဟုတ်စှ်ေဆေၚ်စပ်ကဵု ''" .. word .. "'' (adjective declension)" local ultimate, penultimate = get_last_letters(word) local lemma_form = word if NUMBER == "pl" then if ends_with(word, "é") then lemma_form = remove_suffix(word, "é") .. "ý" elseif ends_with(word, "ie") then lemma_form = remove_suffix(word, "ie") .. "í" elseif ends_with_any(word, {"ove", "ine"}) then lemma_form = remove_suffix(word, "e") elseif ends_with(word, "e") then lemma_form = remove_suffix(word, "e") .. "y" elseif ends_with(word, "í") and not soft_consonants_set[penultimate] then lemma_form = remove_suffix(word, "í") .. "ý" elseif ends_with(word, "i") and not soft_consonants_set[penultimate] then lemma_form = remove_suffix(word, "i") .. "y" end else if GENDER == "f" or GENDER == "n" then if ends_with_any(word, {"á", "é"}) then lemma_form = remove_last_char(word) .. "ý" elseif ends_with_any(word, {"ia", "ie"}) then lemma_form = remove_suffix(remove_last_char(word), "i") .. "í" elseif ends_with_any(word, {"ova", "ovo", "ina", "ino"}) then lemma_form = remove_last_char(word) elseif ends_with_any(word, {"a", "e"}) then lemma_form = remove_last_char(word) .. "y" end end end local forms_raw = m_adj.do_generate_forms({pagename=lemma_form}, "adjective").forms set_forms(forms, {"nom_sg"}, {forms_raw["nom_" .. get_first_char(GENDER)][1].form} ) -- Singular if GENDER == "f" then set_forms(forms, {"gen_sg", "dat_sg", "loc_sg", "ins_sg"}, { forms_raw["gen_f"][1].form, forms_raw["dat_f"][1].form, forms_raw["loc_f"][1].form, forms_raw["ins_f"][1].form } ) else set_forms(forms, {"gen_sg", "dat_sg", "loc_sg", "ins_sg"}, { forms_raw["gen_mn"][1].form, forms_raw["dat_mn"][1].form, forms_raw["loc_mn"][1].form, forms_raw["ins_mn"][1].form } ) end -- special accusative singular if GENDER == "m-pr" or GENDER == "m-anml" then set_forms(forms, {"acc_sg"}, {forms_raw["acc_m_an"][1].form} ) elseif GENDER == "m-in" then set_forms(forms, {"acc_sg"}, {forms_raw["acc_m_in"][1].form} ) else set_forms(forms, {"acc_sg"}, {forms_raw["acc_" .. get_first_char(GENDER)][1].form} ) end -- Plural set_forms(forms, {"gen_pl", "dat_pl", "loc_pl", "ins_pl"}, { forms_raw["gen_p"][1].form, forms_raw["dat_p"][1].form, forms_raw["loc_p"][1].form, forms_raw["ins_p"][1].form } ) if GENDER == "m-pr" then set_forms(forms, {"nom_pl", "acc_sg", "acc_pl"}, {forms_raw["nom_mp_an"][1].form, forms_raw["acc_m_an"][1].form, forms_raw["acc_mp_an"][1].form} ) else set_forms(forms, {"nom_pl", "acc_pl"}, {forms_raw["nom_fnp"][1].form, forms_raw["acc_fnp"][1].form} ) end return forms, title end declensions["indeclinable"] = function(word, genitive) local forms = {} local title = "မလဟုတ်စှ်ေဆေၚ်စပ်ကဵု ''" .. word .. "'' (indeclinable)" local cases = {"nom", "gen", "dat", "acc", "loc", "ins"} -- List of cases local numbers = {"sg", "pl"} for _, case in ipairs(cases) do for _, number in ipairs(numbers) do local form_key = case .. "_" .. number forms[form_key] = word end end -- Surnames ending with -ů, -eje, -oje and -ovie if TYPE == "surn" and ends_with_any(word, {"ů", "eje", "e", "oje", "ovie"}) then append_second_plural(forms, word .. "ovci", word .. "ovcov", word .. "ovcom", word .. "ovcov", word .. "ovcoch", word .. "ovcami") end return forms, title end --[=[ Partial declination functions ]=]-- function check_gender(gender) if gender == nil then return error("No gender entered. Please pass one of these values as parameter 1: m-pr, m-anml, m-in, f, n.") elseif allowed_genders_set[gender] then return gender else return error("Unknown gender. Please pass one of these values as parameter 1: m-pr, m-anml, m-in, f, n.") end end function determine_pattern(word, genitive) local pattern local phon_word = (PRONUNCIATION) and PRONUNCIATION or word local ultimate, penultimate = get_last_letters(phon_word) local first = get_first_char(phon_word) local dlan_endings = m_table.listToSet({"ň", "č", "ž", "ľ", "ď", "j", "š", "m", "z", "dz", "x"}) local dlan_exceptions_neg = m_table.listToSet({"reč", "seč", "lož", "beľ", "soľ", "mlaď", "meď", "myš", "voš"}) local dlan_exceptions_pos = m_table.listToSet({"obec", "pec", "čelusť", "kysť", "päsť", "Provence"}) local dlan_end_with_r_t = m_table.listToSet({"kader", "neter", "šír", "tvár", "činovať", "drobäť", "droboť", "hať", "hrochoť", "Hrochoť", "hrsť", "inovať", "labuť", "niť", "obeť", "paruť", "pažiť", "pečať", "perepúť", "perleť", "peruť", "pípeť", "plť", "postať", "prť", "púť", "sieť", "sihoť", "stať", "štvrť", "trať", "úvrať", "vňať", "violeť", "záhať", "žlť"}) local stroj_exceptions_pos = {"timbre", "cól", "gáfor", "hámor", "kôpor", "kufor", "Pôtor", "šiator", "pedál", "sandál", "kanál", "peniaz", "daniel"} local stroj_exceptions_neg = {"nesvár", "nešvár", "pár", "suchopár", "svár", "ker"} if matches_any(ultimate, {"r", "l"}) and penultimate == "e" and not ends_with(phon_word, "ier") and genitive == nil then genitive = phon_word .. "a" end if mw.ustring.find(phon_word, " ") or word == genitive then return "indeclinable" end if NUMBER == "pl" then if matches_any(ultimate, {"é", "i", "í"}) or (ultimate == "e" and ends_with(genitive, "ch")) then pattern = "adjective" elseif GENDER == "m-in" then if ultimate == "y" then pattern = "dub" else pattern = "stroj" end elseif GENDER == "f" then if ultimate == "y" then pattern = "žena" else pattern = "ulica" end elseif GENDER == "n" then if ultimate == "á" then pattern = "mesto" elseif penultimate == "i" and ultimate == "a" then pattern = "srdce" else if soft_consonants_set[penultimate] then pattern = "srdce" else pattern = "mesto" end end end else if GENDER == "m-pr" then if (matches_any(ultimate, {"y", "ý", "i", "í"}) and not ends_with_any(genitive, {"[yií]ho", "a"}) and not (TYPE == "surn" and matches_any(penultimate .. ultimate, {"ay", "ai"}))) or (matches_any(penultimate .. ultimate, {"ov", "in"}) and ends_with_any(genitive, {"ovho", "inho"})) then pattern = "နာမဝိသေသန" elseif ultimate == "a" or (TYPE == "surn" and matches_any(ultimate, {"e", "ě"}) and (penultimate .. ultimate == "ně" or ends_with(genitive, "u"))) then pattern = "hrdina" elseif (matches_any(ultimate, {"i", "í", "y", "e", "é", "ä"}) or (TYPE == "name" and matches_any(ultimate, {"ü", "ö", "ő"})) or matches_any(phon_word, {"Hrabě", "Poupě"})) and not (TYPE == "surn" and (ends_with_any(phon_word, {"ay", "ai", "eje", "oje", "ovie"}) or ends_with(genitive, "a"))) then pattern = "kuli" elseif TYPE == "surn" and ends_with_any(phon_word, {"ů", "eje", "oje", "ovie"}) then pattern = "indeclinable" else pattern = "chlap" end elseif GENDER == "m-in" or GENDER == "m-anml" then if matches_any(ultimate, {"y", "ý", "i", "í"}) or (matches_any(penultimate .. ultimate, {"ov", "in"}) and ends_with(genitive, "ho")) then pattern = "နာမဝိသေသန" elseif (soft_consonants_set[ultimate] or (matches_any(ultimate, {"r", "l"}) and penultimate == "e" and (ends_with(genitive, "[^e][rl]a"))) or ends_with_any(phon_word, {"ár", "iar", "ier"}) or matches_any(phon_word, stroj_exceptions_pos)) and not matches_any(phon_word, stroj_exceptions_neg) then pattern = "stroj" else pattern = "dub" end elseif GENDER == "f" then if matches_any(phon_word, {"gazdiná", "švagriná", "testiná", "ujčiná", "stryná", "kňažná", "kráľovná", "cisárovná", "cárovná", "šľachtičná", "princezná" }) then pattern = "gazdiná" elseif ultimate == "a" and not ends_with(genitive, "ej") then if soft_consonants_set[penultimate] or matches_any(penultimate, {"i", "y"}) or matches_any(phon_word, {"rozopra", "konopa", "večera"}) then pattern = "ulica" else pattern = "žena" end elseif matches_any(ultimate, {"a", "á"}) or (ends_with_any(phon_word, {"ova", "ina"}) and ends_with(genitive, "ej")) then pattern = "adjective" elseif ends_with(phon_word, "pani") or matches_any(phon_word, {"Mať", "mať", "mater", "mati"}) then pattern = "irregular" else if not dlan_exceptions_neg[phon_word] and (dlan_endings[ultimate] or dlan_exceptions_pos[phon_word] or dlan_end_with_r_t[phon_word] or (penultimate == "š" and ultimate == "ť" and not is_capital(first))) then pattern = "dlaň" else pattern = "kosť" end end if genitive then local g_ultimate = get_last_char(genitive) if g_ultimate == "y" then pattern = "žena" elseif g_ultimate == "i" then pattern = "kosť" end end elseif GENDER == "n" then if (ultimate == "o" or (penultimate == "u" and ultimate == "m") or (penultimate == "o" and ultimate == "n") or (penultimate == "m" and ultimate == "ä")) and not ends_with(genitive, "ho") then pattern = "mesto" elseif (penultimate == "i" and ultimate == "e") or ultimate == "í" then pattern = "vysvedčenie" elseif (ultimate == "e" or ultimate == "ě") and not ends_with(genitive, "ho") then pattern = "srdce" elseif matches_any(ultimate, {"a", "ä"}) then pattern = "dievča" elseif matches_any(ultimate, {"e", "é"}) or ends_with_any(phon_word, {"ovo", "ino"}) then pattern = "နာမဝိသေသန" else pattern = "indeclinable" end end end return pattern end function append_ending(stem1, ending) if matches_any(get_first_char(ending), {"e", "i", "é", "í"}) then return harden_last_consonant(stem1) .. ending else return stem1 .. ending end end function append_endings(forms, word, stem, end2, end3, end4, end5, end6, end7, gen_pl, end9, end10, end11, end12) forms["nom_sg"] = word forms["gen_sg"] = append_ending(stem, end2) forms["dat_sg"] = append_ending(stem, end3) if GENDER == "m-pr" or (GENDER == "f" and (ends_with_any(word, {"pani", "a", "á"}) or matches_any(word, {"Mať", "mať", "mater", "mati"}))) then forms["acc_sg"] = append_ending(stem, end4) else forms["acc_sg"] = word end forms["loc_sg"] = append_ending(stem, end5) forms["ins_sg"] = append_ending(stem, end6) local nom_pl = stem if ends_with_any(stem, {"k", "ch"}) and matches_any(GENDER, {"m-pr", "m-anml"}) and end7 == "i" then if ends_with(stem, "k") then nom_pl = remove_suffix(stem, "k") .. "c" else nom_pl = remove_suffix(stem, "ch") .. "s" end end forms["nom_pl"] = append_ending(nom_pl, end7) forms["gen_pl"] = gen_pl forms["dat_pl"] = append_ending(stem, end9) if GENDER == "m-pr" or end10 or (GENDER == "f" and (ends_with_any(word, {"pani"}) or matches_any(word, {"Mať", "mať", "mater", "mati"}))) then forms["acc_pl"] = append_ending(stem, end10) else forms["acc_pl"] = forms["nom_pl"] end forms["loc_pl"] = append_ending(stem, end11) forms["ins_pl"] = append_ending(stem, end12) end function set_forms(forms, indices, values) for i = 1, #indices do forms[indices[i]] = values[i] end end function switch_plural_forms(forms) local indices = {"nom_pl", "gen_pl", "dat_pl", "acc_pl", "loc_pl", "ins_pl"} for _, index in ipairs(indices) do forms[index], forms[index .. "_alt"] = forms[index .. "_alt"], forms[index] end end function unset_alt_forms(forms) for key in pairs(forms) do if mw.ustring.find(key, "_alt$") then forms[key] = nil end end end function append_alternative_singular(forms, form2, form3, form4, form5, form6) forms["gen_sg2"] = (forms["gen_sg"] ~= form2) and form2 forms["dat_sg2"] = (forms["dat_sg"] ~= form3) and form3 if matches_any(GENDER, {"m-pr", "m-anml"}) or (GENDER == "f" and (ends_with_any(word, {"pani", "a", "á"}) or matches_any(word, {"Mať", "mať", "mater", "mati"}))) then forms["acc_sg2"] = (forms["acc_sg"] ~= form4) and form4 end forms["loc_sg2"] = (forms["loc_sg"] ~= form5) and form5 forms["ins_sg2"] = (forms["ins_sg"] ~= form6) and form6 end function append_alternative_plural(forms, form1, form2, form3, form4, form5, form6) forms["nom_pl2"] = (forms["nom_pl"] ~= form2) and form1 forms["gen_pl2"] = (forms["gen_pl"] ~= form2) and form2 forms["dat_pl2"] = (forms["dat_pl"] ~= form2) and form3 if form4 ~= nil and forms["acc_pl"] ~= form4 then forms["acc_pl2"] = form4 elseif forms["acc_pl"] ~= form1 then forms["acc_pl2"] = form1 end forms["loc_pl2"] = (forms["loc_pl"] ~= form2) and form5 forms["ins_pl2"] = (forms["ins_pl"] ~= form2) and form6 end function append_second_plural(forms, form1, form2, form3, form4, form5, form6) forms["nom_pl_alt"] = form1 forms["gen_pl_alt"] = form2 forms["dat_pl_alt"] = form3 if form4 ~= nil then forms["acc_pl_alt"] = form4 else forms["acc_pl_alt"] = forms["nom_pl_alt"] end forms["loc_pl_alt"] = form5 forms["ins_pl_alt"] = form6 end function append_animal_singular(forms, stem) set_forms(forms, {"gen_sg", "dat_sg", "acc_sg", "loc_sg"}, { append_ending(stem, "a"), append_ending(stem, "ovi"), append_ending(stem, "a"), append_ending(stem, "ovi") } ) end function get_last_char(str) local last = mw.ustring.sub(str, -1, -1) return last end function get_first_char(str) local first = mw.ustring.sub(str, 1, 1) return first end function remove_last_char(str) local stem = mw.ustring.sub(str, 1, -2) return stem end function is_capital(str) return mw.ustring.find(str, "[A-Z]") end function get_last_letters(word) local ultimate = get_last_char(word) local penultimate = get_last_char(remove_last_char(word)) local antepenultimate = get_last_char(remove_last_char(remove_last_char(word))) if (penultimate == "c" and ultimate == "h") or (penultimate == "d" and (ultimate == "z" or ultimate == "ž")) then ultimate = penultimate .. ultimate penultimate = antepenultimate antepenultimate = get_last_char(remove_last_char(remove_last_char(remove_last_char(word)))) end if (antepenultimate == "c" and penultimate == "h") or (antepenultimate == "d" and (penultimate == "z" or penultimate == "ž")) then penultimate = antepenultimate .. penultimate end if penultimate == "v" and consonants_set[ultimate] and not matches_any(ultimate, {"r", "l", "ŕ", "ĺ"}) then penultimate = "ʋ" end return ultimate, penultimate end function ends_with(word, suffix) -- Check if suffix matches the end of word word = (word ~= nil) and word or "" return mw.ustring.find(word, suffix .. "$") ~= nil end function ends_with_any(word, suffixes) for _, suffix in ipairs(suffixes) do if ends_with(word, suffix) then return true -- Return true if any suffix matches end end return false -- Return false if no suffix matches end function matches_any(value, list) for _, item in ipairs(list) do if value == item then return true end end return false end function get_vowel(syllable) -- Define patterns for diphthongs and vowels local diphthong_pattern = "ia|ie|iu|ô" local vowel_pattern = "[aeiouyáéíóúýäöőüű]" local syllabic_consonant_pattern = "[rl]" -- Check for a diphthong first local diphthong = mw.ustring.match(syllable, diphthong_pattern) if diphthong then return diphthong end -- Check for a single vowel local vowel = mw.ustring.match(syllable, vowel_pattern) if vowel then return vowel end -- Check for a syllabic consonant if no vowel is found local syllabic_consonant = mw.ustring.match(syllable, syllabic_consonant_pattern) if syllabic_consonant then return syllabic_consonant end return nil -- Return nil if no vowel or syllabic consonant is found end -- Function to split a word into characters and bigraphs function split_into_letter_units(word) local units = {} local i_word = 1 local i_pron = 1 local word_len = mw.ustring.len(word) local pron_len = PRONUNCIATION and mw.ustring.len(PRONUNCIATION) or 0 while i_word <= word_len do local two_char = mw.ustring.sub(word, i_word, i_word + 1) -- Check if PRONUNCIATION forbids combining here local combine_forbidden = false if PRONUNCIATION then -- Advance pronunciation pointer to skip slashes until it aligns with actual letters -- We only block combination if the *next* character in PRON is a slash while i_pron <= pron_len and mw.ustring.sub(PRONUNCIATION, i_pron, i_pron) == "/" do i_pron = i_pron + 1 end -- Look ahead: is the *next* pronunciation char a slash? if i_pron < pron_len then local next_ch = mw.ustring.sub(PRONUNCIATION, i_pron + 1, i_pron + 1) if next_ch == "/" then combine_forbidden = true end end end -- Normal combination if allowed if not combine_forbidden and (bigraphs_set[two_char] or diphthongs_set[two_char]) then table.insert(units, two_char) i_word = i_word + 2 i_pron = i_pron + 2 -- move pronunciation index along with it else -- Fallback: single character local char = mw.ustring.sub(word, i_word, i_word) table.insert(units, char) i_word = i_word + 1 i_pron = i_pron + 1 end end return units end -- check if a unit is a vowel or syllabic element function is_vowel(unit, prev_unit, next_unit) if diphthongs_set[unit] then return true end if vowels_set[unit] then return true end -- Check if 'r' or 'l' are syllabic (preceded and followed by consonants) if matches_any(unit, {"r", "ŕ", "l", "ĺ"}) and prev_unit and next_unit and not (vowels_set[prev_unit] or vowels_set[next_unit] or diphthongs_set[prev_unit] or diphthongs_set[next_unit]) then return true end return false end -- Function to split a word into syllables according to Slovak rules function split_into_syllables(word) local units = split_into_letter_units(word) local syllables = {} local current_syllable = "" local i = 1 local length = #units local first_vowel_found = false -- Flag to indicate when the first vowel has been encountered -- Iterate over the units in the word while i <= length do local unit = units[i] local next_unit = i < length and units[i + 1] or nil local previous_unit = i > 1 and units[i - 1] or nil local is_current_vowel = is_vowel(unit, previous_unit, next_unit) -- If we haven't encountered the first vowel, keep adding to the first syllable if not first_vowel_found then current_syllable = current_syllable .. unit if is_current_vowel then first_vowel_found = true -- Mark that the first vowel has been found end else if is_current_vowel then -- If a vowel is encountered after the first vowel has been found, finalize the current syllable if current_syllable ~= "" and is_vowel(previous_unit, nil, nil) then table.insert(syllables, current_syllable) current_syllable = "" end current_syllable = current_syllable .. unit else -- Handling consonants between vowels local consonant_cluster = unit -- Collect any consecutive consonants into a cluster local j = i + 1 while j <= length and not is_vowel(units[j], units[j - 1], units[j + 1]) do consonant_cluster = consonant_cluster .. units[j] j = j + 1 end local consonant_count = mw.ustring.len(consonant_cluster) if next_unit and is_vowel(next_unit, unit, units[j]) then -- Apply syllable rules based on the number of consonants in the cluster if consonant_count == 1 then -- Rule 3: Single consonant goes to the next syllable table.insert(syllables, current_syllable) -- End the current syllable without the consonant current_syllable = consonant_cluster -- Start the next syllable with the consonant elseif consonant_count == 2 then -- Rule 4: Two consonants split between syllables current_syllable = current_syllable .. mw.ustring.sub(consonant_cluster, 1, 1) table.insert(syllables, current_syllable) current_syllable = mw.ustring.sub(consonant_cluster, 2, 2) else -- Rule 5: Three or more consonants - first goes with current syllable, rest with next current_syllable = current_syllable .. mw.ustring.sub(consonant_cluster, 1, 1) table.insert(syllables, current_syllable) current_syllable = mw.ustring.sub(consonant_cluster, 2) end i = j - 1 -- Adjust the index to skip the processed consonants else current_syllable = current_syllable .. unit end end end i = i + 1 end -- Add any remaining characters as the final syllable if #current_syllable > 0 then table.insert(syllables, current_syllable) end -- Reverse the syllables array for the requested output order local reversed_syllables = {} for j = #syllables, 1, -1 do reversed_syllables[#reversed_syllables + 1] = syllables[j] end -- Return the count of syllables and the reversed syllable array return #syllables, reversed_syllables end function is_long(syllable) return mw.ustring.find(syllable, "[áéíóúýôĺŕ]") ~= nil or mw.ustring.find(syllable, "i[aeu]") ~= nil end function is_short(syllable) return not is_long(syllable) end local function get_last_consonant_before_vowel(syllable) local vowel = get_vowel(syllable) -- If there is no vowel in the syllable, return false if not vowel then return false end -- Find the position of the vowel in the syllable local vowel_pos = mw.ustring.find(syllable, vowel) -- Loop backwards from the position of the vowel to find the last consonant for i = vowel_pos - 1, 1, -1 do local char = mw.ustring.sub(syllable, i, i) if not mw.ustring.find(char, "[aeiouáéíóúýôä]") then return char -- Return the last consonant before the vowel end end return false -- Return false if no consonant is found before the vowel end -- Function to lengthen the last vowel in a syllable if it’s not already long function lengthen_vowel(syllable) if is_long(syllable) then return syllable -- Return as-is if the syllable is already long end local lengthening_map = { ["a"] = "á", ["i"] = "í", ["y"] = "ý", ["u"] = "ú", ["ä"] = "ia", ["e"] = "ie", ["o"] = "ô" } local cons_map = { ["ď"] = "d", ["ť"] = "t", ["ň"] = "n", ["ľ"] = "l" } -- Check for regular vowels first and replace if found for vowel, long_vowel in pairs(lengthening_map) do if mw.ustring.find(syllable, vowel) then -- if there is a soft consonant before "a", it becomes "ia" instead of "á" local last_cons = get_last_consonant_before_vowel(syllable) or "" if soft_consonants_set[last_cons] and last_cons ~= "j" and vowel == "a" then long_vowel = "ia" end -- if a or ä changes into "ia", the previous consonant should be written as hard if matches_any(vowel, {"ä", "a"}) and matches_any(last_cons, {"ď", "ť", "ň", "ľ"}) then syllable = mw.ustring.gsub(syllable, last_cons .. vowel, cons_map[last_cons] .. vowel, 1) end syllable = mw.ustring.gsub(syllable, vowel, long_vowel, 1) return syllable -- Return immediately after replacing a regular vowel end end -- Only replace "r" and "l" if no other vowels were found if not mw.ustring.find(syllable, "[aeiouyáéíóúýôä]") then syllable = mw.ustring.gsub(syllable, "r", "ŕ") syllable = mw.ustring.gsub(syllable, "l", "ĺ") end return syllable end -- Helper function to determine if the syllable ends with a consonant cluster function ends_with_consonant_cluster(last_syllable) local last_char = get_last_char(last_syllable) local second_last_char = mw.ustring.sub(last_syllable, -2, -2) local third_last_char = mw.ustring.sub(last_syllable, -3, -3) local last_two_chars = mw.ustring.sub(last_syllable, -2) -- Check if the syllable contains any regular vowels local has_vowel = mw.ustring.find(last_syllable, "[aeiouyáéíóúýôä]") if has_vowel then -- If the last two characters form a digraph, check the third-last character for a cluster if bigraphs_set[last_two_chars] then return not vowels_set[third_last_char] else -- If no digraph, just check the last two characters return not (vowels_set[last_char] or vowels_set[second_last_char] or diphthongs_set[last_char] or diphthongs_set[second_last_char]) end else -- No regular vowel; treat `r` or `l` as syllabic if either is in the last two characters if matches_any(last_char, {'ŕ', 'ĺ'}) or matches_any(second_last_char, {'ŕ', 'ĺ'}) then return false elseif mw.ustring.find(last_syllable, "[bcčdďfghjkľmnňpqsštťvwxzž][rl][bcčdďfghjkľmnňpqysštťvwxzž][rl]$") then return true else -- No syllabic `r` or `l`, so both characters are treated as consonants return not vowels_set[last_char] and not vowels_set[second_last_char] end end end function remove_mobile_vowel(word) local units = split_into_letter_units(word) -- Split word into units for i = #units, 1, -1 do local unit = units[i] if matches_any(unit, {"e", "ie", "o", "i", "á"}) then -- Remove the mobile vowel unit and reassemble the word table.remove(units, i) return table.concat(units) end end return word -- Return the original word if no mobile vowel is found end function soften_last_consonant(str) local consonants_t = { ["c"] = "č", ["d"] = "ď", ["l"] = "ľ", ["n"] = "ň", ["s"] = "š", ["t"] = "ť", ["z"] = "ž" } local last_char = get_last_char(str) -- Check if the last character is in consonants_t and replace if needed return consonants_t[last_char] and remove_last_char(str) .. consonants_t[last_char] or str end function harden_last_consonant(str) local soft_to_hard = { ["ď"] = "d", ["ť"] = "t", ["ň"] = "n", ["ľ"] = "l" } local last_char = get_last_char(str) -- Check if the last character is a soft consonant and replace if needed return soft_to_hard[last_char] and remove_last_char(str) .. soft_to_hard[last_char] or str end function remove_suffix(form, suffix) if mw.ustring.find(form, suffix .. "$") then local length = mw.ustring.len(suffix) return mw.ustring.sub(form, 1, -length-1) end return form end function pattern_link(pattern) return "''[[အဆက်လက္ကရဴ:ဝေါဟာသၠဝ်ဝေန်နဳယျာမချူသ္ၜိုန်လဝ်ပရေၚ်လဟုတ်စှ်ေနကဵုဝေါဟာ " .. pattern .. "|" .. pattern .. "]]''" end function decline_with_more_stems(genitive) local genitives = {} for part in mw.ustring.gmatch(genitive, "[^/]+") do table.insert(genitives, part) end local forms, title = declensions[PATTERN](PAGENAME, genitives[1]) normalize_forms(forms) local forms2, title2 = declensions[PATTERN](PAGENAME, genitives[2]) normalize_forms(forms2) append_alternative_singular(forms, forms2["gen_sg"], forms2["dat_sg"], forms2["acc_sg"], forms2["loc_sg"], forms2["ins_sg"]) append_alternative_plural(forms, forms2["nom_pl"], forms2["gen_pl"], forms2["dat_pl"], forms2["acc_pl"], forms2["loc_pl"], forms2["ins_pl"]) return forms, title end function split_into_units(expression, genitive) -- Split the original expression into words local words = {} for word in mw.ustring.gmatch(expression, "%S+") do table.insert(words, word) end -- Split the genitive phrase into words, if provided local gen_words = {} if genitive then for word in mw.ustring.gmatch(genitive, "%S+") do table.insert(gen_words, word) end -- Check if the genitive phrase has the same structure as the original if #gen_words ~= #words then error("Genitive phrase must have the same number of words as the original expression.") end end -- Combine words into units, grouping prepositional phrases for both expressions local units = {} local gen_units = {} local i = 1 while i <= #words do if prepositions_set[words[i]] and words[i + 1] then -- Combine preposition with the following words as one unit local phrase = words[i] local gen_phrase = genitive and gen_words[i] or nil i = i + 1 while i <= #words do phrase = phrase .. " " .. words[i] if genitive then gen_phrase = gen_phrase .. " " .. gen_words[i] end if i == #words then table.insert(units, phrase) if genitive then table.insert(gen_units, gen_phrase) end end i = i + 1 end else -- Add standalone word as a unit table.insert(units, words[i]) if genitive then table.insert(gen_units, gen_words[i]) end i = i + 1 end end -- Return both units and genitive units return units, gen_units end function generate_combined_forms(units, gen_units) -- Process each unit to generate forms local all_forms = {} local patterns = "" for i = 1, #units do local unit = units[i] local gen_unit = gen_units[i] if conjunctions_set[unit] or unit == gen_unit then -- Conjunctions are indeclinable local forms = declensions["indeclinable"](unit, gen_unit) table.insert(all_forms, forms) else -- Decline each unit using determine_pattern and declensions local pattern = determine_pattern(unit, gen_unit) local forms, title = declensions[pattern](unit, gen_unit) normalize_forms(forms) table.insert(all_forms, forms) end end -- Combine forms into a single forms table local combined_forms = {} local cases = {"nom", "gen", "dat", "acc", "loc", "ins"} local numbers = {"sg", "pl"} -- check if vocative and plural 2 forms are necessary for _, forms in ipairs(all_forms) do if forms["voc_sg"] and #cases == 6 then table.insert(cases, "voc") end if forms["nom_pl_alt"] and #numbers == 2 then table.insert(numbers, "pl_alt") end end for _, case in ipairs(cases) do for _, number in ipairs(numbers) do local form_key = case .. "_" .. number local combined_form, highest_index = {}, 1 -- Gather primary and numbered alternative forms (e.g., gen_sg2, gen_sg3) for _, forms in ipairs(all_forms) do local primary_form = forms[form_key] or forms["nom_" .. number] or forms[case .. "_pl"] table.insert(combined_form, primary_form) -- Check the highest alternative index for alt_index = 2, 4 do local alt_key = form_key .. alt_index if forms[alt_key] then highest_index = alt_index end end end -- Combine primary forms combined_forms[form_key] = mw.ustring.gsub(table.concat(combined_form, " "), "^%s+", "") -- Combine alternative forms if present if highest_index > 1 then for alt_index = 2, highest_index do -- Check and add numbered alternative forms local alt_key = form_key .. alt_index alt_form = {} for _, forms in ipairs(all_forms) do local primary_form = forms[form_key] or forms["nom_" .. number] if forms[alt_key] then table.insert(alt_form, forms[alt_key]) else table.insert(alt_form, primary_form) end end combined_forms[alt_key] = mw.ustring.gsub(table.concat(alt_form, " "), "^%s+", "") end end end end return combined_forms end function normalize_forms(forms) -- Step 1: Remove forms based on NUMBER if NUMBER == "sg" then for key in pairs(forms) do if mw.ustring.find(key, "_pl") then forms[key] = nil -- Remove plural forms if "n" is "sg" end end elseif NUMBER == "pl" then for key in pairs(forms) do if mw.ustring.find(key, "_sg") then forms[key] = nil -- Remove singular forms if "n" is "pl" end end end -- Step 2: Ensure all mandatory indices are set local cases = {"nom", "gen", "dat", "acc", "loc", "ins"} local numbers = {"sg", "pl"} for _, case in ipairs(cases) do for _, number in ipairs(numbers) do local form_key = case .. "_" .. number if not forms[form_key] then forms[form_key] = "&mdash;" -- Set missing forms to &mdash; end end end -- Step 3: Create missing _pl_alt indices if at least one exists local has_alt_plural = false for key in pairs(forms) do if mw.ustring.find(key, "_pl_alt") then has_alt_plural = true break end end if has_alt_plural then for _, case in ipairs(cases) do local form_key_alt = case .. "_pl_alt" if not forms[form_key_alt] then forms[form_key_alt] = "&mdash;" -- Create missing _pl_alt forms end end end -- Step 4: Create vocative plural forms if voc_sg exists if forms["voc_sg"] then forms["voc_pl"] = forms["nom_pl"] -- Set voc_pl to nom_pl if has_alt_plural then forms["voc_pl_alt"] = forms["nom_pl_alt"] -- Set voc_pl_alt to nom_pl_alt if it exists end end end function specified_by_user(forms, args) local cases = {nom = true, gen = true, dat = true, acc = true, voc = true, loc = true, ins = true} local numbers = {sg = true, pl = true} for key, value in pairs(args) do -- Match the pattern "<case>_<number><optional digit>" using mw.ustring.match local case, number, optional_digit = mw.ustring.match(key, "^(%a%a%a)_(%a%a)(%d?)$") -- Check if it matches the cases and numbers you want if case and cases[case] and number and numbers[number] then forms[key] = make_link(value, case .. "|" .. get_first_char(number)) end end end function make_link(link, accel_form) local new_link = link -- If link is not empty, valid, and not "&mdash;", create the full link if link ~= "" and link and link ~= "&mdash;" then new_link = m_links.full_link({lang = lang, term = link, accel = {form = accel_form}}) end return new_link end function make_table_header(title) return m_inflection_table.make_top{ title = title, palette = 'blue', tall = 'yes' } end function make_simple_row(forms, case, mnw_case) local case_code = mw.ustring.sub(case, 1, 3) local row = "<tr><th>" .. mnw_case .. "</th>" -- Singular if NUMBER ~= "pl" then row = row .. "<td><span lang=\"sk\">" .. make_link(forms[case_code .. "_sg"], case_code .. "|s") .. "</span>" -- Loop to check and display secondary singular forms in the same cell for i = 2, 4 do local form_key = case_code .. "_sg" .. i if not forms[form_key] then break -- Exit loop if form doesn't exist end row = row .. ",<br /><span lang=\"sk\">" .. make_link(forms[form_key], case_code .. "|s") .. "</span>" end row = row .. "</td>" end -- Plural if NUMBER ~= "sg" then -- Primary plural form row = row .. "<td><span lang=\"sk\">" .. make_link(forms[case_code .. "_pl"], case_code .. "|p") .. "</span>" -- Loop to check and display secondary plural forms in the same cell for i = 2, 4 do local form_key = case_code .. "_pl" .. i if not forms[form_key] then break -- Exit loop if form doesn't exist end row = row .. ",<br /><span lang=\"sk\">" .. make_link(forms[form_key], case_code .. "|p") .. "</span>" end row = row .. "</td>" -- Check for alternative plural and add it in a separate cell if forms[case_code .. "_pl_alt"] then row = row .. "<td><span lang=\"sk\">" .. make_link(forms[case_code .. "_pl_alt"], case_code .. "|p") .. "</span></td>" end end row = row .. "</tr>" return row end function make_table_header2(forms) local tr_open = "<tr><th></th>" local singular = "<th>ကိုန်ဨကဝုစ်</th>" local plural = "<th>ကိုန်ဗဟုဝစ်</th>" local plural1 = "<th>ကိုန်ဗဟုဝစ် ၁</th>" local plural2 = "<th>ကိုန်ဗဟုဝစ် ၂</th>" local tr_close = "</tr>" local alt_plural = false if forms["nom_pl_alt"] or forms["gen_pl_alt"] or forms["dat_pl_alt"] or forms["acc_pl_alt"] or forms["loc_pl_alt"] or forms["ins_pl_alt"] then alt_plural = true end local header if NUMBER == "sg" then header = tr_open .. singular .. tr_close elseif NUMBER == "pl" then if alt_plural then header = tr_open .. plural1 .. plural2 .. tr_close else header = tr_open .. plural .. tr_close end elseif alt_plural then header = tr_open .. singular .. plural1 .. plural2 .. tr_close else header = tr_open .. singular .. plural .. tr_close end return header end function make_table_footer() return '\n' .. m_inflection_table.make_bottom{} end -- Make the table function make_table(forms, title) for key, form in pairs(forms) do -- check for empty strings and nil's if form == "" or not form then forms[key] = "&mdash;" end end local final = make_table_header(title) final = final .. make_table_header2(forms) final = final .. make_simple_row(forms, "nominative", "မဒုၚ်ယၟု") final = final .. make_simple_row(forms, "genitive", "ဗဳဇဂကူ") final = final .. make_simple_row(forms, "dative", "ပြကမ္မကာရက") final = final .. make_simple_row(forms, "accusative", "ကမ္မကာရက") if forms["voc_sg"] then final = final .. make_simple_row(forms, "vocative", "ပရေၚ်ဂယိုၚ်လမျီု") end final = final .. make_simple_row(forms, "locative", "ခၞံဗဒှ်ဌာန်မတန်တဴ") final = final .. make_simple_row(forms, "instrumental", "တိၚ်တိုက်ကပေါတ်ကွိၚ်ကွိုက်") final = final .. make_table_footer() return final end return export oun1gabm4n7bj7ae0qe2tesxncp339v matematička 0 298510 401122 401112 2026-08-13T16:39:50Z 咽頭べさ 33 401122 wikitext text/x-wiki {{also|matematická}} ==ချက်ခ်== ===ဗွဟ်ရမ္သာၚ်=== * {{cs-IPA}} ===နာမ်=== {{cs-noun|f|m=matematik}} # {{female equivalent of|cs|matematik}} ====လဟုတ်စှ်ေ==== {{cs-ndecl|f}} ==သၠဝ်ဝေန်နဳယျာ== ===ဗွဟ်ရမ္သာၚ်=== * {{IPA|sk|/ˈmatɛmatit͡ʃka/}} ===နာမ်=== {{sk-noun|f|gen=matematičky|pl=matematičky|genpl=matematičiek|decl=žena}} # ဗြဴတၠပညာသၚ်္ချာ။ ====လဟုတ်စှ်ေ==== {{sk-ndecl|f}} 6g8sfnuf0ymmb25bu8vqlchst0exz2x ကဏ္ဍ:ဝေါဟာသၠဝ်ဝေန်နဳယျာမၞုံကဵုဝေါဟာ žena မလဟုတ်စှ်ေဂမၠိုၚ် 14 298512 401119 2026-08-13T13:12:40Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "[[ကဏ္ဍ:ဘာသာသၠဝ်ဝေန်နဳယျာ]]" 401119 wikitext text/x-wiki [[ကဏ္ဍ:ဘာသာသၠဝ်ဝေန်နဳယျာ]] 7redv7f752i0adx69we1a0q5a4x4v8k matematičiek 0 298513 401120 2026-08-13T13:16:11Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "==သၠဝ်ဝေန်နဳယျာ== ===နာမ်=== {{head|sk|ဗီုပြၚ်နာမ်}} # {{plural of|sk|matematička}}" 401120 wikitext text/x-wiki ==သၠဝ်ဝေန်နဳယျာ== ===နာမ်=== {{head|sk|ဗီုပြၚ်နာမ်}} # {{plural of|sk|matematička}} d7oqj6sicd29il5pku5ghhknrtg5rw8 အဆက်လက္ကရဴ:ဝေါဟာသၠဝ်ဝေန်နဳယျာမချူသ္ၜိုန်လဝ်ပရေၚ်လဟုတ်စှ်ေနကဵုဝေါဟာ žena 100 298514 401124 2026-08-13T16:59:00Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "==သၠဝ်ဝေန်နဳယျာ== ===မချူသ္ၜိုန်လဝ်ပရေၚ်လဟုတ်စှ်ေနကဵုဝေါဟာ ''žena''=== : '''pattern žena''' ''f, noun'' : '''žen''' ''stem'' ====ကိုန်ဨကဝုစ်==== * ''[[nominative|nom]]'' '''žen-a''' * ''[[genitive|gen]]'' '''žen-y''' * ''[[dative|dat]]'' '''žen-e''' * ''[[accusative|acc]]'' '''žen-u''' * (..." 401124 wikitext text/x-wiki ==သၠဝ်ဝေန်နဳယျာ== ===မချူသ္ၜိုန်လဝ်ပရေၚ်လဟုတ်စှ်ေနကဵုဝေါဟာ ''žena''=== : '''pattern žena''' ''f, noun'' : '''žen''' ''stem'' ====ကိုန်ဨကဝုစ်==== * ''[[nominative|nom]]'' '''žen-a''' * ''[[genitive|gen]]'' '''žen-y''' * ''[[dative|dat]]'' '''žen-e''' * ''[[accusative|acc]]'' '''žen-u''' * (''[[vocative|voc]]'' '''žen-a''') * ''[[locative|loc]]'' '''žen-e''' * ''[[instrumental|ins]]'' '''žen-ou''' ====ကိုန်ဗဟုဝစ်==== * ''[[nominative|nom]]'' '''žen-y''' * ''[[genitive|gen]]'' '''žien''' * ''[[dative|dat]]'' '''žen-ám''' * ''[[accusative|acc]]'' '''žen-y''' * (''[[vocative|voc]]'' '''žen-y''') * ''[[locative|loc]]'' '''žen-ách''' * ''[[instrumental|ins]]'' '''žen-ami''' ===မချူသ္ၜိုန်လဝ်ဣတ္တိလိၚ်တၞဟ်ဂမၠိုၚ်=== *[[အဆက်လက္ကရဴ:ဝေါဟာသၠဝ်ဝေန်နဳယျာမချူသ္ၜိုန်လဝ်ပရေၚ်လဟုတ်စှ်ေနကဵုဝေါဟာ ulica|ulica]] *[[အဆက်လက္ကရဴ:ဝေါဟာသၠဝ်ဝေန်နဳယျာမချူသ္ၜိုန်လဝ်ပရေၚ်လဟုတ်စှ်ေနကဵုဝေါဟာ dlaň|dlaň]] *[[အဆက်လက္ကရဴ:ဝေါဟာသၠဝ်ဝေန်နဳယျာမချူသ္ၜိုန်လဝ်ပရေၚ်လဟုတ်စှ်ေနကဵုဝေါဟာ kosť|kosť]] [[ကဏ္ဍ:အဆက်လက္ကရဴသၠဝ်ဝေန်နဳယျာမချူသ္ၜိုန်လဝ်ပရေၚ်လဟုတ်စှ်ေဂမၠိုၚ်|žena]] 3j4qxi3mjucoqnnqyu0aiwhf19fcwkx ကဏ္ဍ:အဆက်လက္ကရဴသၠဝ်ဝေန်နဳယျာမချူသ္ၜိုန်လဝ်ပရေၚ်လဟုတ်စှ်ေဂမၠိုၚ် 14 298515 401125 2026-08-13T17:01:37Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "[[ကဏ္ဍ:အဆက်လက္ကရဴသၠဝ်ဝေန်နဳယျာဂမၠိုၚ်]][[ကဏ္ဍ:နာမ်အဆက်လက္ကရဴဂမၠိုၚ်|သ]]" 401125 wikitext text/x-wiki [[ကဏ္ဍ:အဆက်လက္ကရဴသၠဝ်ဝေန်နဳယျာဂမၠိုၚ်]][[ကဏ္ဍ:နာမ်အဆက်လက္ကရဴဂမၠိုၚ်|သ]] m5gs0y78ozsarpt107csvo33r5veugj nominative 0 298516 401126 2026-08-13T17:12:53Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "{{also|Nominative}} =={{=en=}}== {{wikipedia|lang=en}} {{was wotd|၂၀၂၆|အဝ်ဂေတ်|၁၃}} ===နိရုတ်=== ဝေါဟာကၠုၚ်နူ {{inh|en|enm|nominatyf}}၊ နူကဵုဝေါဟာ {{der|en|la|nōminātīvus}} ===ဗွဟ်ရမ္သာၚ်=== * {{enPR|nŏmʹ(ĭ)nətĭv}}, {{IPA|en|a1=GA|/ˈnɑm(ɪ)nətɪv/|a2=RP|/ˈnɒm(ɪ)nətɪv/}} * {{audio|en|LL-Q1860 (eng..." 401126 wikitext text/x-wiki {{also|Nominative}} =={{=en=}}== {{wikipedia|lang=en}} {{was wotd|၂၀၂၆|အဝ်ဂေတ်|၁၃}} ===နိရုတ်=== ဝေါဟာကၠုၚ်နူ {{inh|en|enm|nominatyf}}၊ နူကဵုဝေါဟာ {{der|en|la|nōminātīvus}} ===ဗွဟ်ရမ္သာၚ်=== * {{enPR|nŏmʹ(ĭ)nətĭv}}, {{IPA|en|a1=GA|/ˈnɑm(ɪ)nətɪv/|a2=RP|/ˈnɒm(ɪ)nətɪv/}} * {{audio|en|LL-Q1860 (eng)-Vealhurl-nominative.wav|a=Southern England}} ====နာမဝိသေသန==== {{en-adj|-}} # မဆေၚ်စပ်ကဵုပရေၚ်မဒုၚ်ယၟု။ ===နာမ်=== {{en-noun}} # မဆေၚ်စပ်ကဵုကိစ္စမဒုၚ်ယၟု။ # နာမ်မွဲသာ်ပ္ဍဲမဆေၚ်စပ်ကဵုကိစ္စမဒုၚ်ယၟု။ ==ပြၚ်သေတ်== ===ဗွဟ်ရမ္သာၚ်=== * {{fr-IPA}} * {{audio|fr|LL-Q150 (fra)-WikiLucas00-nominative.wav|a=<<France>> (<<Lyon>>)}} ====နာမဝိသေသန==== {{head|fr|adjective form}} # {{feminine singular of|fr|nominatif}} ==အဳတလဳ== ====နာမဝိသေသန==== {{head|it|adjective form}} # {{adj form of|it|nominativo||f|p}} ==လပ်တေန်== ===ဗွဟ်ရမ္သာၚ်=== * {{la-IPA|nōminātīve}} ====နာမဝိသေသန==== {{head|la|adjective form|head=nōminātīve}} # {{inflection of|la|nōminātīvus||voc|m|s}} ==ရဝ်မေနဳယျာ== ===ဗွဟ်ရမ္သာၚ်=== * {{IPA|ro|/ˌnominaˈtive/}} ====နာမဝိသေသန==== {{head|ro|adjective form}} # {{inflection of|ro|nominativ||f//n|p|nom//acc}} ===နာမ်=== {{head|ro|noun form|g=n-p}} # {{plural of|ro|nominativ}} hgrpk5hdecu6mwbqgzomhfmsnpj0pl0 ဝိက်ရှေန်နရဳ:မအရေဝ်သွက်တ္ၚဲဏအ်/၂၀၂၆/အဝ်ဂေတ် ၁၃ 4 298517 401127 2026-08-13T17:15:34Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "{{WOTD|nominative|နာမဝိသေသန| မဆေၚ်စပ်ကဵုပရေၚ်မဒုၚ်ယၟု။ :နာမ် # မဆေၚ်စပ်ကဵုကိစ္စမဒုၚ်ယၟု။ # နာမ်မွဲသာ်ပ္ဍဲမဆေၚ်စပ်ကဵုကိစ္စမဒုၚ်ယၟု။|audio=LL-Q1860 (eng)-Vealhurl-nominative.wav|အဝ်ဂေတ်|၁၃}}" 401127 wikitext text/x-wiki {{WOTD|nominative|နာမဝိသေသန| မဆေၚ်စပ်ကဵုပရေၚ်မဒုၚ်ယၟု။ :နာမ် # မဆေၚ်စပ်ကဵုကိစ္စမဒုၚ်ယၟု။ # နာမ်မွဲသာ်ပ္ဍဲမဆေၚ်စပ်ကဵုကိစ္စမဒုၚ်ယၟု။|audio=LL-Q1860 (eng)-Vealhurl-nominative.wav|အဝ်ဂေတ်|၁၃}} 34uac4i5vp3ll20bw7e16rspjfn2v2s nominatif 0 298518 401128 2026-08-13T17:22:37Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "==ပြၚ်သေတ်== {{wp|fr:}} {{was wotd|၂၀၂၆|အဝ်ဂေတ်|၁၄}} ===ဗွဟ်ရမ္သာၚ်=== * {{fr-IPA}} * {{audio|fr|LL-Q150 (fra)-Pamputt-nominatif.wav|a=<<France>> (<<Brétigny-sur-Orge>>)}} * {{audio|fr|LL-Q150 (fra)-WikiLucas00-nominatif.wav|a=<<France>> (<<Lyon>>)}} ====နာမဝိသေသန==== {{fr-adj}} # မဆေၚ်စပ်ကဵုပရေၚ်မ..." 401128 wikitext text/x-wiki ==ပြၚ်သေတ်== {{wp|fr:}} {{was wotd|၂၀၂၆|အဝ်ဂေတ်|၁၄}} ===ဗွဟ်ရမ္သာၚ်=== * {{fr-IPA}} * {{audio|fr|LL-Q150 (fra)-Pamputt-nominatif.wav|a=<<France>> (<<Brétigny-sur-Orge>>)}} * {{audio|fr|LL-Q150 (fra)-WikiLucas00-nominatif.wav|a=<<France>> (<<Lyon>>)}} ====နာမဝိသေသန==== {{fr-adj}} # မဆေၚ်စပ်ကဵုပရေၚ်မဒုၚ်ယၟု။ ===နာမ်=== {{fr-noun|m}} # {{lb|fr|grammar}} မဒုၚ်ယၟု၊ ပရေၚ်ကိစ္စမဒုၚ်ယၟု။ ==ပြၚ်သေတ်တြေံ== ====နာမဝိသေသန==== {{fro-adj|f=nominative}} # {{lb|fro|grammar}} မဆေၚ်စပ်ကဵုပရေၚ်မဒုၚ်ယၟု။ ===နာမ်=== {{fro-noun|m}} # {{lb|fro|grammar}} မဒုၚ်ယၟု၊ ပရေၚ်ကိစ္စမဒုၚ်ယၟု။ 5d34hgbenc9kgprxya8oqhkvuyf84vg ဝိက်ရှေန်နရဳ:မအရေဝ်သွက်တ္ၚဲဏအ်/၂၀၂၆/အဝ်ဂေတ် ၁၄ 4 298519 401129 2026-08-13T17:25:26Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "{{WOTD|အဲ|နာမဝိသေသန| မဆေၚ်စပ်ကဵုပရေၚ်မဒုၚ်ယၟု။ : နာမ် # {{lb|fr|grammar}} မဒုၚ်ယၟု၊ ပရေၚ်ကိစ္စမဒုၚ်ယၟု။|audio=LL-Q150 (fra)-WikiLucas00-nominatif.wav|အဝ်ဂေတ်|၁၄}}" 401129 wikitext text/x-wiki {{WOTD|အဲ|နာမဝိသေသန| မဆေၚ်စပ်ကဵုပရေၚ်မဒုၚ်ယၟု။ : နာမ် # {{lb|fr|grammar}} မဒုၚ်ယၟု၊ ပရေၚ်ကိစ္စမဒုၚ်ယၟု။|audio=LL-Q150 (fra)-WikiLucas00-nominatif.wav|အဝ်ဂေတ်|၁၄}} s7mxt13emuskmoq9d9c8a33ggrottvw 401130 401129 2026-08-13T17:25:56Z 咽頭べさ 33 401130 wikitext text/x-wiki {{WOTD|nominatif|နာမဝိသေသန| မဆေၚ်စပ်ကဵုပရေၚ်မဒုၚ်ယၟု။ : နာမ် # {{lb|fr|grammar}} မဒုၚ်ယၟု၊ ပရေၚ်ကိစ္စမဒုၚ်ယၟု။|audio=LL-Q150 (fra)-WikiLucas00-nominatif.wav|အဝ်ဂေတ်|၁၄}} osnkyq021igon9smkxvmntrn69bpdhb ကဏ္ဍ:ဝေါဟာသဒ္ဒာပြၚ်သေတ်ဂမၠိုၚ် 14 298520 401131 2026-08-13T17:27:40Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "[[ကဏ္ဍ:ဘာသာပြၚ်သေတ်]]" 401131 wikitext text/x-wiki [[ကဏ္ဍ:ဘာသာပြၚ်သေတ်]] ds75vqpwilqfsuqsl1tskc7lbv7vtrp ကဏ္ဍ:ဝေါဟာသဒ္ဒာပြၚ်သေတ်တြေံဂမၠိုၚ် 14 298521 401132 2026-08-13T17:28:40Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "[[ကဏ္ဍ:ဘာသာပြၚ်သေတ်တြေံ]]" 401132 wikitext text/x-wiki [[ကဏ္ဍ:ဘာသာပြၚ်သေတ်တြေံ]] h913xvr7l05gmqpkpcusodukwnsqhdf nominatifs 0 298522 401133 2026-08-13T17:30:52Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "==ပြၚ်သေတ်== ====နာမဝိသေသန==== {{head|fr|adjective form}} # {{masculine plural of|fr|nominatif}} ===နာမ်=== {{head|fr|noun form|g=m}} # {{plural of|fr|nominatif}}" 401133 wikitext text/x-wiki ==ပြၚ်သေတ်== ====နာမဝိသေသန==== {{head|fr|adjective form}} # {{masculine plural of|fr|nominatif}} ===နာမ်=== {{head|fr|noun form|g=m}} # {{plural of|fr|nominatif}} cw2lw49w5v5ellybyc5ooa2kk86a6ot nominatives 0 298523 401134 2026-08-13T17:33:48Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "=={{=en=}}== ===နာမ်=== {{head|en|noun form}} # {{plural of|en|nominative}} ==ကာတ်တလာန်== ===ဗွဟ်ရမ္သာၚ်=== * {{ca-IPA}} ====နာမဝိသေသန==== {{head|ca|adjective form}} # {{feminine plural of|ca|nominatiu}} ==ပြၚ်သေတ်== ====နာမဝိသေသန==== {{head|fr|adjective form}} # {{feminine plural of|fr|nominatif}}" 401134 wikitext text/x-wiki =={{=en=}}== ===နာမ်=== {{head|en|noun form}} # {{plural of|en|nominative}} ==ကာတ်တလာန်== ===ဗွဟ်ရမ္သာၚ်=== * {{ca-IPA}} ====နာမဝိသေသန==== {{head|ca|adjective form}} # {{feminine plural of|ca|nominatiu}} ==ပြၚ်သေတ်== ====နာမဝိသေသန==== {{head|fr|adjective form}} # {{feminine plural of|fr|nominatif}} bdxq58uhskugbx9t06n7plcpxiopz95 nominatiu 0 298524 401135 2026-08-13T17:36:27Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "==ကာတ်တလာန်== ===ဗွဟ်ရမ္သာၚ်=== * {{ca-IPA}} * {{audio|ca|LL-Q7026 (cat)-Marvives-nominatiu.wav|a=Barcelona}} ====နာမဝိသေသန==== {{ca-adj}} # မဆေၚ်စပ်ကဵုပရေၚ်မဒုၚ်ယၟု။ ===နာမ်=== {{ca-noun|m|-}} # ပရေၚ်မဒုၚ်ယၟု။" 401135 wikitext text/x-wiki ==ကာတ်တလာန်== ===ဗွဟ်ရမ္သာၚ်=== * {{ca-IPA}} * {{audio|ca|LL-Q7026 (cat)-Marvives-nominatiu.wav|a=Barcelona}} ====နာမဝိသေသန==== {{ca-adj}} # မဆေၚ်စပ်ကဵုပရေၚ်မဒုၚ်ယၟု။ ===နာမ်=== {{ca-noun|m|-}} # ပရေၚ်မဒုၚ်ယၟု။ 8fh54m0rabx4hcsvlg4ff1svm1yntw5 ကဏ္ဍ:နာမ်ကာတ်တလာန်မတော်ဟွံဂွံဂမၠိုၚ် 14 298525 401136 2026-08-13T17:37:36Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "[[ကဏ္ဍ:ဘာသာကာတ်တလာန်]]" 401136 wikitext text/x-wiki [[ကဏ္ဍ:ဘာသာကာတ်တလာန်]] 8mpvf378vzzxe8n3797kr7p08acaky3 nominativa 0 298526 401137 2026-08-13T17:47:57Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "{{also|nominatīvā|nominatīva}} ==ကာတ်တလာန်== ===ဗွဟ်ရမ္သာၚ်=== * {{ca-IPA}} ===နာမဝိသေသန=== {{head|ca|adjective form}} # {{feminine singular of|ca|nominatiu}} ==အေက်သပရေန်တဝ်== ===ဗွဟ်ရမ္သာၚ်=== {{eo-pr|a=LL-Q143 (epo)-Lepticed7-nominativa.wav}} ===နာမဝိသေသန=== {{eo-head}} # {{lb|eo|gra..." 401137 wikitext text/x-wiki {{also|nominatīvā|nominatīva}} ==ကာတ်တလာန်== ===ဗွဟ်ရမ္သာၚ်=== * {{ca-IPA}} ===နာမဝိသေသန=== {{head|ca|adjective form}} # {{feminine singular of|ca|nominatiu}} ==အေက်သပရေန်တဝ်== ===ဗွဟ်ရမ္သာၚ်=== {{eo-pr|a=LL-Q143 (epo)-Lepticed7-nominativa.wav}} ===နာမဝိသေသန=== {{eo-head}} # {{lb|eo|grammar}} မဆေၚ်စပ်ကဵုပရေၚ်မဒုၚ်ယၟု၊ မဆေၚ်စပ်ကဵုပွမဆက်စပ်နကဵုကိစ္စမဒုၚ်ယၟု။ ==အၚ်္ဂရေဝ်ယာန်== ===နိရုတ်=== ဝေါဟာကၠုၚ်နူ {{bor|izh|sv|nominativ}}၊ ဗွဲကြဴအိုတ်နကဵုဝေါဟာ {{der|izh|la|nominativus}} ===ဗွဟ်ရမ္သာၚ်=== * {{izh-p|nominat'iva}} ===နာမ်=== {{head|izh|noun}} # ပရေၚ်ကိစ္စမဒုၚ်ယၟု။ ====လဟုတ်စှ်ေ==== {{izh-decl/kana|v|v}} ==အဳတလဳ== ===နာမဝိသေသန=== {{head|it|adjective form}} # {{adj form of|it|nominativo||f|s}} ==လပ်တေန်== ===ဗွဟ်ရမ္သာၚ်=== * {{la-IPA|ann=1|nōminātīva}} * {{la-IPA|ann=1|nōminātīvā}} ===နာမဝိသေသန=== {{head|la|adjective form|head=nōminātīva}} # {{inflection of|la|nōminātīvus||nom//voc|f|s|;|nom//acc//voc|n|p}} # {{inflection of|la|nōminātīvus||abl|f|s}} ==ပဝ်တူဂြဳ== ===နာမဝိသေသန=== {{head|pt|adjective form}} # {{adj form of|pt|nominativo||f|s}} ==သ္ပုၚ်== ===ဗွဟ်ရမ္သာၚ်=== {{es-pr}} ===နာမဝိသေသန=== {{head|es|adjective form}} # {{adj form of|es|nominativo||f|s}} ot44ed9xueqk2okr22qvjczmc48vkty ထာမ်ပလိက်:izh-decl/kana 10 298527 401138 2026-08-13T17:49:05Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "<includeonly>{{#invoke:izh-decl|show|kana}}</includeonly><noinclude><!-- -->{{izh-decl/kana|n|n|title=kana}}{{documentation}}<!-- --></noinclude>" 401138 wikitext text/x-wiki <includeonly>{{#invoke:izh-decl|show|kana}}</includeonly><noinclude><!-- -->{{izh-decl/kana|n|n|title=kana}}{{documentation}}<!-- --></noinclude> svmuhg4so91axsbsup6igqhklqndald မဝ်ဂျူ:izh-decl/style.css 828 298528 401139 2026-08-13T17:49:51Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "/* layout */ table.izh-decl { text-align: left; } table.izh-decl th { text-align: center; } table.izh-decl th.izh-decl-header-row { text-align: left; } table.izh-decl tr { vertical-align: top; } .izh-decl-type { font-size: 90%; } .izh-decl-case-column { width: 11em; } .izh-decl-form-column { width: 12em; } .izh-decl-notes { font-size: smaller; } /* appearance */ table.izh-decl { border-style: solid;..." 401139 sanitized-css text/css /* layout */ table.izh-decl { text-align: left; } table.izh-decl th { text-align: center; } table.izh-decl th.izh-decl-header-row { text-align: left; } table.izh-decl tr { vertical-align: top; } .izh-decl-type { font-size: 90%; } .izh-decl-case-column { width: 11em; } .izh-decl-form-column { width: 12em; } .izh-decl-notes { font-size: smaller; } /* appearance */ table.izh-decl { border-style: solid; border-width: 1px; } /* colors */ table.izh-decl { border: 1px solid var(--wikt-palette-blue-2, #ccccff); } table.izh-decl .izh-decl-header-row, table.izh-decl th { background-color: var(--wikt-palette-blue-2, #ccccff); } table.izh-decl td { background-color: var(--wikt-palette-blue-0, #f2f2ff); } table.izh-poss { border: 1px solid var(--wikt-palette-green-2, #ccffcc); } table.izh-poss th.thheader { background-color: var(--wikt-palette-green-3, #c0e4c0); } table.izh-poss .izh-poss-header-row, table.izh-poss th { background-color: var(--wikt-palette-green-2, #ccffcc); } table.izh-poss td { background-color: var(--wikt-palette-green-0, #f2fff2); } ikxyyoa0cwec49quslez0kmbzfa015b မဝ်ဂျူ:izh-decl 828 298529 401140 2026-08-13T18:00:40Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "local export = {} local m_izh = require("Module:izh-common") local function get_stem(word, ending) if mw.ustring.match(word, ending .. "$") then return word:sub(1, #word - #ending) end error("Unexpected ending for this inflection type! Wrong type?") end local function elongate(stem, condition) if condition == nil or condition then -- already long? if mw.ustring.match(stem, m_izh.vowel .. m_izh.vowel .. "$"..." 401140 Scribunto text/plain local export = {} local m_izh = require("Module:izh-common") local function get_stem(word, ending) if mw.ustring.match(word, ending .. "$") then return word:sub(1, #word - #ending) end error("Unexpected ending for this inflection type! Wrong type?") end local function elongate(stem, condition) if condition == nil or condition then -- already long? if mw.ustring.match(stem, m_izh.vowel .. m_izh.vowel .. "$") then for k, v in pairs(m_izh.vowel_sequences) do if mw.ustring.find(stem, v .. "$", pos) then return stem end end end return stem .. mw.ustring.sub(stem, -1) else return stem end end local function frontalize(w, vh) if vh == "ä" then w = mw.ustring.gsub(w, "[aou]", { a = "ä", o = "ö", u = "y" }) end return w end local function geminate(c) if mw.ustring.match(c, m_izh.consonant .. m_izh.consonant .. "$") then return c end return c .. mw.ustring.sub(c, -1) end local function join(...) local t = {} for _, s in ipairs({...}) do if type(s) == "table" then for _, v in ipairs(s) do table.insert(t, v) end else table.insert(t, s) end end return t end -- Creates a function g(t, ...) which applies f(t, ...) if t is string, -- and else applies f(t, ...) to all values in the table t. local function apply_on_factory(f) return function (t, ...) if type(t) == "string" then return (f(t, ...)) end local r = {} for _, v in ipairs(t) do table.insert(r, (f(v, ...))) end return r end end local append = apply_on_factory(function (v, x) return x and v .. x or v end) local elongate_all = apply_on_factory(elongate) local function make_gradation(s, w) if s == w then return "no gradation" else return s .. "-" .. w .. " gradation" end end local function get_geminated(data, w, fallback) if data.geminate == false then return fallback end if data.headword then local gemprefix = mw.ustring.len(data.title) - mw.ustring.len(data.headword) if gemprefix > 0 then local wp = mw.ustring.sub(w, 1, gemprefix) local wg = m_izh.guess_gemination(mw.ustring.sub(w, gemprefix + 1)) if not wg then return fallback end return wp .. wg end end return m_izh.guess_gemination(w) or fallback end local function get_elongation(data, w) if data.elongate == false then return false end if data.headword then local gemprefix = mw.ustring.len(data.title) - mw.ustring.len(data.headword) if gemprefix > 0 then return m_izh.guess_elongation(mw.ustring.sub(w, gemprefix + 1)) end end return m_izh.guess_elongation(w) end local function process(data, result, vh) local vh = data.vh -- genitive singular/plural stem local gs = result.stem_gs local gp = result.stem_gp -- partitive singular/plural stem local ps = result.stem_ps local pp = result.stem_pp -- oblique plural stem local op = result.stem_op or pp -- illative singular/plural stem local is = result.stem_is or gs local ip = result.stem_ip or op -- allative/inessive singular/plural stem local as = result.stem_as or gs local ap = result.stem_ap or op -- essive singular/plural stem local es = result.stem_es or is local ep = result.stem_ep or ip -- exessive singular/plural stem local xs = result.stem_xs or (result.exe_weak and gs or es) local xp = result.stem_xp or (result.exe_weak and op or ep) if not data.no_singular then result["nom_sg"] = { data.title } result["gen_sg"] = append(gs, "n") result["par_sg"] = append(ps, vh) if result.par_short_ok then result["par_sg"] = join(result["par_sg"], ps) end if result.ill_short or result.ill_short_sg then result["ill_sg"] = append(is, result.ill_ending or result.ill_ending_sg or nil) else result["ill_sg"] = append(elongate_all(is), result.ill_ending or result.ill_ending_sg or nil) end result["ine_sg"] = append(as, "s") result["ela_sg"] = append(gs, "st") result["all_sg"] = append(gs, "lle") result["ade_sg"] = append(as, "l") result["abl_sg"] = append(gs, "lt") result["tra_sg"] = append(gs, "ks") result["ess_sg"] = join(append(es, "nn" .. vh), append(elongate_all(is), "n")) result["exe_sg"] = append(xs, "nt") end if not data.no_plural then result["nom_pl"] = append(gs, "t") result["gen_pl"] = append(gp, "n") result["par_pl"] = append(pp, vh) if result.ill_short then result["ill_pl"] = append(ip, result.ill_ending or result.ill_ending_pl or nil) else result["ill_pl"] = append(elongate_all(ip), result.ill_ending or result.ill_ending_pl or nil) end result["ine_pl"] = append(ap, "s") result["ela_pl"] = append(op, "st") result["all_pl"] = append(op, "lle") result["ade_pl"] = append(ap, "l") result["abl_pl"] = append(op, "lt") result["tra_pl"] = append(op, "ks") result["ess_pl"] = join(append(ep, "nn" .. vh), append(elongate_all(ip), "n")) result["exe_pl"] = append(xp, "nt") end return result end local function guess_illative_weight(stem) local syllables = m_izh.split_syllables(stem) return #syllables % 2 == 1 and mw.ustring.find(stem, m_izh.vowel .. m_izh.vowel .. "$") and mw.ustring.sub(stem, -2, -2) ~= mw.ustring.sub(stem, -1, -1) end local function generate_hv_illative_forms(result, data, stems, weights, ending, short) local outputs = {} for i, stem in ipairs(stems) do local weight = weights[i] if not short then stem = elongate(stem) end if weight == nil then local guess = stem if data.headword then guess = mw.ustring.sub(guess, 1 + mw.ustring.len(data.title) - mw.ustring.len(data.headword)) end weight = guess_illative_weight(guess) end if weight then table.insert(outputs, stem .. ending) else table.insert(outputs, stem) end end return outputs end -- -hV illative ending is only sometimes evident local function generate_hv_illative(result, data, stem_s, weight_s, stem_p, weight_p) if not data.no_singular and stem_s then result["ill_sg"] = generate_hv_illative_forms(result, data, stem_s, weight_s, result.ill_ending_sg or result.ill_ending or "", result.ill_short_sg or result.ill_short) end if not data.no_plural and stem_p then result["ill_pl"] = generate_hv_illative_forms(result, data, stem_p, weight_p, result.ill_ending_pl or result.ill_ending or "", result.ill_short) end return result end -- inflection classes begin local inflections = {} inflections["kärpäin"] = function (data) local result = { typeno = "1" } local word = data.title if data.no_singular then -- plural title -> singular word = get_stem(word, "iset") .. "in" end local stem = get_stem(word, "in") local sgem = "" if get_geminated(data, stem .. "ise", nil) then sgem = "s" end result.stem_gs = stem .. "ise" result.stem_ps = stem .. "ist" result.stem_as = stem .. "is" .. sgem .. "ee" result.stem_gp = stem .. "is" .. sgem .. "ii" result.stem_pp = stem .. "is" .. sgem .. "i" result.stem_ap = stem .. "is" .. sgem .. "ii" result.par_short_ok = true result.exe_weak = true return process(data, result) end inflections["jokahiin"] = function (data) local result = { typeno = "1" } local word = data.title if data.no_singular then -- plural title -> singular word = get_stem(word, "iset") .. "iin" end local stem = get_stem(word, "iin") if ((data.geminate == true and mw.ustring.match(stem, "m$")) or (data.geminate ~= false and mw.ustring.match(stem, "mm$"))) then stem = get_stem(stem, "m") end local sgem = "" if get_geminated(data, stem .. "ise", nil) then sgem = "s" end result.stem_gs = stem .. "ise" result.stem_ps = stem .. "ist" result.stem_is = stem .. "is" .. sgem .. "e" result.stem_es = stem .. "ise" result.stem_gp = stem .. "is" .. sgem .. "ii" result.stem_pp = stem .. "is" .. sgem .. "i" result.stem_op = stem .. "isi" result.stem_ip = stem .. "is" .. sgem .. "i" result.stem_ep = stem .. "isi" result.par_short_ok = true return process(data, result) end inflections["kolmas"] = function (data) local result = { typeno = "2" } local word = data.title if data.no_singular then -- plural title -> singular word = get_stem(word, "nnet") .. "s" end local stem = get_stem(word, "s") result.stem_gs = stem .. "nne" result.stem_ps = stem .. "tt" result.stem_is = stem .. "nte" result.stem_as = stem .. "nnee" result.stem_gp = stem .. "nsii" result.stem_pp = stem .. "nsi" result.stem_ip = stem .. "nsii" result.stem_ap = stem .. "nsii" result.exe_weak = true return process(data, result) end inflections["mees"] = function (data) local result = { typeno = "2" } local word = data.title if data.no_singular then -- plural title -> singular word = get_stem(word, "het") .. "s" end local stem = get_stem(word, "s") result.stem_gs = stem .. "he" result.stem_ps = stem .. "st" result.stem_as = stem .. "hee" result.stem_gp = stem .. "hii" result.stem_pp = stem .. "hi" result.stem_ap = stem .. "hii" result.par_short_ok = true result.exe_weak = true return process(data, result) end inflections["patsas"] = function (data) local result = { typeno = "2" } local word = data.title local weak = data.args[1] or error("must specify weak grade") local strong = data.args[2] or error("must specify strong grade") if data.no_singular then -- plural title -> singular -- does not have to be perfect, plural forms being right is enough word = get_stem(word, "t") local final = mw.ustring.sub(word, -1, -1) word = get_stem(mw.ustring.sub(word, 1, -3), strong) .. weak .. final .. "s" end local final = mw.ustring.sub(word, -2, -2) if not mw.ustring.match(final, m_izh.vowel) then error("invalid penultimate character for tytär-type nominals (should be a vowel)") end local stem = get_stem(word, weak .. final .. "s") local longfinal = final .. final local gem = get_geminated(data, stem .. strong .. final, stem .. strong) result.stem_gs = gem .. longfinal result.stem_ps = stem .. weak .. final .. "st" result.stem_is = gem .. longfinal result.stem_gp = gem .. final .. "i" result.stem_pp = { result.stem_gp .. "t", stem .. strong .. final .. "j" } result.stem_op = result.stem_gp result.par_short_ok = true result.ill_ending = "sse" result.exe_weak = true result.grade = make_gradation(strong, weak) result.geminate = gem ~= stem .. strong return process(data, result) end inflections["petos"] = function (data) local result = { typeno = "2" } local word = data.title if data.no_singular then -- plural title -> singular word = get_stem(word, "kset") .. "s" end local stem = get_stem(word, "s") result.stem_gs = stem .. "kse" result.stem_ps = stem .. "st" result.stem_as = stem .. "ksee" result.stem_gp = stem .. "ksii" result.stem_pp = stem .. "ksi" result.stem_ap = stem .. "ksii" result.par_short_ok = true result.exe_weak = true return process(data, result) end inflections["oikehus"] = function (data) local result = { typeno = "2" } local word = data.title if data.no_singular then -- plural title -> singular word = get_stem(word, "et") .. "s" end local stem = get_stem(word, "s") local long = get_elongation(data, stem .. "e") result.stem_gs = stem .. "e" result.stem_ps = stem .. "tt" result.stem_as = elongate(result.stem_gs, long) result.stem_gp = stem .. "ksii" result.stem_pp = stem .. "ksi" result.stem_ap = stem .. "ksii" result.exe_weak = true return process(data, result) end inflections["kana"] = function (data) local result = { typeno = "3" } local word = data.title local strong = data.args[1] or error("must specify strong grade") local weak = data.args[2] or error("must specify weak grade") local vh = data.vh if data.no_singular then -- plural title -> singular word = get_stem(word, weak .. vh .. "t") .. strong .. vh end local stem = get_stem(word, strong .. vh) local gem = get_geminated(data, word, stem .. strong) local long = get_elongation(data, stem .. weak .. vh) result.stem_gs = stem .. weak .. vh result.stem_ps = gem .. vh result.stem_is = gem .. vh result.stem_as = elongate(stem .. weak .. vh, long) result.stem_es = stem .. strong .. vh result.stem_gp = gem .. frontalize("oi", vh) result.stem_pp = stem .. strong .. frontalize("oj", vh) result.stem_ip = result.stem_gp result.stem_op = stem .. weak .. frontalize("oi", vh) result.stem_ep = stem .. strong .. frontalize("oi", vh) result.grade = make_gradation(strong, weak) result.geminate = gem ~= stem .. strong result.ill_ending_pl = "he" return generate_hv_illative(process(data, result), data, nil, nil, { result.stem_ip }, { nil }) end inflections["koira"] = function (data) local result = { typeno = "3" } local word = data.title local strong = data.args[1] or error("must specify strong grade") local weak = data.args[2] or error("must specify weak grade") local vh = data.vh if data.no_singular then -- plural title -> singular -- does not have to be perfect, plural forms being right is enough word = get_stem(word, weak .. vh .. "t") .. strong .. vh end local stem if mw.ustring.match(word, vh .. "$") then stem = get_stem(word, strong .. vh) else stem = get_stem(word, strong) end local gem = get_geminated(data, word, stem .. strong) local long = get_elongation(data, stem .. weak .. vh) result.stem_gs = stem .. weak .. vh result.stem_ps = gem .. vh result.stem_is = result.stem_ps result.stem_as = elongate(result.stem_gs, long) result.stem_es = stem .. strong .. vh result.stem_gp = gem .. "ii" result.stem_pp = gem .. "i" result.stem_op = stem .. weak .. "i" result.stem_ip = result.stem_pp result.stem_ap = elongate(stem .. weak .. "i", long) result.stem_ep = stem .. strong .. "i" result.grade = make_gradation(strong, weak) result.geminate = gem ~= stem .. strong return process(data, result) end inflections["koivu"] = function (data) local result = { typeno = "4" } local word = data.title local strong = data.args[1] or error("must specify strong grade") local weak = data.args[2] or error("must specify weak grade") local vh = data.vh if data.no_singular then -- plural title -> singular -- does not have to be perfect, plural forms being right is enough word = get_stem(word, "t") local final = mw.ustring.sub(word, -1, -1) word = get_stem(mw.ustring.sub(word, 1, -2), weak) .. strong .. final end local final = mw.ustring.sub(word, -1, -1) local stem = get_stem(word, strong .. final) local gem = get_geminated(data, word, stem .. strong) local long = get_elongation(data, stem .. weak .. final) result.stem_gs = stem .. weak .. final result.stem_ps = gem .. final result.stem_is = result.stem_ps result.stem_as = elongate(stem .. weak .. final, long) result.stem_es = stem .. strong .. final result.stem_gp = { gem .. final .. "i", stem .. strong .. final .. frontalize("loi", vh) } result.stem_pp = { stem .. strong .. final .. "j", stem .. strong .. final .. frontalize("loj", vh) } result.stem_op = { stem .. weak .. final .. "i", stem .. strong .. final .. frontalize("loi", vh) } result.stem_ip = result.stem_gp result.stem_ap = result.stem_op result.stem_ep = { stem .. strong .. final .. "i", stem .. strong .. final .. frontalize("loi", vh) } result.ill_ending_pl = "he" result.grade = make_gradation(strong, weak) result.geminate = gem ~= stem .. strong return generate_hv_illative(process(data, result), data, nil, nil, result.stem_ip, { nil, true }) end inflections["keeli"] = function (data) local result = { typeno = "5" } local word = data.title local vh = data.vh if data.no_singular then -- plural title -> singular -- does not have to be perfect, plural forms being right is enough word = get_stem(word, "et") .. "i" end local stem, final if mw.ustring.match(word, "i$") then stem, final = mw.ustring.match(word, "(.-)(" .. m_izh.consonant .. "+)i$") elseif mw.ustring.match(word, m_izh.consonant .. "$") then stem, final = mw.ustring.match(word, "(.-)(" .. m_izh.consonant .. "+)$") else error("keeli-type nominals may only end in i or a consonant!") end if not final then error("keeli-type, but has no consonant?") end local base = stem .. final local gem = get_geminated(data, base .. "e", base) local long = get_elongation(data, base .. "e") result.stem_gs = stem .. final .. "e" if mw.ustring.match(final, "[kpt]s") then result.stem_ps = stem .. "st" elseif final == "m" then result.stem_ps = stem .. "nt" else result.stem_ps = base .. "t" end result.stem_is = gem .. "e" result.stem_as = long and gem .. "ee" or base .. "e" result.stem_es = base .. "e" result.stem_gp = { gem .. "ii", base .. frontalize("iloi", vh) } result.stem_pp = { gem .. "i", base .. frontalize("iloj", vh) } result.stem_op = { base .. "i", base .. frontalize("iloi", vh) } result.stem_ip = { gem .. "i", base .. frontalize("iloi", vh) } result.stem_ap = { long and gem .. "ii" or base .. "i", base .. frontalize("iloi", vh) } result.stem_ep = { base .. "i", base .. frontalize("iloi", vh) } result.exe_weak = true result.par_short_ok = true result.ill_ending_pl = "he" result.geminate = gem ~= base return generate_hv_illative(process(data, result), data, nil, nil, result.stem_ip, { nil, true }) end inflections["suur"] = function (data) local result = { typeno = "5" } local word = data.title local vh = data.vh if data.no_singular then -- plural title -> singular -- does not have to be perfect, plural forms being right is enough word = get_stem(word, "et") end local stem, final if mw.ustring.match(word, m_izh.consonant .. "$") then stem, final = mw.ustring.match(word, "(.-)(" .. m_izh.consonant .. "+)$") else error("suur-type nominals may only end in a consonant!") end local base = stem .. final local gem = get_geminated(data, base .. "e", base) local long = get_elongation(data, base .. "e") result.stem_gs = stem .. final .. "e" if mw.ustring.match(final, "[kpt]s") then result.stem_ps = stem .. "st" elseif final == "m" then result.stem_ps = stem .. "nt" else result.stem_ps = base .. "t" end result.stem_is = gem .. "e" result.stem_as = long and gem .. "ee" or base .. "e" result.stem_es = base .. "e" result.stem_gp = gem .. "ii" result.stem_pp = gem .. "i" result.stem_op = base .. "i" result.stem_ip = gem .. "i" result.stem_ap = long and gem .. "ii" or base .. "i" result.stem_ep = base .. "i" result.exe_weak = true result.par_short_ok = true result.geminate = gem ~= base return process(data, result) end local vesi_strong = {["s"] = "t", ["ls"] = "lt", ["ns"] = "nt", ["rs"] = "rt"} local vesi_weak = {["s"] = "", ["ls"] = "ll", ["ns"] = "nn", ["rs"] = "rr"} inflections["vesi"] = function (data) local result = { typeno = "5" } local word = data.title local vh = data.vh if data.no_singular then -- plural title -> singular -- does not have to be perfect, plural forms being right is enough word = get_stem(word, "et") if mw.ustring.match(word, "rr$") then word = mw.ustring.sub(word, 1, -3) .. "rsi" elseif mw.ustring.match(word, "nn$") then word = mw.ustring.sub(word, 1, -3) .. "nsi" elseif mw.ustring.match(word, "ll$") then word = mw.ustring.sub(word, 1, -3) .. "lsi" elseif mw.ustring.match(word, "[ouöy]vv$") then word = mw.ustring.sub(word, 1, -3) .. "si" elseif mw.ustring.match(word, "vv$") then word = mw.ustring.sub(word, 1, -3) .. frontalize("u", vh) .. "si" elseif mw.ustring.match(word, "ij$") then word = mw.ustring.sub(word, 1, -3) .. "isi" else word = word .. "si" end end local stem, prefinal, final, strong, weak if mw.ustring.match(word, "si$") then stem, prefinal, final = mw.ustring.match(word, "(.-)(" .. m_izh.vowel .. "+)(" .. m_izh.consonant .. "+)i$") elseif mw.ustring.match(word, "s$") then stem, prefinal, final = mw.ustring.match(word, "(.-)(" .. m_izh.vowel .. "+)(" .. m_izh.consonant .. "+)$") end if not final then error("invalid vesi-type nominal") end local strong = vesi_strong[final] or error("final consonant not supported") local weak = vesi_weak[final] or error("final consonant not supported") local glide = prefinal if weak == "" then if mw.ustring.match(prefinal, "[oö][oö]$") or mw.ustring.match(prefinal, "[uy][uy]$") then weak = "vv" elseif mw.ustring.match(prefinal, m_izh.vowel .. "[uy]$") then weak = "vv" glide = mw.ustring.sub(glide, 1, -2) elseif mw.ustring.match(prefinal, m_izh.vowel .. "i$") then weak = "j" end end local raw_stem = stem .. prefinal local raw_stem_syllables = m_izh.split_syllables(raw_stem) local long_essive = not m_izh.is_heavy_syllable(raw_stem_syllables[#raw_stem_syllables]) local weak_stem = stem .. glide .. weak local strong_stem = stem .. prefinal .. strong local plain_stem = stem .. prefinal .. final local plain_gem_stem = get_geminated(data, plain_stem .. "e", plain_stem) local strong_gem_stem = get_geminated(data, strong_stem .. "e", strong_stem) local long = get_elongation(data, stem .. prefinal .. weak .. "e") result.stem_gs = weak_stem .. "e" result.stem_ps = strong_stem .. "t" result.stem_is = strong_gem_stem .. "e" result.stem_as = elongate(weak_stem .. "e", long) result.stem_es = strong_stem .. "e" result.stem_xs = strong_stem .. "e" result.stem_gp = { plain_gem_stem .. "ii", plain_stem .. frontalize("iloi", vh) } result.stem_pp = { plain_gem_stem .. "i", plain_stem .. frontalize("iloj", vh) } result.stem_op = { plain_stem .. "i", plain_stem .. frontalize("iloi", vh) } result.stem_ip = { plain_gem_stem .. "i", plain_stem .. frontalize("iloi", vh) } result.stem_ap = { elongate(plain_stem .. "i", long), plain_stem .. frontalize("iloi", vh) } result.stem_ep = { plain_stem .. "i", plain_stem .. frontalize("iloi", vh) } result.stem_xp = { plain_stem .. "i", plain_stem .. frontalize("iloi", vh) } if weak == "vv" then result.grade = make_gradation(prefinal .. strong, glide .. weak) elseif weak == "j" then result.grade = make_gradation("i" .. strong, "i" .. weak) else result.grade = make_gradation(strong, weak) end result.ill_ending_pl = "he" return generate_hv_illative(process(data, result), data, nil, nil, result.stem_ip, { nil, true }) end inflections["käsi"] = function (data) local result = { typeno = "5" } local word = data.title local vh = data.vh if data.no_singular then -- plural title -> singular -- does not have to be perfect, plural forms being right is enough word = get_stem(word, "et") if mw.ustring.match(word, "rr$") then word = mw.ustring.sub(word, 1, -3) .. "rs" elseif mw.ustring.match(word, "nn$") then word = mw.ustring.sub(word, 1, -3) .. "ns" elseif mw.ustring.match(word, "ll$") then word = mw.ustring.sub(word, 1, -3) .. "ls" elseif mw.ustring.match(word, "[ouöy]vv$") then word = mw.ustring.sub(word, 1, -3) .. "s" elseif mw.ustring.match(word, "vv$") then word = mw.ustring.sub(word, 1, -3) .. frontalize("u", vh) .. "s" elseif mw.ustring.match(word, "ij$") then word = mw.ustring.sub(word, 1, -3) .. "is" else word = word .. "s" end end local stem, prefinal, final, strong, weak if mw.ustring.match(word, "si$") then stem, prefinal, final = mw.ustring.match(word, "(.-)(" .. m_izh.vowel .. "+)(" .. m_izh.consonant .. "+)i$") elseif mw.ustring.match(word, "s$") then stem, prefinal, final = mw.ustring.match(word, "(.-)(" .. m_izh.vowel .. "+)(" .. m_izh.consonant .. "+)$") end if not final then error("invalid vesi-type nominal") end local strong = vesi_strong[final] or error("final consonant not supported") local weak = vesi_weak[final] or error("final consonant not supported") local glide = prefinal if weak == "" then if mw.ustring.match(prefinal, "[oö][oö]$") or mw.ustring.match(prefinal, "[uy][uy]$") then weak = "vv" elseif mw.ustring.match(prefinal, m_izh.vowel .. "[uy]$") then weak = "vv" glide = mw.ustring.sub(glide, 1, -2) elseif mw.ustring.match(prefinal, m_izh.vowel .. "i$") then weak = "j" end end local raw_stem = stem .. prefinal local raw_stem_syllables = m_izh.split_syllables(raw_stem) local weak_stem = stem .. glide .. weak local strong_stem = stem .. prefinal .. strong local plain_stem = stem .. prefinal .. final local plain_gem_stem = get_geminated(data, plain_stem .. "e", plain_stem) local strong_gem_stem = get_geminated(data, strong_stem .. "e", strong_stem) local long = get_elongation(data, stem .. prefinal .. weak .. "e") result.stem_gs = weak_stem .. "e" result.stem_ps = strong_stem .. "t" result.stem_is = strong_gem_stem .. "e" result.stem_as = elongate(weak_stem .. "e", long) result.stem_es = strong_stem .. "e" result.stem_xs = strong_stem .. "e" result.stem_gp = plain_gem_stem .. "ii" result.stem_pp = plain_gem_stem .. "i" result.stem_op = plain_stem .. "i" result.stem_ip = plain_gem_stem .. "i" result.stem_ap = elongate(plain_stem .. "i", long) result.stem_ep = plain_stem .. "i" result.stem_xp = plain_stem .. "i" if weak == "vv" then result.grade = make_gradation(prefinal .. strong, glide .. weak) elseif weak == "j" then result.grade = make_gradation("i" .. strong, "i" .. weak) else result.grade = make_gradation(strong, weak) end return process(data, result) end inflections["lehti"] = function (data) local result = { typeno = "5" } local word = data.title local strong = data.args[1] or error("must specify strong grade") local weak = data.args[2] or error("must specify weak grade") if data.no_singular then -- plural title -> singular -- does not have to be perfect, plural forms being right is enough word = get_stem(word, weak .. "et") .. strong .. "i" end local vh = data.vh local stem if mw.ustring.match(word, "i$") then stem = get_stem(word, strong .. "i") else stem = get_stem(word, strong) end local gem = get_geminated(data, word, stem .. strong) local long = get_elongation(data, stem .. weak .. "e") result.stem_gs = stem .. weak .. "e" result.stem_ps = gem .. "i" result.stem_is = gem .. "ee" result.stem_as = elongate(stem .. weak .. "e", long) result.stem_es = stem .. strong .. "e" result.stem_gp = { gem .. "ii", stem .. strong .. frontalize("iloi", vh) } result.stem_pp = { stem .. strong .. "ij", stem .. strong .. frontalize("iloj", vh) } result.stem_op = { stem .. weak .. "i", stem .. strong .. frontalize("iloi", vh) } result.stem_ip = { gem .. "ii", stem .. strong .. frontalize("iloi", vh) } result.stem_ap = { elongate(stem .. weak .. "i", long), stem .. strong .. frontalize("iloi", vh)} result.stem_ep = { stem .. strong .. "i", stem .. strong .. frontalize("iloi", vh) } result.ill_ending = "" result.ill_ending_pl = "he" result.ill_short_sg = true result.grade = make_gradation(strong, weak) result.geminate = gem ~= stem .. strong return generate_hv_illative(process(data, result), data, nil, nil, result.stem_ip, { nil, true }) end inflections["vahti"] = function (data) local result = { typeno = "5" } local word = data.title local strong = data.args[1] or error("must specify strong grade") local weak = data.args[2] or error("must specify weak grade") if data.no_singular then -- plural title -> singular -- does not have to be perfect, plural forms being right is enough word = get_stem(word, weak .. "it") .. strong .. "i" end local vh = data.vh local stem if mw.ustring.match(word, "i$") then stem = get_stem(word, strong .. "i") else stem = get_stem(word, strong) end local gem = get_geminated(data, word, stem .. strong) local long = get_elongation(data, stem .. weak .. "i") result.stem_gs = stem .. weak .. "i" result.stem_ps = gem .. "i" result.stem_is = gem .. "i" result.stem_as = elongate(stem .. weak .. "i", long) result.stem_es = stem .. strong .. "i" result.stem_gp = { gem .. "ii", stem .. strong .. frontalize("iloi", vh) } result.stem_pp = { stem .. strong .. "ij", stem .. strong .. frontalize("iloj", vh) } result.stem_op = { stem .. strong .. "ii", stem .. strong .. frontalize("iloi", vh) } result.stem_ip = result.stem_gp result.stem_ap = result.stem_op result.stem_ep = { stem .. strong .. "ii", stem .. strong .. frontalize("iloi", vh) } result.ill_ending_pl = "he" result.grade = make_gradation(strong, weak) result.geminate = gem ~= stem .. strong return generate_hv_illative(process(data, result), data, nil, nil, result.stem_ip, { nil, true }) end inflections["lähe"] = function (data) local result = { typeno = "6" } local word = data.title local weak = data.args[1] or error("must specify weak grade") local strong = data.args[2] or error("must specify strong grade") local stem, gem if data.no_singular then -- plural title -> singular -- does not have to be perfect, plural forms being right is enough gem = get_stem(word, "eet") stem = gem elseif mw.ustring.match(word, "e$") then stem = get_stem(word, weak .. "e") gem = get_geminated(data, stem .. strong .. "e", stem .. strong) else stem = get_stem(word, weak) gem = get_geminated(data, stem .. strong, stem .. strong) end result.stem_gs = gem .. "ee" result.stem_ps = stem .. weak .. "ett" result.stem_gp = gem .. "ei" result.stem_pp = result.stem_gp .. "t" result.stem_op = result.stem_gp result.ill_ending = "sse" result.grade = make_gradation(strong, weak) result.geminate = gem ~= stem .. strong return process(data, result) end inflections["kevät"] = function (data) local result = { typeno = "7" } local word = data.title local weak = data.args[1] or error("must specify weak grade") local strong = data.args[2] or error("must specify strong grade") local final, stem, gem if data.no_singular then -- plural title -> singular -- does not have to be perfect, plural forms being right is enough word = get_stem(word, "t") final = mw.ustring.sub(word, -2, -2) gem = mw.ustring.sub(word, 1, -3) stem = gem else final = mw.ustring.sub(word, -2, -2) stem = get_stem(word, weak .. final .. "t") gem = get_geminated(data, stem .. strong .. final, stem .. strong) end result.stem_gs = gem .. final .. "e" result.stem_ps = stem .. weak .. final .. "tt" result.stem_as = result.stem_gs .. "e" result.stem_gp = gem .. final .. "ei" result.stem_pp = result.stem_gp .. "t" result.stem_op = result.stem_gp result.ill_short_sg = true result.ill_ending = "sse" result.grade = make_gradation(strong, weak) result.geminate = gem ~= stem .. strong return process(data, result) end inflections["maa"] = function (data) local result = { typeno = "8" } local word = data.title if data.no_singular then -- plural title -> singular word = get_stem(word, "t") end local stem = mw.ustring.sub(word, 1, -2) result.stem_gs = word result.stem_ps = word .. "t" result.stem_gp = stem .. "ije" result.stem_pp = stem .. "it" result.stem_op = stem .. "i" result.ill_ending_sg = "h" .. mw.ustring.sub(word, -1, -1) if result.ill_ending_sg == "hi" then result.ill_ending_sg = "he" end result.ill_ending_pl = "he" return generate_hv_illative(process(data, result), data, { result.stem_gs }, { true }, { result.stem_op }, { true }) end inflections["diikkoi"] = function (data) local result = { typeno = "8" } local word = data.title if data.no_singular then -- plural title -> singular word = get_stem(word, "t") end local stem = mw.ustring.sub(word, 1, -2) result.stem_gs = word result.stem_ps = word .. "t" result.stem_gp = stem .. "i" result.stem_pp = stem .. "it" result.stem_op = stem .. "i" result.ill_ending_sg = "h" .. mw.ustring.sub(word, -1, -1) if result.ill_ending_sg == "hi" then result.ill_ending_sg = "he" end result.ill_ending_pl = "he" return generate_hv_illative(process(data, result), data, { result.stem_gs }, { true }, { result.stem_op }, { true }) end inflections["yks"] = function (data) local result = { typeno = "9" } local word = data.title if data.no_singular then -- plural title -> singular word = get_stem(word, vh .. "het") .. "ks" end local stem if mw.ustring.match(word, "i$") then stem = get_stem(word, "ksi") else stem = get_stem(word, "ks") end result.stem_gs = stem .. "he" result.stem_ps = stem .. "ht" result.stem_is = stem .. "hte" result.stem_gp = stem .. "ksii" result.stem_pp = stem .. "ksi" result.stem_op = stem .. "ksi" result.stem_ap = stem .. "ksii" return process(data, result) end inflections["kolt"] = function (data) local result = { typeno = "10" } local word = data.title if data.no_singular then -- plural title -> singular word = get_stem(word, vh .. "met") .. "t" end local stem = get_stem(word, "t") result.stem_gs = stem .. "me" result.stem_ps = stem .. "mi" result.stem_as = result.stem_gs .. "e" result.stem_gp = stem .. "mii" result.stem_pp = stem .. "mi" result.stem_ap = result.stem_pp .. "i" return process(data, result) end inflections["kaheksan"] = function (data) local result = { typeno = "11" } local word = data.title local final = data.args[1] if data.no_singular then -- plural title -> singular word = get_stem(word, vh .. "t") if mw.ustring.sub(word, -1, -1) == "m" then word = mw.ustring.sub(word, 1, -2) .. "n" elseif mw.ustring.match(word, "[s]$") then word = word .. vh .. "n" end end local vh = data.vh local stem if mw.ustring.match(word, vh .. "n$") then stem = get_stem(word, vh .. "n") final = final or "" else stem = get_stem(word, "n") final = final or "n" end result.stem_gs = stem .. final .. vh result.stem_ps = result.stem_gs result.stem_as = elongate(result.stem_gs) result.stem_gp = stem .. final .. "ii" result.stem_pp = stem .. final .. "i" result.stem_ap = elongate(result.stem_pp) return process(data, result) end inflections["tytär"] = function (data) local result = { typeno = "12" } local word = data.title local weak = data.args[1] or error("must specify weak grade") local strong = data.args[2] or error("must specify strong grade") if data.no_singular then -- plural title -> singular -- does not have to be perfect, plural forms being right is enough word = get_stem(word, "et") local coda = mw.ustring.sub(word, -1, -1) local final = mw.ustring.sub(word, -2, -2) word = get_stem(word, strong .. final .. coda) .. weak .. final .. coda end local final = mw.ustring.sub(word, -2, -2) local coda = mw.ustring.sub(word, -1, -1) if coda ~= "l" and coda ~= "r" and coda ~= "n" then error("invalid final character for tytär-type nominals") end if not mw.ustring.match(final, m_izh.vowel) then error("invalid penultimate character for tytär-type nominals (should be a vowel)") end local stem = get_stem(word, weak .. final .. coda) result.stem_gs = stem .. strong .. final .. coda .. "e" result.stem_ps = stem .. weak .. final .. coda .. "t" result.stem_as = elongate(result.stem_gs) result.stem_gp = stem .. strong .. final .. coda .. "ii" result.stem_pp = stem .. strong .. final .. coda .. "i" result.stem_ap = elongate(result.stem_pp) result.grade = make_gradation(strong, weak) return process(data, result) end inflections["harmaa"] = function (data) local result = { typeno = "13" } local word = data.title if data.no_singular then -- plural title -> singular word = get_stem(word, vh .. "t") end local stem = mw.ustring.sub(word, 1, -2) result.stem_gs = word result.stem_ps = word .. "t" result.stem_is = word result.stem_gp = stem .. "i" result.stem_pp = stem .. "it" result.stem_op = stem .. "i" result.ill_ending = "sse" result.exe_weak = true return process(data, result) end inflections["olt"] = function (data) local result = { typeno = "14" } local word = data.title if mw.ustring.sub(word, -2, -2) == "u" or mw.ustring.sub(word, -2, -2) == "y" then word = mw.ustring.sub(word, 1, -3) .. "t" end local long = data.args[1] or "" if long == "+" then long = mw.ustring.sub(word, -2, -2) word = mw.ustring.sub(word, 1, -2) .. long .. "t" end local vh = data.vh if data.no_singular then --plural title -> singular word = get_stem(word, "eet") .. "t" if long ~= "+" then word = mw.ustring.sub(word, 1, -3) .. "t" end end local stem = get_stem(word, "t") local gem = get_geminated(data, stem .. "u", stem) result.stem_gs = gem .. "ee" result.stem_ps = stem .. frontalize("u", vh) .. "tt" result.stem_is = result.stem_gs result.stem_es = result.stem_gs result.stem_gp = gem .. "ei" result.stem_pp = gem .. "eit" result.stem_ip = result.stem_gp result.stem_op = result.stem_gp result.stem_ep = result.stem_gp result.ill_ending = "sse" result.geminate = gem ~= stem return process(data, result) end inflections["syän"] = function (data) local result = { typeno = "15" } local word = data.title local weak = data.args[1] or error("must specify weak grade") local strong = data.args[2] or error("must specify strong grade") local final = mw.ustring.sub(word, -2, -2) if data.no_singular then -- plural title -> singular final = mw.ustring.sub(word, -4, -4) word = get_stem(word, strong .. final .. "met") .. weak .. final .. "n" end if not mw.ustring.match(final, m_izh.vowel) then error("invalid penultimate character for avvain-type nominals (should be a vowel)") end local stem = get_stem(word, weak .. final .. "n") local long = get_elongation(data, stem .. strong .. final .. "me") local gem if m_izh.guess_gemination(stem .. strong .. final .. "me") then gem = "m" else gem = "" end result.stem_gs = stem .. strong .. final .. "me" result.stem_ps = stem .. weak .. final .. "nt" result.stem_is = stem .. weak .. final .. gem .. "me" result.stem_os = result.stem_gs result.stem_as = elongate(result.stem_gs, long) result.stem_es = result.stem_gs result.stem_gp = stem .. strong .. final .. gem .. "mii" result.stem_pp = stem .. strong .. final .. gem .. "mi" result.stem_ip = stem .. strong .. final .. gem .. "mi" result.stem_ep = stem .. strong .. final .. "mi" result.stem_op = result.stem_ep result.stem_ap = elongate(result.stem_ep, long) result.par_short_ok = true result.grade = make_gradation(strong, weak) return process(data, result) end inflections["koitoin"] = function (data) local result = { typeno = "15" } local word = data.title local weak = data.args[1] or error("must specify weak grade") local strong = data.args[2] or error("must specify strong grade") local final = mw.ustring.sub(word, -3, -3) local vh = data.vh if not mw.ustring.match(final, m_izh.vowel) then error("invalid antepenultimate character for koitoin-type nominals (should be a vowel)") end if data.no_singular then -- plural title -> singular word = get_stem(word, strong .. final .. "mat") .. weak .. final .. "in" end local stem = get_stem(word, weak .. final .. "in") local gem = get_geminated(data, stem .. strong .. final .. "ma", stem .. strong .. final .. "m") local long = get_elongation(data, stem .. strong .. final .. "ma") result.stem_gs = stem .. strong .. final .. "m" .. frontalize("a", vh) result.stem_ps = stem .. weak .. final .. "int" result.stem_is = gem .. frontalize("a", vh) result.stem_as = elongate(result.stem_gs, long) result.stem_es = result.stem_gs result.stem_gp = gem .. "ii" result.stem_pp = gem .. "i" result.stem_ip = result.stem_pp result.stem_op = stem .. strong .. final .. "m" .. "i" result.stem_ap = elongate(result.stem_op, long) result.stem_ep = result.stem_op result.par_short_ok = true result.grade = make_gradation(strong, weak) return process(data, result) end inflections["hapan"] = function (data) local result = { typeno = "15" } local word = data.title local weak = data.args[1] or error("must specify weak grade") local strong = data.args[2] or error("must specify strong grade") local final = mw.ustring.sub(word, -2, -2) local vh = data.vh if not mw.ustring.match(final, m_izh.vowel) then error("invalid antepenultimate character for koitoin-type nominals (should be a vowel)") end if data.no_singular then -- plural title -> singular word = get_stem(word, strong .. final .. "m" .. frontalize("a", vh) .. "t") .. weak .. final .. "n" end local stem = get_stem(word, weak .. final .. "n") local long = get_elongation(data, stem .. strong .. final .. "ma") result.stem_gs = stem .. strong .. final .. "m" .. frontalize("a", vh) result.stem_ps = stem .. weak .. final .. "nt" result.stem_is = result.stem_gs result.stem_as = elongate(result.stem_gs, long) result.stem_gp = stem .. strong .. final .. "mii" result.stem_pp = stem .. strong .. final .. "mi" result.stem_ip = result.stem_pp result.stem_ap = elongate(result.stem_pp, long) result.par_short_ok = true result.grade = make_gradation(strong, weak) return process(data, result) end -- inflection classes end local infl_table = [=[{| class="inflection-table vsSwitcher izh-decl" data-toggle-category="declension" |- !colspan=3 class="vsToggleElement izh-decl-header-row"|မလဟုတ်စှ်ေဆေၚ်စပ်ကဵု {{{title}}} (<span class="izh-decl-type">{{{type}}}</span>) |- class="vsHide" ! class="izh-decl-case-column" | ! class="izh-decl-form-column" | ကိုန်ဨကဝုစ် ! class="izh-decl-form-column" | ကိုန်ဗဟုဝစ် |- ! class="izh-decl-case-column" | ပရေၚ်ပ္တိုန်စရၚ်ယၟု | class="izh-decl-form-column" | {{{nom_sg}}} | class="izh-decl-form-column" | {{{nom_pl}}} |- ! ဗဳဇဂကူ |{{{gen_sg}}} |{{{gen_pl}}} |- ! ပရေၚ်ဗက်အလိုက် |{{{par_sg}}} |{{{par_pl}}} |- ! ဟၟဲကဵုအဓိပ္ပါဲ |{{{ill_sg}}} |{{{ill_pl}}} |- class="vsHide" | ! ပရေၚ်ဟွံဆေၚ်စပ် |{{{ine_sg}}} |{{{ine_pl}}} |- class="vsHide" | ! မစၞောန်ထ္ၜးအဆက်နာမ် |{{{ela_sg}}} |{{{ela_pl}}} |- class="vsHide" | ! တသိုက်ပိုန်ဂြပ် |{{{all_sg}}} |{{{all_pl}}} |- class="vsHide" | ! ပရေၚ်စောဲလာံ |{{{ade_sg}}} |{{{ade_pl}}} |- class="vsHide" | ! ပရေၚ်မလၚ် |{{{abl_sg}}} |{{{abl_pl}}} |- class="vsHide" | ! ပရေၚ်မကၠာဲစၠောံ |{{{tra_sg}}} |{{{tra_pl}}} |- class="vsHide" | ! အဓိက |{{{ess_sg}}} |{{{ess_pl}}} |- class="vsHide" | ! exessive<sup>1)</sup> |{{{exe_sg}}} |{{{exe_pl}}} |- class="vsHide" | | colspan="3" class="izh-decl-notes" | <sup>1)</sup> obsolete <br /> <sup>*)</sup> the '''accusative''' corresponds with either the '''genitive''' (<span class="gender"><abbr title="singular number">sg</abbr></span>) or '''nominative''' (<span class="gender"><abbr title="plural number">pl</abbr></span>)<br /> <sup>**)</sup> the '''comitative''' is formed by adding the suffix {{m|izh|-ka}}<sup><span style="cursor:help;" title="in back-vocalic stems">?</span></sup> or {{m|izh|-kä}}<sup><span style="cursor:help;" title="in front-vocalic stems">?</span></sup> to the '''genitive'''. |}]=] local function link(text) return require("Module:links").full_link{ term = text, lang = m_izh.lang } end local function mention(text) return require("Module:links").full_link({ term = text, lang = m_izh.lang }, "term") end function export.show(frame) local infl_type = frame.args[1] or error("inflection class not specified") local infl = inflections[infl_type] or error("unsupported inflection type") local args = frame:getParent().args local title = args["title"] or mw.loadData("Module:headword/data").pagename local geminate, elongate, vh, headword if args["g"] == "1" then geminate = true elseif args["g"] == "0" or args["g"] == "-" then geminate = false else headword = args["g"] vh = m_izh.guess_vowel_harmony(headword or title) end if args["e"] == "1" then elongate = true elseif args["e"] == "0" or args["e"] == "-" then elongate = false else elongate = nil end if args["v"] then vh = args["v"] if vh ~= "a" and vh ~= "ä" then error("Invalid vowel harmony specification") end elseif not vh then vh = m_izh.guess_vowel_harmony(title) end local data = { title = title, headword = headword, geminate = geminate, elongate = elongate, vh = vh, args = args } if args["n"] then if args["n"] == "s" or args["n"] == "sg" then data.no_plural = true elseif args["n"] == "p" or args["n"] == "pl" then data.no_singular = true end end local forms = infl(data) local function repl(form) if form == "title" then return mention(title) elseif form == "type" then if forms.irregular then return "irregular" end local s = "type " .. forms.typeno .. "/" .. mention(infl_type) if forms.grade then s = s .. ", " .. forms.grade else s = s .. ", " .. make_gradation(nil, nil) end if forms.geminate then s = s .. ", gemination" end return s else local value = forms[form] if not value then return "&mdash;" elseif type(value) == "table" then local result = {} for _, f in ipairs(value) do table.insert(result, link(f)) end return table.concat(result, ", ") else return link(value) end end end local result = mw.ustring.gsub(infl_table, "{{{([a-z0-9_:]+)}}}", repl) result = mw.ustring.gsub(result, "{{m|izh|([^}]-)}}", mention) return result .. require("Module:TemplateStyles")("Module:izh-decl/style.css") end return export 07ys2jclxu6a4pmcu9uznbx581fo9rn ထာမ်ပလိက်:Documentation 10 298530 401142 2026-08-13T18:04:16Z 咽頭べさ 33 咽頭べさ ပြံင်ပဆုဲလဝ် မုက်လိက် [[ထာမ်ပလိက်:Documentation]] ဇရေင် [[ထာမ်ပလိက်:documentation]] နကု မကလေင်ပညုင် 401142 wikitext text/x-wiki #REDIRECT [[ထာမ်ပလိက်:documentation]] ju2z3bc96o38dqtxwthb3lg4o3vigg4 ထာမ်ပလိက်:Documentation/documentation 10 298531 401144 2026-08-13T18:04:17Z 咽頭べさ 33 咽頭べさ ပြံင်ပဆုဲလဝ် မုက်လိက် [[ထာမ်ပလိက်:Documentation/documentation]] ဇရေင် [[ထာမ်ပလိက်:documentation/documentation]] နကု မကလေင်ပညုင် 401144 wikitext text/x-wiki #REDIRECT [[ထာမ်ပလိက်:documentation/documentation]] jev8xqe10s6bi0ss1bk9k8nmjp0aobd မဝ်ဂျူ:izh-decl/documentation 828 298532 401145 2026-08-13T18:09:42Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "{{documentation needed}}<!-- Replace this with a short description of the purpose of the module, and how to use it. --> <includeonly> {{module cat|izh}} </includeonly>" 401145 wikitext text/x-wiki {{documentation needed}}<!-- Replace this with a short description of the purpose of the module, and how to use it. --> <includeonly> {{module cat|izh}} </includeonly> 9hn8gutgcml8gwqkdn6cajao1sl9mdb 401146 401145 2026-08-13T18:10:14Z 咽頭べさ 33 咽頭べさ ပြံင်ပဆုဲလဝ် မုက်လိက် [[မဝ်ဂျူ:izh-decl/doc]] ဇရေင် [[မဝ်ဂျူ:izh-decl/documentation]] သီုကဵု ဟွံဂွံ ဂိုင်စွံလဝ် မကလေင်ပညုင် 401145 wikitext text/x-wiki {{documentation needed}}<!-- Replace this with a short description of the purpose of the module, and how to use it. --> <includeonly> {{module cat|izh}} </includeonly> 9hn8gutgcml8gwqkdn6cajao1sl9mdb ကဏ္ဍ:မဝ်ဂျူပွမပြံၚ်လှာဲအၚ်္ဂရေဝ်ယာန်ဂမၠိုၚ် 14 298533 401147 2026-08-13T18:11:47Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "[[ကဏ္ဍ:မဝ်ဂျူအၚ်္ဂရေဝ်ယာန်ဂမၠိုၚ်]][[ကဏ္ဍ:ထာမ်ပလိက်အၚ်္ဂရေဝ်ယာန်အပြံၚ်အလှာဲပ္တဝ်ထ္ၜးပမာဏဂမၠိုၚ်]]ကဏ္ဍ:မဝ်ဂျူဗီုအပြံၚ်အလှာဲဝေါဟာဗက်အလိုက်အရေဝ်ဘာသာဂမ..." 401147 wikitext text/x-wiki [[ကဏ္ဍ:မဝ်ဂျူအၚ်္ဂရေဝ်ယာန်ဂမၠိုၚ်]][[ကဏ္ဍ:ထာမ်ပလိက်အၚ်္ဂရေဝ်ယာန်အပြံၚ်အလှာဲပ္တဝ်ထ္ၜးပမာဏဂမၠိုၚ်]][[ကဏ္ဍ:မဝ်ဂျူဗီုအပြံၚ်အလှာဲဝေါဟာဗက်အလိုက်အရေဝ်ဘာသာဂမၠိုၚ်|အ]] nqtygsiexiz9xfkkt7hrv147y1vgtsj မဝ်ဂျူ:izh-common/documentation 828 298534 401148 2026-08-13T18:15:03Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "{{documentation needed}}<!-- Replace this with a short description of the purpose of the module, and how to use it. --> <includeonly> {{module cat|izh}} </includeonly>" 401148 wikitext text/x-wiki {{documentation needed}}<!-- Replace this with a short description of the purpose of the module, and how to use it. --> <includeonly> {{module cat|izh}} </includeonly> bporte80mfuoj9zmlesf5hzbjo62dlg 401149 401148 2026-08-13T18:15:30Z 咽頭べさ 33 咽頭べさ ပြံင်ပဆုဲလဝ် မုက်လိက် [[မဝ်ဂျူ:izh-common/doc]] ဇရေင် [[မဝ်ဂျူ:izh-common/documentation]] သီုကဵု ဟွံဂွံ ဂိုင်စွံလဝ် မကလေင်ပညုင် 401148 wikitext text/x-wiki {{documentation needed}}<!-- Replace this with a short description of the purpose of the module, and how to use it. --> <includeonly> {{module cat|izh}} </includeonly> bporte80mfuoj9zmlesf5hzbjo62dlg ထာမ်ပလိက်:izh-decl/kana/documentation 10 298535 401150 2026-08-14T04:41:31Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "{{documentation subpage}} To be used for Ingrian nominals ending in '''-a''' - in two-syllable words with a stressed {a, e, i} or in three-syllable words - corresponding to Junus' chapter IV paragraph §3. The nominal number is shared by {{tl|izh-decl/koira}}, which has a somewhat distinct declension from this template, especially in plural declension. The following parameters are present: :{{para|1}} The strong grad..." 401150 wikitext text/x-wiki {{documentation subpage}} To be used for Ingrian nominals ending in '''-a''' - in two-syllable words with a stressed {a, e, i} or in three-syllable words - corresponding to Junus' chapter IV paragraph §3. The nominal number is shared by {{tl|izh-decl/koira}}, which has a somewhat distinct declension from this template, especially in plural declension. The following parameters are present: :{{para|1}} The strong grade of the final consonant :{{para|2}} The weak grade of the final consonant <includeonly>[[ကဏ္ဍ:ထာမ်ပလိက်အၚ်္ဂရေဝ်ယာန်ဆၜိုတ်ဒုၚ်ယၟုအပြံၚ်အလှာဲပ္တဝ်ထ္ၜးပမာဏဂမၠိုၚ်|3]]</includeonly> mznc6ibcdrmwm2oe255c2piuffzw34y ကဏ္ဍ:ထာမ်ပလိက်အၚ်္ဂရေဝ်ယာန်ဆၜိုတ်ဒုၚ်ယၟုအပြံၚ်အလှာဲပ္တဝ်ထ္ၜးပမာဏဂမၠိုၚ် 14 298536 401151 2026-08-14T04:45:21Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "[[ကဏ္ဍ:ထာမ်ပလိက်အၚ်္ဂရေဝ်ယာန်အပြံၚ်အလှာဲပ္တဝ်ထ္ၜးပမာဏဂမၠိုၚ်]][[ကဏ္ဍ:ထာမ်ပလိက်ဆၜိုတ်ဒုၚ်ယၟုအပြံၚ်အလှာဲပ္တဝ်ထ္ၜးပမာဏဗက်အလိုက်အရေဝ်ဘာသာဂမၠိုၚ်|အ]]" 401151 wikitext text/x-wiki [[ကဏ္ဍ:ထာမ်ပလိက်အၚ်္ဂရေဝ်ယာန်အပြံၚ်အလှာဲပ္တဝ်ထ္ၜးပမာဏဂမၠိုၚ်]][[ကဏ္ဍ:ထာမ်ပလိက်ဆၜိုတ်ဒုၚ်ယၟုအပြံၚ်အလှာဲပ္တဝ်ထ္ၜးပမာဏဗက်အလိုက်အရေဝ်ဘာသာဂမၠိုၚ်|အ]] ql9mal1taaq4cuq8qp2xspfahh2ajr5 ကဏ္ဍ:ထာမ်ပလိက်အၚ်္ဂရေဝ်ယာန်အပြံၚ်အလှာဲပ္တဝ်ထ္ၜးပမာဏဂမၠိုၚ် 14 298537 401152 2026-08-14T05:12:40Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "[[ကဏ္ဍ:ထာမ်ပလိက်အၚ်္ဂရေဝ်ယာန်ဂမၠိုၚ်]][[ကဏ္ဍ:ထာမ်ပလိက်အပြံၚ်အလှာဲပ္တဝ်ထ္ၜးပမာဏဗက်အလိုက်အရေဝ်ဘာသာဂမၠိုၚ်|အ]]" 401152 wikitext text/x-wiki [[ကဏ္ဍ:ထာမ်ပလိက်အၚ်္ဂရေဝ်ယာန်ဂမၠိုၚ်]][[ကဏ္ဍ:ထာမ်ပလိက်အပြံၚ်အလှာဲပ္တဝ်ထ္ၜးပမာဏဗက်အလိုက်အရေဝ်ဘာသာဂမၠိုၚ်|အ]] p131yvv71laed8h6aaoy7ayd0fo30du ကဏ္ဍ:ကာရန်:သပုၚ်/iba 14 298538 401153 2026-08-14T05:16:11Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "[[:ကဏ္ဍ:ဒၞာဲလုပ်အဝေါၚ်ကဵုပၟိက်|ဒၞာဲလုပ်အဝေါၚ်ကဵုပၟိက်]] » [[:ကဏ္ဍ:အရေဝ်ဘာသာအိုတ်သီုဂမၠိုၚ်|အရေဝ်ဘာသာအိုတ်သီုဂမၠိုၚ်]] » [[:ကဏ္ဍ:ဘာသာသပုၚ်|သပုၚ်]] » :ကဏ္ဍ:ကာရန်:..." 401153 wikitext text/x-wiki [[:ကဏ္ဍ:ဒၞာဲလုပ်အဝေါၚ်ကဵုပၟိက်|ဒၞာဲလုပ်အဝေါၚ်ကဵုပၟိက်]] » [[:ကဏ္ဍ:အရေဝ်ဘာသာအိုတ်သီုဂမၠိုၚ်|အရေဝ်ဘာသာအိုတ်သီုဂမၠိုၚ်]] » [[:ကဏ္ဍ:ဘာသာသပုၚ်|သပုၚ်]] » [[:ကဏ္ဍ:ကာရန်:သပုၚ်|ကာရန်ဂမၠိုၚ်]] » -iba :စရၚ်မဆေၚ်စပ်ကဵုဝေါဟာ[[:ကဏ္ဍ:ဘာသာသပုၚ်|သပုၚ်]]မနွံကာရန် iba ဂမၠိုၚ်။ [[ကဏ္ဍ:ကာရန်:သပုၚ်|iba]] 3de0d83whlqkastjfohdh3qtjmh2vum ကဏ္ဍ:ကာရန်:အၚ်္ဂရေဝ်ယာန်/ɑtiʋ 14 298539 401154 2026-08-14T05:18:07Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "[[:ကဏ္ဍ:ဒၞာဲလုပ်အဝေါၚ်ကဵုပၟိက်|ဒၞာဲလုပ်အဝေါၚ်ကဵုပၟိက်]] » [[:ကဏ္ဍ:အရေဝ်ဘာသာအိုတ်သီုဂမၠိုၚ်|အရေဝ်ဘာသာအိုတ်သီုဂမၠိုၚ်]] » :ကဏ္ဍ:ဘာသာအၚ်္ဂရေဝ်ယာန်|အၚ်္ဂရေဝ်ယ..." 401154 wikitext text/x-wiki [[:ကဏ္ဍ:ဒၞာဲလုပ်အဝေါၚ်ကဵုပၟိက်|ဒၞာဲလုပ်အဝေါၚ်ကဵုပၟိက်]] » [[:ကဏ္ဍ:အရေဝ်ဘာသာအိုတ်သီုဂမၠိုၚ်|အရေဝ်ဘာသာအိုတ်သီုဂမၠိုၚ်]] » [[:ကဏ္ဍ:ဘာသာအၚ်္ဂရေဝ်ယာန်|အၚ်္ဂရေဝ်ယာန်]] » [[:ကဏ္ဍ:ကာရန်:အၚ်္ဂရေဝ်ယာန်|ကာရန်ဂမၠိုၚ်]] » -ɑtiʋ :စရၚ်မဆေၚ်စပ်ကဵုဝေါဟာ[[:ကဏ္ဍ:ဘာသာအၚ်္ဂရေဝ်ယာန်|အၚ်္ဂရေဝ်ယာန်]]မနွံကာရန် ɑtiʋ ဂမၠိုၚ်။ [[ကဏ္ဍ:ကာရန်:အၚ်္ဂရေဝ်ယာန်|ɑtiʋ]] 0zblum9pj44ozw33kaylkpw0xij6e0c ကဏ္ဍ:ကာရန်:အၚ်္ဂရေဝ်ယာန်/ɑtiʋɑ 14 298540 401155 2026-08-14T05:20:28Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "[[:ကဏ္ဍ:ဒၞာဲလုပ်အဝေါၚ်ကဵုပၟိက်|ဒၞာဲလုပ်အဝေါၚ်ကဵုပၟိက်]] » [[:ကဏ္ဍ:အရေဝ်ဘာသာအိုတ်သီုဂမၠိုၚ်|အရေဝ်ဘာသာအိုတ်သီုဂမၠိုၚ်]] » :ကဏ္ဍ:ဘာသာအၚ်္ဂရေဝ်ယာန်|အၚ်္ဂရေဝ်ယ..." 401155 wikitext text/x-wiki [[:ကဏ္ဍ:ဒၞာဲလုပ်အဝေါၚ်ကဵုပၟိက်|ဒၞာဲလုပ်အဝေါၚ်ကဵုပၟိက်]] » [[:ကဏ္ဍ:အရေဝ်ဘာသာအိုတ်သီုဂမၠိုၚ်|အရေဝ်ဘာသာအိုတ်သီုဂမၠိုၚ်]] » [[:ကဏ္ဍ:ဘာသာအၚ်္ဂရေဝ်ယာန်|အၚ်္ဂရေဝ်ယာန်]] » [[:ကဏ္ဍ:ကာရန်:အၚ်္ဂရေဝ်ယာန်|ကာရန်ဂမၠိုၚ်]] » -ɑtiʋɑ :စရၚ်မဆေၚ်စပ်ကဵုဝေါဟာ[[:ကဏ္ဍ:ဘာသာအၚ်္ဂရေဝ်ယာန်|အၚ်္ဂရေဝ်ယာန်]]မနွံကာရန် ɑtiʋɑ ဂမၠိုၚ်။ [[ကဏ္ဍ:ကာရန်:အၚ်္ဂရေဝ်ယာန်|ɑtiʋɑ]] m7cp6bkl8tcbmkvlqisnd0gkusk1f2w ကဏ္ဍ:ဝေါဟာအၚ်္ဂရေဝ်ယာန်ကၠုၚ်နူဝေါဟာလပ်တေန်ဂမၠိုၚ် 14 298541 401156 2026-08-14T05:22:12Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "[[ကဏ္ဍ:ဘာသာအၚ်္ဂရေဝ်ယာန်]]" 401156 wikitext text/x-wiki [[ကဏ္ဍ:ဘာသာအၚ်္ဂရေဝ်ယာန်]] k8l3994ugckj6zq7icvg1koabkvmfvn ကဏ္ဍ:ဝေါဟာအၚ်္ဂရေဝ်ယာန်ကၠုၚ်နူဝေါဟာသွဳဒေန်ဂမၠိုၚ် 14 298542 401157 2026-08-14T05:23:09Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "[[ကဏ္ဍ:ဘာသာအၚ်္ဂရေဝ်ယာန်]]" 401157 wikitext text/x-wiki [[ကဏ္ဍ:ဘာသာအၚ်္ဂရေဝ်ယာန်]] k8l3994ugckj6zq7icvg1koabkvmfvn ကဏ္ဍ:ဝေါဟာအၚ်္ဂရေဝ်ယာန်လွဳလဝ် နူဝေါဟာသွဳဒေန်ဂမၠိုၚ် 14 298543 401158 2026-08-14T05:24:11Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "[[ကဏ္ဍ:ဘာသာအၚ်္ဂရေဝ်ယာန်]]" 401158 wikitext text/x-wiki [[ကဏ္ဍ:ဘာသာအၚ်္ဂရေဝ်ယာန်]] k8l3994ugckj6zq7icvg1koabkvmfvn ကဏ္ဍ:ဝေါဟာသဒ္ဒာအေက်သပရေန်တဝ်ဂမၠိုၚ် 14 298544 401159 2026-08-14T05:40:06Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "[[ကဏ္ဍ:ဘာသာအေက်သပရေန်တဝ်]]" 401159 wikitext text/x-wiki [[ကဏ္ဍ:ဘာသာအေက်သပရေန်တဝ်]] 0yn1jw8rgpxysjy3wn17283vh2a2yku ကဏ္ဍ:ကာရန်:အေက်သပရေန်တဝ်/iva 14 298545 401160 2026-08-14T05:43:06Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "[[:ကဏ္ဍ:ဒၞာဲလုပ်အဝေါၚ်ကဵုပၟိက်|ဒၞာဲလုပ်အဝေါၚ်ကဵုပၟိက်]] » [[:ကဏ္ဍ:အရေဝ်ဘာသာအိုတ်သီုဂမၠိုၚ်|အရေဝ်ဘာသာအိုတ်သီုဂမၠိုၚ်]] » :ကဏ္ဍ:ဘာသာအေက်သပရေန်တဝ်|အေက်သပရေန်..." 401160 wikitext text/x-wiki [[:ကဏ္ဍ:ဒၞာဲလုပ်အဝေါၚ်ကဵုပၟိက်|ဒၞာဲလုပ်အဝေါၚ်ကဵုပၟိက်]] » [[:ကဏ္ဍ:အရေဝ်ဘာသာအိုတ်သီုဂမၠိုၚ်|အရေဝ်ဘာသာအိုတ်သီုဂမၠိုၚ်]] » [[:ကဏ္ဍ:ဘာသာအေက်သပရေန်တဝ်|အေက်သပရေန်တဝ်]] » [[:ကဏ္ဍ:ကာရန်:အေက်သပရေန်တဝ်|ကာရန်ဂမၠိုၚ်]] » -iva :စရၚ်မဆေၚ်စပ်ကဵုဝေါဟာ[[:ကဏ္ဍ:ဘာသာအေက်သပရေန်တဝ်|အေက်သပရေန်တဝ်]]မနွံကာရန် [[ကာရန်:အေက်သပရေန်တဝ်/iva|-iva]] ဂမၠိုၚ်။ [[ကဏ္ဍ:ကာရန်:အေက်သပရေန်တဝ်|iva]] 0sllpwd2k4zpj1jfqy4kissigqgvrgx ကာရန်:အေက်သပရေန်တဝ်/iva 106 298546 401161 2026-08-14T06:19:17Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "{{rhymes nav|eo|i|va}} ==ဗွဟ်ရမ္သာၚ်== {{IPA|eo|/-i.va/}} ==ကာရန်ဂမၠိုၚ်== ===ဝဏ္ဏမွဲ=== * {{l|eo|liva}} * {{l|eo|viva}} ===ဝဏ္ဏၜါ=== * {{l|eo|aktiva}} * {{l|eo|malviva}} * {{l|eo|naiva}} * {{l|eo|nepiva}} * {{l|eo|nePIVa}} * {{l|eo|pasiva}} * {{l|eo|senviva }} ===ဝဏ္ဏပိ=== * {{l|eo|ablativa}} * {{l|eo|adjektiva}} * {{l|eo|efektiv..." 401161 wikitext text/x-wiki {{rhymes nav|eo|i|va}} ==ဗွဟ်ရမ္သာၚ်== {{IPA|eo|/-i.va/}} ==ကာရန်ဂမၠိုၚ်== ===ဝဏ္ဏမွဲ=== * {{l|eo|liva}} * {{l|eo|viva}} ===ဝဏ္ဏၜါ=== * {{l|eo|aktiva}} * {{l|eo|malviva}} * {{l|eo|naiva}} * {{l|eo|nepiva}} * {{l|eo|nePIVa}} * {{l|eo|pasiva}} * {{l|eo|senviva }} ===ဝဏ္ဏပိ=== * {{l|eo|ablativa}} * {{l|eo|adjektiva}} * {{l|eo|efektiva}} * {{l|eo|ekskluziva}} * {{l|eo|inkluziva}} * {{l|eo|kolektiva}} * {{l|eo|negativa}} * {{l|eo|objektiva }} * {{l|eo|posesiva }} * {{l|eo|pozitiva}} * {{l|eo|respektiva}} * {{l|eo|rilativa}} * {{l|eo|subjunktiva}} * {{l|eo|transitiva}} ===ဝဏ္ဏပန်=== * {{l|eo|alternativa}} * {{l|eo|definitiva}} * {{l|eo|indikativa}} * {{l|eo|konservativa }} * {{l|eo|korelativa}} * {{l|eo|netransitiva}} * {{l|eo|nominativa}} * {{l|eo|senperspektiva}} ===ဝဏ္ဏမသုန်=== * {{l|eo|radioaktiva}} 4qjk0ig7q57843pga8cf9drdva5g7mp nominativan 0 298547 401162 2026-08-14T06:21:59Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "==အေက်သပရေန်တဝ်== ===နာမဝိသေသန=== {{eo-head}} # {{eo-form of|nominativ|an}}" 401162 wikitext text/x-wiki ==အေက်သပရေန်တဝ်== ===နာမဝိသေသန=== {{eo-head}} # {{eo-form of|nominativ|an}} h71jemsggnh141a1e8jj4tzbdp5afrk nominativaj 0 298548 401163 2026-08-14T06:22:36Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "==အေက်သပရေန်တဝ်== ===နာမဝိသေသန=== {{eo-head}} # {{eo-form of|nominativ|aj}}" 401163 wikitext text/x-wiki ==အေက်သပရေန်တဝ်== ===နာမဝိသေသန=== {{eo-head}} # {{eo-form of|nominativ|aj}} k82x76kaqktaer8rtkjfzyrwziuidnb nominativajn 0 298549 401164 2026-08-14T06:23:13Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "==အေက်သပရေန်တဝ်== ===နာမဝိသေသန=== {{eo-head}} # {{eo-form of|nominativ|ajn}}" 401164 wikitext text/x-wiki ==အေက်သပရေန်တဝ်== ===နာမဝိသေသန=== {{eo-head}} # {{eo-form of|nominativ|ajn}} 7ba9mnrafwdyx8fg1nascnnzgz7dutm nominatīva 0 298550 401165 2026-08-14T06:24:52Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "{{also|nominativa|nominatīvā}} ==လပ်ဗဳယာ== ===နာမ်=== {{head|lv|noun form|g=m}} # {{infl of|lv|nominatīvs||gen|s}}" 401165 wikitext text/x-wiki {{also|nominativa|nominatīvā}} ==လပ်ဗဳယာ== ===နာမ်=== {{head|lv|noun form|g=m}} # {{infl of|lv|nominatīvs||gen|s}} 4xe2ehxxffrokkcwzffs23w7v87o26d nominatīvs 0 298551 401166 2026-08-14T06:27:01Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "{{also|nominativs|Nominativs}} ==လပ်ဗဳယာ== ===ဗွဟ်ရမ္သာၚ်=== * {{lv-IPA|nɔminːatiːvs}} ===နာမ်=== {{lv-noun|m|1st}} # {{lb|lv|grammar}} ပရေၚ်ကိစ္စမဒုၚ်ယၟု။ ====လဟုတ်စှ်ေ==== {{lv-decl-noun|nominatīv|s|1st|no-pl}}" 401166 wikitext text/x-wiki {{also|nominativs|Nominativs}} ==လပ်ဗဳယာ== ===ဗွဟ်ရမ္သာၚ်=== * {{lv-IPA|nɔminːatiːvs}} ===နာမ်=== {{lv-noun|m|1st}} # {{lb|lv|grammar}} ပရေၚ်ကိစ္စမဒုၚ်ယၟု။ ====လဟုတ်စှ်ေ==== {{lv-decl-noun|nominatīv|s|1st|no-pl}} j4g9muvszdfug7bnj4ysqfoz7xyenvi ကဏ္ဍ:ဝေါဟာသဒ္ဒာလပ်ဗဳယာဂမၠိုၚ် 14 298552 401167 2026-08-14T06:27:52Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "[[ကဏ္ဍ:ဘာသာလပ်ဗဳယာ]]" 401167 wikitext text/x-wiki [[ကဏ္ဍ:ဘာသာလပ်ဗဳယာ]] 7wlz34m8e6bfilp2hy6dkvjt9msfacn Nominativs 0 298553 401168 2026-08-14T06:29:34Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "{{also|nominativs|nominatīvs}} =={{=de=}}== ===ဗွဟ်ရမ္သာၚ်=== * {{audio|de|De-Nominativs.ogg|a=<<Germany>> (<<Berlin>>)}} ===နာမ်=== {{head|de|noun form}} # {{inflection of|de|Nominativ||gen|s}}" 401168 wikitext text/x-wiki {{also|nominativs|nominatīvs}} =={{=de=}}== ===ဗွဟ်ရမ္သာၚ်=== * {{audio|de|De-Nominativs.ogg|a=<<Germany>> (<<Berlin>>)}} ===နာမ်=== {{head|de|noun form}} # {{inflection of|de|Nominativ||gen|s}} gv2ahigxd2jljtl0ua99lylsqnengnr Nominativ 0 298554 401169 2026-08-14T06:31:29Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "{{also|nominativ|nominatīv}} =={{=de=}}== ===ဗွဟ်ရမ္သာၚ်=== * {{IPA|de|/ˈnoːminaˌtiːf/}} * {{audio|de|De-Nominativ.ogg}} * {{audio|de|De-Nominativ2.ogg|a=<<Germany>> (<<Berlin>>)}} * {{rhymes|de|iːf|s=3}} ===နာမ်=== {{de-noun|m}} # {{lb|de|grammar}} မဆေၚ်စပ်ကဵုကိစ္စမဒုၚ်ယၟု။ #: {{syn|de|Werfall|Nennfall}} ====လဟုတ်စ..." 401169 wikitext text/x-wiki {{also|nominativ|nominatīv}} =={{=de=}}== ===ဗွဟ်ရမ္သာၚ်=== * {{IPA|de|/ˈnoːminaˌtiːf/}} * {{audio|de|De-Nominativ.ogg}} * {{audio|de|De-Nominativ2.ogg|a=<<Germany>> (<<Berlin>>)}} * {{rhymes|de|iːf|s=3}} ===နာမ်=== {{de-noun|m}} # {{lb|de|grammar}} မဆေၚ်စပ်ကဵုကိစ္စမဒုၚ်ယၟု။ #: {{syn|de|Werfall|Nennfall}} ====လဟုတ်စှ်ေ==== {{de-ndecl|m}} g8jn20v1ty815p9nhhawghpa3rn7g6y ကဏ္ဍ:ဝေါဟာသဒ္ဒာဂျာမာန်ဂမၠိုၚ် 14 298555 401170 2026-08-14T06:32:20Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "[[ကဏ္ဍ:ဘာသာဂျာမာန်]]" 401170 wikitext text/x-wiki [[ကဏ္ဍ:ဘာသာဂျာမာန်]] i3xb1yaff9mj7cee5l0lfzy48inljn7 Nominative 0 298556 401171 2026-08-14T06:34:00Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "{{also|nominative}} =={{=de=}}== ===ဗွဟ်ရမ္သာၚ်=== * {{audio|de|De-Nominative.ogg}} * {{audio|de|De-Nominative2.ogg|a=<<Germany>> (<<Berlin>>)}} ===နာမ်=== {{head|de|noun form}} # {{inflection of|de|Nominativ||nom//acc//gen|p}}" 401171 wikitext text/x-wiki {{also|nominative}} =={{=de=}}== ===ဗွဟ်ရမ္သာၚ်=== * {{audio|de|De-Nominative.ogg}} * {{audio|de|De-Nominative2.ogg|a=<<Germany>> (<<Berlin>>)}} ===နာမ်=== {{head|de|noun form}} # {{inflection of|de|Nominativ||nom//acc//gen|p}} 38des8hm8aum40pv8iixkdjvvgyeatb nominatīv 0 298557 401172 2026-08-14T06:37:08Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "{{also|nominativ|Nominativ}} ==လပ်ဗဳယာ== ===နာမ်=== {{head|lv|noun form}} # {{inflection of|lv|nominatīvs||voc|s}} ==လဳၜိုနဳယာန်== ===နိရုတ်=== ဝေါဟာကၠုၚ်နူ {{der|liv|la|nōminātīvus}} ===ဗွဟ်ရမ္သာၚ်=== {{liv-p}} ===နာမ်=== {{head|liv|noun}} # {{lb|liv|grammatical case}} ပရေၚ်ကိစ္..." 401172 wikitext text/x-wiki {{also|nominativ|Nominativ}} ==လပ်ဗဳယာ== ===နာမ်=== {{head|lv|noun form}} # {{inflection of|lv|nominatīvs||voc|s}} ==လဳၜိုနဳယာန်== ===နိရုတ်=== ဝေါဟာကၠုၚ်နူ {{der|liv|la|nōminātīvus}} ===ဗွဟ်ရမ္သာၚ်=== {{liv-p}} ===နာမ်=== {{head|liv|noun}} # {{lb|liv|grammatical case}} ပရေၚ်ကိစ္စမဒုၚ်ယၟု။ ====လဟုတ်စှ်ေ==== {{liv-decl|141|n=sg}} 5ynwty6174bnb35cla28ol9e21nhdv2 ကဏ္ဍ:ဝေါဟာကိစ္စဆေၚ်စပ်ကဵုသဒ္ဒာလဳၜိုနဳယာန်ဂမၠိုၚ် 14 298558 401173 2026-08-14T06:38:02Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "[[ကဏ္ဍ:ဘာသာလဳၜိုနဳယာန်]]" 401173 wikitext text/x-wiki [[ကဏ္ဍ:ဘာသာလဳၜိုနဳယာန်]] 38z9r79qywamymxvm8v8w4ru52dmnp2 ထာမ်ပလိက်:liv-decl 10 298559 401174 2026-08-14T06:50:40Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "<includeonly>{{#invoke:liv-decl|show}}</includeonly><noinclude>{{documentation}}</noinclude>" 401174 wikitext text/x-wiki <includeonly>{{#invoke:liv-decl|show}}</includeonly><noinclude>{{documentation}}</noinclude> gn183xwv34s62sjb6cksjn61aphj4sn ထာမ်ပလိက်:liv-decl/documentation 10 298560 401175 2026-08-14T06:53:09Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "{{documentation subpage}} {{uses lua|Module:liv-decl}} A Standard [[Appendix:Livonian declension|Livonian nominal declension]] template that can work with all regular inflection [https://www.keeleveeb.ee/dict/translate/lietlv/noomenityybid.html types 1-242]. The first parameter is the inflection type (1-242), and the second parameter should be a respelling of the word with the apostrophe for the broken tone and {{ort..." 401175 wikitext text/x-wiki {{documentation subpage}} {{uses lua|Module:liv-decl}} A Standard [[Appendix:Livonian declension|Livonian nominal declension]] template that can work with all regular inflection [https://www.keeleveeb.ee/dict/translate/lietlv/noomenityybid.html types 1-242]. The first parameter is the inflection type (1-242), and the second parameter should be a respelling of the word with the apostrophe for the broken tone and {{orth|ǭ}} spelled, as in the headword template. If the term is not a compound and no other respelling is needed, the respelling argument can be left out. For compound terms, the respelling should be separated by vertical bars, e.g. {{tl|liv-decl|74|ikš|lu’g}}. If a compound term inflects in multiple places, leave an empty slot (or a slot with only a space to separate words with spaces) and separate the inflection types by slashes, e.g. {{tl|liv-decl|135/163|seis||sadāz}}. If a term only has singular or plural forms, use {{para|n|sg}} (singular only) or {{para|n|pl}} (plural only). (Deprecated aliases for these are {{para|sg|1}} and {{para|pl|1}}). To display allative, adessive and ablative forms, use {{para|ad|1}}. ==Examples== {{m|liv|pǟva}}: {{tl|liv-decl|24}} {{box-top|Output}} {{liv-decl|24|title=pǟva}} {{box-bottom}} {{m|liv|mǭ}}: {{tl|liv-decl|12|mǭ|ad=1}} {{box-top|Output}} {{liv-decl|12|mǭ|title=mō|ad=1}} {{box-bottom}} {{m|liv|minā}}: {{tl|liv-decl|6}} {{box-top|Output}} {{liv-decl|6|title=minā}} {{box-bottom}} {{m|liv|ikšlu’g}}: {{tl|liv-decl|74|ikš|lu’g|n=sg}} {{box-top|Output}} {{liv-decl|74|ikš|lu’g|title=ikšlug|n=sg}} {{box-bottom}} {{m|liv|seissadāz}}: {{tl|liv-decl|135/163|seis||sadāz}} {{box-top|Output}} {{liv-decl|135/163|seis||sadāz|title=seissadāz}} {{box-bottom}} <includeonly> [[ကဏ္ဍ:ထာမ်ပလိက်လဳၜိုနဳယာန်အပြံၚ်အလှာဲပ္တဝ်ထ္ၜးပမာဏနာမ်ဂမၠိုၚ်]] </includeonly> rnsaqe46lxbvmbvry4np07tyv3bux1m ကဏ္ဍ:ထာမ်ပလိက်လဳၜိုနဳယာန်အပြံၚ်အလှာဲပ္တဝ်ထ္ၜးပမာဏနာမ်ဂမၠိုၚ် 14 298561 401176 2026-08-14T06:54:20Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "[[ကဏ္ဍ:ထာမ်ပလိက်လဳၜိုနဳယာန်အပြံၚ်အလှာဲပ္တဝ်ထ္ၜးပမာဏဂမၠိုၚ်]][[ကဏ္ဍ:ထာမ်ပလိက်အပြံၚ်အလှာဲပ္တဝ်ထ္ၜးပမာဏနာမ်ဗက်အလိုက်အရေဝ်ဘာသာဂမၠိုၚ်|လ]]" 401176 wikitext text/x-wiki [[ကဏ္ဍ:ထာမ်ပလိက်လဳၜိုနဳယာန်အပြံၚ်အလှာဲပ္တဝ်ထ္ၜးပမာဏဂမၠိုၚ်]][[ကဏ္ဍ:ထာမ်ပလိက်အပြံၚ်အလှာဲပ္တဝ်ထ္ၜးပမာဏနာမ်ဗက်အလိုက်အရေဝ်ဘာသာဂမၠိုၚ်|လ]] h3kwcwor0h54oxoc4nthsjjfa7xquup ကဏ္ဍ:ထာမ်ပလိက်လဳၜိုနဳယာန်အပြံၚ်အလှာဲပ္တဝ်ထ္ၜးပမာဏဂမၠိုၚ် 14 298562 401177 2026-08-14T06:55:38Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "[[ကဏ္ဍ:ထာမ်ပလိက်လဳၜိုနဳယာန်ဂမၠိုၚ်]][[ကဏ္ဍ:ထာမ်ပလိက်အပြံၚ်အလှာဲပ္တဝ်ထ္ၜးပမာဏဗက်အလိုက်အရေဝ်ဘာသာဂမၠိုၚ်|လ]]" 401177 wikitext text/x-wiki [[ကဏ္ဍ:ထာမ်ပလိက်လဳၜိုနဳယာန်ဂမၠိုၚ်]][[ကဏ္ဍ:ထာမ်ပလိက်အပြံၚ်အလှာဲပ္တဝ်ထ္ၜးပမာဏဗက်အလိုက်အရေဝ်ဘာသာဂမၠိုၚ်|လ]] 2ybpwvdmuyjefxcu0q9aw3nk634tkfr မဝ်ဂျူ:liv-decl 828 298563 401178 2026-08-14T07:08:19Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "local export = {} local m_str_utils = require("Module:string utilities") local char = m_str_utils.char local find = m_str_utils.find local gsub = m_str_utils.gsub local len = m_str_utils.len local lower = m_str_utils.lower local match = m_str_utils.match local sub = m_str_utils.sub local unpack = unpack or table.unpack -- Lua 5.2 compatibility local upper = m_str_utils.upper local lang = require("Module:languages")...." 401178 Scribunto text/plain local export = {} local m_str_utils = require("Module:string utilities") local char = m_str_utils.char local find = m_str_utils.find local gsub = m_str_utils.gsub local len = m_str_utils.len local lower = m_str_utils.lower local match = m_str_utils.match local sub = m_str_utils.sub local unpack = unpack or table.unpack -- Lua 5.2 compatibility local upper = m_str_utils.upper local lang = require("Module:languages").getByCode("liv") local listToSet = require("Module:table").listToSet -- Remove ending from word to get an inflection stem. ending can contain Lua pattern syntax. local function get_stem(word, ending) local fragment = match(word, ending .. "$") if fragment then return sub(word, 1, -len(fragment) - 1), fragment end error("Unexpected ending for this inflection type! Wrong type?") end -- Get value from list or fallback if empty/nil. local function get_or(value, fallback) return (value and #value > 0) and value or fallback end -- Return argument local function identity(value) return value end -- Combine strings or lists of strings to one list. local function join(...) local t = {} for _, s in ipairs({ ... }) do if type(s) == "table" then for _, v in ipairs(s) do table.insert(t, v) end elseif type(s) == "string" then table.insert(t, s) end end return t end -- Creates a function g(t, ...) which applies f(t, ...) if t is string, -- and else applies f(t, ...) to all values in the table t. local function apply_on_factory(f) return function (t, ...) if type(t) == "string" then return (f(t, ...)) end local r = {} for _, v in ipairs(t) do table.insert(r, (f(v, ...))) end return r end end -- Apply f to a string or every string in a list of strings. -- If f returns a table, add all strings from that table into the result. -- Otherwise, if f returns a string, add the string into the result. -- Returns the final result. local function flat_map(t, f, ...) local apply = apply_on_factory(f) local applied = apply(t, ...) if type(applied) == "string" then return applied end return join(unpack(applied)) end -- Apply gsub to string or list of strings. local gsub_all = apply_on_factory(gsub) -- Append text to string or list of strings. local append = apply_on_factory(function (v, x) return v .. x end) local function with_note(note, t) if not note then return t end if type(t) == "string" then return { { form = t, note = note } } end local r = {} for _, v in ipairs(t) do table.insert(r, { form = v, note = note }) end return r end local vowels = "aāeēiīoōuūäǟõȭȯȱǭöȫüṻ" local apos = "’" -- Append d/t to stem. local append_dt = apply_on_factory(function (v) return v .. (match(v, "[mnņptțksšzž]" .. apos .. "?$") and "t" or "d") end) local polyphthongs = { ["ie"] = true, ["ie’"] = true, ["uo"] = true, ["uo’"] = true, ["īe"] = true, ["ī’e"] = true, ["ūo"] = true, ["ū’o"] = true, ["iu"] = true, ["i’u"] = true, ["īu"] = true, ["ieu"] = true, ["ei"] = true, ["e’i"] = true, ["ēi"] = true, ["eu"] = true, ["e’u"] = true, ["äu"] = true, ["ä’u"] = true, ["õi"] = true, ["õ’i"] = true, ["ȭi"] = true, ["õu"] = true, ["õ’u"] = true, ["ȯi"] = true, ["ȯ’i"] = true, ["ȱi"] = true, ["ai"] = true, ["a’i"] = true, ["āi"] = true, ["ui"] = true, ["u’i"] = true, ["ūi"] = true, ["uoi"] = true, ["uo’i"] = true, ["ūoi"] = true, ["ū’oi"] = true, ["oi"] = true, ["o’i"] = true, ["ou"] = true, ["o’u"] = true, ["ǭi"] = true, ["ǭ’i"] = true, } -- Checks whether a stem is monosyllabic. local function is_monosyllabic(stem) local vowels = match(stem, "^[^"..vowels.."]*(["..vowels..apos.."]+)[^"..vowels.."]*$") if not vowels then return false end return polyphthongs[vowels] or len(gsub(vowels, apos, "")) == 1 end -- Checks whether a stem ends in a vowel. local function ends_in_vowel(stem) return match(stem, "[" .. vowels .. "][" .. vowels .. apos .. "]*$") end -- Checks whether a vowel is short. local function is_vowel_short(vowels) vowels = gsub(vowels, apos, "") return vowels == "ie" or vowels == "uo" or match(vowels, "^[aeiouäõȯöü]$") end -- Checks whether the final stem in a vowel is short. local function is_final_vowel_short(stem) local vowels = match(stem, "(["..vowels..apos.."]+)[^"..vowels.."]*$") return (vowels and is_vowel_short(vowels)) or false end -- If the stem is monosyllabic, append mono; otherwise append poly. local append_monopoly = apply_on_factory(function (stem, mono, poly) return is_monosyllabic(stem) and stem .. mono or stem .. poly end) -- Drops a final long consonant. local ungeminate_final = apply_on_factory(function (stem) return gsub(stem, "([mnņptțkbdḑgfsšhvzžrŗjlļ])%1$", "%1") end) -- Geminates the final consonant if allowed. local geminate_final = apply_on_factory(function (stem, ignore_prev_vowel) local v, c = match(stem, "^[^" .. vowels .. "]*([" .. vowels .. "][" .. vowels .. apos .. "]*)([mnņptțkbdḑgfsšhvzžrŗjlļ])$") if not v or not is_vowel_short(v) then return stem end return gsub(stem, "([" .. vowels .. "][" .. vowels .. apos .. "]*)([mnņptțkbdḑgfsšhvzžrŗjlļ])$", "%1%2%2") end) -- Make allative from illative local make_all_from_ill = apply_on_factory(function (ill, par_forms, dat_forms) if match(ill, "z$") then return gsub(ill, "z$", "l") end if match(ill, "zõ$") then local append = false if ill == par_forms or ill .. "n" == dat_forms then append = true else if type(par_forms) == "table" then for _, par in ipairs(par_forms) do if ill == par then append = true break end end end if type(dat_forms) == "table" then for _, dat in ipairs(dat_forms) do if ill .. "n" == dat then append = true break end end end end if not append then return gsub(ill, apos .. "?zõ$", "lõ") end end return ill .. "lõ" end) local palatalized_cons = { ["n"] = "ņ", ["t"] = "ț", ["d"] = "ḑ", ["r"] = "ŗ", ["l"] = "ļ", ["s"] = "š", ["z"] = "ž" } -- Palatalizes the final set of consonants. local function palatalize_final_cons(stem) local stem = gsub(stem, "[^" .. vowels .. "]+$", function (f) return gsub(f, "[dlnrstz]", palatalized_cons) end) return gsub(stem, "[țḑ][šž]", { ["țš"] = "tš", ["ḑž"] = "dž" }) end local DEPALATALIZE_BLOCKER = char(0xE801) local depalatalized_cons = { ["ņ"] = "n", ["ț"] = "t", ["ḑ"] = "d", ["ŗ"] = "r", ["ļ"] = "l", ["š"] = DEPALATALIZE_BLOCKER.."s", ["ž"] = DEPALATALIZE_BLOCKER.."z" } -- Depalatalizes the final set of consonants. local function depalatalize_final_cons(stem) local stem = gsub(stem, "[^" .. vowels .. "]+$", function (f) return gsub(f, "[ḑļņŗšțž]", depalatalized_cons) end) stem = gsub(stem, "[td]"..DEPALATALIZE_BLOCKER.."[sz]", { ["t"..DEPALATALIZE_BLOCKER.."s"] = "tš", ["d"..DEPALATALIZE_BLOCKER.."z"] = "dž" }) return gsub(stem, DEPALATALIZE_BLOCKER, "") end local vowel_short_to_long = { -- TODO some of these are probably wrong ["a"] = "ā", ["ai"] = "āi", ["au"] = "ā", ["ä"] = "ǟ", ["äi"] = "ǟi", ["äu"] = "ǟ", ["e"] = "ē", ["ei"] = "ēi", ["eu"] = "ē", ["i"] = "ī", ["iu"] = "ī", ["o"] = "ō", ["oi"] = "ōi", ["ou"] = "ō", ["ȯ"] = "ȱ", ["ȯi"] = "ȱi", ["ȯu"] = "ȱ", ["õ"] = "ȭ", ["õi"] = "ȭi", ["õu"] = "ȭ", ["u"] = "ū", ["ui"] = "ūi", ["ie"] = "īe", ["ieu"] = "īe", ["uo"] = "ūo", ["uoi"] = "ūoi", } local vowel_short_to_long_no_i = { ["ai"] = "ā", ["äi"] = "ǟ", ["ei"] = "ē", ["oi"] = "ō", ["ȯi"] = "ȱ", ["õi"] = "ȭ", ["ui"] = "ū", } -- Vowel short -> long conversion local function do_vowel_short_to_long(stem, no_i) return gsub(stem, "([" .. vowels .. "][" .. vowels .. apos .. "]*)([^" .. vowels .. "]*)$", function (v, c) if no_i and vowel_short_to_long_no_i[v] then return vowel_short_to_long_no_i[v] .. c end return (vowel_short_to_long[v] or v) .. c end) end local vowel_long_to_short = { -- TODO some of these are probably wrong ["ā"] = "a", ["ǟ"] = "ä", ["ē"] = "e", ["ī"] = "i", ["ō"] = "o", ["ȱ"] = "ȯ", ["ȭ"] = "õ", ["ū"] = "u", ["īe"] = "ie", ["ūo"] = "uo", ["ǭ"] = "a", } local vowel_long_to_short2 = { -- TODO some of these are probably wrong ["āi"] = "ai", ["ǟi"] = "äi", ["ēi"] = "ei", ["ōi"] = "oi", ["ȱi"] = "ȯi", ["ȭi"] = "õi", ["ūi"] = "ui", ["ūoi"] = "uoi", ["āu"] = "au", ["ǟu"] = "äu", ["ēu"] = "eu", ["īu"] = "iu", ["ōu"] = "ou", ["ȱu"] = "ȯu", ["ȭu"] = "õu", } -- Vowel long -> short conversion local function do_vowel_long_to_short(stem, suffix) stem = gsub(stem, "([" .. vowels .. "][" .. vowels .. apos .. "]*)([^" .. vowels .. "]*)$", function (v, c) if vowel_long_to_short[v] then return vowel_long_to_short[v] .. (suffix or "") .. c end return (vowel_long_to_short2[v] or v) .. c end) return stem end -- Add apostrophe to make stem broken tone local function make_broken(stem) if find(stem, apos) then return stem end -- Find first vowel local i, _, v = find(stem, "([" .. vowels .. "]+)") if not i then return stem end if match(v, "^ie") or match(v, "^uo") then -- Apostrophe after short ie or uo i = i + 1 else -- Apostrophe after first vowel end return sub(stem, 1, i) .. apos .. sub(stem, i + 1) end -- Remove apostrophe to make stem plain tone local function make_plain(stem) return gsub(stem, apos, "") end -- Return z or ž for illative local function get_illative_z(stem) return match(stem, "[šž][^" .. vowels .. "]*[" .. vowels .. "]*$") and "z" or "ž" end local OPT_ILL_Z = char(0xE800) local function handle_opt_ill_z(form) if match(form, OPT_ILL_Z .. "$") then form = gsub(form, OPT_ILL_Z, "") return { form, form .. "z" } else return form end end local function make_inessive_forms(result) if result["sg_ill"] then -- handle OPT_ILL_Z result["sg_ill"] = flat_map(result["sg_ill"], handle_opt_ill_z) end if result["sg_ela"] then -- sg_ela -> sg_ine by removing t result["sg_ine"] = gsub_all(result["sg_ela"], "t(õ?)$", "%1") end if result["pl_ela"] then -- pl_ela -> pl_ine by removing t result["pl_ine"] = gsub_all(result["pl_ela"], "t(i?)$", "%1") end return result end -- Livonian nominal stems -- nsg: nominative singular -- gsg: genitive singular -- psg: partitive singular -- dsg: (= psg) dative singular (without -n) -- inssg: (= dsg) instructive singular (without -ks) -- ilsg: illative singular (use OPT_ILL_Z for optional z suffix) -- elsg: elative singular (without -st(õ)) -- npl: (= gsg) nominative plural -- gpl: (= npl) genitive plural -- ppl: partitive plural (without -i) -- dpl: (= gpl) dative plural (without -n) -- inspl: (= dpl) instructive plural (without -ks) -- ilpl: illative plural -- elpl: elative plural -- local function make_forms(stems) local result local nsg = stems.nsg local gsg = stems.gsg local psg = stems.psg local dsg = stems.dsg or psg local inssg = stems.inssg or dsg local ilsg = stems.ilsg local elsg = stems.elsg local npl = stems.npl or gsg local gpl = stems.gpl or npl local ppl = stems.ppl local ppl = stems.ppl local dpl = stems.dpl or gpl local inspl = stems.inspl or dpl local ilpl = stems.ilpl local elpl = stems.elpl local result = { } result["sg_nom"] = nsg result["sg_gen"] = gsg result["sg_par"] = psg result["sg_dat"] = append(dsg, "n") result["sg_ins"] = append(inssg, "ks") result["sg_ill"] = ilsg result["sg_ela"] = append_monopoly(gsub_all(elsg, "ss$", "s"), "stõ", "st") -- sg_ela s -> š result["sg_ela"] = gsub_all(result["sg_ela"], "([ņțḑŗļ])s(tõ?)$", "%1š%2") result["pl_nom"] = npl result["pl_gen"] = gpl result["pl_par"] = append(ppl, "i") result["pl_dat"] = append(dpl, "n") result["pl_ins"] = append(inspl, "ks") result["pl_ill"] = ilpl result["pl_ela"] = elpl return make_inessive_forms(result) end local function postprocess(data, result) if data.has_ad then result["sg_ade"] = gsub_all(result["sg_dat"], "n$", "l") -- result["sg_all"] = make_all_from_ill(result["sg_ill"], result["sg_par"], result["sg_dat"]) result["sg_all"] = append(result["sg_ade"], "õ") result["sg_abl"] = append(result["sg_ade"], "d") end if data.prefix and #data.prefix > 0 then local prefix = data.prefix for k, v in pairs(result) do result[k] = gsub_all(v, "^", prefix) end end if data.suffix and #data.suffix > 0 then local suffix = data.suffix for k, v in pairs(result) do result[k] = gsub_all(v, "$", suffix) end end if data.no_singular then for k, v in pairs(result) do if k:match("^sg_") then result[k] = nil end end end if data.no_plural then for k, v in pairs(result) do if k:match("^pl_") then result[k] = nil end end end if data.genlemma then for k, v in pairs(result) do if k:match("_nom$") then result[k] = nil end end end if data.capitalize then local prefix = data.prefix for k, v in pairs(result) do result[k] = gsub_all(v, "^%l", upper) end end return result end -- inflection classes begin local inflections = {} local manual_infls = { [1] = make_inessive_forms{ ["sg_nom"] = "mis", ["sg_gen"] = "mis", ["sg_par"] = { "midā", "mis" }, ["sg_dat"] = "missõn", ["sg_ins"] = "missõks", ["sg_ill"] = "missõ", ["sg_ela"] = "missõst", }, [2] = make_inessive_forms{ ["sg_nom"] = "jegā", ["sg_gen"] = "jegā", ["sg_par"] = "jegā", ["sg_dat"] = "jegān", ["sg_ins"] = "jegāks", ["sg_ill"] = "je’ggõ", ["sg_ela"] = "jegāst", }, [3] = make_inessive_forms{ ["sg_nom"] = "mū", ["pl_nom"] = "munt", ["sg_gen"] = "mū", ["pl_gen"] = "munt", ["sg_par"] = "mūdõ", ["pl_par"] = "mūḑi", ["sg_dat"] = "mūn", ["pl_dat"] = "muntõn", ["sg_ins"] = "mūkõks", ["pl_ins"] = "muntkõks", ["sg_ill"] = "mū’zõ", ["pl_ill"] = "mū’ži", ["sg_ela"] = "mūstõ", ["pl_ela"] = "mūšti", }, [4] = make_inessive_forms{ ["sg_nom"] = "se", ["pl_nom"] = "ne", ["sg_gen"] = "sīe", ["pl_gen"] = "nänt", ["sg_par"] = "siedā", ["pl_par"] = "nēḑi", ["sg_dat"] = "sīen", ["pl_dat"] = "näntõn", ["sg_ins"] = "sīekõks", ["pl_ins"] = "näntkõks", ["sg_ill"] = "sī’ezõ", ["pl_ill"] = "nē’ži", ["sg_ela"] = "sīestõ", ["pl_ela"] = "nēšti", }, [5] = make_inessive_forms{ ["sg_nom"] = { "tämā", "ta" }, ["pl_nom"] = { "ne", "nämād" }, ["sg_gen"] = "tä’m", ["pl_gen"] = "nänt", ["sg_par"] = "tǟnda", ["pl_par"] = "nēḑi", ["sg_dat"] = "tä’mmõn", ["pl_dat"] = "näntõn", ["sg_ins"] = "tä’mkõks", ["pl_ins"] = "näntkõks", ["sg_ill"] = "tä’mmõ"..OPT_ILL_Z, ["pl_ill"] = "nē’ži", ["sg_ela"] = "tä’mstõ", ["pl_ela"] = "nēšti", }, [6] = make_inessive_forms{ ["sg_nom"] = { "minā", "ma" }, ["pl_nom"] = { "mēg", "meg" }, ["sg_gen"] = "mi’n", ["pl_gen"] = "mä’d", ["sg_par"] = "mīnda", ["pl_par"] = "mēḑi", ["sg_dat"] = { "mi’nnõn", "mi’n" }, ["pl_dat"] = { "mä’ddõn", "mä’n" }, ["sg_ins"] = "mi’nkõks", ["pl_ins"] = "mä’dkõks", ["sg_ill"] = "mi’nnõ"..OPT_ILL_Z, ["pl_ill"] = "mē’ži", ["sg_ela"] = "mi’nstõ", ["pl_ela"] = "mēšti", }, [7] = make_inessive_forms{ ["sg_nom"] = { "sinā", "sa" }, ["pl_nom"] = { "tēg", "teg" }, ["sg_gen"] = "si’n", ["pl_gen"] = "tä’d", ["sg_par"] = "sīnda", ["pl_par"] = "tēḑi", ["sg_dat"] = { "si’nnõn", "si’n" }, ["pl_dat"] = { "tä’ddõn", "tä’n" }, ["sg_ins"] = "si’nkõks", ["pl_ins"] = "tä’dkõks", ["sg_ill"] = "si’nnõ"..OPT_ILL_Z, ["pl_ill"] = "tē’ži", ["sg_ela"] = "si’nstõ", ["pl_ela"] = "tēšti", }, [8] = make_inessive_forms{ ["sg_nom"] = "kis", ["pl_nom"] = { "kis", "kīend" }, ["sg_gen"] = { "kīen", "kīnga" }, ["pl_gen"] = "kīend", ["sg_par"] = { "kīenta", "kīenda" }, ["pl_par"] = "kīendi", ["sg_dat"] = { "kīen", "kīngan" }, ["pl_dat"] = "kīendõn", ["sg_ins"] = { "kīenkõks", "kīngaks" }, ["pl_ins"] = "kīendõks", ["sg_ill"] = "kīenõ", ["pl_ill"] = "kīeniž", ["sg_ela"] = "kīenstõ", ["pl_ela"] = "kīenšti", }, [9] = make_inessive_forms{ ["sg_nom"] = "ī’ž", ["pl_nom"] = "eņtšõd", ["sg_gen"] = "eņtš", ["pl_gen"] = "eņtšõd", ["sg_par"] = "ēņtšta", ["pl_par"] = "eņtšidi", ["sg_dat"] = "eņtšõn", ["pl_dat"] = "eņtšõdõn", ["sg_ins"] = "eņtšõks", ["pl_ins"] = "eņtšõdõks", ["sg_ill"] = "eņtšõ"..OPT_ILL_Z, ["pl_ill"] = "eņtšiz", ["sg_ela"] = "eņtšõst", ["pl_ela"] = "eņtšist", }, [10] = make_inessive_forms{ ["sg_nom"] = "midāgõd", ["pl_nom"] = "midāgõd", ["sg_gen"] = "midāgõd", ["pl_gen"] = "midāgõd", ["sg_par"] = "midāgõd", ["pl_par"] = "midāgidi", ["sg_dat"] = "midāgõn", ["pl_dat"] = "midāgõdõn", ["sg_ins"] = "midāgõks", ["pl_ins"] = "midāgõdõks", ["sg_ill"] = "midāgõ"..OPT_ILL_Z, ["pl_ill"] = "midāgiž", ["sg_ela"] = "midāgõst", ["pl_ela"] = "midāgist", }, [11] = make_inessive_forms{ ["sg_nom"] = "mits", ["pl_nom"] = "mitsmõd", ["sg_gen"] = "mits", ["pl_gen"] = "mitsmõd", ["sg_par"] = "mits", ["pl_par"] = "mitsmidi", ["sg_dat"] = "mitsõn", ["pl_dat"] = "mitsmõdõn", ["sg_ins"] = "mitsõks", ["pl_ins"] = "mitsmõdõks", ["sg_ill"] = "mitsõ"..OPT_ILL_Z, ["pl_ill"] = "mitsmiž", ["sg_ela"] = "mitsõs", ["pl_ela"] = "mitsmist", }, } -- Handles types 1-11 local function infl_manual(typeno, data) return manual_infls[typeno] end for i = 1, 11 do inflections[i] = infl_manual end -- Handles types 12-17 local function infl_monosyllabic(typeno, data) local lemma = data.title local stem = get_stem(lemma, data.no_singular and "d" or "") local pl2 = stem if data.genlemma then error("genlemma not supported for this type") end if typeno == 14 or typeno == 15 or typeno == 17 then -- Adjust plural stem vowel pl2 = gsub(pl2, "[" .. vowels .. "]+$", { ["ǟ"] = "ē", ["īe"] = "ē", ["ei"] = "ē" }) end return make_forms { nsg = stem, gsg = stem, psg = typeno <= 15 and stem .. "dõ" or stem .. "õ", dsg = typeno <= 15 and stem or stem .. "õ", inssg = typeno <= 15 and stem .. "kõ" or stem .. "õ", ilsg = typeno <= 15 and make_broken(stem) .. "zõ" or stem .. "õ", elsg = typeno <= 15 and stem or stem .. "õ", npl = stem .. "d", gpl = stem .. "d", ppl = pl2 .. "ḑ", dpl = stem .. "dõ", inspl = typeno <= 15 and stem .. "dkõ" or stem .. "dõ", ilpl = (typeno <= 15 and make_broken(pl2) or pl2) .. "ži", elpl = pl2 .. "šti", } end for i = 12, 17 do inflections[i] = infl_monosyllabic end -- Nominal types within 18-54 that introduce diphthongs of this type into stems from long vowels local bisyllabic_a_diphthongize = { [21] = "i", [22] = "i", [23] = "i", [37] = "i", [47] = "i", [24] = "u", [38] = "u", [48] = "u", } -- Nominal types within 18-54 with broken tone in the other stem local bisyllabic_a_stem2_broken = listToSet({ 18, 19, 20, 25, 26, 39, 40, 49, }) -- Nominal types within 18-54 with gemination in the other stem local bisyllabic_a_stem2_gem = listToSet({ 18, 19, 25, 26, 27, 28, 29, 39, 41, 43, 44, 45, 50, 54, }) -- Handles types 18-54 local function infl_bisyllabic_a_final(typeno, data) local lemma = data.title local stem, a if data.genlemma then error("genlemma not supported for this type") end if data.no_singular and typeno == 54 then stem = get_stem(lemma, "õd") stem = ungeminate_final(stem) a = "a" else stem = data.no_singular and get_stem(lemma, "d") or lemma stem, a = get_stem(stem, "[" .. vowels .. "]") end -- Two stems, called stem (nominative) and stem2 (partitive) -- Forms mixed from the two. -- Modify the stem-final vowel local stem2 = do_vowel_long_to_short(stem, bisyllabic_a_diphthongize[typeno]) if typeno == 22 or typeno == 45 then -- puoi- > pȯi-, puol- > pȯl- stem2 = gsub(stem2, "uo(i?)([^" .. vowels .. "]*)$", "ȯ%1%2") elseif typeno == 47 then -- uišk- > uisk- stem2 = gsub(stem2, "iš([^" .. vowels .. "]*)$", "is%1") end if bisyllabic_a_stem2_broken[typeno] then stem2 = make_broken(stem2) end -- Plural stem local pl2 local ppl if typeno < 39 then pl2 = stem2 if typeno == 19 then -- a'm- -> ä'm- pl2 = gsub(stem2, "%f[" .. vowels .. "]a([^" .. vowels .. "]*)$", "ä%1") elseif typeno == 25 or typeno == 29 or typeno == 32 then -- pie’ž- -> pe’ž- ppl = gsub(stem2, "%f[" .. vowels .. "]ie([^" .. vowels .. "]*)$", "e%1") elseif typeno == 35 then -- käņg- -> keņg- pl2 = gsub(stem2, "%f[" .. vowels .. "]ä([^" .. vowels .. "]*)$", "e%1") end if typeno >= 34 then -- silm- > siļm- pl2 = palatalize_final_cons(pl2) end ppl = ppl or pl2 if typeno >= 33 then ppl = ppl elseif match(ppl, "st$") then ppl = gsub(ppl, "st", "št") elseif match(ppl, "[sš]$") then ppl = palatalize_final_cons(ungeminate_final(ppl)) .. "t" elseif match(ppl, "[kpt]$") then ppl = palatalize_final_cons(ungeminate_final(ppl)) .. "ț" else ppl = palatalize_final_cons(ungeminate_final(ppl)) .. "ḑ" end pl2 = make_plain(pl2) else pl2 = stem end if bisyllabic_a_stem2_gem[typeno] then stem2 = geminate_final(stem2) end local ilpl, elpl if typeno <= 20 then ilpl = palatalize_final_cons(make_broken(pl2)) .. "ži" elpl = palatalize_final_cons(make_broken(pl2)) .. "šti" elseif typeno <= 24 then ilpl = palatalize_final_cons(pl2) .. "ži" elpl = palatalize_final_cons(pl2) .. "šti" elseif typeno == 33 then ilpl = { pl2 .. "ži", stem .. "iž" } elpl = { pl2 .. "šti", stem .. "ist" } elseif 34 <= typeno and typeno <= 35 then ilpl = { palatalize_final_cons(pl2) .. "ži", stem .. "iž" } elpl = { palatalize_final_cons(pl2) .. "šti", stem .. "ist" } else local ii = is_final_vowel_short(stem) and "ī" or "i" ilpl = stem .. ii .. get_illative_z(stem) elpl = stem .. ii .. "st" end if typeno == 54 then -- 54 is too different from everything else return make_forms { nsg = stem .. a, gsg = stem .. a, psg = stem2 .. "õ", dsg = stem .. a, inssg = stem2 .. "õ", ilsg = stem2 .. "õ", elsg = stem .. a, npl = stem2 .. "õd", ppl = stem2 .. "id", dpl = stem2 .. "õdõ", ilpl = stem2 .. "iž", elpl = stem2 .. "ist", } end return make_forms { nsg = stem .. a, gsg = stem .. a, psg = stem2 .. (typeno == 53 and "i" or "õ"), dsg = stem .. a, inssg = stem .. a, ilsg = stem2 .. "õ", elsg = stem .. a, npl = stem .. a .. "d", ppl = ppl or stem .. (is_final_vowel_short(stem) and "īd" or "id"), dpl = stem .. a .. "dõ", ilpl = ilpl, elpl = elpl, } end for i = 18, 54 do inflections[i] = infl_bisyllabic_a_final end -- Handles types 55-58 local function infl_bisyllabic_a_final_invariant(typeno, data) local lemma = data.title local stem = data.no_singular and get_stem(lemma, "d") or lemma local a stem, a = get_stem(stem, "[" .. vowels .. "]") if data.genlemma then error("genlemma not supported for this type") end -- One stem. local psg if typeno == 55 then psg = stem .. "õ" elseif typeno == 56 then psg = stem .. a else psg = stem .. a .. "zt" end local ilsg if typeno == 55 then ilsg = stem .. "õ" else ilsg = stem .. a .. "z" end local pl = stem .. ((is_final_vowel_short(stem) and typeno >= 57) and "ī" or "i") return make_forms { nsg = stem .. a, gsg = stem .. a, psg = psg, dsg = stem .. a, ilsg = ilsg, elsg = stem .. a, npl = stem .. a .. "d", ppl = pl .. "d", dpl = stem .. a .. "dõ", ilpl = pl .. (typeno == 58 and "z" or "ž"), elpl = pl .. "st", } end for i = 55, 58 do inflections[i] = infl_bisyllabic_a_final_invariant end -- Nominal types within 59-114 with length variation between stems local bisyllabic_v_stem2_lenvar = listToSet({ 63, 67, 70 }) -- Nominal types within 59-114 with a broken tone in the nominative singular local bisyllabic_v_stem2_broken_nom_sg = listToSet({ 59, 60, 64, 72, 73, 74, 75, 76, 81, 82, 83, 84, 85, 86, 87, 88, 89 }) -- Nominal types within 59-114 with -ž in the nominative singular and -d- in the stem local bisyllabic_v_zh_d = listToSet({ 86, 87, 88, 112, 113 }) -- Nominal types within 59-114 that introduce diphthongs of this type into stems from long vowels local bisyllabic_v_stem2_diphthongize = { [107] = "i", [108] = "i", [109] = "i", [93] = "u", [98] = "u", [106] = "u", [112] = "u", } -- Nominal types within 59-114 that ban gemination of the stem local bisyllabic_v_no_gem_stem = listToSet({ 60, 75, 93, 98, 107, 108, 109 }) -- Nominal types within 59-114 that always have a long ī in the plural stem local bisyllabic_v_always_plural_ii = listToSet({ 60, 75 }) -- Nominal types within 59-114 that have palatalization in nom.sg. only local bisyllabic_v_palatalized_nom_sg = listToSet({ 78, 89, 96, 110, 111, 112, 113 }) -- Handles types 59-114 except 71, 90, 91 local function infl_bisyllabic_v_final(typeno, data) local lemma = data.title local stem, stem2 if data.genlemma then error("genlemma not supported for this type") end -- Final stem vowel. local pl_v if typeno <= 71 then pl_v = "i" elseif typeno <= 91 then pl_v = "ū" else pl_v = "õ" end local lenvar = bisyllabic_v_stem2_lenvar[typeno] or typeno >= 92 local nsg -- Two stems, the nominative stem and plural stem stem2. if data.no_singular then stem2 = get_stem(lemma, "d") if pl_v == "i" then stem2 = get_stem(stem2, "[iī]") else stem2 = get_stem(stem2, pl_v) end stem = stem2 if lenvar then stem = do_vowel_long_to_short(stem2, bisyllabic_v_stem2_diphthongize[typeno]) end if typeno == 83 then -- mier- > mer- stem = gsub(stem, "%f[" .. vowels .. "]ie([^" .. vowels .. "]*)$", "e%1") elseif typeno == 95 or typeno == 109 then -- puort- > pȯrt- stem = gsub(stem, "%f[" .. vowels .. "]uo([^" .. vowels .. "]*)$", "ȯ%1") end if bisyllabic_v_stem2_broken_nom_sg[typeno] then stem = make_broken(stem) end if typeno == 108 or typeno == 109 then stem = gsub(stem, "š$", "s") end if bisyllabic_v_zh_d[typeno] then stem = gsub(stem, "d$", "ž") if typeno == 87 then -- käd- > ked- stem = gsub(stem, "%f[" .. vowels .. "]ä([^" .. vowels .. "]*)$", "e%1") elseif typeno == 88 then -- vied- > ved- stem = gsub(stem, "%f[" .. vowels .. "]ie([^" .. vowels .. "]*)$", "e%1") end end if bisyllabic_v_palatalized_nom_sg[typeno] then stem = palatalize_final_cons(stem) end else stem = lemma if bisyllabic_v_zh_d[typeno] then nsg = stem stem = get_stem(stem, "ž") .. "d" if typeno == 87 then -- ked- > käd- stem = gsub(stem, "%f[" .. vowels .. "]e([^" .. vowels .. "]*)$", "ä%1") elseif typeno == 88 then -- ved- > vied- stem = gsub(stem, "%f[" .. vowels .. "]e([^" .. vowels .. "]*)$", "ie%1") end if bisyllabic_v_palatalized_nom_sg[typeno] then stem = depalatalize_final_cons(stem) end elseif bisyllabic_v_palatalized_nom_sg[typeno] then nsg = stem stem = depalatalize_final_cons(stem) elseif typeno == 83 then -- me'r- -> mie'r- nsg = stem stem = gsub(stem, "%f[" .. vowels .. "]e([^" .. vowels .. "]*)$", "ie%1") elseif typeno == 101 then -- täm -> tam- nsg = stem stem = gsub(stem, "%f[" .. vowels .. "]ä([^" .. vowels .. "]*)$", "a%1") end stem2 = stem if bisyllabic_v_stem2_broken_nom_sg[typeno] then stem2 = make_plain(stem2) end if lenvar then stem2 = do_vowel_short_to_long(stem2, typeno >= 107) end if typeno == 83 then -- mer- -> mier- stem2 = gsub(stem2, "%f[" .. vowels .. "]e([^" .. vowels .. "]*)$", "ie%1") elseif typeno == 95 or typeno == 109 then -- pȱrt- -> pūort- stem2 = gsub(stem2, "%f[" .. vowels .. "]ȱ(i?[^" .. vowels .. "]*)$", "ūo%1") elseif typeno == 100 or typeno == 101 or typeno == 104 then -- tām- -> tǭm- stem2 = gsub(stem2, "%f[" .. vowels .. "]ā([^" .. vowels .. "]*)$", "ǭ%1") end if typeno == 108 or typeno == 109 then stem2 = gsub(stem2, "s$", "š") end if typeno == 97 then stem2 = gsub(stem2, "t$", "") end end nsg = nsg or stem local gemstem = geminate_final(stem) -- Partitive singular. local psg if (81 <= typeno and typeno <= 89) or (110 <= typeno and typeno <= 114) then psg = stem if typeno ~= 84 then psg = make_plain(psg) end if not (84 <= typeno and typeno <= 89) then psg = do_vowel_short_to_long(psg) end if match(psg, "d$") or typeno == 84 then psg = gsub(psg, "d$", "") .. "t" elseif typeno == 110 then psg = gsub(psg, "g$", "") .. "t" elseif typeno <= 83 then psg = psg .. "d" else psg = psg .. "t" end psg = gsub(psg, "md$", "nd") if typeno <= 83 or typeno >= 110 then psg = psg .. "a" elseif typeno == 84 then psg = psg .. "õ" else psg = psg .. "ā" end else psg = gemstem .. "õ" end -- Instructive singular. local inssg if typeno <= 60 or typeno == 64 or (72 <= typeno and typeno <= 76) or (81 <= typeno and typeno <= 94) or (96 <= typeno and typeno <= 97) or (110 <= typeno and typeno <= 114) then if match(stem, "k$") then inssg = stem .. "õ" else inssg = stem .. "kõ" end else inssg = gemstem .. "õ" end -- Elative singular. local elsg if (68 <= typeno and typeno <= 71) or typeno == 80 or typeno == 89 or (105 <= typeno and typeno <= 109) then elsg = gemstem .. "õ" elseif typeno == 114 then elsg = gsub(gemstem, "z$", "") .. "gõ" else elsg = stem end -- Nominative plural. local pl2 = stem2 .. ((is_final_vowel_short(stem2) or bisyllabic_v_always_plural_ii[typeno]) and "ī" or "i") local npl = (pl_v == "i" and pl2 or stem2 .. pl_v) .. "d" -- Partitive plural. local ppl if typeno == 72 or typeno == 92 then ppl = stem .. "ḑ" elseif typeno == 73 or typeno == 93 then ppl = palatalize_final_cons(stem) .. "ḑ" elseif typeno == 83 then ppl = palatalize_final_cons(make_plain(nsg)) .. "ḑ" elseif 86 <= typeno and typeno <= 89 then ppl = geminate_final(nsg) elseif 110 <= typeno and typeno <= 113 then ppl = nsg else ppl = pl2 .. "d" end -- Illative/elative plural. if 87 <= typeno and typeno <= 89 then pl2 = make_plain(nsg) pl2 = pl2 .. (is_final_vowel_short(pl2) and "ī" or "i") end local z = get_illative_z(pl2) local ilpl local elpl if 72 <= typeno and typeno <= 75 then ilpl = palatalize_final_cons(stem) .. z .. "i" elseif 112 <= typeno and typeno <= 113 then ilpl = palatalize_final_cons(nsg) .. "iz" else ilpl = pl2 .. z end if 112 <= typeno and typeno <= 113 then elpl = palatalize_final_cons(gsub(stem, "d$", "ž")) .. "ist" elseif (72 <= typeno and typeno <= 75) or (110 <= typeno and typeno <= 111) then elpl = palatalize_final_cons(stem) .. "šti" elseif typeno == 83 then elpl = palatalize_final_cons(nsg) .. "šti" elseif (81 <= typeno and typeno <= 84) then elpl = make_broken(stem) .. "šti" else elpl = pl2 .. "st" end return make_forms { nsg = nsg, gsg = stem, psg = psg, dsg = gemstem .. "õ", inssg = inssg, ilsg = gemstem .. (typeno == 114 and "gõ" or "õ"), elsg = elsg, npl = npl, ppl = ppl, dpl = npl .. "õ", ilpl = ilpl, elpl = elpl, } end for i = 59, 114 do inflections[i] = infl_bisyllabic_v_final end inflections[71] = function (typeno, data) local lemma = data.title local stem = lemma if data.genlemma then error("genlemma not supported for this type") end if data.no_singular then stem = get_stem(stem, "d") end return make_forms { nsg = stem, gsg = stem, psg = stem, dsg = stem, ilsg = stem .. OPT_ILL_Z, elsg = stem, npl = stem .. "d", ppl = stem .. "d", dpl = stem .. "dõ", ilpl = stem .. "ž", elpl = stem .. "sti", } end inflections[90] = function (typeno, data) local lemma = data.title local stem = lemma if data.genlemma then error("genlemma not supported for this type") end if data.no_singular then stem = get_stem(stem, "d") end local stempl = gsub(stem, "[" .. vowels .. "]$", "ī") return make_forms { nsg = stem, gsg = stem, psg = stem, dsg = stem, ilsg = stem .. OPT_ILL_Z, elsg = stem, npl = stem .. "d", ppl = stempl .. "d", dpl = stem .. "dõ", ilpl = stempl .. "ž", elpl = stempl .. "st", } end inflections[91] = function (typeno, data) local lemma = data.title local stem = lemma if data.genlemma then error("genlemma not supported for this type") end if data.no_singular then stem = get_stem(stem, "d") end return make_forms { nsg = stem, gsg = stem, psg = stem, dsg = stem, ilsg = stem .. OPT_ILL_Z, elsg = stem, npl = stem .. "d", ppl = stem .. "d", dpl = stem .. "dõ", ilpl = stem .. "iž", elpl = stem .. "ist", } end -- Handles types 115-121 local function infl_bisyllabic_v_final_v(typeno, data) local lemma = data.title local stem, v if data.genlemma then error("genlemma not supported for this type") end if data.no_singular then stem = get_stem(lemma, "d") stem, v = get_stem(stem, "õ") else stem, v = get_stem(lemma, "õ?") end local stemv = stem .. "õ" local psg if typeno >= 118 then psg = stemv elseif typeno == 117 then psg = gsub(stem, "d[" .. vowels .. "]g$", "") .. "ta" else psg = gsub(do_vowel_short_to_long(stem), "([^" .. vowels .. "])g", "%1") .. (typeno == 116 and "ța" or "ta") end return make_forms { nsg = lemma, gsg = lemma, psg = psg, dsg = stemv, ilsg = stemv .. (#v > 0 and OPT_ILL_Z or ""), elsg = stemv, npl = stemv .. "d", ppl = stem .. "id", dpl = stemv .. "dõ", ilpl = stem .. "i" .. get_illative_z(stem), elpl = stem .. "ist", } end for i = 115, 121 do inflections[i] = infl_bisyllabic_v_final_v end -- Handles types 122-150 local function infl_cons_misc(typeno, data) local lemma = data.title local stem = lemma if data.genlemma then error("genlemma not supported for this type") end -- No gemination for 131 local possibly_geminate_final = typeno == 131 and identity or geminate_final if data.no_singular then stem = ungeminate_final(get_stem(stem, "õ?d")) if typeno == 127 or typeno == 146 or typeno == 147 then stem = palatalize_final_cons(stem) end if typeno == 146 or typeno == 150 then -- tǟ’d- > tē’d- stem = gsub(stem, "%f[" .. vowels .. "]ǟ(" .. apos .. "?)([^" .. vowels .. "]*)$", "ē%1%2") elseif typeno == 147 then -- lī’ed- > lē’d- stem = gsub(stem, "%f[" .. vowels .. "]ī(" .. apos .. "?)e([^" .. vowels .. "]*)$", "ē%1%2") end if typeno >= 148 then stem = get_stem(stem, "d") if typeno >= 149 then stem = palatalize_final_cons(stem) end stem = stem .. "tš" end end local nsg = stem if typeno == 127 or typeno == 146 or typeno == 147 then stem = depalatalize_final_cons(stem) elseif typeno >= 148 then stem = get_stem(stem, "tš") if typeno >= 149 then stem = depalatalize_final_cons(stem) end stem = stem .. "d" end -- Genitive and partitive singular local stemv local gsg local psg if 137 <= typeno and typeno <= 139 then stemv = gsub(stem, "[dt]$", "") .. "õ" gsg = typeno == 139 and stem or { stem, stemv } psg = stem .. "õ" elseif typeno >= 146 then if typeno == 146 or typeno == 150 then -- tē’d- > tǟ’d- stem = gsub(stem, "%f[" .. vowels .. "]ē(" .. apos .. "?)([^" .. vowels .. "]*)$", "ǟ%1%2") elseif typeno == 147 then -- lē’d- > lī’ed- stem = gsub(stem, "%f[" .. vowels .. "]ē(" .. apos .. "?)([^" .. vowels .. "]*)$", "ī%1e%2") end stemv = stem .. "õ" psg = stem .. "tõ" else stemv = possibly_geminate_final(stem) .. "õ" psg = stemv end gsg = gsg or stem -- Dative and instrumental singular local dsg, inssg if typeno == 139 then dsg, inssg = stem .. "õ", stemv elseif typeno <= 145 then dsg, inssg = stemv, stemv elseif typeno <= 147 then dsg, inssg = stemv, stem .. "kõ" else dsg, inssg = stem .. "õ", stem .. "kõ" end -- Partitive plural local ppl if typeno <= 124 then ppl = stem .. "ḑ" elseif typeno == 127 then ppl = possibly_geminate_final(do_vowel_short_to_long(stem)) .. "id" elseif 137 <= typeno and typeno <= 139 then local nsg_no_t = gsub(nsg, "[td]$", "") ppl = nsg_no_t .. "id" elseif typeno >= 146 then ppl = nsg else ppl = possibly_geminate_final(stem) .. "id" end -- Illative singular local ilsg if typeno == 139 then ilsg = stem .. "õ" else ilsg = stemv end -- Elative singular local elsg if typeno <= 134 or typeno >= 146 then elsg = stem else elsg = stemv end -- Illative and elative plural local plstem, ilpl, elpl if typeno <= 124 then plstem = stem ilpl = nsg .. get_illative_z(nsg) .. "i" elpl = nsg .. "šti" elseif 137 <= typeno and typeno <= 139 then local nsg_no_t = gsub(nsg, "[td]$", "") plstem = stemv ilpl = possibly_geminate_final(nsg_no_t) .. "i" .. get_illative_z(nsg_no_t) elpl = possibly_geminate_final(nsg_no_t) .. "ist" elseif 148 <= typeno and typeno <= 149 then plstem = stemv ilpl = possibly_geminate_final(stem) .. "i" .. get_illative_z(stem) elpl = possibly_geminate_final(stem) .. "ist" else plstem = stemv ilpl = possibly_geminate_final(nsg) .. "i" .. get_illative_z(nsg) elpl = possibly_geminate_final(nsg) .. "ist" end return make_forms { nsg = nsg, gsg = gsg, psg = psg, dsg = dsg, inssg = inssg, ilsg = ilsg, elsg = elsg, npl = plstem .. "d", ppl = ppl, dpl = plstem .. "dõ", inspl = plstem .. ((typeno == 123 or typeno == 124) and "dkõ" or "dõ"), ilpl = ilpl, elpl = elpl, } end for i = 122, 150 do inflections[i] = infl_cons_misc end -- Handles types 151-156 local function infl_cons_final_m(typeno, data) local lemma = data.title local stem local c if data.genlemma then error("genlemma not supported for this type") end if data.no_singular then stem = get_stem(lemma, "õd") stem, c = get_stem(stem, "[^" .. vowels .. "]") stem = ungeminate_final(stem) if typeno >= 153 then stem = gsub(stem, c .. "$", "õ" .. c) end else stem, c = get_stem(lemma, "[^" .. vowels .. "]") end local stem1m = stem .. c local stem1mg if typeno <= 152 then stem1mg = geminate_final(stem1m) else stem1mg = stem1m end local stem1mv = stem1mg .. "õ" local stem2m if typeno <= 152 then stem2m = stem1mg else stem2m = gsub(stem, "[" .. vowels .. "]+$", "") if typeno == 153 then stem2m = make_broken(stem2m) elseif typeno >= 155 then stem2m = do_vowel_long_to_short(stem2m, typeno == 156 and "i" or "") end stem2m = stem2m .. "m" end return make_forms { nsg = stem1m, gsg = stem1m, psg = append_monopoly(stem1m, "tõ", "t"), dsg = stem1mv, inssg = typeno <= 152 and stem1m .. "kõ" or stem1mv, ilsg = stem1mv, elsg = typeno <= 152 and stem1m or stem1mv, npl = stem2m .. "õd", ppl = stem2m .. "id", dpl = stem2m .. "õdõ", ilpl = stem2m .. "i" .. get_illative_z(stem2m), elpl = stem2m .. "ist", } end for i = 151, 156 do inflections[i] = infl_cons_final_m end -- Handles types 157-162 local function infl_cons_final_c_invariant(typeno, data) local lemma = data.title local stem = lemma if data.genlemma then error("genlemma not supported for this type") end if data.no_singular and typeno < 161 then stem = get_stem(stem, "õd") end -- Elative singular local elsg if typeno >= 161 then elsg = gsub(lemma, "d$", "") elseif typeno == 157 then elsg = lemma .. "õ" else elsg = lemma end local bare if typeno >= 161 then bare = gsub(lemma, "õd$", "") else bare = stem end return make_forms { nsg = stem, gsg = stem, psg = append_monopoly(stem, "tõ", "t"), dsg = bare .. "õ", ilsg = bare .. (typeno >= 161 and "õz" or "õ"), elsg = elsg, npl = bare .. "õd", ppl = bare .. "id", dpl = (typeno >= 161 and stem .. "õ" or stem .. "õdõ"), ilpl = bare .. "iž", elpl = bare .. "ist", } end for i = 157, 162 do inflections[i] = infl_cons_final_c_invariant end -- Handles types 163-165 local function infl_cons_final_z_nd(typeno, data) local lemma = data.title local stem if data.genlemma then error("genlemma not supported for this type") end if data.no_singular then stem = get_stem(lemma, "ndõd") else stem = get_stem(lemma, "z") end local stem_nd = gsub(stem, "n$", "") .. "nd" local stem_ndv = stem_nd .. "õ" return make_forms { nsg = stem .. "z", gsg = stem_nd, psg = stem_nd .. "t", dsg = stem_ndv, ilsg = stem_ndv, elsg = stem_ndv, npl = stem_ndv .. "d", ppl = stem_nd .. "id", dpl = stem_ndv .. "dõ", ilpl = stem_nd .. "i" .. get_illative_z(stem_nd), elpl = stem_nd .. "ist", } end for i = 163, 165 do inflections[i] = infl_cons_final_z_nd end -- Nominal types within 166-185 that introduce diphthongs of this type into stems from long vowels local cons_final_z_diphthongize = { [176] = "i", [177] = "u" } -- Handles types 166-185 local function infl_cons_final_z(typeno, data) local lemma = data.title if data.genlemma then error("genlemma not supported for this type") end local stem if data.no_singular then local v stem, v = get_stem(lemma, "d") if typeno >= 170 then stem, v = get_stem(stem, "[aāõ]") if typeno <= 178 then stem = ungeminate_final(stem) end if 173 <= typeno and typeno <= 178 then stem = do_vowel_short_to_long(stem) if typeno == 175 then -- pāļ- > pǭļ- stem = gsub(stem, "%f[" .. vowels .. "]ā(" .. apos .. "?)([^" .. vowels .. "]*)$", "ǭ%2") elseif typeno == 178 then -- pȱrz- > pūor- stem = gsub(stem, "%f[" .. vowels .. "]ȱ(" .. apos .. "?)([^" .. vowels .. "]*)$", "ū%1o%2") stem = gsub(stem, "z$", "") end end stem = stem .. v end else stem = get_stem(lemma, "z") end local a if typeno <= 167 then -- Special case 166, 167 local stemv = make_broken(stem) local stemvg = geminate_final(stemv) local plstem = stemv if typeno == 166 then plstem = gsub(plstem, "%f[" .. vowels .. "]ī(" .. apos .. "?)e([^" .. vowels .. "]*)$", "ē%1%2") end return make_forms { nsg = stem .. "z", gsg = stemv, psg = append_monopoly(stem, "ztõ", "zt"), dsg = gsub(stemvg, "([^" .. vowels .. "])$", "%1õ"), inssg = stemv .. "kõ", ilsg = typeno == 166 and stemv .. "zõ" or stemvg .. "õ", elsg = stemv, npl = stemv .. "d", ppl = plstem .. "ḑ", dpl = stemv .. "dõ", inspl = stemv .. "dkõ", ilpl = plstem .. get_illative_z(plstem) .. "i", elpl = plstem .. "šti", } end stem, a = get_stem(stem, "[aāõ]") -- Two stems: stem (nominative) and stem2 (illative). local stem2 if typeno <= 169 then stem2 = make_broken(stem) elseif typeno >= 179 then stem2 = stem else stem2 = stem if 173 <= typeno and typeno <= 178 then stem2 = do_vowel_long_to_short(stem2, cons_final_z_diphthongize[typeno]) if typeno == 178 then -- puor- > pȯrz- stem2 = gsub(stem2, "%f[" .. vowels .. "]uo(" .. apos .. "?)([^" .. vowels .. "]*)$", "ȯ%1%2") stem2 = gsub(stem2, "r$", "rz") end end stem2 = geminate_final(stem2) end local stem1a = stem .. a local stem2v = stem2 .. "õ" local stempl = typeno <= 172 and stem .. "ī" or stem2 .. "i" return make_forms { nsg = stem1a .. "z", gsg = typeno == 168 and stem1a or stem2v, psg = stem1a .. "zt", dsg = typeno <= 170 and stem1a or stem2v, ilsg = stem2v .. OPT_ILL_Z, elsg = typeno <= 172 and stem1a or stem2v, npl = (typeno <= 169 and stem1a or stem2v) .. "d", ppl = stempl .. "d", dpl = (typeno <= 169 and stem1a or stem2v) .. "dõ", ilpl = stempl .. get_illative_z(stempl), elpl = stempl .. "st", } end for i = 166, 185 do inflections[i] = infl_cons_final_z end -- Nominal types within 186-202 that have ī in the stem for oblique forms. local cons_i_iz_long_i = listToSet({ 192, 193, 194, 195, 198 }) -- Handles types 186-202 local function infl_cons_i_iz(typeno, data) local lemma = data.title local stem, i stem = lemma if data.no_singular then if match(stem, "zt$") then stem = get_stem(stem, "zt") else stem = get_stem(stem, "d") end elseif data.genlemma then stem = get_stem(stem, "z") end stem, i = get_stem(stem, "[iī]") local stem2 -- Two stems: nominative (stem) and genitive (stem2) if 192 <= typeno and typeno <= 195 then stem2 = ungeminate_final(make_plain(stem)) elseif 196 <= typeno and typeno <= 197 then stem2 = do_vowel_short_to_long(stem) else stem2 = stem end local ii = cons_i_iz_long_i[typeno] and "ī" or "i" -- Partitive singular local psg if typeno == 191 then psg = do_vowel_short_to_long(stem) .. "izta" elseif typeno <= 189 or typeno >= 201 then psg = { stem2 .. ii .. "zt", stem2 .. ii .. "t" } else psg = stem2 .. ii .. "zt" end -- Elative singular local elsg if typeno == 190 then elsg = stem2 .. ii elseif typeno == 186 or typeno == 188 or typeno == 189 or typeno == 191 then elsg = { stem2 .. ii .. "zõ", stem2 .. ii } else elsg = stem2 .. ii .. "zõ" end local dpl_base = stem .. i .. "zt" local ilpl_base = stem2 .. ii .. "ž" local stems = { nsg = stem .. i, gsg = stem2 .. ii .. "z", psg = psg, dsg = typeno == 190 and (stem2 .. ii) or (stem2 .. ii .. "zõ"), ilsg = stem2 .. ii .. "zõ", elsg = elsg, npl = stem .. i .. "zt", ppl = stem2 .. ii .. "ž", dpl = dpl_base .. "õ", inspl = dpl_base .. (typeno == 191 and "kõ" or "õ"), ilpl = ilpl_base .. "i" .. get_illative_z(ilpl_base), elpl = ilpl_base .. "ist", } if typeno == 187 or typeno == 190 then stems.npl = stem .. ii .. "d" stems.ppl = stem .. ii .. "d" stems.dpl = stem .. ii .. "dõ" stems.inspl = stem .. ii .. "dõ" stems.ilpl = ilpl_base stems.elpl = stem .. "isti" elseif typeno <= 189 then stems.npl = join(stems.npl, stem .. ii .. "d") stems.ppl = join(stems.ppl, stem .. ii .. "d") stems.dpl = join(stems.dpl, stem .. ii .. "dõ") stems.inspl = join(stems.inspl, stem .. ii .. "dõ") stems.ilpl = join(stems.ilpl, ilpl_base .. (typeno == 186 and "i" or "")) stems.elpl = join(stems.elpl, stem .. "isti") end return make_forms(stems) end for i = 186, 202 do inflections[i] = infl_cons_i_iz end -- Handles types 203-209 local function infl_cons_z_ks(typeno, data) local lemma = data.title if data.genlemma then error("genlemma not supported for this type") end local stem = lemma if data.no_singular then stem = get_stem(stem, "t") end local stemv = stem .. "õ" local stempl = palatalize_final_cons(stem) if typeno == 204 then -- nȭŗkõ- > nȭŗki- stempl = gsub(stempl, "%f[" .. vowels .. "]õ([^" .. vowels .. "]*)$", "i%1") end return make_forms { nsg = stem, gsg = stem, psg = stem .. "t", dsg = stemv, ilsg = stemv, elsg = stemv, npl = stem .. "t", ppl = stempl, dpl = (typeno == 209 and stempl or stem) .. "tõ", ilpl = stempl .. "i" .. get_illative_z(stempl), elpl = stempl .. "ist", } end for i = 203, 209 do inflections[i] = infl_cons_z_ks end -- Nominal types within 210-223: nom->gen consonant alternations local cons_mono_i_cons_altern = { [217] = { "kš", "d" }, [218] = { "kš", "d" }, [219] = { "ž", "d" }, } -- Nominal types within 210-223: vowel alternations local cons_mono_i_vowel_altern = { [211] = { "ä", "a" }, [215] = { "ē", "īe" }, [217] = { "i", "ī" }, [218] = { "a", "ǭ" }, [220] = { "ē", "īe" }, [223] = { "ē", "ǟ" }, } -- Nominal types within 210-223 with plain/broken tone alternations local cons_mono_i_plain_broken = listToSet({ 217, 218 }) -- Nominal types within 210-223 with -kõ- in the instructive singular. local cons_mono_i_inssg_k = listToSet({ 213, 214, 215, 216, 217, 218, 219, 220, 221, 223 }) -- Handles types 210-223 local function infl_cons_mono_i(typeno, data) local lemma = data.title if data.genlemma then error("genlemma not supported for this type") end -- Two stems: stem (nominative singular, some plural forms) and stem2 local stem if data.no_singular then if 217 <= typeno and typeno <= 219 then stem = lemma else stem = get_stem(lemma, "[dt]") end if cons_mono_i_plain_broken[typeno] then stem = make_plain(stem) end if cons_mono_i_cons_altern[typeno] then local c1, c2 = unpack(cons_mono_i_cons_altern[typeno]) stem = get_stem(stem, c2) .. c1 elseif typeno ~= 212 and typeno ~= 222 then stem = palatalize_final_cons(stem) end if cons_mono_i_vowel_altern[typeno] then local v1, v2 = unpack(cons_mono_i_vowel_altern[typeno]) stem = gsub(stem, "%f[" .. vowels .. "]" .. v2 .. "([^" .. vowels .. "]*)$", v1 .. "%1") end else stem = lemma end local stem2 = stem if cons_mono_i_cons_altern[typeno] then local c1, c2 = unpack(cons_mono_i_cons_altern[typeno]) stem2 = get_stem(stem2, c1) .. c2 else stem2 = depalatalize_final_cons(stem2) end if cons_mono_i_vowel_altern[typeno] then local v1, v2 = unpack(cons_mono_i_vowel_altern[typeno]) stem2 = gsub(stem2, "%f[" .. vowels .. "]" .. v1 .. "([^" .. vowels .. "]*)$", v2 .. "%1") end if cons_mono_i_plain_broken[typeno] then stem2 = make_broken(stem2) end -- Partitive singular local psg if typeno <= 212 then psg = stem2 .. "tā" elseif typeno == 213 then psg = do_vowel_short_to_long(make_plain(stem2)) .. "da" elseif typeno <= 216 then psg = stem2 .. "dõ" else psg = stem2 .. "tõ" end -- Plural forms local nsg = stem if typeno ~= 212 and typeno ~= 222 then stem = palatalize_final_cons(stem) end local stemdpl if typeno <= 212 then stemdpl = stem2 .. "t" elseif typeno <= 215 or typeno >= 220 then stemdpl = stem2 .. "d" else stemdpl = stem2 end -- Partitive plural local steminspl = typeno == 212 and stemdpl or stemdpl .. "k" local plstem = typeno == 212 and stemdpl or stem local pl_i = typeno <= 211 and "ī" or "i" local ppl if typeno == 212 then ppl = palatalize_final_cons(stem2) .. "t" elseif typeno == 213 then ppl = plstem .. "ḑ" else ppl = plstem end -- Illative plural local ilpl if typeno == 213 then ilpl = make_plain(plstem) .. "ī" elseif typeno == 217 or typeno == 218 then ilpl = stem2 .. "i" else ilpl = plstem .. pl_i end -- Elative plural local elpl if typeno <= 212 or typeno == 219 then elpl = plstem .. pl_i .. "st" elseif typeno == 217 or typeno == 218 then elpl = stem2 .. "šti" else elpl = plstem .. "šti" end return make_forms { nsg = nsg, gsg = stem2, psg = psg, dsg = geminate_final(stem2) .. "õ", inssg = cons_mono_i_inssg_k[typeno] and stem2 .. "kõ" or geminate_final(stem2) .. "õ", ilsg = geminate_final(stem2) .. "õ", elsg = typeno <= 212 and stem2 .. "õ" or stem2, npl = ungeminate_final(stem2 .. (typeno <= 212 and "t" or "d")), ppl = ppl, dpl = stemdpl .. "õ", inspl = steminspl .. "õ", ilpl = ilpl .. get_illative_z(ilpl), elpl = elpl, } end for i = 210, 223 do inflections[i] = infl_cons_mono_i end -- Nominal types within 224-242 with -õ- before the elative ending local cons_poly_elsg_vowel = listToSet({ 226, 227, 228, 229, 230, 232, 233, 234, 235, 236, 237, 238 }) -- Nominal types within 224-242 with -õ- > -i- in some plural endings local cons_poly_pl_i = listToSet({ 229, 230 }) -- Nominal types within 224-242 with -õ- > -i- and palatalization in some plural endings local cons_poly_pl_i_pal = listToSet({ 226, 227, 228, 232, 233, 234, 235, 236, 241 }) -- Handles types 224-242 local function infl_cons_poly(typeno, data) local lemma = data.title if data.genlemma then error("genlemma not supported for this type") end local nsg = lemma local stem, z if data.no_singular then stem = get_stem(lemma, "d") z = "" else stem, z = get_stem(lemma, "[zž]?") end local plstem = stem if typeno == 232 then stem = depalatalize_final_cons(stem) end if cons_poly_pl_i_pal[typeno] then plstem = gsub(plstem, "%f[" .. vowels .. "]õ([^" .. vowels .. "]*)$", "i%1") plstem = palatalize_final_cons(plstem) elseif cons_poly_pl_i[typeno] then plstem = gsub(plstem, "%f[" .. vowels .. "]õ([^" .. vowels .. "]*)$", "i%1") end return make_forms { nsg = nsg, gsg = stem, psg = stem .. (typeno >= 229 and z .. "t" or "t"), dsg = typeno == 224 and stem or stem .. "õ", ilsg = stem .. "õ", elsg = cons_poly_elsg_vowel[typeno] and stem .. "õ" or stem, npl = stem .. "d", ppl = typeno <= 225 and plstem .. "ḑ" or plstem, dpl = stem .. "dõ", inspl = stem .. (typeno <= 225 and "dkõ" or "dõ"), ilpl = typeno <= 225 and plstem .. get_illative_z(plstem) .. "i" or plstem .. "i" .. get_illative_z(plstem), elpl = typeno <= 225 and plstem .. "šti" or plstem .. "ist", } end for i = 224, 242 do inflections[i] = infl_cons_poly end -- inflection classes end local decl_table_base = [=[ ! ! ကိုန်ဨကဝုစ် <small>({{l|liv|ikšlu’g}})</small> ! ကိုန်ဗဟုဝစ် <small>({{l|liv|pǟgiņlu’g}})</small> |- ! မဒုၚ်ယၟု <small>({{l|liv|nominatīv}})</small> | {{{sg_nom}}} | {{{pl_nom}}} |- ! ဗဳဇဂကူ <small>({{l|liv|genitīv}})</small> | {{{sg_gen}}} | {{{pl_gen}}} |- ! ပရေၚ်ဗက်အလိုက် <small>({{l|liv|partitīv}})</small> | {{{sg_par}}} | {{{pl_par}}} |- ! ပြကမ္မကာရက <small>({{l|liv|datīv}})</small> | {{{sg_dat}}} | {{{pl_dat}}} |- ! တိၚ်တိုက်ကပေါတ်ကွိၚ်ကွိုက် <small>({{l|liv|instrumentāl}})</small> | {{{sg_ins}}} | {{{pl_ins}}} |- ! ဟၟဲကဵုအဓိပ္ပါဲ <small>({{l|liv|illatīv}})</small> | {{{sg_ill}}} | {{{pl_ill}}} |- ! ပရေၚ်ဟွံဆေၚ်စပ် <small>({{l|liv|inesīv}})</small> | {{{sg_ine}}} | {{{pl_ine}}} |- ! မစၞောန်ထ္ၜးအဆက်နာမ် <small>({{l|liv|elatīv}})</small> | {{{sg_ela}}} | {{{pl_ela}}} ]=] local decl_table_ad = [=[ |- ! တသိုက်ပိုန်ဂြပ် <small>({{l|liv|allatīv}})</small> | {{{sg_all}}} | {{{pl_all}}} |- ! ပရေၚ်စောဲလာံ <small>({{l|liv|adesīv}})</small> | {{{sg_ade}}} | {{{pl_ade}}} |- ! ပရေၚ်မလၚ်<small>({{l|liv|ablatīv}})</small> | {{{sg_abl}}} | {{{pl_abl}}} ]=] local function tag(text) return require("Module:script utilities").tag_text(text, lang, nil, "term") end local function link(text, prefix, suffix) if prefix and find(prefix, "%[%[") then if not find(text, "%[%[") then text = "[[" .. text .. "]]" end return require("Module:script utilities").tag_text(require("Module:links").language_link{ term = (prefix and prefix or "") .. text, lang = lang } .. (suffix and suffix or ""), lang) else return require("Module:script utilities").tag_text((prefix and prefix or "") .. require("Module:links").language_link{ term = text, lang = lang } .. (suffix and suffix or ""), lang) end end local function mention(text) return require("Module:links").full_link({ term = text, lang = lang }, "term") end local function mention_with_gloss(text, gloss) return require("Module:links").full_link({ term = text, lang = lang, gloss = gloss }, "term") end local function help_tooltip(text) return "<sup>" .. tostring(mw.html.create("span"):attr("style", "cursor:help"):attr("title", text):wikitext("?")) .. "</sup>" end local function note_reference(note) if note then return "<sup>" .. note .. ")</sup>" else return "" end end local function note_text(reference, text) return note_reference(reference) .. " " .. text end -- extract notes from forms into a list and replace by their index local function format_notes_for_form(data, form) local note = form.note if note then local index = data.notes_reverse[note] if index then form.note = index else index = tostring(#data.notes + 1) table.insert(data.notes, note) data.notes_reverse[note] = index form.note = index end end end local function format_notes(data, forms) data.notes = {} data.notes_reverse = {} for k, v in pairs(forms) do if type(v) == "table" then if v[1] then for _, form in ipairs(v) do if type(form) == "table" then format_notes_for_form(data, form) end end else format_notes_for_form(data, v) end end end data.notes_reverse = nil end local commabelow = char(0x326) local function normalize(word) word = gsub(word, "[ţ']", { ["ţ"] = "ț", ["'"] = "’" }) word = gsub(word, "d"..commabelow, "ḑ") word = gsub(word, "_", " ") return word end function export.raw(inflected_part, infl_type, word_prefix, args) if not infl_type then error("inflection class not specified") end args = args or {} local infl = inflections[infl_type] or error("unsupported inflection type") inflected_part = normalize(inflected_part) local data = { title = inflected_part, args = args, prefix = word_prefix } if args["n"] then if args["n"] == "s" or args["n"] == "sg" then data.no_plural = true elseif args["n"] == "p" or args["n"] == "pl" then data.no_singular = true end elseif args["sg"] then data.no_plural = true elseif args["pl"] then data.no_singular = true end if args["ad"] then data.has_ad = true end if args["genlemma"] then data.genlemma = true end local forms = infl(infl_type, data) postprocess(data, forms) return forms end local function parse_inflections(args, title) local infl_type = args[1] if not infl_type then error("inflection class not specified") end local infl_types = {} for itype in infl_type:gmatch("[^/]+") do local itypeno = tonumber(itype) if not itypeno then error("inflection types must be numbers") end table.insert(infl_types, itypeno) end local function make_data(prefix, lemma) return { title = lemma, args = args, prefix = prefix } end local infl_datas if not args[2] then args[2] = title end local respelled = "" local word_prefix = "" local word_suffix = args["suffix"] infl_datas = {} local i = 2 while args[i] do local normarg = normalize(args[i]) if match(normarg, "^%s*$") then if not match(respelled, "^%s*$") then table.insert(infl_datas, make_data(word_prefix, respelled)) end word_prefix = "" else word_prefix = word_prefix .. respelled end respelled = normalize(args[i]) i = i + 1 end table.insert(infl_datas, make_data(word_prefix, respelled)) if #infl_types ~= #infl_datas then error("Different number of inflection types and inflectable parts specified") end return infl_types, infl_datas end local function combine_forms(infl_results) if #infl_results <= 1 then return infl_results[1] end local final_result = {} local function find_next(form, result, index) if index > #infl_results then if not final_result[form] then final_result[form] = {} end table.insert(final_result[form], result) else local v = infl_results[index][form] if v == nil then -- do nothing elseif type(v) == "string" then find_next(form, result .. v, index + 1) else for _, f in ipairs(v) do if f then find_next(form, result .. f, index + 1) end end end end end for form, _ in pairs(infl_results[1]) do find_next(form, "", 1) end return final_result end function export.show(frame) local args = frame:getParent().args local title = args["title"] or mw.loadData("Module:headword/data").pagename local infl_types, infl_datas = parse_inflections(args, title) local word_suffix = args["suffix"] if word_suffix then infl_datas[#infl_datas].suffix = word_suffix end local joined = {} for _, data in ipairs(infl_datas) do table.insert(joined, (data.prefix or "") .. data.title) end joined = table.concat(joined) if lang:stripDiacritics(joined) ~= title then error("Respelling does not match title") end for _, data in ipairs(infl_datas) do if match(data.title, "^%u%U") then data.capitalize = true data.title = gsub(data.title, "^%u", lower) end end local categories = {} local all_data = {} if args["n"] then if args["n"] == "s" or args["n"] == "sg" then all_data.no_plural = true elseif args["n"] == "p" or args["n"] == "pl" then all_data.no_singular = true end elseif args["sg"] then all_data.no_plural = true elseif args["pl"] then all_data.no_singular = true end if args["ad"] then all_data.has_ad = true end if args["genlemma"] then all_data.genlemma = true end local inflection_results = {} for index, data in ipairs(infl_datas) do for k, v in pairs(all_data) do data[k] = v end local infl_type = infl_types[index] local infl = inflections[infl_type] or error("unsupported inflection type " .. infl_type) local forms = infl(infl_type, data) postprocess(data, forms) format_notes(data, forms) table.insert(inflection_results, forms) end local forms = combine_forms(inflection_results) word_suffix = word_suffix or "" local table_title = "မလဟုတ်စှ်ေဆေၚ်စပ်ကဵု " .. mention(joined .. word_suffix) .. " ([:en:[Appendix:Livonian declension#" .. infl_types[#infl_types] .. "|" .. infl_types[#infl_types] .. "]])" local function repl(form) local prefix = "" local suffix = "" if find(form, "^%^") then local value = forms[sub(form, 2)] if type(value) == "table" and value[1] then return value[1] elseif type(value) == "string" and #value > 0 then return value else return "&mdash;" end end if find(form, "%$") then local excl = find(form, "%$") prefix = sub(form, 1, excl - 1) form = sub(form, excl + 1) end if find(form, "@") then local excl = find(form, "@") suffix = sub(form, excl + 1) form = sub(form, 1, excl - 1) end local value = forms[form] if type(value) == "table" and value[1] then local result = {} for _, f in ipairs(value) do table.insert(result, link(f, prefix, suffix)) end return table.concat(result, "<br/>") elseif type(value) == "string" and #value > 0 then return link(value, prefix, suffix) else return "&mdash;" end end local function process_text(text) local result = gsub(text, "{{{([^%}]+)}}}", repl) result = gsub(result, "{{l|liv|([^}]-)}}", link) result = gsub(result, "{{m|liv|([^|}]-)||([^}]-)}}", mention_with_gloss) result = gsub(result, "{{m|liv||([^}]-)}}", tag) result = gsub(result, "{{m|liv|([^}]-)}}", mention) return result end local notes = {} local builtin_notes = {} for index, note in ipairs(builtin_notes) do table.insert(notes, note_text(tostring(#notes + 1), process_text(note))) end for _, data in ipairs(infl_datas) do for index, note in ipairs(data.notes) do table.insert(notes, note_text(tostring(#notes + 1), note)) end end notes = table.concat(notes, "<br />") --if mw.title.getCurrentTitle().namespace == 0 then -- table.insert(categories, "Livonian " .. infl_type .. "-type nominals") --end local decl_table = decl_table_base if all_data.has_ad then decl_table = decl_table .. decl_table_ad end local result = process_text(decl_table) return require("Module:inflection-table").make_table({ title = table_title, palette = "teal", tall = "yes", notes = notes, }, result) .. require("Module:utilities").format_categories(categories, lang) end return export eqr3685n1hcaw8kst5wkcsuim42ljj3 401183 401178 2026-08-14T07:16:06Z 咽頭べさ 33 401183 Scribunto text/plain local export = {} local m_str_utils = require("Module:string utilities") local char = m_str_utils.char local find = m_str_utils.find local gsub = m_str_utils.gsub local len = m_str_utils.len local lower = m_str_utils.lower local match = m_str_utils.match local sub = m_str_utils.sub local unpack = unpack or table.unpack -- Lua 5.2 compatibility local upper = m_str_utils.upper local lang = require("Module:languages").getByCode("liv") local listToSet = require("Module:table").listToSet -- Remove ending from word to get an inflection stem. ending can contain Lua pattern syntax. local function get_stem(word, ending) local fragment = match(word, ending .. "$") if fragment then return sub(word, 1, -len(fragment) - 1), fragment end error("Unexpected ending for this inflection type! Wrong type?") end -- Get value from list or fallback if empty/nil. local function get_or(value, fallback) return (value and #value > 0) and value or fallback end -- Return argument local function identity(value) return value end -- Combine strings or lists of strings to one list. local function join(...) local t = {} for _, s in ipairs({ ... }) do if type(s) == "table" then for _, v in ipairs(s) do table.insert(t, v) end elseif type(s) == "string" then table.insert(t, s) end end return t end -- Creates a function g(t, ...) which applies f(t, ...) if t is string, -- and else applies f(t, ...) to all values in the table t. local function apply_on_factory(f) return function (t, ...) if type(t) == "string" then return (f(t, ...)) end local r = {} for _, v in ipairs(t) do table.insert(r, (f(v, ...))) end return r end end -- Apply f to a string or every string in a list of strings. -- If f returns a table, add all strings from that table into the result. -- Otherwise, if f returns a string, add the string into the result. -- Returns the final result. local function flat_map(t, f, ...) local apply = apply_on_factory(f) local applied = apply(t, ...) if type(applied) == "string" then return applied end return join(unpack(applied)) end -- Apply gsub to string or list of strings. local gsub_all = apply_on_factory(gsub) -- Append text to string or list of strings. local append = apply_on_factory(function (v, x) return v .. x end) local function with_note(note, t) if not note then return t end if type(t) == "string" then return { { form = t, note = note } } end local r = {} for _, v in ipairs(t) do table.insert(r, { form = v, note = note }) end return r end local vowels = "aāeēiīoōuūäǟõȭȯȱǭöȫüṻ" local apos = "’" -- Append d/t to stem. local append_dt = apply_on_factory(function (v) return v .. (match(v, "[mnņptțksšzž]" .. apos .. "?$") and "t" or "d") end) local polyphthongs = { ["ie"] = true, ["ie’"] = true, ["uo"] = true, ["uo’"] = true, ["īe"] = true, ["ī’e"] = true, ["ūo"] = true, ["ū’o"] = true, ["iu"] = true, ["i’u"] = true, ["īu"] = true, ["ieu"] = true, ["ei"] = true, ["e’i"] = true, ["ēi"] = true, ["eu"] = true, ["e’u"] = true, ["äu"] = true, ["ä’u"] = true, ["õi"] = true, ["õ’i"] = true, ["ȭi"] = true, ["õu"] = true, ["õ’u"] = true, ["ȯi"] = true, ["ȯ’i"] = true, ["ȱi"] = true, ["ai"] = true, ["a’i"] = true, ["āi"] = true, ["ui"] = true, ["u’i"] = true, ["ūi"] = true, ["uoi"] = true, ["uo’i"] = true, ["ūoi"] = true, ["ū’oi"] = true, ["oi"] = true, ["o’i"] = true, ["ou"] = true, ["o’u"] = true, ["ǭi"] = true, ["ǭ’i"] = true, } -- Checks whether a stem is monosyllabic. local function is_monosyllabic(stem) local vowels = match(stem, "^[^"..vowels.."]*(["..vowels..apos.."]+)[^"..vowels.."]*$") if not vowels then return false end return polyphthongs[vowels] or len(gsub(vowels, apos, "")) == 1 end -- Checks whether a stem ends in a vowel. local function ends_in_vowel(stem) return match(stem, "[" .. vowels .. "][" .. vowels .. apos .. "]*$") end -- Checks whether a vowel is short. local function is_vowel_short(vowels) vowels = gsub(vowels, apos, "") return vowels == "ie" or vowels == "uo" or match(vowels, "^[aeiouäõȯöü]$") end -- Checks whether the final stem in a vowel is short. local function is_final_vowel_short(stem) local vowels = match(stem, "(["..vowels..apos.."]+)[^"..vowels.."]*$") return (vowels and is_vowel_short(vowels)) or false end -- If the stem is monosyllabic, append mono; otherwise append poly. local append_monopoly = apply_on_factory(function (stem, mono, poly) return is_monosyllabic(stem) and stem .. mono or stem .. poly end) -- Drops a final long consonant. local ungeminate_final = apply_on_factory(function (stem) return gsub(stem, "([mnņptțkbdḑgfsšhvzžrŗjlļ])%1$", "%1") end) -- Geminates the final consonant if allowed. local geminate_final = apply_on_factory(function (stem, ignore_prev_vowel) local v, c = match(stem, "^[^" .. vowels .. "]*([" .. vowels .. "][" .. vowels .. apos .. "]*)([mnņptțkbdḑgfsšhvzžrŗjlļ])$") if not v or not is_vowel_short(v) then return stem end return gsub(stem, "([" .. vowels .. "][" .. vowels .. apos .. "]*)([mnņptțkbdḑgfsšhvzžrŗjlļ])$", "%1%2%2") end) -- Make allative from illative local make_all_from_ill = apply_on_factory(function (ill, par_forms, dat_forms) if match(ill, "z$") then return gsub(ill, "z$", "l") end if match(ill, "zõ$") then local append = false if ill == par_forms or ill .. "n" == dat_forms then append = true else if type(par_forms) == "table" then for _, par in ipairs(par_forms) do if ill == par then append = true break end end end if type(dat_forms) == "table" then for _, dat in ipairs(dat_forms) do if ill .. "n" == dat then append = true break end end end end if not append then return gsub(ill, apos .. "?zõ$", "lõ") end end return ill .. "lõ" end) local palatalized_cons = { ["n"] = "ņ", ["t"] = "ț", ["d"] = "ḑ", ["r"] = "ŗ", ["l"] = "ļ", ["s"] = "š", ["z"] = "ž" } -- Palatalizes the final set of consonants. local function palatalize_final_cons(stem) local stem = gsub(stem, "[^" .. vowels .. "]+$", function (f) return gsub(f, "[dlnrstz]", palatalized_cons) end) return gsub(stem, "[țḑ][šž]", { ["țš"] = "tš", ["ḑž"] = "dž" }) end local DEPALATALIZE_BLOCKER = char(0xE801) local depalatalized_cons = { ["ņ"] = "n", ["ț"] = "t", ["ḑ"] = "d", ["ŗ"] = "r", ["ļ"] = "l", ["š"] = DEPALATALIZE_BLOCKER.."s", ["ž"] = DEPALATALIZE_BLOCKER.."z" } -- Depalatalizes the final set of consonants. local function depalatalize_final_cons(stem) local stem = gsub(stem, "[^" .. vowels .. "]+$", function (f) return gsub(f, "[ḑļņŗšțž]", depalatalized_cons) end) stem = gsub(stem, "[td]"..DEPALATALIZE_BLOCKER.."[sz]", { ["t"..DEPALATALIZE_BLOCKER.."s"] = "tš", ["d"..DEPALATALIZE_BLOCKER.."z"] = "dž" }) return gsub(stem, DEPALATALIZE_BLOCKER, "") end local vowel_short_to_long = { -- TODO some of these are probably wrong ["a"] = "ā", ["ai"] = "āi", ["au"] = "ā", ["ä"] = "ǟ", ["äi"] = "ǟi", ["äu"] = "ǟ", ["e"] = "ē", ["ei"] = "ēi", ["eu"] = "ē", ["i"] = "ī", ["iu"] = "ī", ["o"] = "ō", ["oi"] = "ōi", ["ou"] = "ō", ["ȯ"] = "ȱ", ["ȯi"] = "ȱi", ["ȯu"] = "ȱ", ["õ"] = "ȭ", ["õi"] = "ȭi", ["õu"] = "ȭ", ["u"] = "ū", ["ui"] = "ūi", ["ie"] = "īe", ["ieu"] = "īe", ["uo"] = "ūo", ["uoi"] = "ūoi", } local vowel_short_to_long_no_i = { ["ai"] = "ā", ["äi"] = "ǟ", ["ei"] = "ē", ["oi"] = "ō", ["ȯi"] = "ȱ", ["õi"] = "ȭ", ["ui"] = "ū", } -- Vowel short -> long conversion local function do_vowel_short_to_long(stem, no_i) return gsub(stem, "([" .. vowels .. "][" .. vowels .. apos .. "]*)([^" .. vowels .. "]*)$", function (v, c) if no_i and vowel_short_to_long_no_i[v] then return vowel_short_to_long_no_i[v] .. c end return (vowel_short_to_long[v] or v) .. c end) end local vowel_long_to_short = { -- TODO some of these are probably wrong ["ā"] = "a", ["ǟ"] = "ä", ["ē"] = "e", ["ī"] = "i", ["ō"] = "o", ["ȱ"] = "ȯ", ["ȭ"] = "õ", ["ū"] = "u", ["īe"] = "ie", ["ūo"] = "uo", ["ǭ"] = "a", } local vowel_long_to_short2 = { -- TODO some of these are probably wrong ["āi"] = "ai", ["ǟi"] = "äi", ["ēi"] = "ei", ["ōi"] = "oi", ["ȱi"] = "ȯi", ["ȭi"] = "õi", ["ūi"] = "ui", ["ūoi"] = "uoi", ["āu"] = "au", ["ǟu"] = "äu", ["ēu"] = "eu", ["īu"] = "iu", ["ōu"] = "ou", ["ȱu"] = "ȯu", ["ȭu"] = "õu", } -- Vowel long -> short conversion local function do_vowel_long_to_short(stem, suffix) stem = gsub(stem, "([" .. vowels .. "][" .. vowels .. apos .. "]*)([^" .. vowels .. "]*)$", function (v, c) if vowel_long_to_short[v] then return vowel_long_to_short[v] .. (suffix or "") .. c end return (vowel_long_to_short2[v] or v) .. c end) return stem end -- Add apostrophe to make stem broken tone local function make_broken(stem) if find(stem, apos) then return stem end -- Find first vowel local i, _, v = find(stem, "([" .. vowels .. "]+)") if not i then return stem end if match(v, "^ie") or match(v, "^uo") then -- Apostrophe after short ie or uo i = i + 1 else -- Apostrophe after first vowel end return sub(stem, 1, i) .. apos .. sub(stem, i + 1) end -- Remove apostrophe to make stem plain tone local function make_plain(stem) return gsub(stem, apos, "") end -- Return z or ž for illative local function get_illative_z(stem) return match(stem, "[šž][^" .. vowels .. "]*[" .. vowels .. "]*$") and "z" or "ž" end local OPT_ILL_Z = char(0xE800) local function handle_opt_ill_z(form) if match(form, OPT_ILL_Z .. "$") then form = gsub(form, OPT_ILL_Z, "") return { form, form .. "z" } else return form end end local function make_inessive_forms(result) if result["sg_ill"] then -- handle OPT_ILL_Z result["sg_ill"] = flat_map(result["sg_ill"], handle_opt_ill_z) end if result["sg_ela"] then -- sg_ela -> sg_ine by removing t result["sg_ine"] = gsub_all(result["sg_ela"], "t(õ?)$", "%1") end if result["pl_ela"] then -- pl_ela -> pl_ine by removing t result["pl_ine"] = gsub_all(result["pl_ela"], "t(i?)$", "%1") end return result end -- Livonian nominal stems -- nsg: nominative singular -- gsg: genitive singular -- psg: partitive singular -- dsg: (= psg) dative singular (without -n) -- inssg: (= dsg) instructive singular (without -ks) -- ilsg: illative singular (use OPT_ILL_Z for optional z suffix) -- elsg: elative singular (without -st(õ)) -- npl: (= gsg) nominative plural -- gpl: (= npl) genitive plural -- ppl: partitive plural (without -i) -- dpl: (= gpl) dative plural (without -n) -- inspl: (= dpl) instructive plural (without -ks) -- ilpl: illative plural -- elpl: elative plural -- local function make_forms(stems) local result local nsg = stems.nsg local gsg = stems.gsg local psg = stems.psg local dsg = stems.dsg or psg local inssg = stems.inssg or dsg local ilsg = stems.ilsg local elsg = stems.elsg local npl = stems.npl or gsg local gpl = stems.gpl or npl local ppl = stems.ppl local ppl = stems.ppl local dpl = stems.dpl or gpl local inspl = stems.inspl or dpl local ilpl = stems.ilpl local elpl = stems.elpl local result = { } result["sg_nom"] = nsg result["sg_gen"] = gsg result["sg_par"] = psg result["sg_dat"] = append(dsg, "n") result["sg_ins"] = append(inssg, "ks") result["sg_ill"] = ilsg result["sg_ela"] = append_monopoly(gsub_all(elsg, "ss$", "s"), "stõ", "st") -- sg_ela s -> š result["sg_ela"] = gsub_all(result["sg_ela"], "([ņțḑŗļ])s(tõ?)$", "%1š%2") result["pl_nom"] = npl result["pl_gen"] = gpl result["pl_par"] = append(ppl, "i") result["pl_dat"] = append(dpl, "n") result["pl_ins"] = append(inspl, "ks") result["pl_ill"] = ilpl result["pl_ela"] = elpl return make_inessive_forms(result) end local function postprocess(data, result) if data.has_ad then result["sg_ade"] = gsub_all(result["sg_dat"], "n$", "l") -- result["sg_all"] = make_all_from_ill(result["sg_ill"], result["sg_par"], result["sg_dat"]) result["sg_all"] = append(result["sg_ade"], "õ") result["sg_abl"] = append(result["sg_ade"], "d") end if data.prefix and #data.prefix > 0 then local prefix = data.prefix for k, v in pairs(result) do result[k] = gsub_all(v, "^", prefix) end end if data.suffix and #data.suffix > 0 then local suffix = data.suffix for k, v in pairs(result) do result[k] = gsub_all(v, "$", suffix) end end if data.no_singular then for k, v in pairs(result) do if k:match("^sg_") then result[k] = nil end end end if data.no_plural then for k, v in pairs(result) do if k:match("^pl_") then result[k] = nil end end end if data.genlemma then for k, v in pairs(result) do if k:match("_nom$") then result[k] = nil end end end if data.capitalize then local prefix = data.prefix for k, v in pairs(result) do result[k] = gsub_all(v, "^%l", upper) end end return result end -- inflection classes begin local inflections = {} local manual_infls = { [1] = make_inessive_forms{ ["sg_nom"] = "mis", ["sg_gen"] = "mis", ["sg_par"] = { "midā", "mis" }, ["sg_dat"] = "missõn", ["sg_ins"] = "missõks", ["sg_ill"] = "missõ", ["sg_ela"] = "missõst", }, [2] = make_inessive_forms{ ["sg_nom"] = "jegā", ["sg_gen"] = "jegā", ["sg_par"] = "jegā", ["sg_dat"] = "jegān", ["sg_ins"] = "jegāks", ["sg_ill"] = "je’ggõ", ["sg_ela"] = "jegāst", }, [3] = make_inessive_forms{ ["sg_nom"] = "mū", ["pl_nom"] = "munt", ["sg_gen"] = "mū", ["pl_gen"] = "munt", ["sg_par"] = "mūdõ", ["pl_par"] = "mūḑi", ["sg_dat"] = "mūn", ["pl_dat"] = "muntõn", ["sg_ins"] = "mūkõks", ["pl_ins"] = "muntkõks", ["sg_ill"] = "mū’zõ", ["pl_ill"] = "mū’ži", ["sg_ela"] = "mūstõ", ["pl_ela"] = "mūšti", }, [4] = make_inessive_forms{ ["sg_nom"] = "se", ["pl_nom"] = "ne", ["sg_gen"] = "sīe", ["pl_gen"] = "nänt", ["sg_par"] = "siedā", ["pl_par"] = "nēḑi", ["sg_dat"] = "sīen", ["pl_dat"] = "näntõn", ["sg_ins"] = "sīekõks", ["pl_ins"] = "näntkõks", ["sg_ill"] = "sī’ezõ", ["pl_ill"] = "nē’ži", ["sg_ela"] = "sīestõ", ["pl_ela"] = "nēšti", }, [5] = make_inessive_forms{ ["sg_nom"] = { "tämā", "ta" }, ["pl_nom"] = { "ne", "nämād" }, ["sg_gen"] = "tä’m", ["pl_gen"] = "nänt", ["sg_par"] = "tǟnda", ["pl_par"] = "nēḑi", ["sg_dat"] = "tä’mmõn", ["pl_dat"] = "näntõn", ["sg_ins"] = "tä’mkõks", ["pl_ins"] = "näntkõks", ["sg_ill"] = "tä’mmõ"..OPT_ILL_Z, ["pl_ill"] = "nē’ži", ["sg_ela"] = "tä’mstõ", ["pl_ela"] = "nēšti", }, [6] = make_inessive_forms{ ["sg_nom"] = { "minā", "ma" }, ["pl_nom"] = { "mēg", "meg" }, ["sg_gen"] = "mi’n", ["pl_gen"] = "mä’d", ["sg_par"] = "mīnda", ["pl_par"] = "mēḑi", ["sg_dat"] = { "mi’nnõn", "mi’n" }, ["pl_dat"] = { "mä’ddõn", "mä’n" }, ["sg_ins"] = "mi’nkõks", ["pl_ins"] = "mä’dkõks", ["sg_ill"] = "mi’nnõ"..OPT_ILL_Z, ["pl_ill"] = "mē’ži", ["sg_ela"] = "mi’nstõ", ["pl_ela"] = "mēšti", }, [7] = make_inessive_forms{ ["sg_nom"] = { "sinā", "sa" }, ["pl_nom"] = { "tēg", "teg" }, ["sg_gen"] = "si’n", ["pl_gen"] = "tä’d", ["sg_par"] = "sīnda", ["pl_par"] = "tēḑi", ["sg_dat"] = { "si’nnõn", "si’n" }, ["pl_dat"] = { "tä’ddõn", "tä’n" }, ["sg_ins"] = "si’nkõks", ["pl_ins"] = "tä’dkõks", ["sg_ill"] = "si’nnõ"..OPT_ILL_Z, ["pl_ill"] = "tē’ži", ["sg_ela"] = "si’nstõ", ["pl_ela"] = "tēšti", }, [8] = make_inessive_forms{ ["sg_nom"] = "kis", ["pl_nom"] = { "kis", "kīend" }, ["sg_gen"] = { "kīen", "kīnga" }, ["pl_gen"] = "kīend", ["sg_par"] = { "kīenta", "kīenda" }, ["pl_par"] = "kīendi", ["sg_dat"] = { "kīen", "kīngan" }, ["pl_dat"] = "kīendõn", ["sg_ins"] = { "kīenkõks", "kīngaks" }, ["pl_ins"] = "kīendõks", ["sg_ill"] = "kīenõ", ["pl_ill"] = "kīeniž", ["sg_ela"] = "kīenstõ", ["pl_ela"] = "kīenšti", }, [9] = make_inessive_forms{ ["sg_nom"] = "ī’ž", ["pl_nom"] = "eņtšõd", ["sg_gen"] = "eņtš", ["pl_gen"] = "eņtšõd", ["sg_par"] = "ēņtšta", ["pl_par"] = "eņtšidi", ["sg_dat"] = "eņtšõn", ["pl_dat"] = "eņtšõdõn", ["sg_ins"] = "eņtšõks", ["pl_ins"] = "eņtšõdõks", ["sg_ill"] = "eņtšõ"..OPT_ILL_Z, ["pl_ill"] = "eņtšiz", ["sg_ela"] = "eņtšõst", ["pl_ela"] = "eņtšist", }, [10] = make_inessive_forms{ ["sg_nom"] = "midāgõd", ["pl_nom"] = "midāgõd", ["sg_gen"] = "midāgõd", ["pl_gen"] = "midāgõd", ["sg_par"] = "midāgõd", ["pl_par"] = "midāgidi", ["sg_dat"] = "midāgõn", ["pl_dat"] = "midāgõdõn", ["sg_ins"] = "midāgõks", ["pl_ins"] = "midāgõdõks", ["sg_ill"] = "midāgõ"..OPT_ILL_Z, ["pl_ill"] = "midāgiž", ["sg_ela"] = "midāgõst", ["pl_ela"] = "midāgist", }, [11] = make_inessive_forms{ ["sg_nom"] = "mits", ["pl_nom"] = "mitsmõd", ["sg_gen"] = "mits", ["pl_gen"] = "mitsmõd", ["sg_par"] = "mits", ["pl_par"] = "mitsmidi", ["sg_dat"] = "mitsõn", ["pl_dat"] = "mitsmõdõn", ["sg_ins"] = "mitsõks", ["pl_ins"] = "mitsmõdõks", ["sg_ill"] = "mitsõ"..OPT_ILL_Z, ["pl_ill"] = "mitsmiž", ["sg_ela"] = "mitsõs", ["pl_ela"] = "mitsmist", }, } -- Handles types 1-11 local function infl_manual(typeno, data) return manual_infls[typeno] end for i = 1, 11 do inflections[i] = infl_manual end -- Handles types 12-17 local function infl_monosyllabic(typeno, data) local lemma = data.title local stem = get_stem(lemma, data.no_singular and "d" or "") local pl2 = stem if data.genlemma then error("genlemma not supported for this type") end if typeno == 14 or typeno == 15 or typeno == 17 then -- Adjust plural stem vowel pl2 = gsub(pl2, "[" .. vowels .. "]+$", { ["ǟ"] = "ē", ["īe"] = "ē", ["ei"] = "ē" }) end return make_forms { nsg = stem, gsg = stem, psg = typeno <= 15 and stem .. "dõ" or stem .. "õ", dsg = typeno <= 15 and stem or stem .. "õ", inssg = typeno <= 15 and stem .. "kõ" or stem .. "õ", ilsg = typeno <= 15 and make_broken(stem) .. "zõ" or stem .. "õ", elsg = typeno <= 15 and stem or stem .. "õ", npl = stem .. "d", gpl = stem .. "d", ppl = pl2 .. "ḑ", dpl = stem .. "dõ", inspl = typeno <= 15 and stem .. "dkõ" or stem .. "dõ", ilpl = (typeno <= 15 and make_broken(pl2) or pl2) .. "ži", elpl = pl2 .. "šti", } end for i = 12, 17 do inflections[i] = infl_monosyllabic end -- Nominal types within 18-54 that introduce diphthongs of this type into stems from long vowels local bisyllabic_a_diphthongize = { [21] = "i", [22] = "i", [23] = "i", [37] = "i", [47] = "i", [24] = "u", [38] = "u", [48] = "u", } -- Nominal types within 18-54 with broken tone in the other stem local bisyllabic_a_stem2_broken = listToSet({ 18, 19, 20, 25, 26, 39, 40, 49, }) -- Nominal types within 18-54 with gemination in the other stem local bisyllabic_a_stem2_gem = listToSet({ 18, 19, 25, 26, 27, 28, 29, 39, 41, 43, 44, 45, 50, 54, }) -- Handles types 18-54 local function infl_bisyllabic_a_final(typeno, data) local lemma = data.title local stem, a if data.genlemma then error("genlemma not supported for this type") end if data.no_singular and typeno == 54 then stem = get_stem(lemma, "õd") stem = ungeminate_final(stem) a = "a" else stem = data.no_singular and get_stem(lemma, "d") or lemma stem, a = get_stem(stem, "[" .. vowels .. "]") end -- Two stems, called stem (nominative) and stem2 (partitive) -- Forms mixed from the two. -- Modify the stem-final vowel local stem2 = do_vowel_long_to_short(stem, bisyllabic_a_diphthongize[typeno]) if typeno == 22 or typeno == 45 then -- puoi- > pȯi-, puol- > pȯl- stem2 = gsub(stem2, "uo(i?)([^" .. vowels .. "]*)$", "ȯ%1%2") elseif typeno == 47 then -- uišk- > uisk- stem2 = gsub(stem2, "iš([^" .. vowels .. "]*)$", "is%1") end if bisyllabic_a_stem2_broken[typeno] then stem2 = make_broken(stem2) end -- Plural stem local pl2 local ppl if typeno < 39 then pl2 = stem2 if typeno == 19 then -- a'm- -> ä'm- pl2 = gsub(stem2, "%f[" .. vowels .. "]a([^" .. vowels .. "]*)$", "ä%1") elseif typeno == 25 or typeno == 29 or typeno == 32 then -- pie’ž- -> pe’ž- ppl = gsub(stem2, "%f[" .. vowels .. "]ie([^" .. vowels .. "]*)$", "e%1") elseif typeno == 35 then -- käņg- -> keņg- pl2 = gsub(stem2, "%f[" .. vowels .. "]ä([^" .. vowels .. "]*)$", "e%1") end if typeno >= 34 then -- silm- > siļm- pl2 = palatalize_final_cons(pl2) end ppl = ppl or pl2 if typeno >= 33 then ppl = ppl elseif match(ppl, "st$") then ppl = gsub(ppl, "st", "št") elseif match(ppl, "[sš]$") then ppl = palatalize_final_cons(ungeminate_final(ppl)) .. "t" elseif match(ppl, "[kpt]$") then ppl = palatalize_final_cons(ungeminate_final(ppl)) .. "ț" else ppl = palatalize_final_cons(ungeminate_final(ppl)) .. "ḑ" end pl2 = make_plain(pl2) else pl2 = stem end if bisyllabic_a_stem2_gem[typeno] then stem2 = geminate_final(stem2) end local ilpl, elpl if typeno <= 20 then ilpl = palatalize_final_cons(make_broken(pl2)) .. "ži" elpl = palatalize_final_cons(make_broken(pl2)) .. "šti" elseif typeno <= 24 then ilpl = palatalize_final_cons(pl2) .. "ži" elpl = palatalize_final_cons(pl2) .. "šti" elseif typeno == 33 then ilpl = { pl2 .. "ži", stem .. "iž" } elpl = { pl2 .. "šti", stem .. "ist" } elseif 34 <= typeno and typeno <= 35 then ilpl = { palatalize_final_cons(pl2) .. "ži", stem .. "iž" } elpl = { palatalize_final_cons(pl2) .. "šti", stem .. "ist" } else local ii = is_final_vowel_short(stem) and "ī" or "i" ilpl = stem .. ii .. get_illative_z(stem) elpl = stem .. ii .. "st" end if typeno == 54 then -- 54 is too different from everything else return make_forms { nsg = stem .. a, gsg = stem .. a, psg = stem2 .. "õ", dsg = stem .. a, inssg = stem2 .. "õ", ilsg = stem2 .. "õ", elsg = stem .. a, npl = stem2 .. "õd", ppl = stem2 .. "id", dpl = stem2 .. "õdõ", ilpl = stem2 .. "iž", elpl = stem2 .. "ist", } end return make_forms { nsg = stem .. a, gsg = stem .. a, psg = stem2 .. (typeno == 53 and "i" or "õ"), dsg = stem .. a, inssg = stem .. a, ilsg = stem2 .. "õ", elsg = stem .. a, npl = stem .. a .. "d", ppl = ppl or stem .. (is_final_vowel_short(stem) and "īd" or "id"), dpl = stem .. a .. "dõ", ilpl = ilpl, elpl = elpl, } end for i = 18, 54 do inflections[i] = infl_bisyllabic_a_final end -- Handles types 55-58 local function infl_bisyllabic_a_final_invariant(typeno, data) local lemma = data.title local stem = data.no_singular and get_stem(lemma, "d") or lemma local a stem, a = get_stem(stem, "[" .. vowels .. "]") if data.genlemma then error("genlemma not supported for this type") end -- One stem. local psg if typeno == 55 then psg = stem .. "õ" elseif typeno == 56 then psg = stem .. a else psg = stem .. a .. "zt" end local ilsg if typeno == 55 then ilsg = stem .. "õ" else ilsg = stem .. a .. "z" end local pl = stem .. ((is_final_vowel_short(stem) and typeno >= 57) and "ī" or "i") return make_forms { nsg = stem .. a, gsg = stem .. a, psg = psg, dsg = stem .. a, ilsg = ilsg, elsg = stem .. a, npl = stem .. a .. "d", ppl = pl .. "d", dpl = stem .. a .. "dõ", ilpl = pl .. (typeno == 58 and "z" or "ž"), elpl = pl .. "st", } end for i = 55, 58 do inflections[i] = infl_bisyllabic_a_final_invariant end -- Nominal types within 59-114 with length variation between stems local bisyllabic_v_stem2_lenvar = listToSet({ 63, 67, 70 }) -- Nominal types within 59-114 with a broken tone in the nominative singular local bisyllabic_v_stem2_broken_nom_sg = listToSet({ 59, 60, 64, 72, 73, 74, 75, 76, 81, 82, 83, 84, 85, 86, 87, 88, 89 }) -- Nominal types within 59-114 with -ž in the nominative singular and -d- in the stem local bisyllabic_v_zh_d = listToSet({ 86, 87, 88, 112, 113 }) -- Nominal types within 59-114 that introduce diphthongs of this type into stems from long vowels local bisyllabic_v_stem2_diphthongize = { [107] = "i", [108] = "i", [109] = "i", [93] = "u", [98] = "u", [106] = "u", [112] = "u", } -- Nominal types within 59-114 that ban gemination of the stem local bisyllabic_v_no_gem_stem = listToSet({ 60, 75, 93, 98, 107, 108, 109 }) -- Nominal types within 59-114 that always have a long ī in the plural stem local bisyllabic_v_always_plural_ii = listToSet({ 60, 75 }) -- Nominal types within 59-114 that have palatalization in nom.sg. only local bisyllabic_v_palatalized_nom_sg = listToSet({ 78, 89, 96, 110, 111, 112, 113 }) -- Handles types 59-114 except 71, 90, 91 local function infl_bisyllabic_v_final(typeno, data) local lemma = data.title local stem, stem2 if data.genlemma then error("genlemma not supported for this type") end -- Final stem vowel. local pl_v if typeno <= 71 then pl_v = "i" elseif typeno <= 91 then pl_v = "ū" else pl_v = "õ" end local lenvar = bisyllabic_v_stem2_lenvar[typeno] or typeno >= 92 local nsg -- Two stems, the nominative stem and plural stem stem2. if data.no_singular then stem2 = get_stem(lemma, "d") if pl_v == "i" then stem2 = get_stem(stem2, "[iī]") else stem2 = get_stem(stem2, pl_v) end stem = stem2 if lenvar then stem = do_vowel_long_to_short(stem2, bisyllabic_v_stem2_diphthongize[typeno]) end if typeno == 83 then -- mier- > mer- stem = gsub(stem, "%f[" .. vowels .. "]ie([^" .. vowels .. "]*)$", "e%1") elseif typeno == 95 or typeno == 109 then -- puort- > pȯrt- stem = gsub(stem, "%f[" .. vowels .. "]uo([^" .. vowels .. "]*)$", "ȯ%1") end if bisyllabic_v_stem2_broken_nom_sg[typeno] then stem = make_broken(stem) end if typeno == 108 or typeno == 109 then stem = gsub(stem, "š$", "s") end if bisyllabic_v_zh_d[typeno] then stem = gsub(stem, "d$", "ž") if typeno == 87 then -- käd- > ked- stem = gsub(stem, "%f[" .. vowels .. "]ä([^" .. vowels .. "]*)$", "e%1") elseif typeno == 88 then -- vied- > ved- stem = gsub(stem, "%f[" .. vowels .. "]ie([^" .. vowels .. "]*)$", "e%1") end end if bisyllabic_v_palatalized_nom_sg[typeno] then stem = palatalize_final_cons(stem) end else stem = lemma if bisyllabic_v_zh_d[typeno] then nsg = stem stem = get_stem(stem, "ž") .. "d" if typeno == 87 then -- ked- > käd- stem = gsub(stem, "%f[" .. vowels .. "]e([^" .. vowels .. "]*)$", "ä%1") elseif typeno == 88 then -- ved- > vied- stem = gsub(stem, "%f[" .. vowels .. "]e([^" .. vowels .. "]*)$", "ie%1") end if bisyllabic_v_palatalized_nom_sg[typeno] then stem = depalatalize_final_cons(stem) end elseif bisyllabic_v_palatalized_nom_sg[typeno] then nsg = stem stem = depalatalize_final_cons(stem) elseif typeno == 83 then -- me'r- -> mie'r- nsg = stem stem = gsub(stem, "%f[" .. vowels .. "]e([^" .. vowels .. "]*)$", "ie%1") elseif typeno == 101 then -- täm -> tam- nsg = stem stem = gsub(stem, "%f[" .. vowels .. "]ä([^" .. vowels .. "]*)$", "a%1") end stem2 = stem if bisyllabic_v_stem2_broken_nom_sg[typeno] then stem2 = make_plain(stem2) end if lenvar then stem2 = do_vowel_short_to_long(stem2, typeno >= 107) end if typeno == 83 then -- mer- -> mier- stem2 = gsub(stem2, "%f[" .. vowels .. "]e([^" .. vowels .. "]*)$", "ie%1") elseif typeno == 95 or typeno == 109 then -- pȱrt- -> pūort- stem2 = gsub(stem2, "%f[" .. vowels .. "]ȱ(i?[^" .. vowels .. "]*)$", "ūo%1") elseif typeno == 100 or typeno == 101 or typeno == 104 then -- tām- -> tǭm- stem2 = gsub(stem2, "%f[" .. vowels .. "]ā([^" .. vowels .. "]*)$", "ǭ%1") end if typeno == 108 or typeno == 109 then stem2 = gsub(stem2, "s$", "š") end if typeno == 97 then stem2 = gsub(stem2, "t$", "") end end nsg = nsg or stem local gemstem = geminate_final(stem) -- Partitive singular. local psg if (81 <= typeno and typeno <= 89) or (110 <= typeno and typeno <= 114) then psg = stem if typeno ~= 84 then psg = make_plain(psg) end if not (84 <= typeno and typeno <= 89) then psg = do_vowel_short_to_long(psg) end if match(psg, "d$") or typeno == 84 then psg = gsub(psg, "d$", "") .. "t" elseif typeno == 110 then psg = gsub(psg, "g$", "") .. "t" elseif typeno <= 83 then psg = psg .. "d" else psg = psg .. "t" end psg = gsub(psg, "md$", "nd") if typeno <= 83 or typeno >= 110 then psg = psg .. "a" elseif typeno == 84 then psg = psg .. "õ" else psg = psg .. "ā" end else psg = gemstem .. "õ" end -- Instructive singular. local inssg if typeno <= 60 or typeno == 64 or (72 <= typeno and typeno <= 76) or (81 <= typeno and typeno <= 94) or (96 <= typeno and typeno <= 97) or (110 <= typeno and typeno <= 114) then if match(stem, "k$") then inssg = stem .. "õ" else inssg = stem .. "kõ" end else inssg = gemstem .. "õ" end -- Elative singular. local elsg if (68 <= typeno and typeno <= 71) or typeno == 80 or typeno == 89 or (105 <= typeno and typeno <= 109) then elsg = gemstem .. "õ" elseif typeno == 114 then elsg = gsub(gemstem, "z$", "") .. "gõ" else elsg = stem end -- Nominative plural. local pl2 = stem2 .. ((is_final_vowel_short(stem2) or bisyllabic_v_always_plural_ii[typeno]) and "ī" or "i") local npl = (pl_v == "i" and pl2 or stem2 .. pl_v) .. "d" -- Partitive plural. local ppl if typeno == 72 or typeno == 92 then ppl = stem .. "ḑ" elseif typeno == 73 or typeno == 93 then ppl = palatalize_final_cons(stem) .. "ḑ" elseif typeno == 83 then ppl = palatalize_final_cons(make_plain(nsg)) .. "ḑ" elseif 86 <= typeno and typeno <= 89 then ppl = geminate_final(nsg) elseif 110 <= typeno and typeno <= 113 then ppl = nsg else ppl = pl2 .. "d" end -- Illative/elative plural. if 87 <= typeno and typeno <= 89 then pl2 = make_plain(nsg) pl2 = pl2 .. (is_final_vowel_short(pl2) and "ī" or "i") end local z = get_illative_z(pl2) local ilpl local elpl if 72 <= typeno and typeno <= 75 then ilpl = palatalize_final_cons(stem) .. z .. "i" elseif 112 <= typeno and typeno <= 113 then ilpl = palatalize_final_cons(nsg) .. "iz" else ilpl = pl2 .. z end if 112 <= typeno and typeno <= 113 then elpl = palatalize_final_cons(gsub(stem, "d$", "ž")) .. "ist" elseif (72 <= typeno and typeno <= 75) or (110 <= typeno and typeno <= 111) then elpl = palatalize_final_cons(stem) .. "šti" elseif typeno == 83 then elpl = palatalize_final_cons(nsg) .. "šti" elseif (81 <= typeno and typeno <= 84) then elpl = make_broken(stem) .. "šti" else elpl = pl2 .. "st" end return make_forms { nsg = nsg, gsg = stem, psg = psg, dsg = gemstem .. "õ", inssg = inssg, ilsg = gemstem .. (typeno == 114 and "gõ" or "õ"), elsg = elsg, npl = npl, ppl = ppl, dpl = npl .. "õ", ilpl = ilpl, elpl = elpl, } end for i = 59, 114 do inflections[i] = infl_bisyllabic_v_final end inflections[71] = function (typeno, data) local lemma = data.title local stem = lemma if data.genlemma then error("genlemma not supported for this type") end if data.no_singular then stem = get_stem(stem, "d") end return make_forms { nsg = stem, gsg = stem, psg = stem, dsg = stem, ilsg = stem .. OPT_ILL_Z, elsg = stem, npl = stem .. "d", ppl = stem .. "d", dpl = stem .. "dõ", ilpl = stem .. "ž", elpl = stem .. "sti", } end inflections[90] = function (typeno, data) local lemma = data.title local stem = lemma if data.genlemma then error("genlemma not supported for this type") end if data.no_singular then stem = get_stem(stem, "d") end local stempl = gsub(stem, "[" .. vowels .. "]$", "ī") return make_forms { nsg = stem, gsg = stem, psg = stem, dsg = stem, ilsg = stem .. OPT_ILL_Z, elsg = stem, npl = stem .. "d", ppl = stempl .. "d", dpl = stem .. "dõ", ilpl = stempl .. "ž", elpl = stempl .. "st", } end inflections[91] = function (typeno, data) local lemma = data.title local stem = lemma if data.genlemma then error("genlemma not supported for this type") end if data.no_singular then stem = get_stem(stem, "d") end return make_forms { nsg = stem, gsg = stem, psg = stem, dsg = stem, ilsg = stem .. OPT_ILL_Z, elsg = stem, npl = stem .. "d", ppl = stem .. "d", dpl = stem .. "dõ", ilpl = stem .. "iž", elpl = stem .. "ist", } end -- Handles types 115-121 local function infl_bisyllabic_v_final_v(typeno, data) local lemma = data.title local stem, v if data.genlemma then error("genlemma not supported for this type") end if data.no_singular then stem = get_stem(lemma, "d") stem, v = get_stem(stem, "õ") else stem, v = get_stem(lemma, "õ?") end local stemv = stem .. "õ" local psg if typeno >= 118 then psg = stemv elseif typeno == 117 then psg = gsub(stem, "d[" .. vowels .. "]g$", "") .. "ta" else psg = gsub(do_vowel_short_to_long(stem), "([^" .. vowels .. "])g", "%1") .. (typeno == 116 and "ța" or "ta") end return make_forms { nsg = lemma, gsg = lemma, psg = psg, dsg = stemv, ilsg = stemv .. (#v > 0 and OPT_ILL_Z or ""), elsg = stemv, npl = stemv .. "d", ppl = stem .. "id", dpl = stemv .. "dõ", ilpl = stem .. "i" .. get_illative_z(stem), elpl = stem .. "ist", } end for i = 115, 121 do inflections[i] = infl_bisyllabic_v_final_v end -- Handles types 122-150 local function infl_cons_misc(typeno, data) local lemma = data.title local stem = lemma if data.genlemma then error("genlemma not supported for this type") end -- No gemination for 131 local possibly_geminate_final = typeno == 131 and identity or geminate_final if data.no_singular then stem = ungeminate_final(get_stem(stem, "õ?d")) if typeno == 127 or typeno == 146 or typeno == 147 then stem = palatalize_final_cons(stem) end if typeno == 146 or typeno == 150 then -- tǟ’d- > tē’d- stem = gsub(stem, "%f[" .. vowels .. "]ǟ(" .. apos .. "?)([^" .. vowels .. "]*)$", "ē%1%2") elseif typeno == 147 then -- lī’ed- > lē’d- stem = gsub(stem, "%f[" .. vowels .. "]ī(" .. apos .. "?)e([^" .. vowels .. "]*)$", "ē%1%2") end if typeno >= 148 then stem = get_stem(stem, "d") if typeno >= 149 then stem = palatalize_final_cons(stem) end stem = stem .. "tš" end end local nsg = stem if typeno == 127 or typeno == 146 or typeno == 147 then stem = depalatalize_final_cons(stem) elseif typeno >= 148 then stem = get_stem(stem, "tš") if typeno >= 149 then stem = depalatalize_final_cons(stem) end stem = stem .. "d" end -- Genitive and partitive singular local stemv local gsg local psg if 137 <= typeno and typeno <= 139 then stemv = gsub(stem, "[dt]$", "") .. "õ" gsg = typeno == 139 and stem or { stem, stemv } psg = stem .. "õ" elseif typeno >= 146 then if typeno == 146 or typeno == 150 then -- tē’d- > tǟ’d- stem = gsub(stem, "%f[" .. vowels .. "]ē(" .. apos .. "?)([^" .. vowels .. "]*)$", "ǟ%1%2") elseif typeno == 147 then -- lē’d- > lī’ed- stem = gsub(stem, "%f[" .. vowels .. "]ē(" .. apos .. "?)([^" .. vowels .. "]*)$", "ī%1e%2") end stemv = stem .. "õ" psg = stem .. "tõ" else stemv = possibly_geminate_final(stem) .. "õ" psg = stemv end gsg = gsg or stem -- Dative and instrumental singular local dsg, inssg if typeno == 139 then dsg, inssg = stem .. "õ", stemv elseif typeno <= 145 then dsg, inssg = stemv, stemv elseif typeno <= 147 then dsg, inssg = stemv, stem .. "kõ" else dsg, inssg = stem .. "õ", stem .. "kõ" end -- Partitive plural local ppl if typeno <= 124 then ppl = stem .. "ḑ" elseif typeno == 127 then ppl = possibly_geminate_final(do_vowel_short_to_long(stem)) .. "id" elseif 137 <= typeno and typeno <= 139 then local nsg_no_t = gsub(nsg, "[td]$", "") ppl = nsg_no_t .. "id" elseif typeno >= 146 then ppl = nsg else ppl = possibly_geminate_final(stem) .. "id" end -- Illative singular local ilsg if typeno == 139 then ilsg = stem .. "õ" else ilsg = stemv end -- Elative singular local elsg if typeno <= 134 or typeno >= 146 then elsg = stem else elsg = stemv end -- Illative and elative plural local plstem, ilpl, elpl if typeno <= 124 then plstem = stem ilpl = nsg .. get_illative_z(nsg) .. "i" elpl = nsg .. "šti" elseif 137 <= typeno and typeno <= 139 then local nsg_no_t = gsub(nsg, "[td]$", "") plstem = stemv ilpl = possibly_geminate_final(nsg_no_t) .. "i" .. get_illative_z(nsg_no_t) elpl = possibly_geminate_final(nsg_no_t) .. "ist" elseif 148 <= typeno and typeno <= 149 then plstem = stemv ilpl = possibly_geminate_final(stem) .. "i" .. get_illative_z(stem) elpl = possibly_geminate_final(stem) .. "ist" else plstem = stemv ilpl = possibly_geminate_final(nsg) .. "i" .. get_illative_z(nsg) elpl = possibly_geminate_final(nsg) .. "ist" end return make_forms { nsg = nsg, gsg = gsg, psg = psg, dsg = dsg, inssg = inssg, ilsg = ilsg, elsg = elsg, npl = plstem .. "d", ppl = ppl, dpl = plstem .. "dõ", inspl = plstem .. ((typeno == 123 or typeno == 124) and "dkõ" or "dõ"), ilpl = ilpl, elpl = elpl, } end for i = 122, 150 do inflections[i] = infl_cons_misc end -- Handles types 151-156 local function infl_cons_final_m(typeno, data) local lemma = data.title local stem local c if data.genlemma then error("genlemma not supported for this type") end if data.no_singular then stem = get_stem(lemma, "õd") stem, c = get_stem(stem, "[^" .. vowels .. "]") stem = ungeminate_final(stem) if typeno >= 153 then stem = gsub(stem, c .. "$", "õ" .. c) end else stem, c = get_stem(lemma, "[^" .. vowels .. "]") end local stem1m = stem .. c local stem1mg if typeno <= 152 then stem1mg = geminate_final(stem1m) else stem1mg = stem1m end local stem1mv = stem1mg .. "õ" local stem2m if typeno <= 152 then stem2m = stem1mg else stem2m = gsub(stem, "[" .. vowels .. "]+$", "") if typeno == 153 then stem2m = make_broken(stem2m) elseif typeno >= 155 then stem2m = do_vowel_long_to_short(stem2m, typeno == 156 and "i" or "") end stem2m = stem2m .. "m" end return make_forms { nsg = stem1m, gsg = stem1m, psg = append_monopoly(stem1m, "tõ", "t"), dsg = stem1mv, inssg = typeno <= 152 and stem1m .. "kõ" or stem1mv, ilsg = stem1mv, elsg = typeno <= 152 and stem1m or stem1mv, npl = stem2m .. "õd", ppl = stem2m .. "id", dpl = stem2m .. "õdõ", ilpl = stem2m .. "i" .. get_illative_z(stem2m), elpl = stem2m .. "ist", } end for i = 151, 156 do inflections[i] = infl_cons_final_m end -- Handles types 157-162 local function infl_cons_final_c_invariant(typeno, data) local lemma = data.title local stem = lemma if data.genlemma then error("genlemma not supported for this type") end if data.no_singular and typeno < 161 then stem = get_stem(stem, "õd") end -- Elative singular local elsg if typeno >= 161 then elsg = gsub(lemma, "d$", "") elseif typeno == 157 then elsg = lemma .. "õ" else elsg = lemma end local bare if typeno >= 161 then bare = gsub(lemma, "õd$", "") else bare = stem end return make_forms { nsg = stem, gsg = stem, psg = append_monopoly(stem, "tõ", "t"), dsg = bare .. "õ", ilsg = bare .. (typeno >= 161 and "õz" or "õ"), elsg = elsg, npl = bare .. "õd", ppl = bare .. "id", dpl = (typeno >= 161 and stem .. "õ" or stem .. "õdõ"), ilpl = bare .. "iž", elpl = bare .. "ist", } end for i = 157, 162 do inflections[i] = infl_cons_final_c_invariant end -- Handles types 163-165 local function infl_cons_final_z_nd(typeno, data) local lemma = data.title local stem if data.genlemma then error("genlemma not supported for this type") end if data.no_singular then stem = get_stem(lemma, "ndõd") else stem = get_stem(lemma, "z") end local stem_nd = gsub(stem, "n$", "") .. "nd" local stem_ndv = stem_nd .. "õ" return make_forms { nsg = stem .. "z", gsg = stem_nd, psg = stem_nd .. "t", dsg = stem_ndv, ilsg = stem_ndv, elsg = stem_ndv, npl = stem_ndv .. "d", ppl = stem_nd .. "id", dpl = stem_ndv .. "dõ", ilpl = stem_nd .. "i" .. get_illative_z(stem_nd), elpl = stem_nd .. "ist", } end for i = 163, 165 do inflections[i] = infl_cons_final_z_nd end -- Nominal types within 166-185 that introduce diphthongs of this type into stems from long vowels local cons_final_z_diphthongize = { [176] = "i", [177] = "u" } -- Handles types 166-185 local function infl_cons_final_z(typeno, data) local lemma = data.title if data.genlemma then error("genlemma not supported for this type") end local stem if data.no_singular then local v stem, v = get_stem(lemma, "d") if typeno >= 170 then stem, v = get_stem(stem, "[aāõ]") if typeno <= 178 then stem = ungeminate_final(stem) end if 173 <= typeno and typeno <= 178 then stem = do_vowel_short_to_long(stem) if typeno == 175 then -- pāļ- > pǭļ- stem = gsub(stem, "%f[" .. vowels .. "]ā(" .. apos .. "?)([^" .. vowels .. "]*)$", "ǭ%2") elseif typeno == 178 then -- pȱrz- > pūor- stem = gsub(stem, "%f[" .. vowels .. "]ȱ(" .. apos .. "?)([^" .. vowels .. "]*)$", "ū%1o%2") stem = gsub(stem, "z$", "") end end stem = stem .. v end else stem = get_stem(lemma, "z") end local a if typeno <= 167 then -- Special case 166, 167 local stemv = make_broken(stem) local stemvg = geminate_final(stemv) local plstem = stemv if typeno == 166 then plstem = gsub(plstem, "%f[" .. vowels .. "]ī(" .. apos .. "?)e([^" .. vowels .. "]*)$", "ē%1%2") end return make_forms { nsg = stem .. "z", gsg = stemv, psg = append_monopoly(stem, "ztõ", "zt"), dsg = gsub(stemvg, "([^" .. vowels .. "])$", "%1õ"), inssg = stemv .. "kõ", ilsg = typeno == 166 and stemv .. "zõ" or stemvg .. "õ", elsg = stemv, npl = stemv .. "d", ppl = plstem .. "ḑ", dpl = stemv .. "dõ", inspl = stemv .. "dkõ", ilpl = plstem .. get_illative_z(plstem) .. "i", elpl = plstem .. "šti", } end stem, a = get_stem(stem, "[aāõ]") -- Two stems: stem (nominative) and stem2 (illative). local stem2 if typeno <= 169 then stem2 = make_broken(stem) elseif typeno >= 179 then stem2 = stem else stem2 = stem if 173 <= typeno and typeno <= 178 then stem2 = do_vowel_long_to_short(stem2, cons_final_z_diphthongize[typeno]) if typeno == 178 then -- puor- > pȯrz- stem2 = gsub(stem2, "%f[" .. vowels .. "]uo(" .. apos .. "?)([^" .. vowels .. "]*)$", "ȯ%1%2") stem2 = gsub(stem2, "r$", "rz") end end stem2 = geminate_final(stem2) end local stem1a = stem .. a local stem2v = stem2 .. "õ" local stempl = typeno <= 172 and stem .. "ī" or stem2 .. "i" return make_forms { nsg = stem1a .. "z", gsg = typeno == 168 and stem1a or stem2v, psg = stem1a .. "zt", dsg = typeno <= 170 and stem1a or stem2v, ilsg = stem2v .. OPT_ILL_Z, elsg = typeno <= 172 and stem1a or stem2v, npl = (typeno <= 169 and stem1a or stem2v) .. "d", ppl = stempl .. "d", dpl = (typeno <= 169 and stem1a or stem2v) .. "dõ", ilpl = stempl .. get_illative_z(stempl), elpl = stempl .. "st", } end for i = 166, 185 do inflections[i] = infl_cons_final_z end -- Nominal types within 186-202 that have ī in the stem for oblique forms. local cons_i_iz_long_i = listToSet({ 192, 193, 194, 195, 198 }) -- Handles types 186-202 local function infl_cons_i_iz(typeno, data) local lemma = data.title local stem, i stem = lemma if data.no_singular then if match(stem, "zt$") then stem = get_stem(stem, "zt") else stem = get_stem(stem, "d") end elseif data.genlemma then stem = get_stem(stem, "z") end stem, i = get_stem(stem, "[iī]") local stem2 -- Two stems: nominative (stem) and genitive (stem2) if 192 <= typeno and typeno <= 195 then stem2 = ungeminate_final(make_plain(stem)) elseif 196 <= typeno and typeno <= 197 then stem2 = do_vowel_short_to_long(stem) else stem2 = stem end local ii = cons_i_iz_long_i[typeno] and "ī" or "i" -- Partitive singular local psg if typeno == 191 then psg = do_vowel_short_to_long(stem) .. "izta" elseif typeno <= 189 or typeno >= 201 then psg = { stem2 .. ii .. "zt", stem2 .. ii .. "t" } else psg = stem2 .. ii .. "zt" end -- Elative singular local elsg if typeno == 190 then elsg = stem2 .. ii elseif typeno == 186 or typeno == 188 or typeno == 189 or typeno == 191 then elsg = { stem2 .. ii .. "zõ", stem2 .. ii } else elsg = stem2 .. ii .. "zõ" end local dpl_base = stem .. i .. "zt" local ilpl_base = stem2 .. ii .. "ž" local stems = { nsg = stem .. i, gsg = stem2 .. ii .. "z", psg = psg, dsg = typeno == 190 and (stem2 .. ii) or (stem2 .. ii .. "zõ"), ilsg = stem2 .. ii .. "zõ", elsg = elsg, npl = stem .. i .. "zt", ppl = stem2 .. ii .. "ž", dpl = dpl_base .. "õ", inspl = dpl_base .. (typeno == 191 and "kõ" or "õ"), ilpl = ilpl_base .. "i" .. get_illative_z(ilpl_base), elpl = ilpl_base .. "ist", } if typeno == 187 or typeno == 190 then stems.npl = stem .. ii .. "d" stems.ppl = stem .. ii .. "d" stems.dpl = stem .. ii .. "dõ" stems.inspl = stem .. ii .. "dõ" stems.ilpl = ilpl_base stems.elpl = stem .. "isti" elseif typeno <= 189 then stems.npl = join(stems.npl, stem .. ii .. "d") stems.ppl = join(stems.ppl, stem .. ii .. "d") stems.dpl = join(stems.dpl, stem .. ii .. "dõ") stems.inspl = join(stems.inspl, stem .. ii .. "dõ") stems.ilpl = join(stems.ilpl, ilpl_base .. (typeno == 186 and "i" or "")) stems.elpl = join(stems.elpl, stem .. "isti") end return make_forms(stems) end for i = 186, 202 do inflections[i] = infl_cons_i_iz end -- Handles types 203-209 local function infl_cons_z_ks(typeno, data) local lemma = data.title if data.genlemma then error("genlemma not supported for this type") end local stem = lemma if data.no_singular then stem = get_stem(stem, "t") end local stemv = stem .. "õ" local stempl = palatalize_final_cons(stem) if typeno == 204 then -- nȭŗkõ- > nȭŗki- stempl = gsub(stempl, "%f[" .. vowels .. "]õ([^" .. vowels .. "]*)$", "i%1") end return make_forms { nsg = stem, gsg = stem, psg = stem .. "t", dsg = stemv, ilsg = stemv, elsg = stemv, npl = stem .. "t", ppl = stempl, dpl = (typeno == 209 and stempl or stem) .. "tõ", ilpl = stempl .. "i" .. get_illative_z(stempl), elpl = stempl .. "ist", } end for i = 203, 209 do inflections[i] = infl_cons_z_ks end -- Nominal types within 210-223: nom->gen consonant alternations local cons_mono_i_cons_altern = { [217] = { "kš", "d" }, [218] = { "kš", "d" }, [219] = { "ž", "d" }, } -- Nominal types within 210-223: vowel alternations local cons_mono_i_vowel_altern = { [211] = { "ä", "a" }, [215] = { "ē", "īe" }, [217] = { "i", "ī" }, [218] = { "a", "ǭ" }, [220] = { "ē", "īe" }, [223] = { "ē", "ǟ" }, } -- Nominal types within 210-223 with plain/broken tone alternations local cons_mono_i_plain_broken = listToSet({ 217, 218 }) -- Nominal types within 210-223 with -kõ- in the instructive singular. local cons_mono_i_inssg_k = listToSet({ 213, 214, 215, 216, 217, 218, 219, 220, 221, 223 }) -- Handles types 210-223 local function infl_cons_mono_i(typeno, data) local lemma = data.title if data.genlemma then error("genlemma not supported for this type") end -- Two stems: stem (nominative singular, some plural forms) and stem2 local stem if data.no_singular then if 217 <= typeno and typeno <= 219 then stem = lemma else stem = get_stem(lemma, "[dt]") end if cons_mono_i_plain_broken[typeno] then stem = make_plain(stem) end if cons_mono_i_cons_altern[typeno] then local c1, c2 = unpack(cons_mono_i_cons_altern[typeno]) stem = get_stem(stem, c2) .. c1 elseif typeno ~= 212 and typeno ~= 222 then stem = palatalize_final_cons(stem) end if cons_mono_i_vowel_altern[typeno] then local v1, v2 = unpack(cons_mono_i_vowel_altern[typeno]) stem = gsub(stem, "%f[" .. vowels .. "]" .. v2 .. "([^" .. vowels .. "]*)$", v1 .. "%1") end else stem = lemma end local stem2 = stem if cons_mono_i_cons_altern[typeno] then local c1, c2 = unpack(cons_mono_i_cons_altern[typeno]) stem2 = get_stem(stem2, c1) .. c2 else stem2 = depalatalize_final_cons(stem2) end if cons_mono_i_vowel_altern[typeno] then local v1, v2 = unpack(cons_mono_i_vowel_altern[typeno]) stem2 = gsub(stem2, "%f[" .. vowels .. "]" .. v1 .. "([^" .. vowels .. "]*)$", v2 .. "%1") end if cons_mono_i_plain_broken[typeno] then stem2 = make_broken(stem2) end -- Partitive singular local psg if typeno <= 212 then psg = stem2 .. "tā" elseif typeno == 213 then psg = do_vowel_short_to_long(make_plain(stem2)) .. "da" elseif typeno <= 216 then psg = stem2 .. "dõ" else psg = stem2 .. "tõ" end -- Plural forms local nsg = stem if typeno ~= 212 and typeno ~= 222 then stem = palatalize_final_cons(stem) end local stemdpl if typeno <= 212 then stemdpl = stem2 .. "t" elseif typeno <= 215 or typeno >= 220 then stemdpl = stem2 .. "d" else stemdpl = stem2 end -- Partitive plural local steminspl = typeno == 212 and stemdpl or stemdpl .. "k" local plstem = typeno == 212 and stemdpl or stem local pl_i = typeno <= 211 and "ī" or "i" local ppl if typeno == 212 then ppl = palatalize_final_cons(stem2) .. "t" elseif typeno == 213 then ppl = plstem .. "ḑ" else ppl = plstem end -- Illative plural local ilpl if typeno == 213 then ilpl = make_plain(plstem) .. "ī" elseif typeno == 217 or typeno == 218 then ilpl = stem2 .. "i" else ilpl = plstem .. pl_i end -- Elative plural local elpl if typeno <= 212 or typeno == 219 then elpl = plstem .. pl_i .. "st" elseif typeno == 217 or typeno == 218 then elpl = stem2 .. "šti" else elpl = plstem .. "šti" end return make_forms { nsg = nsg, gsg = stem2, psg = psg, dsg = geminate_final(stem2) .. "õ", inssg = cons_mono_i_inssg_k[typeno] and stem2 .. "kõ" or geminate_final(stem2) .. "õ", ilsg = geminate_final(stem2) .. "õ", elsg = typeno <= 212 and stem2 .. "õ" or stem2, npl = ungeminate_final(stem2 .. (typeno <= 212 and "t" or "d")), ppl = ppl, dpl = stemdpl .. "õ", inspl = steminspl .. "õ", ilpl = ilpl .. get_illative_z(ilpl), elpl = elpl, } end for i = 210, 223 do inflections[i] = infl_cons_mono_i end -- Nominal types within 224-242 with -õ- before the elative ending local cons_poly_elsg_vowel = listToSet({ 226, 227, 228, 229, 230, 232, 233, 234, 235, 236, 237, 238 }) -- Nominal types within 224-242 with -õ- > -i- in some plural endings local cons_poly_pl_i = listToSet({ 229, 230 }) -- Nominal types within 224-242 with -õ- > -i- and palatalization in some plural endings local cons_poly_pl_i_pal = listToSet({ 226, 227, 228, 232, 233, 234, 235, 236, 241 }) -- Handles types 224-242 local function infl_cons_poly(typeno, data) local lemma = data.title if data.genlemma then error("genlemma not supported for this type") end local nsg = lemma local stem, z if data.no_singular then stem = get_stem(lemma, "d") z = "" else stem, z = get_stem(lemma, "[zž]?") end local plstem = stem if typeno == 232 then stem = depalatalize_final_cons(stem) end if cons_poly_pl_i_pal[typeno] then plstem = gsub(plstem, "%f[" .. vowels .. "]õ([^" .. vowels .. "]*)$", "i%1") plstem = palatalize_final_cons(plstem) elseif cons_poly_pl_i[typeno] then plstem = gsub(plstem, "%f[" .. vowels .. "]õ([^" .. vowels .. "]*)$", "i%1") end return make_forms { nsg = nsg, gsg = stem, psg = stem .. (typeno >= 229 and z .. "t" or "t"), dsg = typeno == 224 and stem or stem .. "õ", ilsg = stem .. "õ", elsg = cons_poly_elsg_vowel[typeno] and stem .. "õ" or stem, npl = stem .. "d", ppl = typeno <= 225 and plstem .. "ḑ" or plstem, dpl = stem .. "dõ", inspl = stem .. (typeno <= 225 and "dkõ" or "dõ"), ilpl = typeno <= 225 and plstem .. get_illative_z(plstem) .. "i" or plstem .. "i" .. get_illative_z(plstem), elpl = typeno <= 225 and plstem .. "šti" or plstem .. "ist", } end for i = 224, 242 do inflections[i] = infl_cons_poly end -- inflection classes end local decl_table_base = [=[ ! ! ကိုန်ဨကဝုစ် <small>({{l|liv|ikšlu’g}})</small> ! ကိုန်ဗဟုဝစ် <small>({{l|liv|pǟgiņlu’g}})</small> |- ! မဒုၚ်ယၟု <small>({{l|liv|nominatīv}})</small> | {{{sg_nom}}} | {{{pl_nom}}} |- ! ဗဳဇဂကူ <small>({{l|liv|genitīv}})</small> | {{{sg_gen}}} | {{{pl_gen}}} |- ! ပရေၚ်ဗက်အလိုက် <small>({{l|liv|partitīv}})</small> | {{{sg_par}}} | {{{pl_par}}} |- ! ပြကမ္မကာရက <small>({{l|liv|datīv}})</small> | {{{sg_dat}}} | {{{pl_dat}}} |- ! တိၚ်တိုက်ကပေါတ်ကွိၚ်ကွိုက် <small>({{l|liv|instrumentāl}})</small> | {{{sg_ins}}} | {{{pl_ins}}} |- ! ဟၟဲကဵုအဓိပ္ပါဲ <small>({{l|liv|illatīv}})</small> | {{{sg_ill}}} | {{{pl_ill}}} |- ! ပရေၚ်ဟွံဆေၚ်စပ် <small>({{l|liv|inesīv}})</small> | {{{sg_ine}}} | {{{pl_ine}}} |- ! မစၞောန်ထ္ၜးအဆက်နာမ် <small>({{l|liv|elatīv}})</small> | {{{sg_ela}}} | {{{pl_ela}}} ]=] local decl_table_ad = [=[ |- ! တသိုက်ပိုန်ဂြပ် <small>({{l|liv|allatīv}})</small> | {{{sg_all}}} | {{{pl_all}}} |- ! ပရေၚ်စောဲလာံ <small>({{l|liv|adesīv}})</small> | {{{sg_ade}}} | {{{pl_ade}}} |- ! ပရေၚ်မလၚ်<small>({{l|liv|ablatīv}})</small> | {{{sg_abl}}} | {{{pl_abl}}} ]=] local function tag(text) return require("Module:script utilities").tag_text(text, lang, nil, "term") end local function link(text, prefix, suffix) if prefix and find(prefix, "%[%[") then if not find(text, "%[%[") then text = "[[" .. text .. "]]" end return require("Module:script utilities").tag_text(require("Module:links").language_link{ term = (prefix and prefix or "") .. text, lang = lang } .. (suffix and suffix or ""), lang) else return require("Module:script utilities").tag_text((prefix and prefix or "") .. require("Module:links").language_link{ term = text, lang = lang } .. (suffix and suffix or ""), lang) end end local function mention(text) return require("Module:links").full_link({ term = text, lang = lang }, "term") end local function mention_with_gloss(text, gloss) return require("Module:links").full_link({ term = text, lang = lang, gloss = gloss }, "term") end local function help_tooltip(text) return "<sup>" .. tostring(mw.html.create("span"):attr("style", "cursor:help"):attr("title", text):wikitext("?")) .. "</sup>" end local function note_reference(note) if note then return "<sup>" .. note .. ")</sup>" else return "" end end local function note_text(reference, text) return note_reference(reference) .. " " .. text end -- extract notes from forms into a list and replace by their index local function format_notes_for_form(data, form) local note = form.note if note then local index = data.notes_reverse[note] if index then form.note = index else index = tostring(#data.notes + 1) table.insert(data.notes, note) data.notes_reverse[note] = index form.note = index end end end local function format_notes(data, forms) data.notes = {} data.notes_reverse = {} for k, v in pairs(forms) do if type(v) == "table" then if v[1] then for _, form in ipairs(v) do if type(form) == "table" then format_notes_for_form(data, form) end end else format_notes_for_form(data, v) end end end data.notes_reverse = nil end local commabelow = char(0x326) local function normalize(word) word = gsub(word, "[ţ']", { ["ţ"] = "ț", ["'"] = "’" }) word = gsub(word, "d"..commabelow, "ḑ") word = gsub(word, "_", " ") return word end function export.raw(inflected_part, infl_type, word_prefix, args) if not infl_type then error("inflection class not specified") end args = args or {} local infl = inflections[infl_type] or error("unsupported inflection type") inflected_part = normalize(inflected_part) local data = { title = inflected_part, args = args, prefix = word_prefix } if args["n"] then if args["n"] == "s" or args["n"] == "sg" then data.no_plural = true elseif args["n"] == "p" or args["n"] == "pl" then data.no_singular = true end elseif args["sg"] then data.no_plural = true elseif args["pl"] then data.no_singular = true end if args["ad"] then data.has_ad = true end if args["genlemma"] then data.genlemma = true end local forms = infl(infl_type, data) postprocess(data, forms) return forms end local function parse_inflections(args, title) local infl_type = args[1] if not infl_type then error("inflection class not specified") end local infl_types = {} for itype in infl_type:gmatch("[^/]+") do local itypeno = tonumber(itype) if not itypeno then error("inflection types must be numbers") end table.insert(infl_types, itypeno) end local function make_data(prefix, lemma) return { title = lemma, args = args, prefix = prefix } end local infl_datas if not args[2] then args[2] = title end local respelled = "" local word_prefix = "" local word_suffix = args["suffix"] infl_datas = {} local i = 2 while args[i] do local normarg = normalize(args[i]) if match(normarg, "^%s*$") then if not match(respelled, "^%s*$") then table.insert(infl_datas, make_data(word_prefix, respelled)) end word_prefix = "" else word_prefix = word_prefix .. respelled end respelled = normalize(args[i]) i = i + 1 end table.insert(infl_datas, make_data(word_prefix, respelled)) if #infl_types ~= #infl_datas then error("Different number of inflection types and inflectable parts specified") end return infl_types, infl_datas end local function combine_forms(infl_results) if #infl_results <= 1 then return infl_results[1] end local final_result = {} local function find_next(form, result, index) if index > #infl_results then if not final_result[form] then final_result[form] = {} end table.insert(final_result[form], result) else local v = infl_results[index][form] if v == nil then -- do nothing elseif type(v) == "string" then find_next(form, result .. v, index + 1) else for _, f in ipairs(v) do if f then find_next(form, result .. f, index + 1) end end end end end for form, _ in pairs(infl_results[1]) do find_next(form, "", 1) end return final_result end function export.show(frame) local args = frame:getParent().args local title = args["title"] or mw.loadData("Module:headword/data").pagename local infl_types, infl_datas = parse_inflections(args, title) local word_suffix = args["suffix"] if word_suffix then infl_datas[#infl_datas].suffix = word_suffix end local joined = {} for _, data in ipairs(infl_datas) do table.insert(joined, (data.prefix or "") .. data.title) end joined = table.concat(joined) if lang:stripDiacritics(joined) ~= title then error("Respelling does not match title") end for _, data in ipairs(infl_datas) do if match(data.title, "^%u%U") then data.capitalize = true data.title = gsub(data.title, "^%u", lower) end end local categories = {} local all_data = {} if args["n"] then if args["n"] == "s" or args["n"] == "sg" then all_data.no_plural = true elseif args["n"] == "p" or args["n"] == "pl" then all_data.no_singular = true end elseif args["sg"] then all_data.no_plural = true elseif args["pl"] then all_data.no_singular = true end if args["ad"] then all_data.has_ad = true end if args["genlemma"] then all_data.genlemma = true end local inflection_results = {} for index, data in ipairs(infl_datas) do for k, v in pairs(all_data) do data[k] = v end local infl_type = infl_types[index] local infl = inflections[infl_type] or error("unsupported inflection type " .. infl_type) local forms = infl(infl_type, data) postprocess(data, forms) format_notes(data, forms) table.insert(inflection_results, forms) end local forms = combine_forms(inflection_results) word_suffix = word_suffix or "" local table_title = "မလဟုတ်စှ်ေဆေၚ်စပ်ကဵု " .. mention(joined .. word_suffix) .. " ([[:en:Appendix:Livonian declension#" .. infl_types[#infl_types] .. "|" .. infl_types[#infl_types] .. "]])" local function repl(form) local prefix = "" local suffix = "" if find(form, "^%^") then local value = forms[sub(form, 2)] if type(value) == "table" and value[1] then return value[1] elseif type(value) == "string" and #value > 0 then return value else return "&mdash;" end end if find(form, "%$") then local excl = find(form, "%$") prefix = sub(form, 1, excl - 1) form = sub(form, excl + 1) end if find(form, "@") then local excl = find(form, "@") suffix = sub(form, excl + 1) form = sub(form, 1, excl - 1) end local value = forms[form] if type(value) == "table" and value[1] then local result = {} for _, f in ipairs(value) do table.insert(result, link(f, prefix, suffix)) end return table.concat(result, "<br/>") elseif type(value) == "string" and #value > 0 then return link(value, prefix, suffix) else return "&mdash;" end end local function process_text(text) local result = gsub(text, "{{{([^%}]+)}}}", repl) result = gsub(result, "{{l|liv|([^}]-)}}", link) result = gsub(result, "{{m|liv|([^|}]-)||([^}]-)}}", mention_with_gloss) result = gsub(result, "{{m|liv||([^}]-)}}", tag) result = gsub(result, "{{m|liv|([^}]-)}}", mention) return result end local notes = {} local builtin_notes = {} for index, note in ipairs(builtin_notes) do table.insert(notes, note_text(tostring(#notes + 1), process_text(note))) end for _, data in ipairs(infl_datas) do for index, note in ipairs(data.notes) do table.insert(notes, note_text(tostring(#notes + 1), note)) end end notes = table.concat(notes, "<br />") --if mw.title.getCurrentTitle().namespace == 0 then -- table.insert(categories, "Livonian " .. infl_type .. "-type nominals") --end local decl_table = decl_table_base if all_data.has_ad then decl_table = decl_table .. decl_table_ad end local result = process_text(decl_table) return require("Module:inflection-table").make_table({ title = table_title, palette = "teal", tall = "yes", notes = notes, }, result) .. require("Module:utilities").format_categories(categories, lang) end return export 8ecxuctyphxw7zalwcz3h1lf1v60i0p မဝ်ဂျူ:liv-decl/documentation 828 298564 401179 2026-08-14T07:10:36Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "{{documentation needed}}<!-- Replace this with a short description of the purpose of the module, and how to use it. --> <includeonly> {{module cat|liv}} </includeonly>" 401179 wikitext text/x-wiki {{documentation needed}}<!-- Replace this with a short description of the purpose of the module, and how to use it. --> <includeonly> {{module cat|liv}} </includeonly> oaq9z4znoxcpk51yk63p9fvbtlxj2hr 401180 401179 2026-08-14T07:10:59Z 咽頭べさ 33 咽頭べさ ပြံင်ပဆုဲလဝ် မုက်လိက် [[မဝ်ဂျူ:liv-decl/doc]] ဇရေင် [[မဝ်ဂျူ:liv-decl/documentation]] သီုကဵု ဟွံဂွံ ဂိုင်စွံလဝ် မကလေင်ပညုင် 401179 wikitext text/x-wiki {{documentation needed}}<!-- Replace this with a short description of the purpose of the module, and how to use it. --> <includeonly> {{module cat|liv}} </includeonly> oaq9z4znoxcpk51yk63p9fvbtlxj2hr ကဏ္ဍ:မဝ်ဂျူလဳၜိုနဳယာန်ဂမၠိုၚ် 14 298565 401181 2026-08-14T07:12:32Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "[[:ကဏ္ဍ:ဒၞာဲလုပ်အဝေါၚ်ကဵုပၟိက်|ဒၞာဲလုပ်အဝေါၚ်ကဵုပၟိက်]] » [[:ကဏ္ဍ:အရေဝ်ဘာသာအိုတ်သီုဂမၠိုၚ်|အရေဝ်ဘာသာအိုတ်သီုဂမၠိုၚ်]] » [[:ကဏ္ဍ:ဘာသာလဳၜိုနဳယာန်|လဳၜိုနဳယာန်]]..." 401181 wikitext text/x-wiki [[:ကဏ္ဍ:ဒၞာဲလုပ်အဝေါၚ်ကဵုပၟိက်|ဒၞာဲလုပ်အဝေါၚ်ကဵုပၟိက်]] » [[:ကဏ္ဍ:အရေဝ်ဘာသာအိုတ်သီုဂမၠိုၚ်|အရေဝ်ဘာသာအိုတ်သီုဂမၠိုၚ်]] » [[:ကဏ္ဍ:ဘာသာလဳၜိုနဳယာန်|လဳၜိုနဳယာန်]] » '''မဝ်ဂျူဂမၠိုၚ်''' :[[:ကဏ္ဍ:မဝ်ဂျူဂမၠိုၚ်|မဝ်ဂျူ]]ဘာသာလဳၜိုနဳယာန်၊ မနွံကဵုလုပ်အဝေါၚ်ကုဒ် Lua နကဵုမကၠောန်ဗဒှ် ကဵု မစဳရေၚ်ယဵုဒုၚ်သ္ပမာန်ဂမၠိုၚ်။ [[ကဏ္ဍ:ဘာသာလဳၜိုနဳယာန်]][[ကဏ္ဍ:မဝ်ဂျူဗက်အလိုက်အရေဝ်ဘာသာဂမၠိုၚ်|လ]] 3v7lmnahh92ajbx30a3ya6st3n08brv ကဏ္ဍ:မဝ်ဂျူပွမပြံၚ်လှာဲလဳၜိုနဳယာန်ဂမၠိုၚ် 14 298566 401182 2026-08-14T07:14:09Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "[[ကဏ္ဍ:မဝ်ဂျူလဳၜိုနဳယာန်ဂမၠိုၚ်]][[ကဏ္ဍ:မဝ်ဂျူဗီုအပြံၚ်အလှာဲဝေါဟာဗက်အလိုက်အရေဝ်ဘာသာဂမၠိုၚ်|လ]]" 401182 wikitext text/x-wiki [[ကဏ္ဍ:မဝ်ဂျူလဳၜိုနဳယာန်ဂမၠိုၚ်]][[ကဏ္ဍ:မဝ်ဂျူဗီုအပြံၚ်အလှာဲဝေါဟာဗက်အလိုက်အရေဝ်ဘာသာဂမၠိုၚ်|လ]] nb1083np6imdlsqnvk4my6d7qrgi1sj ကဏ္ဍ:ဝေါဟာလဳၜိုနဳယာန်ကၠုၚ်နူဝေါဟာလပ်တေန်ဂမၠိုၚ် 14 298567 401184 2026-08-14T07:17:23Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "[[ကဏ္ဍ:ဘာသာလဳၜိုနဳယာန်]]" 401184 wikitext text/x-wiki [[ကဏ္ဍ:ဘာသာလဳၜိုနဳယာန်]] 38z9r79qywamymxvm8v8w4ru52dmnp2 nominativus 0 298568 401185 2026-08-14T07:22:50Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "==ဒါတ်== ===နိရုတ်=== ဝေါဟာကၠုၚ်နူ {{bor|nl|la|nominativus}} ===နာမ်=== {{nl-noun|m|nominativi,-en|-}} # {{lb|nl|grammar}} မဆေၚ်စပ်ကဵုကိစ္စမဒုၚ်ယၟု ဝါ မအရေဝ်ပ္ဍဲအရာကိစ္စမွဲသာ်။ ==လပ်တေန်== ===ဗွဟ်ရမ္သာၚ်=== * {{la-IPA|nōminā..." 401185 wikitext text/x-wiki ==ဒါတ်== ===နိရုတ်=== ဝေါဟာကၠုၚ်နူ {{bor|nl|la|nominativus}} ===နာမ်=== {{nl-noun|m|nominativi,-en|-}} # {{lb|nl|grammar}} မဆေၚ်စပ်ကဵုကိစ္စမဒုၚ်ယၟု ဝါ မအရေဝ်ပ္ဍဲအရာကိစ္စမွဲသာ်။ ==လပ်တေန်== ===ဗွဟ်ရမ္သာၚ်=== * {{la-IPA|nōminātīvus}} ====နာမဝိသေသန==== {{la-adj|nōminātīvus}} # {{lb|la|grammar}} မဆေၚ်စပ်ကဵုပရေၚ်မဒုၚ်ယၟု။ ====လဟုတ်စှ်ေ==== {{la-adecl|nōminātīvus}} my3r8lm3paqz9j2k6z4np5lodwgki80 ကဏ္ဍ:ဝေါဟာသဒ္ဒာလပ်တေန်ဂမၠိုၚ် 14 298569 401186 2026-08-14T07:24:01Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "[[ကဏ္ဍ:ဘာသာလပ်တေန်]]" 401186 wikitext text/x-wiki [[ကဏ္ဍ:ဘာသာလပ်တေန်]] 7kzbbql5x51jv1h4u6gsvws92e6syef ကဏ္ဍ:ဝေါဟာသဒ္ဒာဒါတ်ဂမၠိုၚ် 14 298570 401187 2026-08-14T07:24:58Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "[[ကဏ္ဍ:ဘာသာဒါတ်]]" 401187 wikitext text/x-wiki [[ကဏ္ဍ:ဘာသာဒါတ်]] c43ye6pvlajmnb0hkh0gdy48uzc5m9n nominativi 0 298571 401188 2026-08-14T07:28:41Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "==ဂရိန်လာန်== ===နာမ်=== {{kl-noun}} # {{lb|kl|grammatical case}} ကိစ္စမဒုၚ်ယၟု။} ==အဳတလဳ== ====နာမဝိသေသန==== {{head|it|adjective form}} # {{adj form of|it|nominativo||m|p}} ===နာမ်=== {{head|it|noun form|g=m-p}} # {{plural of|it|nominativo}} ==လပ်တေန်== ===ဗွဟ်ရမ္သာၚ်=== * {{la-IPA|n..." 401188 wikitext text/x-wiki ==ဂရိန်လာန်== ===နာမ်=== {{kl-noun}} # {{lb|kl|grammatical case}} ကိစ္စမဒုၚ်ယၟု။} ==အဳတလဳ== ====နာမဝိသေသန==== {{head|it|adjective form}} # {{adj form of|it|nominativo||m|p}} ===နာမ်=== {{head|it|noun form|g=m-p}} # {{plural of|it|nominativo}} ==လပ်တေန်== ===ဗွဟ်ရမ္သာၚ်=== * {{la-IPA|nōminātīvī}} ====နာမဝိသေသန==== {{head|la|adjective form|head=nōminātīvī}} # {{inflection of|la|nōminātīvus||nom//voc|m|p|;|gen|m//n|s}} doegafwmr7etbjnvypizvmb5syz5cn7 ကဏ္ဍ:ဝေါဟာကိစ္စဆေၚ်စပ်ကဵုသဒ္ဒာဂရိန်လာန်ဂမၠိုၚ် 14 298572 401189 2026-08-14T07:29:27Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "[[ကဏ္ဍ:ဘာသာဂရိန်လာန်]]" 401189 wikitext text/x-wiki [[ကဏ္ဍ:ဘာသာဂရိန်လာန်]] d1zmc39ncwncnjt2lreg5yelluekby5 nominativo 0 298573 401190 2026-08-14T07:43:34Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "==အေက်သပရေန်တဝ်== ===ဗွဟ်ရမ္သာၚ်=== {{eo-pr|a=LL-Q143 (epo)-Robin van der Vliet-nominativo.wav;LL-Q143 (epo)-Lepticed7-nominativo.wav}} ===နာမ်=== {{eo-head}} # {{lb|eo|grammar}} ကိစ္စမဒုၚ်ယၟု။ ==အဳတလဳ== ===ဗွဟ်ရမ္သာၚ်=== {{it-pr}} ===နိရုတ်=== {{bor+|it|la|nōminātīvus}} ====နာ..." 401190 wikitext text/x-wiki ==အေက်သပရေန်တဝ်== ===ဗွဟ်ရမ္သာၚ်=== {{eo-pr|a=LL-Q143 (epo)-Robin van der Vliet-nominativo.wav;LL-Q143 (epo)-Lepticed7-nominativo.wav}} ===နာမ်=== {{eo-head}} # {{lb|eo|grammar}} ကိစ္စမဒုၚ်ယၟု။ ==အဳတလဳ== ===ဗွဟ်ရမ္သာၚ်=== {{it-pr}} ===နိရုတ်=== {{bor+|it|la|nōminātīvus}} ====နာမဝိသေသန==== {{it-adj}} # မဆေၚ်စပ်ကဵုပရေၚ်မဒုၚ်ယၟု။ # မဆေၚ်စပ်ကဵုပ္တိုန်လဝ်ယၟုစရၚ်လိက်အုပ်။ ===နိရုတ်=== ဝေါဟာကၠုၚ်နူ {{der|it|la|[[nōminātīvus]] [​[[cāsus]]​]}} ===နာမ်=== {{it-noun|m}} # {{lb|it|grammar}} ကိစ္စမဒုၚ်ယၟု။ #: {{hyper|it|caso}} # {{synonym of|it|nome}} ==လပ်တေန်== ===ဗွဟ်ရမ္သာၚ်=== * {{la-IPA|nōminātīvō}} ====နာမဝိသေသန==== {{head|la|adjective form|head=nōminātīvō}} # {{inflection of|la|nōminātīvus||dat//abl|m//n|s}} ==ပဝ်တူဂြဳ== {{wp|pt:}} ===နိရုတ်=== ဝေါဟာကၠုၚ်နူ {{bor|pt|la|nōminātīvus}} ===ဗွဟ်ရမ္သာၚ်=== {{pt-IPA}}<!-- * {{a|South Brazil}} {{IPA|pt|/ˌno.mi.na.ˈt͡ʃi.vo/}} --> * {{hyph|pt|no|mi|na|ti|vo}} ====နာမဝိသေသန==== {{pt-adj|hascomp=no}} # မဆေၚ်စပ်ကဵုပရေၚ်မဒုၚ်ယၟု။ #: {{syn|pt|nominal}} # မဆေၚ်စပ်ကဵုမဒုၚ်ယၟုစရၚ်။ #: {{syn|pt|nominal}} # ကာလမတန်တဴဒၟံၚ်ပါဲနူပ္ဍဲယၟု။ # {{lb|pt|grammar}} ပရေၚ်မဒုၚ်ယၟု။ ==သ္ပုၚ်== {{wp|es:}} ===နိရုတ်=== {{bor+|es|la|nōminatīvus}} ===ဗွဟ်ရမ္သာၚ်=== {{es-pr|+<audio:LL-Q1321 (spa)-AdrianAbdulBaha-nominativo.wav<a:Colombia>>}} ====နာမဝိသေသန==== {{es-adj}} # မဆေၚ်စပ်ကဵုပရေၚ်မဒုၚ်ယၟု။ # {{lb|es|grammar}} မဆေၚ်စပ်ကဵုမဒုၚ်ယၟုစရၚ်။ ===နာမ်=== {{es-noun|m}} # {{lb|es|grammar}} ကိစ္စမဒုၚ်ယၟု။ #: {{syn|es|caso nominativo}} # တၚ်မဓမံက်ထ္ၜးပရေၚ်သ္ဂောံဒုၚ်စသိုၚ်ပ္ဍဲကိစ္စမဒုၚ်ယၟု။ 1sc1shwx436upykok4222cl4q4xa67m ထာမ်ပလိက်:pt-adj/documentation 10 298574 401191 2026-08-14T07:45:56Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "{{documentation subpage}} This template generates a headword line and categorizes Portuguese adjective entries. {{uses lua|pt-headword}} ==Usage== This template should be added to all Portuguese adjective entries. The template should be placed within the Portuguese language section, immediately following the '''Adjective''' L3 header. As with other Wiktionary inflection line templates, '''please do not use <code>s..." 401191 wikitext text/x-wiki {{documentation subpage}} This template generates a headword line and categorizes Portuguese adjective entries. {{uses lua|pt-headword}} ==Usage== This template should be added to all Portuguese adjective entries. The template should be placed within the Portuguese language section, immediately following the '''Adjective''' L3 header. As with other Wiktionary inflection line templates, '''please do not use <code>subst:</code>'''. ==Parameters== ===Default parameters=== In the majority of cases, no parameters are required, e.g. for {{m|pt|lindo||beautiful}}: :{{demo|<nowiki>{{pt-adj|pagename=lindo}}</nowiki>}} The module knows how to form the feminine and plural of most adjectives, including those in ''-l'', ''-ão'', ''-m'', etc. For example, for {{m|pt|fácil||easy}}: :{{demo|<nowiki>{{pt-adj|pagename=fácil}}</nowiki>}} Similarly, for {{m|pt|vermelhão||vermilion}}: :{{demo|<nowiki>{{pt-adj|pagename=vermelhão}}</nowiki>}} And for {{m|pt|comum||common}}: :{{demo|<nowiki>{{pt-adj|pagename=comum}}</nowiki>}} Note in the latter case that the module knows that the feminine is the same as the masculine, and adjusts the display accordingly. ===Explicit parameters=== Explicit parameters are available in case of irregular adjectives: ;{{para|f}} :Explicitly specify the feminine(s), comma-separated (with no space following the comma) if there are multiple. ;{{para|mpl}} :Explicitly specify the masculine plural(s), comma-separated (with no space following the comma) if there are multiple. ;{{para|pl}} :Explicitly specify the plural(s), for adjectives where the masculine and feminine plural are the same; comma-separated (with no space following the comma) if there are multiple. ;{{para|fpl}} :Explicitly specify the feminine plural(s), comma-separated (with no space following the comma) if there are multiple. The default is based on applying the pluralization algorithm to the feminine(s) (whether defaulted or explicitly specified). ;{{para|comp}} :Explicitly specify the comparative(s), comma-separated (with no space following the comma) if there are multiple. ;{{para|sup}} :Explicitly specify the superlative(s), comma-separated (with no space following the comma) if there are multiple. ;{{para|dim}} :Explicitly specify the diminutive(s), comma-separated (with no space following the comma) if there are multiple. ;{{para|aug}} :Explicitly specify the augmentative(s), comma-separated (with no space following the comma) if there are multiple. ;{{para|inv|1}} :Specify that the adjective is invariable (indeclinable). ;{{para|fonly|1}} :Specify that the adjective is feminine-only. ;{{para|hascomp}} :Indicative whether the adjective has a comparative. Possible values are <code>1</code>, <code>yes</code> or <code>true</code> (the adjective has a comparative); <code>0</code>, <code>no</code> or <code>false</code> (the adjective has no comparative); and <code>both</code> (the adjective sometimes has a comparative, depending on the meaning). ;{{para|meta|1}} :Specify that the adjective is [[Appendix:Portuguese pronunciation#Metaphony|metaphonic]], i.e. the stressed vowel varies between {{IPAchar|/o/}} in the masculine singular and {{IPAchar|/ɔ/}} in other forms. Adjectives in {{m|pt|-oso}} are automatically marked as metaphonic unless {{para|nometa|1}} is used. Certain other adjectives, e.g. {{m|pt|novo||new}} and {{m|pt|exposto||exposed}}, are also metaphonic and should be marked as such using {{para|meta|1}}. ;{{para|nometa|1}} :Explicitly indicate that the adjective is not metaphonic, in case of adjectives in {{m|pt|-oso}}. ;{{para|pagename}} :Override the page name. Useful especially on documentation and test pages. ;{{para|sp}} :Special indicator describing how to form non-lemma parts for multiword expressions. See below. All of the above parameters that take a term or gender as a value can have multiple such values, comma-separated (with no space following the comma), and each value can have inline modifiers, as described above. Alternatively, separate parameters can be given, like {{para|f2}}, {{para|f3}}, etc. for additional feminines; {{para|dim2}}, {{para|dim3}}, etc. for additional diminutives; {{para|sup2}}, {{para|sup3}}, etc. for additional superlatives; etc. However, this format is deprecated, and using comma-separated items in a single parameter is preferred as it is more compact and easier to read. For all the above gender/number/comparative/superlative/diminutive/augmentative parameters, use <code>+</code> to explicitly request the default and <code>#</code> to stand for the lemma. For example, for {{m|pt|espanhol||Spanish}}: :{{demo|<nowiki>{{pt-adj|f=espanhola|pagename=espanhol}}</nowiki>}} For {{m|pt|bom||good}}: :{{demo|<nowiki>{{pt-adj|f=boa|comp=melhor|sup=boníssimo,ótimo|pagename=bom}}</nowiki>}} Note how the masculine and feminine plural are appropriately generated (the feminine plural by pluralizing the explicitly given feminine). For {{m|pt|são||healthy}}: :{{demo|<nowiki>{{pt-adj|f=sã|mpl=sãos|pagename=são}}</nowiki>}} For {{m|pt|locomotor||locomotive}}: :{{demo|<nowiki>{{pt-adj|f=+,locomotriz|pagename=locomotor}}</nowiki>}} For {{m|pt|vilão||villainous, vile}}: :{{demo|<nowiki>{{pt-adj|f=vilã,viloa|mpl=vilãos,vilães,vilões|pagename=vilão}}</nowiki>}} For {{m|pt|só||sole, only}}: :{{demo|<nowiki>{{pt-adj|pl=#,sós<l:obsolete>|pagename=só}}</nowiki>}} For {{m|pt|azul-celeste||sky blue}}: :{{demo|<nowiki>{{pt-adj|pl=azul-celestes<l:Portugal>,#<l:Brazil>|pagename=azul-celeste}}</nowiki>}} For {{m|pt|wireless||wireless}}: :{{demo|<nowiki>{{pt-adj|inv=1|pagename=wireless}}</nowiki>}} ===Comparatives and superlatives=== When degrees of comparison are not explicitly stated through parameters, the adjective is not assumed to be comparable or uncomparable. Whether an adjective is comparable can be controlled using {{para|hascomp}} as described above. In addition, if a comparative or superlative is explicitly given, the adjective is assumed comparable. For example, for the adjective {{m|pt|fácil||easy}} to request the default comparative form {{m|pt|[[mais]] [[fácil]]}}, use {{para|comp|+}}: :{{demo|<nowiki>{{pt-adj|comp=+|pagename=fácil}}</nowiki>}} Note how the default superlative {{m|pt|[[o]] [[mais]] [[fácil]]}} is automatically supplied as well. If an absolute superlative in {{m|pt|-íssimo}} is specified, default comparatives and superlatives will automatically be added. To request a default absolute superlative, use {{para|sup|+abs}}. For example, for {{m|pt|fácil}}, use the following: :{{demo|<nowiki>{{pt-adj|sup=+abs|pagename=fácil}}</nowiki>}} The default algorithm for generating absolute superlatives is fairly smart, and knows e.g. that the accent on {{m|pt|fácil}} must be removed before adding the suffix. It also knows that adjectives in {{m|pt|-ável}} must change to ''-abil''; those in {{m|pt|-ível}} must change to ''-ibil''; those in {{m|pt|-ão}} must change to ''-on''; those in {{m|pt|-co}} must change to ''-qu'' (e.g. {{m|pt|rico||rich}} becomes {{m|pt|riquíssimo}}); etc. For example, for {{m|pt|agradável||agreeable}}, use the following: :{{demo|<nowiki>{{pt-adj|sup=+abs|pagename=agradável}}</nowiki>}} Nonetheless, in some cases irregular absolute superlatives must be given explicitly, e.g. for {{m|pt|frio||cold}}: :{{demo|<nowiki>{{pt-adj|sup=+abs,frigidíssimo|pagename=frio}}</nowiki>}} ===Diminutives and augmentatives=== Use {{para|dim|+}} to request a default diminutive in {{m|pt|-inho}}, and {{para|aug|+}} to request a default augmentative in {{m|pt|-ão}}. In each case, the algorithm for generating the default is smart and handles most adjectives correctly, as with comparatives and superlatives. For example, for {{m|pt|seco||dry}}, to specify a diminutive and augmentative along with an absolute superlative, use the following: :{{demo|<nowiki>{{pt-adj|sup=+abs|dim=+|aug=+|pagename=seco}}</nowiki>}} Irregular diminutives and/or augmentatives can be given explicitly, as with comparatives and superlatives. For example, for {{m|pt|frio}}, use: :{{demo|<nowiki>{{pt-adj|sup=+abs,frigidíssimo|dim=friozinho,+|pagename=frio}}</nowiki>}} ===Multiword expressions=== The module knows how to correctly pluralize and form the feminine of most multiword expressions. An example is {{m|pt|morto de fome||starving|lit=dead of hunger}}: :{{demo|<nowiki>{{pt-adj|meta=1|pagename=morto de fome}}</nowiki>}} Note here we use {{para|meta|1}} to indicate that the adjective {{m|pt|morto}} is metaphonic (see above). The default algorithm is to inflect the first and last word, unless (as here) there is a recognized preposition in the word, in which case only the portion before the preposition is inflected. An example without a preposition is {{m|pt|católico romano||Roman Catholic}}: :{{demo|<nowiki>{{pt-adj|pagename=católico romano}}</nowiki>}} In some cases, the default algorithm produces incorrect results. In those cases, you can control which words are inflected using one of the following specs: * Use {{para|sp|first}} if only the first word inflects. * Use {{para|sp|last}} if only the first word inflects. * Use {{para|sp|first-last}} if the first and last word inflect. * Use {{para|sp|each}} if all words inflect. * Use {{para|sp|first-second}} if the first and second words inflect. * Use {{para|sp|second}} if only the second word inflects. * Use {{para|sp|+}} to explicitly request the default multiword inflection algorithm (needed with hyphenated terms; see below). An example that uses these codes is {{m|pt|assim chamado||so-called}}. The default is to inflect the first and last words, but here we need only the last word inflected: :{{demo|<nowiki>{{pt-adj|sp=last|pagename=assim chamado}}</nowiki>}} Another example is {{m|pt|mais velho que a Sé de Braga||[[older than the hills]]|lit=older than the [[w:en:Cathedral of Braga|Cathedral of Braga]]}}, where we want only the second word pluralized: :{{demo|<nowiki>{{pt-adj|sp=second|pagename=mais velho que a Sé de Braga}}</nowiki>}} These codes also work for hyphenated terms such as {{m|pt|gato-doméstico||[[domestic cat]]}} and {{m|pt|tartaruga-do-mar||[[sea turtle]]}}, but in these cases the default multiword algorithm does not automatically apply; instead, by default the word is treated as a single word. To apply the multiword algorithm, you must explicitly specify one of the codes above; use <code>++</code> to request the default. An example of this is {{m|pt|caçador-recoletor||[[hunter-gathering]]}}: :{{demo|<nowiki>{{pt-adj|sp=+|pagename=caçador-recoletor}}</nowiki>}} Here the default multiword algorithm inflects both parts; without {{para|sp|+}}, the term would be treated as single-word and only the last part inflected. ===Qualifiers, labels, references=== You can add qualifiers and labels to a given plural, feminine or masculine using inline modifiers. An example of a superlative label is with {{m|pt|magro||thin}}: :{{demo|<nowiki>{{pt-adj|dim=+|sup=magríssimo,macérrimo,magérrimo<l:sometimes,proscribed>|pagename=magro}}</nowiki>}} An example of masculine plural and feminine labels is with {{m|pt|vilão||villainous, vile, wicked; coarse}}: :{{demo|<nowiki>{{pt-adj|mpl=+,vilães<l:rare>,#s<l:rare>|f=vilã,viloa<l:rare>|pagename=vilão}}</nowiki>}} The allowed inline modifiers are: * {{cd|<q:...>}}: Qualifier displayed as-is before the value in question. * {{cd|<qq:...>}}: Qualifier displayed as-is after the value in question. * {{cd|<l:...>}}: One or more comma-separated labels (with no space after the comma) displayed before the value in question. Recognized labels are generally linked to the glossary. * {{cd|<ll:...>}}: One or more comma-separated labels (with no space after the comma) displayed after the value in question. * {{cd|<ref:...>}}: One or more references. See {{tl|IPA}} for the exact format. To get multiple references, you can stack multiple inline modifiers {{cd|<ref:...><ref:...>}} or separate with {{cd|&nbsp;!!!&nbsp;}} (three exclamation points surrounded by spaces). ===Suffixes=== You can use this template for adjective-forming suffixes. If the page name begins with a hyphen, the part of speech for categories is changed to <code>suffixes</code> instead of <code>nouns</code>, and the page is added to an additional category [[:Category:Portuguese adjective-forming suffixes]]. An example is {{m|pt|-ês||-ese}}: :{{demo|<nowiki>{{pt-adj|pagename=-ês}}</nowiki>}} and automatically adds the page to [[:Category:Portuguese suffixes]] and [[:Category:Portuguese adjective-forming suffixes]]. Note how we rely here on the default feminine-forming and plural-forming algorithms, which usually work. {{hwcat}} 2srdbuoyqeici7koc21fd7mxa9cj6ra ကဏ္ဍ:ဝေါဟာသဒ္ဒာသပုၚ်ဂမၠိုၚ် 14 298575 401193 2026-08-14T08:42:20Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "[[ကဏ္ဍ:ဘာသာသပုၚ်]]" 401193 wikitext text/x-wiki [[ကဏ္ဍ:ဘာသာသပုၚ်]] psankndqa9rxk77be4r2iutyh9n8l07 ကဏ္ဍ:ကာရန်:သပုၚ်/ibo 14 298576 401194 2026-08-14T08:44:04Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "[[:ကဏ္ဍ:ဒၞာဲလုပ်အဝေါၚ်ကဵုပၟိက်|ဒၞာဲလုပ်အဝေါၚ်ကဵုပၟိက်]] » [[:ကဏ္ဍ:အရေဝ်ဘာသာအိုတ်သီုဂမၠိုၚ်|အရေဝ်ဘာသာအိုတ်သီုဂမၠိုၚ်]] » [[:ကဏ္ဍ:ဘာသာသပုၚ်|သပုၚ်]] » :ကဏ္ဍ:ကာရန်:..." 401194 wikitext text/x-wiki [[:ကဏ္ဍ:ဒၞာဲလုပ်အဝေါၚ်ကဵုပၟိက်|ဒၞာဲလုပ်အဝေါၚ်ကဵုပၟိက်]] » [[:ကဏ္ဍ:အရေဝ်ဘာသာအိုတ်သီုဂမၠိုၚ်|အရေဝ်ဘာသာအိုတ်သီုဂမၠိုၚ်]] » [[:ကဏ္ဍ:ဘာသာသပုၚ်|သပုၚ်]] » [[:ကဏ္ဍ:ကာရန်:သပုၚ်|ကာရန်ဂမၠိုၚ်]] » -ibo :စရၚ်မဆေၚ်စပ်ကဵုဝေါဟာ[[:ကဏ္ဍ:ဘာသာသပုၚ်|သပုၚ်]]မနွံကာရန် ibo ဂမၠိုၚ်။ [[ကဏ္ဍ:ကာရန်:သပုၚ်|ibo]] muyoloagnye8sphc8ksg4n5js4lqglg ကဏ္ဍ:ဝေါဟာသဒ္ဒာပဝ်တူဂြဳဂမၠိုၚ် 14 298577 401195 2026-08-14T08:46:26Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "[[ကဏ္ဍ:ဘာသာပဝ်တူဂြဳ]]" 401195 wikitext text/x-wiki [[ကဏ္ဍ:ဘာသာပဝ်တူဂြဳ]] mgj0zcfrfb9myxlwmi5x4ip1vh38hok ကဏ္ဍ:နာမဝိသေသနပဝ်တူဂြဳမတော်ဟွံဂွံဂမၠိုၚ် 14 298578 401196 2026-08-14T08:47:32Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "[[ကဏ္ဍ:ဘာသာပဝ်တူဂြဳ]]" 401196 wikitext text/x-wiki [[ကဏ္ဍ:ဘာသာပဝ်တူဂြဳ]] mgj0zcfrfb9myxlwmi5x4ip1vh38hok ကဏ္ဍ:ဝေါဟာပဝ်တူဂြဳဝဏ္ဏ ၅ မ-ဂမၠိုၚ် 14 298579 401197 2026-08-14T08:48:37Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "[[ကဏ္ဍ:ဘာသာပဝ်တူဂြဳ]]" 401197 wikitext text/x-wiki [[ကဏ္ဍ:ဘာသာပဝ်တူဂြဳ]] mgj0zcfrfb9myxlwmi5x4ip1vh38hok ကဏ္ဍ:ဝေါဟာသဒ္ဒာအဳတခ်လဳဂမၠိုၚ် 14 298580 401198 2026-08-14T08:49:45Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "[[ကဏ္ဍ:ဘာသာအဳတခ်လဳ]]" 401198 wikitext text/x-wiki [[ကဏ္ဍ:ဘာသာအဳတခ်လဳ]] gbeqdk32838i2079b24yzbewkbbcs22 ကဏ္ဍ:ကာရန်:အဳတခ်လဳ/ivo 14 298581 401199 2026-08-14T08:52:16Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "[[:ကဏ္ဍ:ဒၞာဲလုပ်အဝေါၚ်ကဵုပၟိက်|ဒၞာဲလုပ်အဝေါၚ်ကဵုပၟိက်]] » [[:ကဏ္ဍ:အရေဝ်ဘာသာအိုတ်သီုဂမၠိုၚ်|အရေဝ်ဘာသာအိုတ်သီုဂမၠိုၚ်]] » [[:ကဏ္ဍ:ဘာသာအဳတခ်လဳ|အဳတခ်လဳ]] » :ကဏ္ဍ:ကာ..." 401199 wikitext text/x-wiki [[:ကဏ္ဍ:ဒၞာဲလုပ်အဝေါၚ်ကဵုပၟိက်|ဒၞာဲလုပ်အဝေါၚ်ကဵုပၟိက်]] » [[:ကဏ္ဍ:အရေဝ်ဘာသာအိုတ်သီုဂမၠိုၚ်|အရေဝ်ဘာသာအိုတ်သီုဂမၠိုၚ်]] » [[:ကဏ္ဍ:ဘာသာအဳတခ်လဳ|အဳတခ်လဳ]] » [[:ကဏ္ဍ:ကာရန်:အဳတခ်လဳ|ကာရန်ဂမၠိုၚ်]] » -ivo :စရၚ်မဆေၚ်စပ်ကဵုဝေါဟာ[[:ကဏ္ဍ:ဘာသာအဳတခ်လဳ|အဳတခ်လဳ]]မနွံကာရန် ivo ဂမၠိုၚ်။ [[ကဏ္ဍ:ကာရန်:အဳတခ်လဳ|ivo]] i4q7iou4t31pmwxbu2inb7ohbouc51c ကဏ္ဍ:ကာရန်:အေက်သပရေန်တဝ်/ivo 14 298582 401200 2026-08-14T08:54:21Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "[[:ကဏ္ဍ:ဒၞာဲလုပ်အဝေါၚ်ကဵုပၟိက်|ဒၞာဲလုပ်အဝေါၚ်ကဵုပၟိက်]] » [[:ကဏ္ဍ:အရေဝ်ဘာသာအိုတ်သီုဂမၠိုၚ်|အရေဝ်ဘာသာအိုတ်သီုဂမၠိုၚ်]] » :ကဏ္ဍ:ဘာသာအေက်သပရေန်တဝ်|အေက်သပရေန်..." 401200 wikitext text/x-wiki [[:ကဏ္ဍ:ဒၞာဲလုပ်အဝေါၚ်ကဵုပၟိက်|ဒၞာဲလုပ်အဝေါၚ်ကဵုပၟိက်]] » [[:ကဏ္ဍ:အရေဝ်ဘာသာအိုတ်သီုဂမၠိုၚ်|အရေဝ်ဘာသာအိုတ်သီုဂမၠိုၚ်]] » [[:ကဏ္ဍ:ဘာသာအေက်သပရေန်တဝ်|အေက်သပရေန်တဝ်]] » [[:ကဏ္ဍ:ကာရန်:အေက်သပရေန်တဝ်|ကာရန်ဂမၠိုၚ်]] » -ivo :စရၚ်မဆေၚ်စပ်ကဵုဝေါဟာ[[:ကဏ္ဍ:ဘာသာအေက်သပရေန်တဝ်|အေက်သပရေန်တဝ်]]မနွံကာရန် [[ကာရန်:အေက်သပရေန်တဝ်/ivo|-ivo]] ဂမၠိုၚ်။ [[ကဏ္ဍ:ကာရန်:အေက်သပရေန်တဝ်|ivo]] dxks7xg9fdyuws4dkzs87r3y01tv865 ကာရန်:အေက်သပရေန်တဝ်/ivo 106 298583 401201 2026-08-14T08:57:21Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "{{rhymes nav|eo|i|vo}} ==ဗွဟ်ရမ္သာၚ်== {{IPA|eo|/-i.vo/}} ==ကာရန်ဂမၠိုၚ်== ===ဝဏ္ဏမွဲ=== * {{l|eo|drivo}} * {{l|eo|vivo}} ===ဝဏ္ဏၜါ=== * {{l|eo|aktivo}} * {{l|eo|arĥivo}} * {{l|eo|arkivo}} * {{l|eo|dativo}} * {{l|eo|deklivo}} * {{l|eo|kursivo}} * {{l|eo|lesivo}} * {{l|eo|malvivo}} * {{l|eo|motivo}} * {{l|eo|olivo}} * {{l|eo|salivo}} * {{l|eo|..." 401201 wikitext text/x-wiki {{rhymes nav|eo|i|vo}} ==ဗွဟ်ရမ္သာၚ်== {{IPA|eo|/-i.vo/}} ==ကာရန်ဂမၠိုၚ်== ===ဝဏ္ဏမွဲ=== * {{l|eo|drivo}} * {{l|eo|vivo}} ===ဝဏ္ဏၜါ=== * {{l|eo|aktivo}} * {{l|eo|arĥivo}} * {{l|eo|arkivo}} * {{l|eo|dativo}} * {{l|eo|deklivo}} * {{l|eo|kursivo}} * {{l|eo|lesivo}} * {{l|eo|malvivo}} * {{l|eo|motivo}} * {{l|eo|olivo}} * {{l|eo|salivo}} * {{l|eo|stativo}} ===ဝဏ္ဏပိ=== * {{l|eo|ablativo}} * {{l|eo|adjektivo}} * {{l|eo|alativo}} * {{l|eo|detektivo}} * {{l|eo|kolektivo}} * {{l|eo|optativo}} * {{l|eo|perspektivo}} * {{l|eo|substantivo}} * {{l|eo|subjunktivo}} * {{l|eo|vokativo}} * {{l|eo|volitivo}} ===ဝဏ္ဏပန်=== * {{l|eo|akreditivo}} * {{l|eo|akuzativo}} * {{l|eo|alternativo}} * {{l|eo|aperitivo}} * {{l|eo|demonstrativo}} * {{l|eo|imperativo}} * {{l|eo|indikativo}} * {{l|eo|infinitivo}} * {{l|eo|korelativo}} * {{l|eo|lokomotivo}} * {{l|eo|nominativo}} * {{l|eo|prerogativo}} * {{l|eo|substantivo}} ===ဝဏ္ဏမသုန်=== * {{l|eo|kooperativo}} fpayl7c7ewr4e5ujx1i9a5fg4527ehv nominativon 0 298584 401202 2026-08-14T08:59:34Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "==အေက်သပရေန်တဝ်== ===နာမ်=== {{eo-head}} # {{eo-form of|nominativ|on}}" 401202 wikitext text/x-wiki ==အေက်သပရေန်တဝ်== ===နာမ်=== {{eo-head}} # {{eo-form of|nominativ|on}} p924slipgtv696prb25x69zpmwenb01 nominativoj 0 298585 401203 2026-08-14T09:00:14Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "==အေက်သပရေန်တဝ်== ===နာမ်=== {{eo-head}} # {{eo-form of|nominativ|oj}}" 401203 wikitext text/x-wiki ==အေက်သပရေန်တဝ်== ===နာမ်=== {{eo-head}} # {{eo-form of|nominativ|oj}} fea9ufpm8xbojbb011jnr9f2iy11fed nominativojn 0 298586 401204 2026-08-14T09:00:52Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "==အေက်သပရေန်တဝ်== ===နာမ်=== {{eo-head}} # {{eo-form of|nominativ|ojn}}" 401204 wikitext text/x-wiki ==အေက်သပရေန်တဝ်== ===နာမ်=== {{eo-head}} # {{eo-form of|nominativ|ojn}} oew6of635i8ocu0sf4owqgpr9cgjhjk nominativos 0 298587 401205 2026-08-14T09:03:44Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "==လပ်တေန်== ===ဗွဟ်ရမ္သာၚ်=== * {{la-IPA|nōminātīvōs}} ====နာမဝိသေသန==== {{head|la|adjective form|head=nōminātīvōs}} # {{inflection of|la|nōminātīvus||acc|m|p}} ==ပဝ်တူဂြဳ== ====နာမဝိသေသန==== {{head|pt|adjective form}} # {{adj form of|pt|nominativo||m|p}} ==သ္ပုၚ်== ===ဗွဟ်ရမ္သာၚ..." 401205 wikitext text/x-wiki ==လပ်တေန်== ===ဗွဟ်ရမ္သာၚ်=== * {{la-IPA|nōminātīvōs}} ====နာမဝိသေသန==== {{head|la|adjective form|head=nōminātīvōs}} # {{inflection of|la|nōminātīvus||acc|m|p}} ==ပဝ်တူဂြဳ== ====နာမဝိသေသန==== {{head|pt|adjective form}} # {{adj form of|pt|nominativo||m|p}} ==သ္ပုၚ်== ===ဗွဟ်ရမ္သာၚ်=== {{es-pr}} ====နာမဝိသေသန==== {{head|es|adjective form}} # {{adj form of|es|nominativo||m|p}} ===နာမ်=== {{head|es|noun form|g=m-p}} # {{inflection of|es|nominativo||p}} h8ygss8mbqimb3cfkkanc6kgehfrhp4 ကဏ္ဍ:ကာရန်:သပုၚ်/ibos 14 298588 401206 2026-08-14T09:05:17Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "[[:ကဏ္ဍ:ဒၞာဲလုပ်အဝေါၚ်ကဵုပၟိက်|ဒၞာဲလုပ်အဝေါၚ်ကဵုပၟိက်]] » [[:ကဏ္ဍ:အရေဝ်ဘာသာအိုတ်သီုဂမၠိုၚ်|အရေဝ်ဘာသာအိုတ်သီုဂမၠိုၚ်]] » [[:ကဏ္ဍ:ဘာသာသပုၚ်|သပုၚ်]] » :ကဏ္ဍ:ကာရန်:..." 401206 wikitext text/x-wiki [[:ကဏ္ဍ:ဒၞာဲလုပ်အဝေါၚ်ကဵုပၟိက်|ဒၞာဲလုပ်အဝေါၚ်ကဵုပၟိက်]] » [[:ကဏ္ဍ:အရေဝ်ဘာသာအိုတ်သီုဂမၠိုၚ်|အရေဝ်ဘာသာအိုတ်သီုဂမၠိုၚ်]] » [[:ကဏ္ဍ:ဘာသာသပုၚ်|သပုၚ်]] » [[:ကဏ္ဍ:ကာရန်:သပုၚ်|ကာရန်ဂမၠိုၚ်]] » -ibos :စရၚ်မဆေၚ်စပ်ကဵုဝေါဟာ[[:ကဏ္ဍ:ဘာသာသပုၚ်|သပုၚ်]]မနွံကာရန် ibos ဂမၠိုၚ်။ [[ကဏ္ဍ:ကာရန်:သပုၚ်|ibos]] i4kgm1n3il7j6m7y716nhpi448hm26f nominativas 0 298589 401207 2026-08-14T09:07:30Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "==လပ်တေန်== ===ဗွဟ်ရမ္သာၚ်=== * {{la-IPA|nōminātīvās}} ====နာမဝိသေသန==== {{head|la|adjective form|head=nōminātīvās}} # {{inflection of|la|nōminātīvus||acc|f|p}} ==ပဝ်တူဂြဳ== ====နာမဝိသေသန==== {{head|pt|adjective form}} # {{adj form of|pt|nominativo||f|p}} ==သ္ပုၚ်== ===ဗွဟ်ရမ္သာၚ..." 401207 wikitext text/x-wiki ==လပ်တေန်== ===ဗွဟ်ရမ္သာၚ်=== * {{la-IPA|nōminātīvās}} ====နာမဝိသေသန==== {{head|la|adjective form|head=nōminātīvās}} # {{inflection of|la|nōminātīvus||acc|f|p}} ==ပဝ်တူဂြဳ== ====နာမဝိသေသန==== {{head|pt|adjective form}} # {{adj form of|pt|nominativo||f|p}} ==သ္ပုၚ်== ===ဗွဟ်ရမ္သာၚ်=== {{es-pr}} ====နာမဝိသေသန==== {{head|es|adjective form}} # {{adj form of|es|nominativo||f|p}} fu4tsg9tsy2bhwurw9fzs3lhcfkz7yl ကဏ္ဍ:ကာရန်:သပုၚ်/ibas 14 298590 401208 2026-08-14T09:08:38Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "[[:ကဏ္ဍ:ဒၞာဲလုပ်အဝေါၚ်ကဵုပၟိက်|ဒၞာဲလုပ်အဝေါၚ်ကဵုပၟိက်]] » [[:ကဏ္ဍ:အရေဝ်ဘာသာအိုတ်သီုဂမၠိုၚ်|အရေဝ်ဘာသာအိုတ်သီုဂမၠိုၚ်]] » [[:ကဏ္ဍ:ဘာသာသပုၚ်|သပုၚ်]] » :ကဏ္ဍ:ကာရန်:..." 401208 wikitext text/x-wiki [[:ကဏ္ဍ:ဒၞာဲလုပ်အဝေါၚ်ကဵုပၟိက်|ဒၞာဲလုပ်အဝေါၚ်ကဵုပၟိက်]] » [[:ကဏ္ဍ:အရေဝ်ဘာသာအိုတ်သီုဂမၠိုၚ်|အရေဝ်ဘာသာအိုတ်သီုဂမၠိုၚ်]] » [[:ကဏ္ဍ:ဘာသာသပုၚ်|သပုၚ်]] » [[:ကဏ္ဍ:ကာရန်:သပုၚ်|ကာရန်ဂမၠိုၚ်]] » -ibas :စရၚ်မဆေၚ်စပ်ကဵုဝေါဟာ[[:ကဏ္ဍ:ဘာသာသပုၚ်|သပုၚ်]]မနွံကာရန် ibas ဂမၠိုၚ်။ [[ကဏ္ဍ:ကာရန်:သပုၚ်|ibas]] apvm9yjzdxthi1awptsav00q09u4ymv nominativussen 0 298591 401209 2026-08-14T09:15:37Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "==ဒါတ်== ===နာမ်=== {{head|nl|ဗီုပြၚ်နာမ်}} # {{plural of|nl|nominativus}}" 401209 wikitext text/x-wiki ==ဒါတ်== ===နာမ်=== {{head|nl|ဗီုပြၚ်နာမ်}} # {{plural of|nl|nominativus}} rm07jciqpbdutk8ctpwmhugwg9cbivs nominativum 0 298592 401210 2026-08-14T09:16:31Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "==လပ်တေန်== ====နာမဝိသေသန==== {{head|la|adjective form|head=nōminātīvum}} # {{inflection of|la|nōminātīvus||nom//acc//voc|n|s|;|acc|m|s}}" 401210 wikitext text/x-wiki ==လပ်တေန်== ====နာမဝိသေသန==== {{head|la|adjective form|head=nōminātīvum}} # {{inflection of|la|nōminātīvus||nom//acc//voc|n|s|;|acc|m|s}} ahdtng5auhvfvm0ihny0qs8p6swh7t6 nominativ 0 298593 401211 2026-08-14T09:53:20Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "{{also|Nominativ|nominatív|nominatīv}} ==ချက်ခ်== {{wp|cs:}} ===နိရုတ်=== ဝေါဟာကၠုၚ်နူ {{der|cs|la|nōminātīvus}} ===ဗွဟ်ရမ္သာၚ်=== * {{cs-IPA|[tyv]}} * {{cs-IPA|[týv]}} * {{audio|cs|LL-Q9056 (ces)-Ghost4Man-nominativ.wav}} ===နာမ်=== {{cs-noun|m-in}} # {{lb|cs|grammar}} ကိစ္စမဒုၚ်ယၟု၊ ကိစ္စမ..." 401211 wikitext text/x-wiki {{also|Nominativ|nominatív|nominatīv}} ==ချက်ခ်== {{wp|cs:}} ===နိရုတ်=== ဝေါဟာကၠုၚ်နူ {{der|cs|la|nōminātīvus}} ===ဗွဟ်ရမ္သာၚ်=== * {{cs-IPA|[tyv]}} * {{cs-IPA|[týv]}} * {{audio|cs|LL-Q9056 (ces)-Ghost4Man-nominativ.wav}} ===နာမ်=== {{cs-noun|m-in}} # {{lb|cs|grammar}} ကိစ္စမဒုၚ်ယၟု၊ ကိစ္စမရပ်စပ်မဆေၚ်စပ်ကဵုပရေၚ်စၞောန်ထ္ၜးနကဵုပရောပရာ ဝါ စၞးမဆေၚ်စပ်ကဵုကြိယာသိၚ်ဗိုၚ်။ #: {{syn|cs|první pád|názevník|jmenovatel|jmenovník}} ====လဟုတ်စှ်ေ==== {{cs-ndecl|m.locě:u}} ==ဒိန်နေတ်== {{wp|da:}} ===နိရုတ်=== ဝေါဟာကၠုၚ်နူ {{der|da|la|nōminātīvus}} ===ဗွဟ်ရမ္သာၚ်=== * {{IPA|da|/nominatiːv/|[ˈnominaˌtˢiwˀ]|[ˈnɔminaˌtˢiwˀ]}} ===နာမ်=== {{da-noun|en|er}} # ကိစ္စမဒုၚ်ယၟု။ # မအရေဝ်မွဲဗီုပြၚ်ပ္ဍဲဆေၚ်စပ်ကဵုကိစ္စမဒုၚ်ယၟု။ ====ပရေၚ်ကၠောံ==== {{da-noun-infl|en|er}} ==ရဝ်မေနဳယျာ== ===နိရုတ်=== {{der|ro|la|nominativus}} ===ဗွဟ်ရမ္သာၚ်=== * {{IPA|ro|/ˌnominaˈtiv/}} ===နာမ်=== {{ro-noun|n|nominative}} # မဆေၚ်စပ်ကဵုကိစ္စမဒုၚ်ယၟု။ ====လဟုတ်စှ်ေ==== {{ro-noun-n|pl=nominative|def=nominativul}} ==သာဗ်ခြဝ်ဨရှဳယာန်== ===ဗွဟ်ရမ္သာၚ်=== * {{IPA|sh|/nôminatiːʋ/}} ===နာမ်=== {{sh-noun|nȍminatīv|m-in}} # {{lb|sh|grammar}} ကိစ္စမဒုၚ်ယၟု။ #: {{syn|sh|pr̀vi pádež}} ====လဟုတ်စှ်ေ==== {{sh-decl-noun |nominativ|nominativi |nominativa|nominativa |nominativu|nominativima |nominativ|nominative |nominative|nominativi |nominativu|nominativima |nominativom|nominativima }} ==သၠဝ်ဝေနဳ== ===ဗွဟ်ရမ္သာၚ်=== * {{sl-IPA|nọ̑minativ}} ===နာမ်=== {{sl-noun|nọ̑minativ|m-in}} # {{lb|sl|grammar}} ကိစ္စမဒုၚ်ယၟု။ #: {{syn|sl|imenovalnik}} ====လဟုတ်စှ်ေ==== {{rfinfl|sl|noun}} ==သွဳဒေန်== ===နိရုတ်=== ဝေါဟာကၠုၚ်နူ {{der|sv|la|nominativus}} ===ဗွဟ်ရမ္သာၚ်=== * {{IPA|sv|/ˈnʊmɪnaˌtiːv/}} ===နာမ်=== {{sv-noun|c|g2=n}} # မဆေၚ်စပ်ကဵုသဒ္ဒါကိစ္စမဒုၚ်ယၟု။ ====လဟုတ်စှ်ေ==== {{sv-noun-irreg-c|3=nominativer}} ====Descendants==== * {{desc|izh|nominativa|bor=1|alts=1}} ==ဝေပ်== ===နာမ်=== {{vep-noun}} # ကိစ္စမဒုၚ်ယၟု။ ====ပရေၚ်ကၠောံ==== {{vep-decl-sana|nominativa}} 5ymcz5jyoy8tqyufkw1p9jp1ssx7ppd 401213 401211 2026-08-14T11:27:03Z 咽頭べさ 33 401213 wikitext text/x-wiki {{also|Nominativ|nominatív|nominatīv}} ==ချက်ခ်== {{wp|cs:}} {{was wotd|၂၀၂၆|အဝ်ဂေတ်|၁၅}} ===နိရုတ်=== ဝေါဟာကၠုၚ်နူ {{der|cs|la|nōminātīvus}} ===ဗွဟ်ရမ္သာၚ်=== * {{cs-IPA|[tyv]}} * {{cs-IPA|[týv]}} * {{audio|cs|LL-Q9056 (ces)-Ghost4Man-nominativ.wav}} ===နာမ်=== {{cs-noun|m-in}} # {{lb|cs|grammar}} ကိစ္စမဒုၚ်ယၟု၊ ကိစ္စမရပ်စပ်မဆေၚ်စပ်ကဵုပရေၚ်စၞောန်ထ္ၜးနကဵုပရောပရာ ဝါ စၞးမဆေၚ်စပ်ကဵုကြိယာသိၚ်ဗိုၚ်။ #: {{syn|cs|první pád|názevník|jmenovatel|jmenovník}} ====လဟုတ်စှ်ေ==== {{cs-ndecl|m.locě:u}} ==ဒိန်နေတ်== {{wp|da:}} ===နိရုတ်=== ဝေါဟာကၠုၚ်နူ {{der|da|la|nōminātīvus}} ===ဗွဟ်ရမ္သာၚ်=== * {{IPA|da|/nominatiːv/|[ˈnominaˌtˢiwˀ]|[ˈnɔminaˌtˢiwˀ]}} ===နာမ်=== {{da-noun|en|er}} # ကိစ္စမဒုၚ်ယၟု။ # မအရေဝ်မွဲဗီုပြၚ်ပ္ဍဲဆေၚ်စပ်ကဵုကိစ္စမဒုၚ်ယၟု။ ====ပရေၚ်ကၠောံ==== {{da-noun-infl|en|er}} ==ရဝ်မေနဳယျာ== ===နိရုတ်=== {{der|ro|la|nominativus}} ===ဗွဟ်ရမ္သာၚ်=== * {{IPA|ro|/ˌnominaˈtiv/}} ===နာမ်=== {{ro-noun|n|nominative}} # မဆေၚ်စပ်ကဵုကိစ္စမဒုၚ်ယၟု။ ====လဟုတ်စှ်ေ==== {{ro-noun-n|pl=nominative|def=nominativul}} ==သာဗ်ခြဝ်ဨရှဳယာန်== ===ဗွဟ်ရမ္သာၚ်=== * {{IPA|sh|/nôminatiːʋ/}} ===နာမ်=== {{sh-noun|nȍminatīv|m-in}} # {{lb|sh|grammar}} ကိစ္စမဒုၚ်ယၟု။ #: {{syn|sh|pr̀vi pádež}} ====လဟုတ်စှ်ေ==== {{sh-decl-noun |nominativ|nominativi |nominativa|nominativa |nominativu|nominativima |nominativ|nominative |nominative|nominativi |nominativu|nominativima |nominativom|nominativima }} ==သၠဝ်ဝေနဳ== ===ဗွဟ်ရမ္သာၚ်=== * {{sl-IPA|nọ̑minativ}} ===နာမ်=== {{sl-noun|nọ̑minativ|m-in}} # {{lb|sl|grammar}} ကိစ္စမဒုၚ်ယၟု။ #: {{syn|sl|imenovalnik}} ====လဟုတ်စှ်ေ==== {{rfinfl|sl|noun}} ==သွဳဒေန်== ===နိရုတ်=== ဝေါဟာကၠုၚ်နူ {{der|sv|la|nominativus}} ===ဗွဟ်ရမ္သာၚ်=== * {{IPA|sv|/ˈnʊmɪnaˌtiːv/}} ===နာမ်=== {{sv-noun|c|g2=n}} # မဆေၚ်စပ်ကဵုသဒ္ဒါကိစ္စမဒုၚ်ယၟု။ ====လဟုတ်စှ်ေ==== {{sv-noun-irreg-c|3=nominativer}} ====Descendants==== * {{desc|izh|nominativa|bor=1|alts=1}} ==ဝေပ်== ===နာမ်=== {{vep-noun}} # ကိစ္စမဒုၚ်ယၟု။ ====ပရေၚ်ကၠောံ==== {{vep-decl-sana|nominativa}} o85jmgzw77abpmi4imp0v65s8a7e9z9 ထာမ်ပလိက်:sv-noun-irreg-c 10 298594 401215 2026-08-14T11:30:54Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "{{sv-decl-noun<!-- -->|base={{{base|{{pagename}}}}}<!-- -->|definitions={{{definitions|}}}<!-- -->|{{{1<includeonly>|{{pagename}}</includeonly>}}}<!-- -->|{{{2<includeonly>|{{{1|{{pagename}}}}}en</includeonly>}}}<!-- -->|{{{3}}}<!-- -->|{{{4<includeonly>|{{{3}}}na</includeonly>}}}<!-- -->|{{{5<includeonly>|{{{1|{{pagename}}}}}s</includeonly>}}}<!-- -->|{{{6<includeonly>|{{{2|{{{1|{{pagename}}}}}en}}}s</includeonly>}}..." 401215 wikitext text/x-wiki {{sv-decl-noun<!-- -->|base={{{base|{{pagename}}}}}<!-- -->|definitions={{{definitions|}}}<!-- -->|{{{1<includeonly>|{{pagename}}</includeonly>}}}<!-- -->|{{{2<includeonly>|{{{1|{{pagename}}}}}en</includeonly>}}}<!-- -->|{{{3}}}<!-- -->|{{{4<includeonly>|{{{3}}}na</includeonly>}}}<!-- -->|{{{5<includeonly>|{{{1|{{pagename}}}}}s</includeonly>}}}<!-- -->|{{{6<includeonly>|{{{2|{{{1|{{pagename}}}}}en}}}s</includeonly>}}}<!-- -->|{{{7<includeonly>|{{{3}}}s</includeonly>}}}<!-- -->|{{{8<includeonly>|{{{4|{{{3}}}na}}}s</includeonly>}}}<!-- -->}}<!-- --><noinclude>{{documentation}}</noinclude> no8co07sidtuqt8o14fqcwt2bcteeyf ထာမ်ပလိက်:sv-noun-irreg-c/documentation 10 298595 401217 2026-08-14T11:38:20Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "{{documentation subpage}} On the page for '''{{l|sv|hand}}''' * <tt><nowiki>{{sv-noun-irreg-c|3=händer}}</nowiki></tt> On the page for '''{{l|sv|fader}}''' * <tt><nowiki>{{sv-noun-irreg-c|2=fadern|3=fäder}}</nowiki></tt> On the page for '''{{l|sv|ros}}''' * <tt><nowiki>{{sv-noun-irreg-c|3=rosor|5=ros}}</nowiki></tt> On the page for '''{{l|sv|man}}''' * <tt><nowiki>{{sv-noun-irreg-c|2=mannen|3=män|4=männen}}</no..." 401217 wikitext text/x-wiki {{documentation subpage}} On the page for '''{{l|sv|hand}}''' * <tt><nowiki>{{sv-noun-irreg-c|3=händer}}</nowiki></tt> On the page for '''{{l|sv|fader}}''' * <tt><nowiki>{{sv-noun-irreg-c|2=fadern|3=fäder}}</nowiki></tt> On the page for '''{{l|sv|ros}}''' * <tt><nowiki>{{sv-noun-irreg-c|3=rosor|5=ros}}</nowiki></tt> On the page for '''{{l|sv|man}}''' * <tt><nowiki>{{sv-noun-irreg-c|2=mannen|3=män|4=männen}}</nowiki></tt> On the page for '''{{l|sv|mus}}''' * <tt><nowiki>{{sv-noun-irreg-c|3=möss|4=mössen|5=mus|7=möss}}</nowiki></tt> ==Categories== * [[:ကဏ္ဍ:နာမ်သွဳဒေန်ဂမၠိုၚ်|Swedish nouns]] <includeonly> [[ကဏ္ဍ:ထာမ်ပလိက်သွဳဒေန်အပြံၚ်အလှာဲပ္တဝ်ထ္ၜးပမာဏနာမ်ဂမၠိုၚ်|noun-irreg-c]] 4cemiskm95uuhtl5sturq3ocv7tai2y ထာမ်ပလိက်:vep-decl-sana 10 298596 401218 2026-08-14T11:39:19Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "<includeonly>{{#invoke:vep-nominals|show|sana}}</includeonly><noinclude>{{documentation}}</noinclude>" 401218 wikitext text/x-wiki <includeonly>{{#invoke:vep-nominals|show|sana}}</includeonly><noinclude>{{documentation}}</noinclude> i0jp7wol21s6a57a02emtrclakbd690 ထာမ်ပလိက်:vep-decl-sana/documentation 10 298597 401219 2026-08-14T11:41:28Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "{{documentation subpage}} For Veps nominals with a polysyllabic genitive singular ending in '''-an''', and a plural stem with '''-oi-'''. The nominative singular may end in '''-a''' or a consonant. The following parameter is required: :{{para|1}} The stem (equivalent to the genitive singular form except the final ''-n'' is not included) {{vep-decl/common-documentation}} <includeonly>ကဏ္ဍ:ထာမ်ပလ..." 401219 wikitext text/x-wiki {{documentation subpage}} For Veps nominals with a polysyllabic genitive singular ending in '''-an''', and a plural stem with '''-oi-'''. The nominative singular may end in '''-a''' or a consonant. The following parameter is required: :{{para|1}} The stem (equivalent to the genitive singular form except the final ''-n'' is not included) {{vep-decl/common-documentation}} <includeonly>[[ကဏ္ဍ:ထာမ်ပလိက်ဝေပ်ဆၜိုတ်ဒုၚ်ယၟုအပြံၚ်အလှာဲပ္တဝ်ထ္ၜးပမာဏဂမၠိုၚ်|5]]</includeonly> 73505c7wpzq00od6u344b18l8pqm0p9 ကဏ္ဍ:ထာမ်ပလိက်ဝေပ်ဆၜိုတ်ဒုၚ်ယၟုအပြံၚ်အလှာဲပ္တဝ်ထ္ၜးပမာဏဂမၠိုၚ် 14 298598 401220 2026-08-14T11:42:55Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "[[ကဏ္ဍ:ထာမ်ပလိက်ဝေပ်အပြံၚ်အလှာဲပ္တဝ်ထ္ၜးပမာဏဂမၠိုၚ်]][[ကဏ္ဍ:ထာမ်ပလိက်ဆၜိုတ်ဒုၚ်ယၟုအပြံၚ်အလှာဲပ္တဝ်ထ္ၜးပမာဏဗက်အလိုက်အရေဝ်ဘာသာဂမၠိုၚ်|ဝ]]" 401220 wikitext text/x-wiki [[ကဏ္ဍ:ထာမ်ပလိက်ဝေပ်အပြံၚ်အလှာဲပ္တဝ်ထ္ၜးပမာဏဂမၠိုၚ်]][[ကဏ္ဍ:ထာမ်ပလိက်ဆၜိုတ်ဒုၚ်ယၟုအပြံၚ်အလှာဲပ္တဝ်ထ္ၜးပမာဏဗက်အလိုက်အရေဝ်ဘာသာဂမၠိုၚ်|ဝ]] ct3oixy2up8ii0xc32t08zt6788e800 ကဏ္ဍ:ထာမ်ပလိက်ဝေပ်အပြံၚ်အလှာဲပ္တဝ်ထ္ၜးပမာဏဂမၠိုၚ် 14 298599 401221 2026-08-14T11:44:45Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "[[ကဏ္ဍ:ထာမ်ပလိက်ဝေပ်ဂမၠိုၚ်]][[ကဏ္ဍ:ထာမ်ပလိက်အပြံၚ်အလှာဲပ္တဝ်ထ္ၜးပမာဏဗက်အလိုက်အရေဝ်ဘာသာဂမၠိုၚ်|ဝ]]" 401221 wikitext text/x-wiki [[ကဏ္ဍ:ထာမ်ပလိက်ဝေပ်ဂမၠိုၚ်]][[ကဏ္ဍ:ထာမ်ပလိက်အပြံၚ်အလှာဲပ္တဝ်ထ္ၜးပမာဏဗက်အလိုက်အရေဝ်ဘာသာဂမၠိုၚ်|ဝ]] 2neo32ybowkttdn0ccqyqyi1034hlkn ဝိက်ရှေန်နရဳ:မအရေဝ်သွက်တ္ၚဲဏအ်/၂၀၂၆/အဝ်ဂေတ် ၁၅ 4 298600 401222 2026-08-14T11:48:04Z 咽頭べさ 33 ခၞံကၠောန်လဝ် မုက်လိက် နကု "{{WOTD|nominativ|နာမ်| {{lb|cs|grammar}} ကိစ္စမဒုၚ်ယၟု၊ ကိစ္စမရပ်စပ်မဆေၚ်စပ်ကဵုပရေၚ်စၞောန်ထ္ၜးနကဵုပရောပရာ ဝါ စၞးမဆေၚ်စပ်ကဵုကြိယာသိၚ်ဗိုၚ်။ #: {{syn|cs|první pád|názevník|jmenovatel|jmenovník}}|audio=LL-Q9056 (ces)-Ghost4..." 401222 wikitext text/x-wiki {{WOTD|nominativ|နာမ်| {{lb|cs|grammar}} ကိစ္စမဒုၚ်ယၟု၊ ကိစ္စမရပ်စပ်မဆေၚ်စပ်ကဵုပရေၚ်စၞောန်ထ္ၜးနကဵုပရောပရာ ဝါ စၞးမဆေၚ်စပ်ကဵုကြိယာသိၚ်ဗိုၚ်။ #: {{syn|cs|první pád|názevník|jmenovatel|jmenovník}}|audio=LL-Q9056 (ces)-Ghost4Man-nominativ.wav|အဝ်ဂေတ်|၁၅}} 0p5rpeo07qyq0iy49jw2x62swwk2kkd