Module:siwa-noun/data: Difference between revisions

From Linguifex
Jump to navigation Jump to search
No edit summary
No edit summary
Line 2: Line 2:


local sub = mw.ustring.sub
local sub = mw.ustring.sub
local m = mw.ustring.match
local match = mw.ustring.match


data["a"] = {
data["a"] = {
Line 15: Line 15:
data.forms["u"] = {stem}
data.forms["u"] = {stem}
if stem:m("m.$") or stem:m("mm.$") then
if stem:match("m.$") or stem:match("mm.$") then
data.forms["m"] = {""}
data.forms["m"] = {""}
end
end

Revision as of 19:16, 19 July 2021



local data = {}

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

data["a"] = {
	params = {
		[1] = {},
	},
}
setmetatable(data["a"], {__call = function(self, args, data)
	local stem = args[1]
	table.insert(data.categories, "Siwa inanimate nouns")
	table.insert(data.categories, "Siwa a-declension nouns")
	
	data.forms["u"] = {stem}
	if stem:match("m.$") or stem:match("mm.$") then
		data.forms["m"] = {""}
	end
end
})





return data