Module:siwa-noun/data: Difference between revisions
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 | local match = mw.ustring.match | ||
data["a"] = { | data["a"] = { | ||
Line 15: | Line 15: | ||
data.forms["u"] = {stem} | data.forms["u"] = {stem} | ||
if stem: | 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
- The following documentation is located at Module:siwa-noun/data/doc.[edit]
- Useful links: root page • root page's subpages • links • transclusions • testcases • sandbox
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