45,660
edits
No edit summary |
No edit summary |
||
Line 5: | Line 5: | ||
local deacuter = {["á"] = "a", ["é"] = "e", ["í"] = "i", ["ó"] = "o", ["ú"] = "u"} | local deacuter = {["á"] = "a", ["é"] = "e", ["í"] = "i", ["ó"] = "o", ["ú"] = "u"} | ||
local cs = "bkdhjlmnñpqrstxzvɡzʧʎ" | |||
local data = {} | local data = {} | ||
Line 14: | Line 15: | ||
} | } | ||
setmetatable(data["o"], {__call = function(self, args, data) | setmetatable(data["o"], {__call = function(self, args, data) | ||
local stem = data.head; data.decl_type = "o"; local s1 = sub(stem, 1, -2) | local stem = data.head; data.decl_type = "o"; local s1 = sub(stem, 1, -2); local inserted = s1 | ||
local | local pat = { | ||
{"ch", "ʧ"}, {"il", "ʎ"}, {"([^" .. cs .. "])([" .. cs .. "]*)(i?)$", "%1i%2%3"}, {"ii", "i"}, {"c$", "qu"}, {"ʎ", "il"}, {"ʧ", "ch"} | |||
} | |||
for _, repl in ipairs(pat) do | |||
inserted = gsub(inserted, repl[1], repl[2]) | |||
end | |||
table.insert(data.categories, "Modern Gallaecian o-declension " .. (data.proper and "proper" or "") .. " nouns") | table.insert(data.categories, "Modern Gallaecian o-declension " .. (data.proper and "proper" or "") .. " nouns") | ||