模組:Phk-headword
外观
-- The following code is same as aio, kht. Just different at language code.
local export = {}
local pos_functions = {}
local gsub = mw.ustring.gsub
local u = mw.ustring.char
local lang = require("Module:languages").getByCode("phk")
local script = require("Module:scripts").getByCode("Mymr")
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 head = dotted_form(args["head"] or PAGENAME)
local tr = args["tr"]
local data = {lang = lang, sc = script, pos_category = poscat, categories = {}, heads = {head}, translits = {tr}, inflections = {}}
if pos_functions[poscat] then
pos_functions[poscat](args, data)
end
return require("Module:headword").full_headword(data)
end
-- https://www.unicode.org/Public/UNIDATA/StandardizedVariants.txt
function dotted_form(text)
return gsub(text, "([ကဂငတထပမယလဝဢေၵၸၺႀꩠꩡꩢꩣꩤꩥꩦꩫꩬꩯꩺ])", "%1" .. u(0xFE00))
end
--pos_functions here
return export