• The account request system seems to be hiding some requests. Join the Linguifex Discord server for support if you haven't been granted access after more than 24 hours. Be sure to check your spam folder! • The request form is only for screening out spambots. No need to share private info, just some conlanging experience to prove you're not a bot! • Donations for Linguifex upkeep can be given at Liberapay. Thank you! |
Module:mg-noun/data: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 5: | Line 5: | ||
local data = {} | local data = {} | ||
data["O"] = { | |||
params = { | |||
[1] = {}, | |||
}, | |||
} | |||
setmetatable(data["O"], {__call = function(self, args, data) | |||
local stem = data.head; local inserted = gsub(stem, "(.)o$", "i%1") | |||
local s1 = sub(stem, 1, -2); local s2 = sub(stem, 1, -3) | |||
data.decl_type = "O" | |||
table.insert(data.categories, "Modern Gallaecian o-declension nouns") | |||
data.forms["di_s"] = {s1 .. "o"} | |||
data.forms["da_s"] = {s1 .. "o"} | |||
data.forms["lo_s"] = {inserted .. "e"} | |||
data.forms["di_p"] = {s1 .. "os"} | |||
data.forms["da_p"] = {s1 .. "ú"} | |||
data.forms["lo_p"] = {s1 .. "ui"} | |||
end | |||
}) | |||
data["R"] = { | data["R"] = { |
Revision as of 11:36, 12 September 2021
- The following documentation is located at Module:mg-noun/data/doc.[edit]
- Useful links: root page • root page's subpages • links • transclusions • testcases • sandbox
local sub = mw.ustring.sub
local gsub = mw.ustring.gsub
local match = mw.ustring.match
local PAGENAME = mw.title.getCurrentTitle().text
local data = {}
data["O"] = {
params = {
[1] = {},
},
}
setmetatable(data["O"], {__call = function(self, args, data)
local stem = data.head; local inserted = gsub(stem, "(.)o$", "i%1")
local s1 = sub(stem, 1, -2); local s2 = sub(stem, 1, -3)
data.decl_type = "O"
table.insert(data.categories, "Modern Gallaecian o-declension nouns")
data.forms["di_s"] = {s1 .. "o"}
data.forms["da_s"] = {s1 .. "o"}
data.forms["lo_s"] = {inserted .. "e"}
data.forms["di_p"] = {s1 .. "os"}
data.forms["da_p"] = {s1 .. "ú"}
data.forms["lo_p"] = {s1 .. "ui"}
end
})
data["R"] = {
params = {
[1] = {},
},
}
setmetatable(data["R"], {__call = function(self, args, data)
local stem = data.head
local s1 = sub(stem, 1, -2); local s2 = sub(stem, 1, -3)
data.decl_type = "R"
table.insert(data.categories, "Modern Gallaecian r-declension nouns")
data.forms["di_s"] = {s1 .. "r"}
data.forms["da_s"] = {s2 .. "re"}
data.forms["lo_s"] = {s2 .. "re"}
data.forms["di_p"] = {s2 .. "res"}
data.forms["da_p"] = {s2 .. "rú"}
data.forms["lo_p"] = {s2 .. "rui"}
end
})
return data