local export = {}
local pos_functions = {}
local lang = require("Module:languages").getByCode("aot")
local PAGENAME = mw.title.getCurrentTitle().text
local script = lang:findBestScript(PAGENAME) -- Latn or Beng
function export.show(frame)
local args = frame:getParent().args
local poscat = frame.args or error("Part of speech has not been specified. Please pass parameter 1 to the module invocation.")
local data = {lang = lang, sc = script, pos_category = poscat, sccat = true, categories = {}, heads = {args or PAGENAME}, translits = {args}, inflections = {},
no_redundant_head_cat = not args
}
local beng = {label = "Bengali script", lang = lang, sc = require("Module:scripts").getByCode("Beng")}
if args then table.insert(beng, args) end
if args then table.insert(beng, args) end
if args then table.insert(beng, args) end
if args then table.insert(beng, args) end
if #beng > 0 then table.insert(data.inflections, beng) end
if pos_functions then
pos_functions(args, data)
end
return require("Module:headword").full_headword(data)
end
pos_functions = function(args, data)
--verb is always prefix
data.heads = data.heads .. "-"
end
pos_functions = function(args, data)
--classifier is always prefix
data.heads = data.heads .. "-"
end
pos_functions = function(args, data)
--adjective can be either type 1 or type 2
if args ~= "1" and args ~= "2" then
args = "?"
end
--adjective type 1 is prefix
if args == "1" then
data.heads = data.heads .. "-"
end
table.insert(data.inflections, {label = "type " .. args})
end
return export