This module implements the following template:
{{ikx-noun}}
local export = {}
local lang = require("Module:languages").getByCode("ikx")
function export.noun(frame)
local params = {
= {},
= {},
= {}
}
local args = require("Module:parameters").process(frame:getParent().args, params)
if not args then
error("Please provide a headoword with the appropriate tone marks")
end
if not args then
error("Please provide a stem.")
elseif args:sub(-1) ~= "-" then
error("The stem must end with a dash.")
end
local data = {lang = lang, pos_category = "nouns", categories = {}, heads = {args}, inflections = {}}
--insert the stem
local stem = {label = "stem", {term = args, nolinkinfl = true}}
table.insert(data.inflections, stem)
--insert the plural, if it exists
if args then
local plural = {label = "plural", args, request = true}
table.insert(data.inflections, plural)
end
return require("Module:headword").full_headword(data)
end
return export