Module:mg-noun/data: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 13: Line 13:
setmetatable(data["o"], {__call = function(self, args, data)
setmetatable(data["o"], {__call = function(self, args, data)
local stem = data.head; local inserted = gsub(stem, "(.)o$", "i%1")
local stem = data.head; local inserted = gsub(stem, "(.)o$", "i%1")
local s1 = sub(stem, 1, -2); local s2 = sub(stem, 1, -3)
local s1 = sub(stem, 1, -2); data.decl_type = "o"
data.decl_type = "o"
table.insert(data.categories, "Modern Gallaecian o-declension nouns")
table.insert(data.categories, "Modern Gallaecian o-declension nouns")
Line 34: Line 33:
}
}
setmetatable(data["a"], {__call = function(self, args, data)
setmetatable(data["a"], {__call = function(self, args, data)
local stem = data.head
local stem = data.head; data.decl_type = "a"
local s1 = sub(stem, 1, -2); local s2 = sub(stem, 1, -3)
local s1 = sub(stem, 1, -2)
data.decl_type = "a"
table.insert(data.categories, "Modern Gallaecian a-declension nouns")
table.insert(data.categories, "Modern Gallaecian a-declension nouns")
Line 56: Line 54:
}
}
setmetatable(data["e"], {__call = function(self, args, data)
setmetatable(data["e"], {__call = function(self, args, data)
local stem = data.head
local stem = data.head; data.decl_type = "e"
local s1 = sub(stem, 1, -2); local s2 = sub(stem, 1, -3)
local s1 = sub(stem, 1, -2)
data.decl_type = "e"
table.insert(data.categories, "Modern Gallaecian e-declension nouns")
table.insert(data.categories, "Modern Gallaecian e-declension nouns")
Line 103: Line 100:
}
}
setmetatable(data["r"], {__call = function(self, args, data)
setmetatable(data["r"], {__call = function(self, args, data)
local stem = data.head
local stem = data.head; data.decl_type = "r"
local s1 = sub(stem, 1, -2); local s2 = sub(stem, 1, -3)
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")
table.insert(data.categories, "Modern Gallaecian r-declension nouns")
Line 115: Line 111:
data.forms["da_p"] = {s2 .. "rú"}
data.forms["da_p"] = {s2 .. "rú"}
data.forms["lo_p"] = {s2 .. "rui"}
data.forms["lo_p"] = {s2 .. "rui"}
end
})
data["nt"] = {
params = {
[1] = {},
},
}
setmetatable(data["nt"], {__call = function(self, args, data)
local stem = data.head; data.decl_type = "nt"
local s1 = sub(stem, 1, -2)
table.insert(data.categories, "Modern Gallaecian nt-declension nouns")
data.forms["di_s"] = {s1 .. "n"}
data.forms["da_s"] = {s1 .. "nze"}
data.forms["lo_s"] = {s1 .. "nze"}
data.forms["di_p"] = {s1 .. "ndes"}
data.forms["da_p"] = {s1 .. "ndú"}
data.forms["lo_p"] = {s1 .. "ndui"}
end
})
data["consonant"] = {
params = {
[1] = {},
},
}
setmetatable(data["consonant"], {__call = function(self, args, data)
local stem = data.head; data.decl_type = "consonant"
table.insert(data.categories, "Modern Gallaecian consonant-declension nouns")
data.forms["di_s"] = {stem}
data.forms["da_s"] = {stem .. "e"}
data.forms["lo_s"] = {stem .. "e"}
data.forms["di_p"] = {stem .. "as"}
data.forms["da_p"] = {stem .. "ú"}
data.forms["lo_p"] = {stem .. "ui"}
end
end