Module:cel-adjectives

local m_utilities = require("Module:utilities") local m_links = require("Module:links")

local export = {}

local lang = require("Module:languages").getByCode("cel-pro")

local function postprocess(args, data) -- Nothing here yet end

-- Inflection functions

export["o+a"] = function(frame) local params = { [1] = {required = true, default = ""}, }	local args = require("Module:parameters").process(frame:getParent.args, params) local delabial = mw.ustring.gsub(args[1], "ʷ$", "") local data = {forms = {}, info = "o/ā-stem", categories = {lang:getCanonicalName .. " o/ā-stem adjectives"}} data.forms["m_nom_sg"] = {args[1] .. "os"} data.forms["m_voc_sg"] = {args[1] .. "e"} data.forms["m_acc_sg"] = {args[1] .. "om"} data.forms["m_gen_sg"] = {args[1] .. "ī"} data.forms["m_dat_sg"] = {delabial .. "ūi"} data.forms["m_ins_sg"] = {delabial .. "ū"} data.forms["m_nom_du"] = {args[1] .. "ou"} data.forms["m_voc_du"] = {args[1] .. "ou"} data.forms["m_acc_du"] = {args[1] .. "ou"} data.forms["m_gen_du"] = {args[1] .. "ous"} data.forms["m_dat_du"] = {args[1] .. "obom"} data.forms["m_ins_du"] = {args[1] .. "obim"} data.forms["m_nom_pl"] = {args[1] .. "oi"} data.forms["m_voc_pl"] = {args[1] .. "oi"} data.forms["m_acc_pl"] = {args[1] .. "oms"} data.forms["m_gen_pl"] = {args[1] .. "om"} data.forms["m_dat_pl"] = {args[1] .. "obos"} data.forms["m_ins_pl"] = {args[1] .. "obis"} data.forms["f_nom_sg"] = {args[1] .. "ā"} data.forms["f_voc_sg"] = {args[1] .. "ā"} data.forms["f_acc_sg"] = {args[1] .. "am"} data.forms["f_gen_sg"] = {args[1] .. "ās"} data.forms["f_dat_sg"] = {args[1] .. "ai"} data.forms["f_ins_sg"] = {"?"} data.forms["f_nom_du"] = {args[1] .. "ai"} data.forms["f_voc_du"] = {args[1] .. "ai"} data.forms["f_acc_du"] = {args[1] .. "ai"} data.forms["f_gen_du"] = {args[1] .. "ous"} data.forms["f_dat_du"] = {args[1] .. "ābom"} data.forms["f_ins_du"] = {args[1] .. "ābim"} data.forms["f_nom_pl"] = {args[1] .. "ās"} data.forms["f_voc_pl"] = {args[1] .. "ās"} data.forms["f_acc_pl"] = {args[1] .. "ams"} data.forms["f_gen_pl"] = {args[1] .. "om"} data.forms["f_dat_pl"] = {args[1] .. "ābos"} data.forms["f_ins_pl"] = {args[1] .. "ābis"} data.forms["n_nom_sg"] = {args[1] .. "om"} data.forms["n_voc_sg"] = {args[1] .. "om"} data.forms["n_acc_sg"] = {args[1] .. "om"} data.forms["n_gen_sg"] = {args[1] .. "ī"} data.forms["n_dat_sg"] = {delabial .. "ūi"} data.forms["n_ins_sg"] = {delabial .. "ū"} data.forms["n_nom_du"] = {args[1] .. "ou"} data.forms["n_voc_du"] = {args[1] .. "ou"} data.forms["n_acc_du"] = {args[1] .. "ou"} data.forms["n_gen_du"] = {args[1] .. "ous"} data.forms["n_dat_du"] = {args[1] .. "obom"} data.forms["n_ins_du"] = {args[1] .. "obim"} data.forms["n_nom_pl"] = {args[1] .. "ā"} data.forms["n_voc_pl"] = {args[1] .. "ā"} data.forms["n_acc_pl"] = {args[1] .. "ā"} data.forms["n_gen_pl"] = {args[1] .. "om"} data.forms["n_dat_pl"] = {args[1] .. "obos"} data.forms["n_ins_pl"] = {args[1] .. "obis"} postprocess(args, data) return make_table(data) .. m_utilities.format_categories(data.categories, lang) end

export["ptcp"] = function(frame) local params = { [1] = {allow_holes = true}, [2] = {allow_holes = true}, [3] = {allow_holes = true}, [4] = {default = ""}, [5] = {allow_holes = true}, }	local args = require("Module:parameters").process(frame:getParent.args, params) local delabial = mw.ustring.gsub(args[4], "ʷ$", "") local data = {forms = {}, info = "Declension of the past participle"} data.forms["m_nom_sg"] = {args[4] .. "os"} data.forms["m_voc_sg"] = {args[4] .. "e"} data.forms["m_acc_sg"] = {args[4] .. "om"} data.forms["m_gen_sg"] = {args[4] .. "ī"} data.forms["m_dat_sg"] = {delabial .. "ūi"} data.forms["m_ins_sg"] = {delabial .. "ū"} data.forms["m_nom_du"] = {args[4] .. "ou"} data.forms["m_voc_du"] = {args[4] .. "ou"} data.forms["m_acc_du"] = {args[4] .. "ou"} data.forms["m_gen_du"] = {args[4] .. "ous"} data.forms["m_dat_du"] = {args[4] .. "obom"} data.forms["m_ins_du"] = {args[4] .. "obim"} data.forms["m_nom_pl"] = {args[4] .. "oi"} data.forms["m_voc_pl"] = {args[4] .. "oi"} data.forms["m_acc_pl"] = {args[4] .. "oms"} data.forms["m_gen_pl"] = {args[4] .. "om"} data.forms["m_dat_pl"] = {args[4] .. "obos"} data.forms["m_ins_pl"] = {args[4] .. "obis"} data.forms["f_nom_sg"] = {args[4] .. "ā"} data.forms["f_voc_sg"] = {args[4] .. "ā"} data.forms["f_acc_sg"] = {args[4] .. "am"} data.forms["f_gen_sg"] = {args[4] .. "ās"} data.forms["f_dat_sg"] = {args[4] .. "ai"} data.forms["f_ins_sg"] = {"?"} data.forms["f_nom_du"] = {args[4] .. "ai"} data.forms["f_voc_du"] = {args[4] .. "ai"} data.forms["f_acc_du"] = {args[4] .. "ai"} data.forms["f_gen_du"] = {args[4] .. "ous"} data.forms["f_dat_du"] = {args[4] .. "ābom"} data.forms["f_ins_du"] = {args[4] .. "ābim"} data.forms["f_nom_pl"] = {args[4] .. "ās"} data.forms["f_voc_pl"] = {args[4] .. "ās"} data.forms["f_acc_pl"] = {args[4] .. "ams"} data.forms["f_gen_pl"] = {args[4] .. "om"} data.forms["f_dat_pl"] = {args[4] .. "ābos"} data.forms["f_ins_pl"] = {args[4] .. "ābis"} data.forms["n_nom_sg"] = {args[4] .. "om"} data.forms["n_voc_sg"] = {args[4] .. "om"} data.forms["n_acc_sg"] = {args[4] .. "om"} data.forms["n_gen_sg"] = {args[4] .. "ī"} data.forms["n_dat_sg"] = {delabial .. "ūi"} data.forms["n_ins_sg"] = {delabial .. "ū"} data.forms["n_nom_du"] = {args[4] .. "ou"} data.forms["n_voc_du"] = {args[4] .. "ou"} data.forms["n_acc_du"] = {args[4] .. "ou"} data.forms["n_gen_du"] = {args[4] .. "ous"} data.forms["n_dat_du"] = {args[4] .. "obom"} data.forms["n_ins_du"] = {args[4] .. "obim"} data.forms["n_nom_pl"] = {args[4] .. "ā"} data.forms["n_voc_pl"] = {args[4] .. "ā"} data.forms["n_acc_pl"] = {args[4] .. "ā"} data.forms["n_gen_pl"] = {args[4] .. "om"} data.forms["n_dat_pl"] = {args[4] .. "obos"} data.forms["n_ins_pl"] = {args[4] .. "obis"} postprocess(args, data) return make_table(data) end

export["i"] = function(frame) local params = { [1] = {required = true, default = ""}, }	local args = require("Module:parameters").process(frame:getParent.args, params) local data = {forms = {}, info = "i-stem", categories = {lang:getCanonicalName .. " i-stem adjectives"}} data.forms["m_nom_sg"] = {args[1] .. "is"} data.forms["m_voc_sg"] = {args[1] .. "i"} data.forms["m_acc_sg"] = {args[1] .. "im"} data.forms["m_gen_sg"] = {args[1] .. "ēs"} data.forms["m_dat_sg"] = {args[1] .. "ē"} data.forms["m_ins_sg"] = {args[1] .. "ī"} data.forms["m_nom_du"] = {args[1] .. "ī"} data.forms["m_voc_du"] = {args[1] .. "ī"} data.forms["m_acc_du"] = {args[1] .. "ī"} data.forms["m_gen_du"] = {args[1] .. "you"} data.forms["m_dat_du"] = {args[1] .. "ibom"} data.forms["m_ins_du"] = {args[1] .. "ibim"} data.forms["m_nom_pl"] = {args[1] .. "īs"} data.forms["m_voc_pl"] = {args[1] .. "īs"} data.forms["m_acc_pl"] = {args[1] .. "ims"} data.forms["m_gen_pl"] = {args[1] .. "yom"} data.forms["m_dat_pl"] = {args[1] .. "ibos"} data.forms["m_ins_pl"] = {args[1] .. "ibis"} data.forms["f_nom_sg"] = {args[1] .. "is"} data.forms["f_voc_sg"] = {args[1] .. "i"} data.forms["f_acc_sg"] = {args[1] .. "im"} data.forms["f_gen_sg"] = {args[1] .. "ēs"} data.forms["f_dat_sg"] = {args[1] .. "ē"} data.forms["f_ins_sg"] = {args[1] .. "ī"} data.forms["f_nom_du"] = {args[1] .. "ī"} data.forms["f_voc_du"] = {args[1] .. "ī"} data.forms["f_acc_du"] = {args[1] .. "ī"} data.forms["f_gen_du"] = {args[1] .. "you"} data.forms["f_dat_du"] = {args[1] .. "ibom"} data.forms["f_ins_du"] = {args[1] .. "ibim"} data.forms["f_nom_pl"] = {args[1] .. "īs"} data.forms["f_voc_pl"] = {args[1] .. "īs"} data.forms["f_acc_pl"] = {args[1] .. "ims"} data.forms["f_gen_pl"] = {args[1] .. "yom"} data.forms["f_dat_pl"] = {args[1] .. "ibos"} data.forms["f_ins_pl"] = {args[1] .. "ibis"} data.forms["n_nom_sg"] = {args[1] .. "i"} data.forms["n_voc_sg"] = {args[1] .. "i"} data.forms["n_acc_sg"] = {args[1] .. "i"} data.forms["n_gen_sg"] = {args[1] .. "ois"} data.forms["n_dat_sg"] = {args[1] .. "ē"} data.forms["n_ins_sg"] = {args[1] .. "ī"} data.forms["n_nom_du"] = {args[1] .. "ī"} data.forms["n_voc_du"] = {args[1] .. "ī"} data.forms["n_acc_du"] = {args[1] .. "ī"} data.forms["n_gen_du"] = {args[1] .. "ois"} data.forms["n_dat_du"] = {args[1] .. "ibom"} data.forms["n_ins_du"] = {args[1] .. "ibim"} data.forms["n_nom_pl"] = {args[1] .. "yā"} data.forms["n_voc_pl"] = {args[1] .. "yā"} data.forms["n_acc_pl"] = {args[1] .. "yā"} data.forms["n_gen_pl"] = {args[1] .. "yom"} data.forms["n_dat_pl"] = {args[1] .. "ibos"} data.forms["n_ins_pl"] = {args[1] .. "ibis"} postprocess(args, data) return make_table(data) .. m_utilities.format_categories(data.categories, lang) end

export["u"] = function(frame) local params = { [1] = {required = true, default = ""}, }	local args = require("Module:parameters").process(frame:getParent.args, params) local data = {forms = {}, info = "u-stem", categories = {lang:getCanonicalName .. " u-stem adjectives"}} data.forms["m_nom_sg"] = {args[1] .. "us"} data.forms["m_voc_sg"] = {args[1] .. "u"} data.forms["m_acc_sg"] = {args[1] .. "um"} data.forms["m_gen_sg"] = {args[1] .. "ous"} data.forms["m_dat_sg"] = {args[1] .. "ou"} data.forms["m_ins_sg"] = {args[1] .. "ū"} data.forms["m_nom_du"] = {args[1] .. "ū"} data.forms["m_voc_du"] = {args[1] .. "ū"} data.forms["m_acc_du"] = {args[1] .. "ū"} data.forms["m_gen_du"] = {args[1] .. "ous"} data.forms["m_dat_du"] = {args[1] .. "ubom"} data.forms["m_ins_du"] = {args[1] .. "ubim"} data.forms["m_nom_pl"] = {args[1] .. "owes"} data.forms["m_voc_pl"] = {args[1] .. "ūs"} data.forms["m_acc_pl"] = {args[1] .. "ums"} data.forms["m_gen_pl"] = {args[1] .. "owom"} data.forms["m_dat_pl"] = {args[1] .. "ubos"} data.forms["m_ins_pl"] = {args[1] .. "ubis"} data.forms["f_nom_sg"] = {args[1] .. "us"} data.forms["f_voc_sg"] = {args[1] .. "u"} data.forms["f_acc_sg"] = {args[1] .. "um"} data.forms["f_gen_sg"] = {args[1] .. "ous"} data.forms["f_dat_sg"] = {args[1] .. "ou"} data.forms["f_ins_sg"] = {args[1] .. "ū"} data.forms["f_nom_du"] = {args[1] .. "ū"} data.forms["f_voc_du"] = {args[1] .. "ū"} data.forms["f_acc_du"] = {args[1] .. "ū"} data.forms["f_gen_du"] = {args[1] .. "ous"} data.forms["f_dat_du"] = {args[1] .. "ubom"} data.forms["f_ins_du"] = {args[1] .. "ubim"} data.forms["f_nom_pl"] = {args[1] .. "owes"} data.forms["f_voc_pl"] = {args[1] .. "ūs"} data.forms["f_acc_pl"] = {args[1] .. "ums"} data.forms["f_gen_pl"] = {args[1] .. "owom"} data.forms["f_dat_pl"] = {args[1] .. "ubos"} data.forms["f_ins_pl"] = {args[1] .. "ubis"} data.forms["n_nom_sg"] = {args[1] .. "u"} data.forms["n_voc_sg"] = {args[1] .. "u"} data.forms["n_acc_sg"] = {args[1] .. "u"} data.forms["n_gen_sg"] = {args[1] .. "ous"} data.forms["n_dat_sg"] = {args[1] .. "ou"} data.forms["n_ins_sg"] = {args[1] .. "ū"} data.forms["n_nom_du"] = {args[1] .. "ū"} data.forms["n_voc_du"] = {args[1] .. "ū"} data.forms["n_acc_du"] = {args[1] .. "ū"} data.forms["n_gen_du"] = {args[1] .. "ous"} data.forms["n_dat_du"] = {args[1] .. "ubom"} data.forms["n_ins_du"] = {args[1] .. "ubim"} data.forms["n_nom_pl"] = {args[1] .. "wā"} data.forms["n_voc_pl"] = {args[1] .. "wā"} data.forms["n_acc_pl"] = {args[1] .. "wā"} data.forms["n_gen_pl"] = {args[1] .. "owom"} data.forms["n_dat_pl"] = {args[1] .. "ubos"} data.forms["n_ins_pl"] = {args[1] .. "ubis"} postprocess(args, data) return make_table(data) .. m_utilities.format_categories(data.categories, lang) end

export["i"] = function(frame) local params = { [1] = {required = true, default = ""}, }	local args = require("Module:parameters").process(frame:getParent.args, params) local data = {forms = {}, info = "i-stem", categories = {lang:getCanonicalName .. " i-stem adjectives"}} data.forms["m_nom_sg"] = {args[1] .. "is"} data.forms["m_voc_sg"] = {args[1] .. "i"} data.forms["m_acc_sg"] = {args[1] .. "im"} data.forms["m_gen_sg"] = {args[1] .. "ēs"} data.forms["m_dat_sg"] = {args[1] .. "ē"} data.forms["m_ins_sg"] = {args[1] .. "ī"} data.forms["m_nom_du"] = {args[1] .. "ī"} data.forms["m_voc_du"] = {args[1] .. "ī"} data.forms["m_acc_du"] = {args[1] .. "ī"} data.forms["m_gen_du"] = {args[1] .. "you"} data.forms["m_dat_du"] = {args[1] .. "ibom"} data.forms["m_ins_du"] = {args[1] .. "ibim"} data.forms["m_nom_pl"] = {args[1] .. "īs"} data.forms["m_voc_pl"] = {args[1] .. "īs"} data.forms["m_acc_pl"] = {args[1] .. "ims"} data.forms["m_gen_pl"] = {args[1] .. "yom"} data.forms["m_dat_pl"] = {args[1] .. "ibos"} data.forms["m_ins_pl"] = {args[1] .. "ibis"} data.forms["f_nom_sg"] = {args[1] .. "is"} data.forms["f_voc_sg"] = {args[1] .. "i"} data.forms["f_acc_sg"] = {args[1] .. "im"} data.forms["f_gen_sg"] = {args[1] .. "ēs"} data.forms["f_dat_sg"] = {args[1] .. "ē"} data.forms["f_ins_sg"] = {args[1] .. "ī"} data.forms["f_nom_du"] = {args[1] .. "ī"} data.forms["f_voc_du"] = {args[1] .. "ī"} data.forms["f_acc_du"] = {args[1] .. "ī"} data.forms["f_gen_du"] = {args[1] .. "you"} data.forms["f_dat_du"] = {args[1] .. "ibom"} data.forms["f_ins_du"] = {args[1] .. "ibim"} data.forms["f_nom_pl"] = {args[1] .. "īs"} data.forms["f_voc_pl"] = {args[1] .. "īs"} data.forms["f_acc_pl"] = {args[1] .. "ims"} data.forms["f_gen_pl"] = {args[1] .. "yom"} data.forms["f_dat_pl"] = {args[1] .. "ibos"} data.forms["f_ins_pl"] = {args[1] .. "ibis"} data.forms["n_nom_sg"] = {args[1] .. "i"} data.forms["n_voc_sg"] = {args[1] .. "i"} data.forms["n_acc_sg"] = {args[1] .. "i"} data.forms["n_gen_sg"] = {args[1] .. "ois"} data.forms["n_dat_sg"] = {args[1] .. "ē"} data.forms["n_ins_sg"] = {args[1] .. "ī"} data.forms["n_nom_du"] = {args[1] .. "ī"} data.forms["n_voc_du"] = {args[1] .. "ī"} data.forms["n_acc_du"] = {args[1] .. "ī"} data.forms["n_gen_du"] = {args[1] .. "ois"} data.forms["n_dat_du"] = {args[1] .. "ibom"} data.forms["n_ins_du"] = {args[1] .. "ibim"} data.forms["n_nom_pl"] = {args[1] .. "yā"} data.forms["n_voc_pl"] = {args[1] .. "yā"} data.forms["n_acc_pl"] = {args[1] .. "yā"} data.forms["n_gen_pl"] = {args[1] .. "yom"} data.forms["n_dat_pl"] = {args[1] .. "ibos"} data.forms["n_ins_pl"] = {args[1] .. "ibis"} postprocess(args, data) return make_table(data) .. m_utilities.format_categories(data.categories, lang) end

-- Custom declension for sindos; according to Schrijver and Jasanoff, sindom was not used in the neuter singular and genitive plural; instead respectively sosim/sinde and sindoisom were used

export["sindos"] = function(frame) local params = { [1] = {required = true, default = ""}, }	local args = require("Module:parameters").process(frame:getParent.args, params) local delabial = mw.ustring.gsub(args[1], "ʷ$", "") local data = {forms = {}, info = "irregular", categories = {lang:getCanonicalName .. " irregular determiners"}} data.forms["m_nom_sg"] = {args[1] .. "os"} data.forms["m_voc_sg"] = {args[1] .. "e"} data.forms["m_acc_sg"] = {args[1] .. "om"} data.forms["m_gen_sg"] = {args[1] .. "ī"} data.forms["m_dat_sg"] = {delabial .. "ūi"} data.forms["m_ins_sg"] = {delabial .. "ū"} data.forms["m_nom_du"] = {args[1] .. "ou"} data.forms["m_voc_du"] = {args[1] .. "ou"} data.forms["m_acc_du"] = {args[1] .. "ou"} data.forms["m_gen_du"] = {args[1] .. "ous"} data.forms["m_dat_du"] = {args[1] .. "obom"} data.forms["m_ins_du"] = {args[1] .. "obim"} data.forms["m_nom_pl"] = {args[1] .. "oi"} data.forms["m_voc_pl"] = {delabial .. "ūs"} data.forms["m_acc_pl"] = {delabial .. "oms"} data.forms["m_gen_pl"] = {args[1] .. "oisom"} data.forms["m_dat_pl"] = {args[1] .. "obos"} data.forms["m_ins_pl"] = {args[1] .. "obis"} data.forms["f_nom_sg"] = {args[1] .. "ā"} data.forms["f_voc_sg"] = {args[1] .. "ā"} data.forms["f_acc_sg"] = {args[1] .. "am"} data.forms["f_gen_sg"] = {args[1] .. "ās"} data.forms["f_dat_sg"] = {args[1] .. "ai"} data.forms["f_ins_sg"] = {"?"} data.forms["f_nom_du"] = {args[1] .. "ai"} data.forms["f_voc_du"] = {args[1] .. "ai"} data.forms["f_acc_du"] = {args[1] .. "ai"} data.forms["f_gen_du"] = {args[1] .. "ous"} data.forms["f_dat_du"] = {args[1] .. "ābom"} data.forms["f_ins_du"] = {args[1] .. "ābim"} data.forms["f_nom_pl"] = {args[1] .. "ās"} data.forms["f_voc_pl"] = {args[1] .. "ās"} data.forms["f_acc_pl"] = {args[1] .. "ams"} data.forms["f_gen_pl"] = {args[1] .. "oisom"} data.forms["f_dat_pl"] = {args[1] .. "ābos"} data.forms["f_ins_pl"] = {args[1] .. "ābis"} data.forms["n_nom_sg"] = {"sosim, sinde"} data.forms["n_voc_sg"] = {"sosim, sinde"} data.forms["n_acc_sg"] = {"sosim, sinde"} data.forms["n_gen_sg"] = {args[1] .. "ī"} data.forms["n_dat_sg"] = {delabial .. "ūi"} data.forms["n_ins_sg"] = {delabial .. "ū"} data.forms["n_nom_du"] = {args[1] .. "ou"} data.forms["n_voc_du"] = {args[1] .. "ou"} data.forms["n_acc_du"] = {args[1] .. "ou"} data.forms["n_gen_du"] = {args[1] .. "ous"} data.forms["n_dat_du"] = {args[1] .. "obom"} data.forms["n_ins_du"] = {args[1] .. "obim"} data.forms["n_nom_pl"] = {args[1] .. "ā"} data.forms["n_voc_pl"] = {args[1] .. "ā"} data.forms["n_acc_pl"] = {args[1] .. "ā"} data.forms["n_gen_pl"] = {args[1] .. "oisom"} data.forms["n_dat_pl"] = {args[1] .. "obos"} data.forms["n_ins_pl"] = {args[1] .. "obis"} postprocess(args, data) return make_table(data) .. m_utilities.format_categories(data.categories, lang) end

-- Cardinal numerals, each so irregular that each must be hardcoded apiece. *duwo inflection is due to McCone in Stair na Gaeilge

export["duwo"] = function(frame) local data = {forms = {}, info = "irregular numeral", categories = {lang:getCanonicalName .. " irregular numerals"}} data.forms["m_nom_du"] = {"duwo"} data.forms["m_voc_du"] = {"duwo"} data.forms["m_acc_du"] = {"duwo"} data.forms["m_gen_du"] = {"duwo"} data.forms["m_dat_du"] = {"duwo"} data.forms["m_ins_du"] = {"duwo"}

data.forms["f_nom_du"] = {"dwei"} data.forms["f_voc_du"] = {"dwei"} data.forms["f_acc_du"] = {"dwei"} data.forms["f_gen_du"] = {"dwiyou"} data.forms["f_dat_du"] = {"dwibom"} data.forms["f_ins_du"] = {"dwibim"} data.forms["n_nom_du"] = {"duwo"} data.forms["n_voc_du"] = {"duwo"} data.forms["n_acc_du"] = {"duwo"} data.forms["n_gen_du"] = {"dwiyou"} data.forms["n_dat_du"] = {"dwibom"} data.forms["n_ins_du"] = {"dwibim"} postprocess(args, data) return make_table(data) .. m_utilities.format_categories(data.categories, lang) end

export["trīs"] = function(frame) local data = {forms = {}, info = "irregular numeral", categories = {lang:getCanonicalName .. " irregular numerals"}} data.forms["m_nom_pl"] = {"trīs"} data.forms["m_voc_pl"] = {"trīs"} data.forms["m_acc_pl"] = {"trims"} data.forms["m_gen_pl"] = {"triyom"} data.forms["m_dat_pl"] = {"tribom"} data.forms["m_ins_pl"] = {"tribim"}

data.forms["f_nom_pl"] = {"tisres"} data.forms["f_voc_pl"] = {"tisres"} data.forms["f_acc_pl"] = {"tisrams"} data.forms["f_gen_pl"] = {"tisrom"} data.forms["f_dat_pl"] = {"tisribom"} data.forms["f_ins_pl"] = {"tisribim"} data.forms["n_nom_pl"] = {"trī"} data.forms["n_voc_pl"] = {"trī"} data.forms["n_acc_pl"] = {"trī"} data.forms["n_gen_pl"] = {"triyom"} data.forms["n_dat_pl"] = {"tribom"} data.forms["n_ins_pl"] = {"tribim"} postprocess(args, data) return make_table(data) .. m_utilities.format_categories(data.categories, lang) end

export["kʷetwores"] = function(frame) local data = {forms = {}, info = "irregular numeral", categories = {lang:getCanonicalName .. " irregular numerals"}} data.forms["m_nom_pl"] = {"kʷetwores"} data.forms["m_voc_pl"] = {"kʷetwores"} data.forms["m_acc_pl"] = {"kʷetworams"} data.forms["m_gen_pl"] = {"kʷeturiyom"} data.forms["m_dat_pl"] = {"kʷeturibom"} data.forms["m_ins_pl"] = {"kʷeturibim"}

data.forms["f_nom_pl"] = {"kʷetesres"} data.forms["f_voc_pl"] = {"kʷetesres"} data.forms["f_acc_pl"] = {"kʷetesrams"} data.forms["f_gen_pl"] = {"kʷetesriyom"} data.forms["f_dat_pl"] = {"kʷetesribom"} data.forms["f_ins_pl"] = {"kʷetesribim"} data.forms["n_nom_pl"] = {"?"} data.forms["n_voc_pl"] = {"?"} data.forms["n_acc_pl"] = {"?"} data.forms["n_gen_pl"] = {"kʷeturiyom"} data.forms["n_dat_pl"] = {"kʷeturibom"} data.forms["n_ins_pl"] = {"kʷeturibim"} postprocess(args, data) return make_table(data) .. m_utilities.format_categories(data.categories, lang) end

local names = { ["nom"] = "nominative", ["voc"] = "vocative", ["acc"] = "accusative", ["gen"] = "genitive", ["dat"] = "dative", ["ins"] = "instrumental", ["sg"] = "singular", ["du"] = "dual", ["pl"] = "plural", ["m"] = "masculine", ["f"] = "feminine", ["n"] = "neuter", }

-- Make the table function make_table(data) local function repl(param) if param == "info" then return mw.getContentLanguage:ucfirst(data.info or "") end local form = data.forms[param] if not form or #form == 0 then return "&mdash;" end local ret = {} for key, subform in ipairs(form) do table.insert(ret, m_links.full_link({lang = lang, alt = "*" .. subform})) end return table.concat(ret, ", ") end local genders = {"m", "f", "n"} local numbers = {"sg", "du", "pl"} local cases = {"nom", "voc", "acc", "gen", "dat", "ins"} local wikicode = {} table.insert(wikicode, "{| class=\"inflection-table vsSwitcher\" data-toggle-category=\"inflection\" style=\"background: #FAFAFA; border: 1px solid #d0d0d0; text-align: left;\" cellspacing=\"1\" cellpadding=\"2\"") table.insert(wikicode, "|- style=\"background: #CCCCFF;\"\n! class=\"vsToggleElement\" style=\"min-width: 41em;\" colspan=\"" .. (#numbers + 1) .. "\" | ") for _, gender in ipairs(genders) do		table.insert(wikicode, "|- class=\"vsHide\" style=\"background: #CCCCFF;\"") table.insert(wikicode, "! " .. names[gender]) for _, number in ipairs(numbers) do table.insert(wikicode, "! style=\"min-width: 11em; background: #CCCCFF;\" | " .. names[number]) end for _, case in ipairs(cases) do table.insert(wikicode, "|- class=\"vsHide\" style=\"background-color: #F2F2FF;\"\n! style=\"min-width: 8em; background-color: #E6E6FF;\" | " .. names[case]) for _, number in ipairs(numbers) do				table.insert(wikicode, "| ") end end end table.insert(wikicode, "|}") wikicode = table.concat(wikicode, "\n") return (mw.ustring.gsub(wikicode, "", repl)) end

return export