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


data["a"] = {
data["a"] = {
Line 13: Line 14:
table.insert(data.categories, "Siwa a-declension nouns")
table.insert(data.categories, "Siwa a-declension nouns")
data.forms["u"] = {"!"}
data.forms["u"] = {stem}
if stem:m("m.$") or stem:m("mm.$") then
data.forms["m"] = {""}
end
end
end
})
})

Revision as of 19:15, 19 July 2021



local data = {}

local sub = mw.ustring.sub
local m = 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:m("m.$") or stem:m("mm.$") then
		data.forms["m"] = {""}
	end
end
})





return data