Module:akk-conj/g/endings

local Sound = {} function Sound:new(vowel) self.vowel = vowel or "a" return setmetatable({}, {__index = self}) end function Sound:default(stem1, stem2) local v = self.vowel return { v..stem1, "t"..v..stem1, "t"..v..(stem2 or stem1).."ī", "i"..stem1, "ni"..stem1, "t"..v..(stem2 or stem1).."ā", "i"..(stem2 or stem1).."ū", "i"..(stem2 or stem1).."ā", } end function Sound:imp(s) return { "lu"..s.pret1, s.imp2, s.imp1.."ī", "li"..s.pret1, "i ni"..s.pret1, s.imp1.."ā", "li"..s.pret2.."ū", "li"..s.pret2.."ā", } end function Sound:dur(stem1, stem2) return self:default(stem1, stem2) end function Sound:perf(stem1, stem2) return self:default(stem1, stem2) end function Sound:pret(stem1, stem2) return self:default(stem1, stem2) end function Sound:nominal(stem) return stem.."um" end

-- -- local Ia = setmetatable({}, {__index = Sound}) function Ia:pret(stem1, stem2) return { "ā"..stem1, "tā"..stem1 , "tā"..stem2.."ī", "ī"..stem1, "nī"..stem1, "tā"..stem2.."ā", "ī"..stem2.."ū", "ī".. stem2.."ā" } end function Ia:imp(s) return { "lū"..s.pret1, s.imp2, s.imp1.."ī", "lī"..s.pret1, "i nī"..s.pret1, s.imp1.."ā", "lī"..s.pret2.."ū", "lī"..s.pret2.."ā", } end function Ia:perf(stem1, stem2) return self:pret(stem1, stem2) end
 * I-a verbs   |

-- ---|  I-e verbs    |- -- local Ie = setmetatable({}, {__index = Sound}) function Ie:dur(stem1, stem2) return { "e"..stem1, "te"..stem1, "te"..stem2.."ī", "i"..stem1, "ni"..stem1, "te"..stem2.."ā", "i"..stem1.."ū", "i"..stem1.."ā", } end function Ie:pret(stem1, stem2) return { "ē"..stem1, "tē"..stem1, "tē"..stem2.."ī", "ī"..stem1, "nī"..stem1, "tē"..stem2.."ā", "ī"..stem2.."ū", "ī"..stem2.."ā", } end function Ie:perf(stem1, stem2) return self:pret(stem1, stem2) end function Ie:imp(s) return { "lū"..s.pret1, s.imp2, s.imp1.."ī", "lī"..s.pret1, "i nī"..s.pret1, s.imp1.."ā", "lī"..s.pret2.."ū", "lī"..s.pret2.."ā", } end

-- ---|  I-n verbs    |- -- local In = setmetatable({}, {__index = Sound})

-- ---|  I-w verbs    |- -- local Iwa = setmetatable({}, {__index = Sound})

function Iwa:default(stem1, stem2) return { "u"..stem1, "tu"..stem1, "tu"..stem2.."ī", "u"..stem1, "nu"..stem1, "tu"..stem2.."ā", "u"..stem2.."ū", "u"..stem2.."ā", } end Iwa.perf = Sound.default

local Iwi = setmetatable({}, {__index = Sound})

function Iwi:perf(stem1, stem2) return self:pret(stem1, stem2) end function Iwi:pret(stem1, stem2) return { "ē"..stem1, "tē"..stem1, "tē"..stem2.."ī", "ī"..stem1, "nī"..stem1, "tē"..stem2.."ā", "ī"..stem2.."ū", "ī"..stem2.."ā", } end function Iwi:dur(stem1, stem2) return { "e"..stem1, "te"..stem1, "te"..stem2.."ī", "i"..stem1, "ni"..stem1, "te"..stem2.."ā", "i"..stem1.."ū", "i"..stem1.."ā", } end function Iwi:imp(s) return { "-",        "-",         "-",        "-",        "-",        "-",        "-",        "-",    }  end

-- -  II-a verbs -- local IIa = setmetatable({}, {__index = Sound})

-- -  II-e verbs -- local IIe = setmetatable({}, {__index = Sound}) function IIe:default(stem1, stem2) return { "e"..stem1, "te"..stem1, "te"..stem2.."ī", "i"..stem1, "ni"..stem1, "te"..stem2.."ā", "i"..stem2.."ū", "i"..stem2.."ā", } end

-- -  III-a verbs    --- -- local IIIa = setmetatable({}, {__index = Sound}) function IIIa:default(stem1, stem2) return { "a"..stem1.."a", "ta"..stem1.."a", "ta"..(stem2 or stem1).."î", "i"..stem1.."a", "ni"..stem1.."a", "ta"..(stem2 or stem1).."â", "i"..(stem2 or stem1).."û", "i"..(stem2 or stem1).."â", } end function IIIa:imp(s) return { "lu"..s.pret1.."a", s.imp2.."a", s.imp1.."î", "li"..s.pret1.."a", "i ni"..s.pret1.."a", s.imp1.."â", "li"..s.pret2.."û", "li"..s.pret2.."â", } end function IIIa:nominal(stem) return stem.."ûm" end

-- -  III-j verbs    --- -- local IIIj = setmetatable({}, {__index = IIIa}) function IIIj:default(stem1, stem2) return { "a"..stem1.."i", "ta"..stem1.."i", "ta"..(stem2 or stem1).."î", "i"..stem1.."i", "ni"..stem1.."i", "ta"..(stem2 or stem1).."iā", "i"..(stem2 or stem1).."û", "i"..(stem2 or stem1).."iā", } end function IIIj:imp(s) return { "lu"..s.pret1.."i", s.imp2.."i", s.imp1.."î", "li"..s.pret1.."i", "i ni"..s.pret1.."i", s.imp1.."iā", "li"..s.pret2.."û", "li"..s.pret2.."iā", } end

-- -  III-w verbs    --- -- local IIIw = setmetatable({}, {__index = IIIa}) function IIIw:default(stem1, stem2) return { "a"..stem1.."u", "ta"..stem1.."u", "ta"..(stem2 or stem1).."î", "i"..stem1.."u", "ni"..stem1.."u", "ta"..(stem2 or stem1).."â", "i"..(stem2 or stem1).."û", "i"..(stem2 or stem1).."â", } end function IIIw:imp(s) return { "lu"..s.pret1.."u", s.imp2.."u", s.imp1.."î", "li"..s.pret1.."u", "i ni"..s.pret1.."u", s.imp1.."â", "li"..s.pret2.."û", "li"..s.pret2.."â", } end

-- -  III-e verbs    --- -- local IIIe = setmetatable({}, {__index = IIIa}) function IIIe:default(stem1, stem2) return { "e"..stem1.."e", "te"..stem1.."e", "te"..(stem2 or stem1).."î", "i"..stem1.."e", "ni"..stem1.."e", "te"..(stem2 or stem1).."eā", "i"..(stem2 or stem1).."û", "i"..(stem2 or stem1).."eā", } end function IIIe:imp(s) return { "lu"..s.pret1.."e", s.imp2.."e", s.imp1.."î", "li"..s.pret1.."e", "i ni"..s.pret1.."e", s.imp1.."eā", "li"..s.pret2.."û", "li"..s.pret2.."eā", } end

return function (weakness) if not weakness then return Sound:new elseif weakness == "Sound e-i" then return Sound:new("e") elseif weakness == "I-a" then return Ia:new elseif weakness == "I-e" then return Ie:new elseif weakness == "I-n" then return In:new elseif weakness == "I-w a-i" then return Iwa:new elseif weakness == "I-w i" then return Iwi:new elseif weakness == "II-a" then return IIa:new elseif weakness == "II-e" then return IIe:new elseif weakness == "III-a" then return IIIa:new elseif weakness == "III-y" then return IIIj:new elseif weakness == "III-w" then return IIIw:new elseif weakness == "III-e" then return IIIe:new else error("Not yet implemented") end end