48,355
edits
No edit summary |
|||
| Line 108: | Line 108: | ||
{"(" .. consonants .. ")([iyeø])", "%1ʲ%2"}, | {"(" .. consonants .. ")([iyeø])", "%1ʲ%2"}, | ||
} | } | ||
-- Remove diacritics for module calculations based on vowels | |||
function export.simplify(term) | |||
term = mw.usting.toNFD(term):gsub(c.macron, "") -- vowel length | |||
term = term:gsub("э" .. c.breve, "ɛ"); term = term:gsub("о" .. c.breve, "ɔ") | |||
term = mw.ustring.toNFC(term):gsub("ё", "о"); term = term:gsub("е" .. c.diaer, "о") | |||
return term | |||
end | |||
function export.crux(term) | function export.crux(term) | ||
| Line 122: | Line 131: | ||
function export.harmony(term) | function export.harmony(term) | ||
term = export.simplify(term) | |||
--[[local ret = { | |||
["roundness"] = ((not term:match("о" .. c.macron .. "?" .. c.breve) and term:match("[үуӯюөоё]")) or term:match("е" .. c.macron .. c.diaer)) and "r" | |||
or term:match("[ыиӣэе]") and "u" or "ar", | |||
["backness"] = term:match("э") and "f" or term:match("о" .. c.macron .. "?" .. c.breve) and "b" or "ab", | |||
}]] | |||
local ret = { | local ret = { | ||
["roundness"] = | ["roundness"] = term:match("[ыиӣеэ]") and "u" or term:match("[үөуӯюоё]") and "r" or "ar", | ||
["backness"] = term:match("ɜ") and "f" or term:match("ɔ") and "b" or "ab", | |||
["backness"] = term:match(" | |||
} | } | ||
return ret | return ret | ||