Module:xchc-pron: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 121: Line 121:


function export.harmony(term)
function export.harmony(term)
local ret = {
local roundness, backness
--["roundness"] = ipa:match("[yuøo]") and "r" or ipa:match("[ie]") and "u" or "ar",
 
--["backness"] = ipa:match("ɜ") and "f" or ipa:match("ɔ") and "b" or "ab",
if (not term:match("о" .. c.macron .. "?" .. c.breve) and term:match("[үуӯюөоё]"))
["roundness"] = term:match("[үуӯюөоё]") and "r" or term:match("[ыиӣэе]") and "u" or "ar",
or term:match("е" .. c.macron .. c.diaer) then
["backness"] = term:match("э") and "f" or term:match("о̆") and "b" or "ab",
roundness = "r"
}
elseif term:match("[ыиӣэе]") then
return ret
roundness = "u"
else
roundness = "ar"
end
 
if term:match("э") then
backness = "f"
elseif term:match("о" .. c.macron .. "?" .. c.breve) then
backness = "b"
else
backness = "ab"
end
 
return { roundness = roundness, backness = backness }
end
end


Navigation menu