Module:mg-pron: Difference between revisions

Jump to navigation Jump to search
No edit summary
No edit summary
Line 37: Line 37:
local monosyll = {["n"] = "ˈ", ["pron"] = "", ["particle"] = "(ˈ)", ["prep"] = "(ˈ)", ["conj"] = "(ˈ)"}
local monosyll = {["n"] = "ˈ", ["pron"] = "", ["particle"] = "(ˈ)", ["prep"] = "(ˈ)", ["conj"] = "(ˈ)"}
if #syll == 1 then
if #syll == 1 then
syll[1] = monosyll[pos] .. syll[1]
syll[1] = monosyll[pos] .. (pos ~= "n" and gsub(syll[1], "([aá])", "%1ː") or syll[1])
if match(monosyll[pos], "%(?ˈ%)?") --[[and match(syll[1], "[aá]")]] then gsub(syll[1], "([aá])", "%1(ː)") end
else
else
syll[#syll - 1] = "ˈ" .. syll[#syll - 1]
syll[#syll - 1] = "ˈ" .. syll[#syll - 1]