local decl_data = {}
decl_data = {
params = {
= {},
= {},
},
}
setmetatable(decl_data, {__call = function(self, args, data)
local stem = args
local stem_i = ""
if mw.ustring.sub(stem, -2) == "ij" then
stem_i = mw.ustring.sub(stem, 1, -3) .. "ī"
data.decl_type = "masculine ja-stem"
table.insert(data.categories, "Proto-Germanic ja-stem nouns")
elseif mw.ustring.sub(stem, -1) == "j" then
stem_i = mw.ustring.sub(stem, 1, -2) .. "i"
data.decl_type = "masculine ja-stem"
table.insert(data.categories, "Proto-Germanic ja-stem nouns")
else
stem_i = stem
data.decl_type = "masculine a-stem"
table.insert(data.categories, "Proto-Germanic a-stem nouns")
end
data.forms = {stem .. "az"}
data.forms = {stem_i == stem and stem or stem_i}
data.forms = {stem .. "ą"}
data.forms = {stem .. "as", stem_i .. (stem_i == stem and "is" or "s")}
data.forms = {stem .. "ai"}
data.forms = {stem .. "ō"}
if not args.nopl then
data.forms = {stem .. "ōz", args .. "ōs"}
data.forms = data.forms
data.forms = {stem .. "anz"}
data.forms = {stem .. "ǫ̂"}
data.forms = {stem .. "amaz"}
data.forms = {stem .. "amiz"}
end
end
})
decl_data = {
params = {
= {},
= {},
},
}
setmetatable(decl_data, {__call = function(self, args, data)
decl_data(args, data)
data.decl_type = data.decl_type:gsub("masculine", "neuter")
data.forms = data.forms
data.forms = data.forms
if not args.nopl then
data.forms = {args .. "ō"}
data.forms = data.forms
data.forms = data.forms
data.forms = {args .. "ǫ̂"}
data.forms = {args .. "amaz"}
data.forms = {args .. "amiz"}
end
end
})
decl_data = {
params = {
= {},
= {},
= {},
},
}
setmetatable(decl_data, {__call = function(self, args, data)
decl_data(args, data)
data.decl_type = data.decl_type:gsub("masculine", "neuter")
data.forms = data.forms
data.forms = data.forms
if not args.nopl then
data.forms = {args .. "ō"}
data.forms = data.forms
data.forms = data.forms
data.forms = {args .. "ǫ̂"}
data.forms = {args .. "amaz"}
data.forms = {args .. "amiz"}
end
end
})
decl_data = {
params = {
= {},
= {},
= {},
= {},
},
}
setmetatable(decl_data, {__call = function(self, args, data)
local pagename = mw.title.getCurrentTitle().subpageText
local s = mw.ustring.sub(pagename, -1, -1)
-- Check for s-stems
if mw.ustring.sub(pagename, -1, -1) == "s" and not mw.ustring.find(mw.ustring.sub(pagename, -2, -2), "") then
s = ""
end
-- (mw.ustring.find(mw.ustring.sub(args, -1, -1), "") and "s" or "z")
data.decl_type = "consonant stem"
data.forms = {args.nomsg or (args .. s)}
data.forms = {args.vocsg or args}
data.forms = {args .. "ų"}
data.forms = {args .. "iz"}
data.forms = {args .. "i"}
data.forms = {args .. "ē"}
if not args.nopl then
data.forms = {args .. "iz"}
data.forms = data.forms
data.forms = {args .. "unz"}
data.forms = {args .. "ǫ̂"}
data.forms = {args .. "umaz"}
data.forms = {args .. "umiz"}
end
table.insert(data.categories, "Proto-Germanic consonant stem nouns")
end
})
decl_data = {
params = {
= {},
= {},
},
}
setmetatable(decl_data, {__call = function(self, args, data)
decl_data(args, data)
data.decl_type = "neuter consonant stem"
data.forms = {args}
data.forms = data.forms
data.forms = data.forms
if not args.nopl then
data.forms = {args}
data.forms = data.forms
data.forms = data.forms
end
end
})
decl_data = {
params = {
= {},
= {},
= {},
},
}
setmetatable(decl_data, {__call = function(self, args, data)
data.decl_type = "i-stem"
local j = args.j or require("Module:gem-pronunc").determine_sievers(args)
data.forms = {args .. "iz"}
data.forms = {args .. "i"}
data.forms = {args .. "į"}
data.forms = {args .. "īz"}
data.forms = {args .. "ī"}
data.forms = {args .. "ī"}
if not args.nopl then
data.forms = {args .. "īz"}
data.forms = data.forms
data.forms = {args .. "inz"}
data.forms = {args .. (j or "") .. "ǫ̂"}
data.forms = {args .. "imaz"}
data.forms = {args .. "imiz"}
end
table.insert(data.categories, "Proto-Germanic i-stem nouns")
end
})
decl_data = {
params = {
= {},
= {},
= {},
= {},
},
}
setmetatable(decl_data, {__call = function(self, args, data)
data.decl_type = "feminine i-stem"
local j = args.j or require("Module:gem-pronunc").determine_sievers(args)
data.forms = {args .. "iz"}
data.forms = {args .. "i"}
data.forms = {args .. "į"}
data.forms = {args .. "īz"}
data.forms = {args .. "ī"}
data.forms = {args .. "ī"}
if not args.nopl then
data.forms = {args .. "īz"}
data.forms = data.forms
data.forms = {args .. "inz"}
data.forms = {args .. (j or "") .. "ǫ̂"}
data.forms = {args .. "imaz"}
data.forms = {args .. "imiz"}
end
table.insert(data.categories, "Proto-Germanic i-stem nouns")
end
})
decl_data = {
params = {
= {},
= {},
= {},
},
}
setmetatable(decl_data, {__call = function(self, args, data)
decl_data(args, data)
data.decl_type = "neuter i-stem"
data.forms = data.forms
data.forms = data.forms
if not args.nopl then
data.forms = {args .. "ī"}
data.forms = data.forms
data.forms = data.forms
end
end
})
decl_data = {
params = {
= {},
= {},
},
}
setmetatable(decl_data, {__call = function(self, args, data)
data.decl_type = "ī/jō-stem"
local stem = args .. require("Module:gem-pronunc").determine_sievers(args)
data.forms = {args .. "ī"}
data.forms = data.forms
data.forms = {stem .. "ǭ"}
data.forms = {stem.. "ōz"}
data.forms = {stem .. "ōi"}
data.forms = {stem .. "ō"}
if not args.nopl then
data.forms = {stem .. "ôz"}
data.forms = data.forms
data.forms = {stem .. "ōz"}
data.forms = {stem .. "ǫ̂"}
data.forms = {stem .. "ōmaz"}
data.forms = {stem .. "ōmiz"}
end
table.insert(data.categories, "Proto-Germanic ī/jō-stem nouns")
end
})
decl_data = {
params = {
= {},
= {},
},
}
setmetatable(decl_data, {__call = function(self, args, data)
data.decl_type = "ōn-stem"
data.forms = {args .. "ǭ"}
data.forms = data.forms
data.forms = {args .. "ōnų"}
data.forms = {args .. "ōniz"}
data.forms = {args .. "ōni"}
data.forms = {args .. "ōnē"}
if not args.nopl then
data.forms = {args .. "ōniz"}
data.forms = data.forms
data.forms = {args .. "ōnunz"}
data.forms = {args .. "ōnǫ̂"}
data.forms = {args .. "ōmaz"}
data.forms = {args .. "ōmiz"}
end
table.insert(data.categories, "Proto-Germanic ōn-stem nouns")
end
})
decl_data = {
params = {
= {},
= {},
},
}
setmetatable(decl_data, {__call = function(self, args, data)
data.decl_type = "masculine an-stem"
data.forms = {args .. "ô"}
data.forms = data.forms
data.forms = {args .. "anų"}
data.forms = {args.. "iniz"}
data.forms = {args .. "ini"}
data.forms = {args .. "inē"}
if not args.nopl then
data.forms = {args .. "aniz"}
data.forms = data.forms
data.forms = {args .. "anunz"}
data.forms = {args .. "anǫ̂"}
data.forms = {args .. "ammaz"}
data.forms = {args .. "ammiz"}
end
table.insert(data.categories, "Proto-Germanic an-stem nouns")
end
})
decl_data = {
params = {
= {},
= {},
= {},
= {},
},
}
setmetatable(decl_data, {__call = function(self, args, data)
data.decl_type = "masculine an-stem"
data.forms = {args .. "ô"}
data.forms = data.forms
data.forms = {args .. "anų"}
data.forms = {args.. "az"}
data.forms = {args .. "ini"}
data.forms = {args .. "ē"}
if not args.nopl then
data.forms = {args .. "aniz"}
data.forms = data.forms
data.forms = {args .. "unz"}
data.forms = {args .. "ǫ̂"}
data.forms = {args .. "ummaz"}
data.forms = {args .. "ummiz"}
end
table.insert(data.categories, "Proto-Germanic an-stem nouns")
end
})
decl_data = {
params = {
= {},
= {},
},
}
setmetatable(decl_data, {__call = function(self, args, data)
decl_data(args, data)
data.decl_type = "neuter an-stem"
data.forms = data.forms
if not args.nopl then
data.forms = {args .. "ōnō"}
data.forms = data.forms
data.forms = data.forms
end
table.insert(data.categories, "Proto-Germanic an-stem nouns")
end
})
decl_data = {
params = {
= {},
= {},
},
}
setmetatable(decl_data, {__call = function(self, args, data)
data.decl_type = "īn-stem"
data.forms = {args .. "į̄"}
data.forms = data.forms
data.forms = {args .. "īnų"}
data.forms = {args .. "īniz"}
data.forms = {args .. "īni"}
data.forms = {args .. "īnē"}
if not args.nopl then
data.forms = {args .. "īniz"}
data.forms = data.forms
data.forms = {args .. "īnunz"}
data.forms = {args .. "īnǫ̂"}
data.forms = {args .. "īmaz"}
data.forms = {args .. "īmiz"}
end
table.insert(data.categories, "Proto-Germanic īn-stem nouns")
end
})
decl_data = {
params = {
= {},
= {},
},
}
setmetatable(decl_data, {__call = function(self, args, data)
data.decl_type = "ō-stem"
data.forms = {args .. "ō"}
data.forms = data.forms
data.forms = {args .. "ǭ"}
data.forms = {args .. "ōz"}
data.forms = {args .. "ōi"}
data.forms = data.forms
if not args.nopl then
data.forms = {args .. "ôz"}
data.forms = data.forms
data.forms = {args .. "ōz"}
data.forms = {args .. "ǫ̂"}
data.forms = {args .. "ōmaz"}
data.forms = {args .. "ōmiz"}
end
table.insert(data.categories, "Proto-Germanic ō-stem nouns")
end
})
decl_data = {
params = {
= {},
= {},
},
}
setmetatable(decl_data, {__call = function(self, args, data)
data.decl_type = "r-stem"
data.forms = {args .. "ēr"}
data.forms = {args .. "er"}
data.forms = {args .. "erų"}
data.forms = {args .. "urz"}
data.forms = {args .. "ri"}
data.forms = {args .. "rē"}
if not args.nopl then
data.forms = {args .. "riz"}
data.forms = data.forms
data.forms = {args .. "runz"}
data.forms = {args .. "rǫ̂"}
data.forms = {args .. "rumaz"}
data.forms = {args .. "rumiz"}
end
table.insert(data.categories, "Proto-Germanic r-stem nouns")
end
})
decl_data = {
params = {
= {},
= {},
},
}
setmetatable(decl_data, {__call = function(self, args, data)
data.decl_type = "u-stem"
data.forms = {args .. "uz"}
data.forms = {args .. "u"}
data.forms = {args .. "ų"}
data.forms = {args .. "auz"}
data.forms = {args .. "iwi"}
data.forms = {args .. "ū"}
if not args.nopl then
data.forms = {args .. "iwiz"}
data.forms = data.forms
data.forms = {args .. "unz"}
data.forms = {args .. "iwǫ̂"}
data.forms = {args .. "umaz"}
data.forms = {args .. "umiz"}
end
table.insert(data.categories, "Proto-Germanic u-stem nouns")
end
})
decl_data = {
params = {
= {},
= {},
},
}
setmetatable(decl_data, {__call = function(self, args, data)
decl_data(args, data)
data.decl_type = "neuter u-stem"
data.forms = data.forms
data.forms = data.forms
if not args.nopl then
data.forms = data.forms
data.forms = data.forms
data.forms = data.forms
end
end
})
decl_data = {
params = {
= {},
= {},
},
}
setmetatable(decl_data, {__call = function(self, args, data)
data.decl_type = "z-stem"
data.forms = {args .. "az"}
data.forms = data.forms
data.forms = data.forms
data.forms = {args .. "iziz"}
data.forms = {args .. "izi"}
data.forms = {args .. "izē"}
if not args.nopl then
data.forms = {args .. "izō"}
data.forms = data.forms
data.forms = data.forms
data.forms = {args .. "izǫ̂"}
data.forms = {args .. "izumaz"}
data.forms = {args .. "izumiz"}
end
table.insert(data.categories, "Proto-Germanic z-stem nouns")
end
})
decl_data = {}
setmetatable(decl_data, {__call = function(self, args, data)
local word = mw.title.getCurrentTitle().subpageText
irreg_data = require("Module:gem-decl-noun/data/irreg")
if irreg_data.irreg then
irreg_data.irreg(args, data)
else
error("Irregular inflection not found. Please check Module:gem-decl-noun/data.")
end
table.insert(data.categories, "Proto-Germanic irregular nouns")
end
})
return decl_data