Module:xchc-pron: Difference between revisions

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


function export.harmony(term)
function export.harmony(term)
local roundness, backness
local ret = {
 
["roundness"] = ((not term:match("о" .. c.macron .. "?" .. c.breve) and term:match("[үуӯюөоё]")) or term:match("е" .. c.macron .. c.diaer)) and "r"
if (not term:match("о" .. c.macron .. "?" .. c.breve) and term:match("[үуӯюөоё]"))
or term:match("[ыиӣэе]") and "u" or "ar",
or term:match("е" .. c.macron .. c.diaer) then
["backness"] = term:match("э") and "f" or term:match("о" .. c.macron .. "?" .. c.breve) and "b" or "ab",
roundness = "r"
}
elseif term:match("[ыиӣэе]") then
return ret
roundness = "u"
end
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


function separate_word(term)
function separate_word(term)

Navigation menu