Module:qhv-noun/data

From Linguifex
< Module:qhv-noun
Revision as of 19:36, 9 February 2021 by Sware (talk | contribs) (Created page with "local sub = mw.ustring.sub local alldata = {} alldata["1-l"] = { params = { [1] = {}, ["nopl"] = {}, }, } setmetatable(alldata["1-l"], {__call = function(self, args, d...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


local sub = mw.ustring.sub

local alldata = {}

alldata["1-l"] = {
	params = {
		[1] = {},
		["nopl"] = {},
	},
}
setmetatable(alldata["1-l"], {__call = function(self, args, data)
	local stem = args[1]
	if sub(stem, -1) == "i" then local i = true end
	data.decl_type = "lunar first-declension"
	table.insert(data.categories, "High Valyrian first-declension nouns")

	data.forms["nom_sg"] = {stem .. "a"}
	data.forms["acc_sg"] = {stem .. "e"}
	data.forms["gen_sg"] = {stem .. "o"}
	data.forms["dat_sg"] = {stem .. "ot"}
	data.forms["loc_sg"] = {stem .. "ā"}
	data.forms["ins_sg"] = {i and stem .. "ȳsa" or stem .. "osa"}
	data.forms["com_sg"] = {i and stem .. "ȳma" or stem .. "oma"}
	data.forms["voc_sg"] = {i and stem .. "ȳs" or stem .. "us"}

	if not args.nopl then
		data.forms["nom_pl"] = {i and stem .. "ī" or stem .. "i"}
		data.forms["acc_pl"] = {stem .. "ī"}
		data.forms["gen_pl"] = {i and stem .. "ȳti" or stem .. "oti"}
		data.forms["dat_pl"] = data.forms["gen_pl"]
		data.forms["loc_pl"] = data.forms["gen_pl"]
		data.forms["ins_pl"] = {i and stem .. "ȳssi" or stem .. "ossi"}
		data.forms["com_pl"] = {i and stem .. "ȳmmi" or stem .. "ommi"}
		data.forms["voc_pl"] = {i and stem .. "īs" or stem .. "is"}
		
		data.forms["nom_pa"] = {i and stem .. "ȳn" or stem .. "un"}
		data.forms["acc_pa"] = {i and stem .. "ȳni" or stem .. "uni"}
		data.forms["gen_pa"] = {i and stem .. "ȳno" or stem .. "uno"}
		data.forms["dat_pa"] = {i and stem .. "ȳnt" or stem .. "unta"}
		data.forms["loc_pa"] = {i and stem .. "ȳnna" or stem .. "unna"}
		data.forms["ins_pa"] = {i and stem .. "ȳssa" or stem .. "ussa"}
		data.forms["com_pa"] = {i and stem .. "ȳmma" or stem .. "umma"}
		data.forms["voc_pa"] = data.forms["ins_pa"]
		
		data.forms["nom_co"] = {stem .. "ar"}
		data.forms["acc_co"] = {stem .. "ari"}
		data.forms["gen_co"] = {stem .. "aro"}
		data.forms["dat_co"] = {stem .. "arta"}
		data.forms["loc_co"] = {stem .. "arra"}
		data.forms["ins_co"] = {stem .. "arza"}
		data.forms["com_co"] = {stem .. "arma"}
		data.forms["voc_co"] = data.forms["ins_co"]
	end
end
})

alldata["1-l"] = {
	params = {
		[1] = {},
		["nopl"] = {},
	},
}
setmetatable(alldata["1-a"], {__call = function(self, args, data)
	local stem = args[1]
	data.decl_type = "aquatic first-declension"
	table.insert(data.categories, "High Valyrian first-declension nouns")

	data.forms["nom_sg"] = {stem .. "ar"}
	data.forms["acc_sg"] = {stem .. "ri"}
	data.forms["gen_sg"] = {stem .. "ro"}
	data.forms["dat_sg"] = {stem .. "rot"}
	data.forms["loc_sg"] = {stem .. "ār"}
	data.forms["ins_sg"] = {stem .. "rosa"}
	data.forms["com_sg"] = {stem .. "roma"}
	data.forms["voc_sg"] = {stem .. "us"}

	if not args.nopl then
		data.forms["nom_pl"] = {stem .. "ri"}
		data.forms["acc_pl"] = {stem .. "rī"}
		data.forms["gen_pl"] = {stem .. "oti"}
		data.forms["dat_pl"] = data.forms["gen_pl"]
		data.forms["loc_pl"] = data.forms["gen_pl"]
		data.forms["ins_pl"] = {stem .. "rossi"}
		data.forms["com_pl"] = {stem .. "rommi"}
		data.forms["voc_pl"] = {stem .. "is"}
		
		data.forms["nom_pa"] = {i and stem .. "ȳn" or stem .. "run"}
		data.forms["acc_pa"] = {i and stem .. "ȳni" or stem .. "runi"}
		data.forms["gen_pa"] = {i and stem .. "ȳno" or stem .. "runo"}
		data.forms["dat_pa"] = {i and stem .. "ȳnt" or stem .. "runta"}
		data.forms["loc_pa"] = {i and stem .. "ȳnna" or stem .. "runna"}
		data.forms["ins_pa"] = {i and stem .. "ȳssa" or stem .. "russa"}
		data.forms["com_pa"] = {i and stem .. "ȳmma" or stem .. "rumma"}
		data.forms["voc_pa"] = data.forms["ins_pa"]
		
		data.forms["nom_co"] = {stem .. "rar"}
		data.forms["acc_co"] = {stem .. "rari"}
		data.forms["gen_co"] = {stem .. "raro"}
		data.forms["dat_co"] = {stem .. "rarta"}
		data.forms["loc_co"] = {stem .. "rarra"}
		data.forms["ins_co"] = {stem .. "rarza"}
		data.forms["com_co"] = {stem .. "rarma"}
		data.forms["voc_co"] = data.forms["ins_co"]
	end
end
})






return alldata