Module:qay-verb/data: Difference between revisions

From Linguifex
Jump to navigation Jump to search
No edit summary
No edit summary
Line 61: Line 61:
data.forms["imperative"] = {s1 .. "u"}
data.forms["imperative"] = {s1 .. "u"}
data.forms["hortative"] = {s1 .. "-" .. s1}
data.forms["hortative"] = {data.forms["imperative"] .. "-" .. data.forms["imperative"]}
data.forms["iterative"] = {stem .. "-" .. stem}
data.forms["iterative"] = {stem .. "-" .. stem}
data.forms["participle"] = {stem .. "yam"}
data.forms["participle"] = {stem .. "yam"}

Revision as of 11:48, 25 June 2023

Documentation for this module may be created at Module:qay-verb/data/doc

local sub = mw.ustring.sub
local gsub = mw.ustring.gsub
local match = mw.ustring.match

local m_table = require('Module:table')

local function llet(s, pattern)
	return match(s, "[" .. pattern .. "]$")
end

local function long(v)
	local switch = {
		["a"] = "ā", ["e"] = "ē", ["i"] = "ī", ["o"] = "ō", ["u"] = "ū",
	}
	return switch[v] or v
end

local d = {}

d["v"] = {
	params = {
		[1] = {},
	},
}
setmetatable(d["v"], {__call = function(self, args, data)
	local stem = args[1]
	local s1 = sub(stem, 1, -2)
	
	data.decl_type = "vocalic"
	if not data.no_cat then
		table.insert(data.categories, "Ayeri " .. data.decl_type .. " verbs")
	end
	
	data.forms["top_1_s"] = {stem .. "ay"}
	data.forms["top_2_s"] = {stem .. "va"}
	data.forms["top_3_s_m"] = {stem .. "ya"}
	data.forms["top_3_s_f"] = {stem .. "ye"}
	data.forms["top_3_s_n"] = {stem .. "yo"}
	data.forms["top_3_s_in"] = {stem .. "ara"}
	
	data.forms["cli_1_s"] = {stem .. "yang"}
	data.forms["cli_2_s"] = {stem .. "vāng"}
	data.forms["cli_3_s_m"] = {stem .. "yāng"}
	data.forms["cli_3_s_f"] = {stem .. "yeng"}
	data.forms["cli_3_s_n"] = {stem .. "yong"}
	data.forms["cli_3_s_in"] = {stem .. "reng"}
	
	data.forms["top_1_p"] = {stem .. "ayn"}
	data.forms["top_2_p"] = {stem .. "va"}
	data.forms["top_3_p_m"] = {stem .. "yan"}
	data.forms["top_3_p_f"] = {stem .. "yen"}
	data.forms["top_3_p_n"] = {stem .. "yon"}
	data.forms["top_3_p_in"] = {stem .. "aran"}
	
	data.forms["cli_1_p"] = {stem .. "nang"}
	data.forms["cli_2_p"] = {stem .. "vāng"}
	data.forms["cli_3_p_m"] = {stem .. "tang"}
	data.forms["cli_3_p_f"] = {stem .. "teng"}
	data.forms["cli_3_p_n"] = {stem .. "tong"}
	data.forms["cli_3_p_in"] = {stem .. "teng"}
	
	data.forms["imperative"] = {s1 .. "u"}
	data.forms["hortative"] = {data.forms["imperative"] .. "-" .. data.forms["imperative"]}
	data.forms["iterative"] = {stem .. "-" .. stem}
	data.forms["participle"] = {stem .. "yam"}
end
})

return d