မဝ်ဂျူ:ta-headword
မံက်ပြာကတ်
Documentation for this module may be created at မဝ်ဂျူ:ta-headword/doc
local export = {}
local pos_functions = {}
local lang = require("Module:languages").getByCode("ta")
local script = require("Module:scripts").getByCode("Taml")
local PAGENAME = mw.title.getCurrentTitle().text
function export.show(frame)
local args = frame:getParent().args
local poscat = frame.args[1] 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, categories = {}, heads = {args["head"] or PAGENAME}, inflections = {}}
if pos_functions[poscat] then
pos_functions[poscat](args, data)
end
local letter = true
local specialLetter = mw.ustring.gmatch(PAGENAME, '.-([ஃஜஶஷஸஹ]).-')
while true do
letter = specialLetter()
if (not letter) then break end
end
return require("Module:headword").full_headword(data)
end
pos_functions["နာမ်"] = function(args, data)
local plurals = {label = "ကိုန်ဗဟုဝစ်"}
if args["pl"] then
table.insert(plurals, args["pl"])
table.insert(data.inflections, plurals)
end
end
pos_functions["သဗ္ဗနာမ်"] = function(args, data)
local plurals = {label = "ကိုန်ဗဟုဝစ်"}
if args["pl"] then
table.insert(plurals, args["pl"])
table.insert(data.inflections, plurals)
end
end
return export