Module:siwa-noun/data: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 29: Line 29:
data["a"] = {
data["a"] = {
params = {
params = {
[1] = {},
["nolen"] = {},
},
},
}
}
setmetatable(data["a"], {__call = function(self, args, data)
setmetatable(data["a"], {__call = function(self, args, data)
local stem = data.head  
local stem = args.nolen and data.head or lenition(data.head)
local s2, s3 = sub(lenition(stem), 1, -3), sub(lenition(stem), 1, -4)
local s2, s3 = sub(stem, 1, -3), sub(stem, 1, -4)
table.insert(data.categories, "Siwa a-declension nouns")
table.insert(data.categories, "Siwa a-declension nouns")
data.forms["u"] = {stem}
data.forms["u"] = {data.head}
if stem:match(v.."mm.$") then
if stem:match(v.."mm.$") then
Line 96: Line 96:
data["e"] = {
data["e"] = {
params = {
params = {
[1] = {},
["nolen"] = {},
},
},
}
}
setmetatable(data["e"], {__call = function(self, args, data)
setmetatable(data["e"], {__call = function(self, args, data)
local stem = data.head  
local stem = args.nolen and data.head or lenition(data.head)
local s1, s2, s3 = sub(lenition(stem), 1, -2), sub(lenition(stem), 1, -3), sub(lenition(stem), 1, -4)
local s1, s2, s3 = sub(stem, 1, -2), sub(stem, 1, -3), sub(stem, 1, -4)
table.insert(data.categories, "Siwa e-declension nouns")
table.insert(data.categories, "Siwa e-declension nouns")
data.forms["u"] = {stem}
data.forms["u"] = {data.head}
if stem:match("[ae]$") then
if stem:match("[ae]$") then
Line 196: Line 196:
data["i"] = {
data["i"] = {
params = {
params = {
[1] = {},
["nolen"] = {},
},
},
}
}
setmetatable(data["i"], {__call = function(self, args, data)
setmetatable(data["i"], {__call = function(self, args, data)
local stem = data.head  
local stem = args.nolen and data.head or lenition(data.head)
local s1, s2, s3 = sub(lenition(stem), 1, -2), sub(lenition(stem), 1, -3), sub(lenition(stem), 1, -4)
local s1, s2, s3 = sub(stem, 1, -2), sub(stem, 1, -3), sub(stem, 1, -4)
table.insert(data.categories, "Siwa i-declension nouns")
table.insert(data.categories, "Siwa i-declension nouns")
data.forms["ine"] = {}
data.forms["ine"] = {}
data.forms["u"] = {stem}
data.forms["u"] = {data.head}
if stem:match(v.."[mn][mn].$") then
if stem:match(v.."[mn][mn].$") then
Line 255: Line 255:
data["o"] = {
data["o"] = {
params = {
params = {
[1] = {},
["nolen"] = {},
},
},
}
}
setmetatable(data["o"], {__call = function(self, args, data)
setmetatable(data["o"], {__call = function(self, args, data)
local stem = data.head  
local stem = args.nolen and data.head or lenition(data.head)
local s1, s2, s3 = sub(lenition(stem), 1, -2), sub(lenition(stem), 1, -3), sub(lenition(stem), 1, -4)
local s1, s2, s3 = sub(stem, 1, -2), sub(stem, 1, -3), sub(stem, 1, -4)
table.insert(data.categories, "Siwa o-declension nouns")
table.insert(data.categories, "Siwa o-declension nouns")
data.forms["u"] = {stem}
data.forms["u"] = {data.head}
if stem:match("[ae]$") then
if stem:match("[ae]$") then
Line 354: Line 354:
data["u"] = {
data["u"] = {
params = {
params = {
[1] = {},
["nolen"] = {},
},
},
}
}
setmetatable(data["u"], {__call = function(self, args, data)
setmetatable(data["u"], {__call = function(self, args, data)
local stem = data.head  
local stem = args.nolen and data.head or lenition(data.head)
local s1, s2, s3 = sub(lenition(stem), 1, -2), sub(lenition(stem), 1, -3), sub(lenition(stem), 1, -4)
local s1, s2, s3 = sub(stem, 1, -2), sub(stem, 1, -3), sub(stem, 1, -4)
table.insert(data.categories, "Siwa u-declension nouns")
table.insert(data.categories, "Siwa u-declension nouns")
data.forms["u"] = {stem}
data.forms["u"] = {data.head}
if stem:match("[aei]$") then
if stem:match("[aei]$") then
Line 428: Line 428:
}
}
setmetatable(data["y"], {__call = function(self, args, data)
setmetatable(data["y"], {__call = function(self, args, data)
local stem = data.head  
local stem = args.nolen and data.head or lenition(data.head)
local s1, s2, s3 = sub(lenition(stem), 1, -2), sub(lenition(stem), 1, -3), sub(lenition(stem), 1, -4)
local s1, s2, s3 = sub(stem, 1, -2), sub(stem, 1, -3), sub(stem, 1, -4)
table.insert(data.categories, "Siwa y-declension nouns")
table.insert(data.categories, "Siwa y-declension nouns")
data.forms["ine"] = {}
data.forms["ine"] = {}
data.forms["u"] = {stem}
data.forms["u"] = {data.head}
if stem:match("a$") then
if stem:match("a$") then