local export = {}
local NAMESPACE = mw.title.getCurrentTitle().nsText
local pos_functions = {}
pos_functions = function(postype, def, args, data)
local params = {
= {required = true},
= {required = true, list = "head", default = def},
= true,
= {type = "script"},
= {type = "boolean"}
}
local args = require("Module:parameters").process(args, params)
data.heads = args
data.no_redundant_head_cat = true -- since 2= is required and goes into heads
data.id = args.id
data.sc = args
data.sccat = args
end
-- The main entry point.
-- This is the only function that can be invoked from a template.
function export.show(frame)
local iparams = {
= {required = true},
= true,
= {type = "script"},
= {type = "boolean"}
}
local iargs = require("Module:parameters").process(frame.args, iparams)
local lang = require("Module:languages").getByCode(iargs)
local args = frame:getParent().args
local poscat = "diacritical marks"
local def = iargs.def
local postype = poscat
local data = {lang = lang, categories = {}, heads = {}, genders = {}, inflections = {}}
if pos_functions then
local new_poscat = pos_functions(postype, def, args, data)
if new_poscat then
poscat = new_poscat
end
end
data.pos_category = (NAMESPACE == "Reconstruction" and "reconstructed " or "") .. poscat
local ret = require("Module:headword").full_headword(data)
ret = mw.ustring.gsub(ret,"terms spelled with ]+","lemmas")
return ret
end
return export