This is a private module sandbox of Wyang, for their own experimentation. Items in this module may be added and removed at Wyang's discretion; do not rely on this module's stability.
local m_data = require("Module:User:Wyang/yue-char-pron/data")
local export = {}
function export.make(frame)
local character_readings = {}
for syllable, characters in pairs(m_data) do
for _, character in ipairs(characters) do
if character_readings then
table.insert(character_readings, syllable)
else
character_readings = { syllable }
end
end
end
local output_text = { "<pre>" }
for character, readings in pairs(character_readings) do
table.insert(output_text, (" = \"" .. table.concat(readings, ",") .. "\","))
end
table.insert(output_text, "</pre>")
return table.concat(output_text, "\n")
end
return export