Module:xchc-pron: Difference between revisions

Jump to navigation Jump to search
no edit summary
(Undo revision 474002 by Sware (talk))
No edit summary
Line 111: Line 111:
-- Remove diacritics for module calculations based on vowels
-- Remove diacritics for module calculations based on vowels
function export.simplify(term)
function export.simplify(term)
term = mw.usting.toNFD(term):gsub(c.macron, "") -- vowel length  
term = mw.ustring.toNFD(term):gsub(c.macron, "") -- vowel length  
term = term:gsub("э" .. c.breve, "ɛ"); term = term:gsub("о" .. c.breve, "ɔ")
term = term:gsub("э" .. c.breve, "ɛ"); term = term:gsub("о" .. c.breve, "ɔ")
term = mw.ustring.toNFC(term):gsub("ё", "о"); term = term:gsub("е" .. c.diaer, "о")
term = mw.ustring.toNFC(term):gsub("ё", "о"); term = term:gsub("е" .. c.diaer, "о")

Navigation menu