Module:User:ObnoxiousCoder/hit-conj/mi

local hit = require("Module:User:ObnoxiousCoder/hit-common")

function consonant(stem1, stem2, vowel) local weni = "uw"..vowel.."ni" local teni = "t"..vowel.."ni"

local table = { nom = { inf = stem2.."anna", part = stem2.."anza", noun = stem2.."ātar", su = stem1.."uan" },		act = { pre = { ["1.sg"] = stem1.."mi", ["2.sg"] = stem1.."ši", ["3.sg"] = stem1.."zzi", ["1.pl"] = stem2.."uweni", ["2.pl"] = stem2.."tteni", ["3.pl"] = stem2.."anzi", },	         aor = { ["1.sg"] = stem1.."un", ["2.sg"] = stem1.."t", ["3.sg"] = stem1.."t", ["1.pl"] = stem1.."uen", ["2.pl"] = stem1.."tteni", ["3.pl"] = stem1.."er", },	         imp = { ["1.sg"] = stem2.."allu", ["2.sg"] = stem1, ["3.sg"] = stem1.."du", ["1.pl"] = stem1.."uen", ["2.pl"] = stem1.."tten", ["3.pl"] = stem2.."andu", }	 },	  mid = { pre = { ["1.sg"] = stem2.."ḫa(ri)", ["2.sg"] = stem2.."tta(ri), "..stem2.."tta(ti)", ["3.sg"] = stem2.."a(ri), "..stem2.."ttari", ["1.pl"] = stem2.."uwasta", ["2.pl"] = stem2.."ttuma", ["3.pl"] = stem2.."anta(ri)", },	     aor = { ["1.sg"] = stem2.."ḫat", ["2.sg"] = stem2.."ttat", ["3.sg"] = stem2.."ttat", ["1.pl"] = stem2.."uastat", ["2.pl"] = stem2.."dumat", ["3.pl"] = stem2.."antat", },	     imp = { ["1.sg"] = stem2.."ḫḫaḫaru", ["2.sg"] = stem2.."ḫut", ["3.sg"] = stem2.."aru, "..stem2.."ttaru", ["1.pl"] = stem2.."uwastat", ["2.pl"] = stem2.."dumat", ["3.pl"] = stem2.."antaru", }	 }	}	normalize_table(table) return table end

function normalize_table(tbl) for key, value in pairs(tbl) do       if type(value) == "string" then tbl[key] = hit.normalize_geminates(value) elseif type(value) == "table" then normalize_table(value) end end end

return function (args) local stem1 = args[2] local stem2 = args[3] or stem1 --local ya_stem = mw.ustring.gmatch(stem1, "(.+)[iy][iy]?a$") --local ye_stem = mw.ustring.gmatch(stem1, "(.+)[iy][iy]?e$") --local ess_stem = mw.ustring.gmatch(stem1, "(.+)ešš$") --local ai_stem = mw.ustring.gmatch(stem1, "(.+)ai$") --local a_stem = mw.ustring.gmatch(stem1, "(.+)e$") --local e_stem = mw.ustring.gmatch(stem1, "(.+)e$") --local nu_stem = mw.ustring.gmatch(stem1, "(.+)nu$") if mw.ustring.gmatch("asdya", "[iy]e$") then return ya_stem(stem1, stem2, vowel_broad) end local vowel_broad = mw.ustring.match(stem1, "[áéíóú]") and "a" or "e" return consonant(stem1, stem2, vowel_broad) end