Module:siwa-noun/data

From Linguifex
< Module:siwa-noun
Revision as of 20:16, 5 February 2021 by Sware (talk | contribs)
Jump to navigation Jump to search


local data = {}

local sub = mw.ustring.sub

decl_data["i-a-s"] = {
	params = {
		[1] = {},
	},
}
setmetatable(decl_data["i-a-s"], {__call = function(self, args, data)
	local stem = args[1]
	table.insert(data.categories, "Siwa a-declension nouns")
	
	data.forms["nom"] = {stem}
	data.forms["gen"] = {
		(sub(stem, -3, -2) == "mm" and sub(stem, 1, -4) .. "mġa") or
		(sub(stem, -2, -2) == "m" and sub(stem, 1, -3) .. "mġa") or
		(sub(stem, -2, -2) == "n" and sub(stem, 1, -3) .. "nka") or
		((sub(stem, -2, -2) == "p" or sub(stem, -2, -2) == "b") and sub(stem, 1, -3) .. "pra") or
		(sub(stem, -2, -2) == "t" and sub(stem, 1, -3) .. "tra") or
		(sub(stem, -3, -2) == "vv" and sub(stem, 1, -4) .. "gga") or
		(sub(stem, -3, -2) == "lk" and sub(stem, 1, -4) .. "lkka") or
		(sub(stem, -3, -2) == "rk" and sub(stem, 1, -4) .. "rkka") or
		(sub(stem, -3, -2) == "sk" and sub(stem, 1, -4) .. "skka") or
		(stem .. "ka")
	}
	data.forms["ine"] = {
		(sub(stem, -3, -2) == "mm" and sub(stem, 1, -4) .. "mṡia") or
		(sub(stem, -2, -2) == "m" and sub(stem, 1, -3) .. "mṡia") or
		(sub(stem, -2, -2) == "n" and sub(stem, 1, -3) .. "nṡia") or
		((sub(stem, -2, -2) == "p" or sub(stem, -2, -2) == "b") and sub(stem, 1, -3) .. "pṡia") or
		(sub(stem, -2, -2) == "t" and sub(stem, 1, -3) .. "tria") or
		(sub(stem, -3, -2) == "vv" and sub(stem, 1, -4) .. "ggia") or
		(sub(stem, -3, -2) == "lk" and sub(stem, 1, -4) .. "lkkia") or
		(sub(stem, -3, -2) == "rk" and sub(stem, 1, -4) .. "rkkia") or
		(sub(stem, -3, -2) == "sk" and sub(stem, 1, -4) .. "skkia") or
		(stem .. "kia"),
		(sub(stem, -2, -2) == "n" and sub(stem, 1, -3) .. "nkia") or
		((sub(stem, -2, -2) == "p" or sub(stem, -2, -2) == "b") and sub(stem, 1, -3) .. "pria") or
		(sub(stem, -2, -2) == "t" and sub(stem, 1, -3) .. "tṡia")
	}
	data.forms["ill"] = {
		(sub(stem, -3, -2) == "mm" and sub(stem, 1, -4) .. "mṡita") or
		(sub(stem, -2, -2) == "m" and sub(stem, 1, -3) .. "mṡita") or
		(sub(stem, -2, -2) == "n" and sub(stem, 1, -3) .. "nṡita") or
		((sub(stem, -2, -2) == "p" or sub(stem, -2, -2) == "b") and sub(stem, 1, -3) .. "pṡita") or
		(sub(stem, -2, -2) == "t" and sub(stem, 1, -3) .. "trita") or
		(sub(stem, -3, -2) == "vv" and sub(stem, 1, -4) .. "ggita") or
		(sub(stem, -3, -2) == "lk" and sub(stem, 1, -4) .. "lkkita") or
		(sub(stem, -3, -2) == "rk" and sub(stem, 1, -4) .. "rkkita") or
		(sub(stem, -3, -2) == "sk" and sub(stem, 1, -4) .. "skkita") or
		(stem .. "kita")
	}
	data.forms["ela"] = {
		(sub(stem, -3, -2) == "mm" and sub(stem, 1, -4) .. "mṡika") or
		(sub(stem, -2, -2) == "m" and sub(stem, 1, -3) .. "mṡika") or
		(sub(stem, -2, -2) == "n" and sub(stem, 1, -3) .. "nṡika") or
		((sub(stem, -2, -2) == "p" or sub(stem, -2, -2) == "b") and sub(stem, 1, -3) .. "pṡika") or
		(sub(stem, -2, -2) == "t" and sub(stem, 1, -3) .. "trika") or
		(sub(stem, -3, -2) == "vv" and sub(stem, 1, -4) .. "ggika") or
		(sub(stem, -3, -2) == "lk" and sub(stem, 1, -4) .. "lkkika") or
		(sub(stem, -3, -2) == "rk" and sub(stem, 1, -4) .. "rkkika") or
		(sub(stem, -3, -2) == "sk" and sub(stem, 1, -4) .. "skkika") or
		(stem .. "kika")
	}
	data.forms["ade"] = {
		(sub(stem, -3, -2) == "mm" and sub(stem, 1, -4) .. "mṡima") or
		(sub(stem, -2, -2) == "m" and sub(stem, 1, -3) .. "mṡima") or
		(sub(stem, -2, -2) == "n" and sub(stem, 1, -3) .. "nṡima") or
		((sub(stem, -2, -2) == "p" or sub(stem, -2, -2) == "b") and sub(stem, 1, -3) .. "pṡima") or
		(sub(stem, -2, -2) == "t" and sub(stem, 1, -3) .. "trima") or
		(sub(stem, -3, -2) == "vv" and sub(stem, 1, -4) .. "ggima") or
		(sub(stem, -3, -2) == "lk" and sub(stem, 1, -4) .. "lkkima") or
		(sub(stem, -3, -2) == "rk" and sub(stem, 1, -4) .. "rkkima") or
		(sub(stem, -3, -2) == "sk" and sub(stem, 1, -4) .. "skkima") or
		(stem .. "kima")
	}
	data.forms["all"] = {
		(sub(stem, -3, -2) == "mm" and sub(stem, 1, -4) .. "mṡibma") or
		(sub(stem, -2, -2) == "m" and sub(stem, 1, -3) .. "mṡibma") or
		(sub(stem, -2, -2) == "n" and sub(stem, 1, -3) .. "nṡibma") or
		((sub(stem, -2, -2) == "p" or sub(stem, -2, -2) == "b") and sub(stem, 1, -3) .. "pṡibma") or
		(sub(stem, -2, -2) == "t" and sub(stem, 1, -3) .. "tribma") or
		(sub(stem, -3, -2) == "vv" and sub(stem, 1, -4) .. "ggibma") or
		(sub(stem, -3, -2) == "lk" and sub(stem, 1, -4) .. "lkkibma") or
		(sub(stem, -3, -2) == "rk" and sub(stem, 1, -4) .. "rkkibma") or
		(sub(stem, -3, -2) == "sk" and sub(stem, 1, -4) .. "skkibma") or
		(stem .. "kibma")
	}
	data.forms["abl"] = {
		(sub(stem, -3, -2) == "mm" and sub(stem, 1, -4) .. "mṡiska") or
		(sub(stem, -2, -2) == "m" and sub(stem, 1, -3) .. "mṡiska") or
		(sub(stem, -2, -2) == "n" and sub(stem, 1, -3) .. "nṡiska") or
		((sub(stem, -2, -2) == "p" or sub(stem, -2, -2) == "b") and sub(stem, 1, -3) .. "pṡiska") or
		(sub(stem, -2, -2) == "t" and sub(stem, 1, -3) .. "triska") or
		(sub(stem, -3, -2) == "vv" and sub(stem, 1, -4) .. "ggiska") or
		(sub(stem, -3, -2) == "lk" and sub(stem, 1, -4) .. "lkkiska") or
		(sub(stem, -3, -2) == "rk" and sub(stem, 1, -4) .. "rkkiska") or
		(sub(stem, -3, -2) == "sk" and sub(stem, 1, -4) .. "skkiska") or
		(stem .. "kiska")
	}
end
})

























return data