Module:User:ObnoxiousCoder/hit-conj/mi
Appearance
- This module sandbox lacks a documentation subpage. Please create it.
- Useful links: root page • root page’s subpages • links • transclusions • testcases • sandbox
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.."anz",
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 thematic(stem_e, stem_a, vowel)
local weni = "uw"..vowel.."ni"
local teni = "tt"..vowel.."ni"
local table = {
nom = {
inf = stem_a.."wanzi",
part = stem_a.."nz",
noun = stem_a.."war",
su = stem_a.."wan"
},
act = {
pre = {
["1.sg"] = stem_a.."mi",
["2.sg"] = stem_e.."ši",
["3.sg"] = stem_e.."zzi",
["1.pl"] = stem_a.."uweni",
["2.pl"] = stem_e.."tteni",
["3.pl"] = stem_a.."nzi",
},
aor = {
["1.sg"] = stem_e.."un",
["2.sg"] = stem_e.."t",
["3.sg"] = stem_e.."t",
["1.pl"] = stem_a.."uen",
["2.pl"] = stem_e.."tteni, "..stem_a.."tteni",
["3.pl"] = stem_e.."r",
},
imp = {
["1.sg"] = stem_a.."llu",
["2.sg"] = stem_e.."(t), "..stem_a.."(t)",
["3.sg"] = stem_a.."du",
["1.pl"] = stem_a.."uen",
["2.pl"] = stem_e.."tten, "..stem_a.."tten",
["3.pl"] = stem_a.."ndu",
}
},
mid = {
pre = {
["1.sg"] = stem_a.."ḫḫa(ri)",
["2.sg"] = stem_a.."tta(ri), "..stem_a.."tta(ti)",
["3.sg"] = stem_a.."(ri), "..stem_a.."ttari",
["1.pl"] = stem_a.."uwasta",
["2.pl"] = stem_a.."ttuma",
["3.pl"] = stem_a.."nta(ri)",
},
aor = {
["1.sg"] = stem_a.."ḫḫat",
["2.sg"] = stem_e.."ttat",
["3.sg"] = stem_e.."ttat",
["1.pl"] = stem_a.."uastat",
["2.pl"] = stem_e.."ddumat",
["3.pl"] = stem_a.."ntat",
},
imp = {
["1.sg"] = stem_a.."ḫḫaḫaru",
["2.sg"] = stem_a.."ḫḫut",
["3.sg"] = stem_a.."ru, "..stem_a.."ttaru",
["1.pl"] = stem_a.."uwastat",
["2.pl"] = stem_a.."ddumat",
["3.pl"] = stem_a.."ntaru",
}
}
}
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 ya_stem or ye_stem then
local thematic_stem = ya_stem or ye_stem
return thematic(thematic_stem..'ie', thematic_stem..'iya', 'e')
end
local vowel_broad = mw.ustring.match(stem1, "[áéíóú]") and "a" or "e"
return consonant(stem1, stem2, vowel_broad)
end