Module:User:Thadh/mus-IPA

local export = {}

local m_IPA = require("Module:IPA") local lang = require("Module:languages").getByCode("mus") local rsub = mw.ustring.gsub local rlower = mw.ustring.lower

local function phonetic(text) text = rlower(text) -- pitch text = rsub(text, "é", "eH") text = rsub(text, "ú", "uH") text = rsub(text, "á", "aH") text = rsub(text, "ó", "oH") text = rsub(text, "í", "iH") text = rsub(text, "́", "H") text = rsub(text, "ê", "eL") text = rsub(text, "û", "uL") text = rsub(text, "â", "aL") text = rsub(text, "ô", "oL") text = rsub(text, "î", "iL") text = rsub(text, "̂", "L") -- nasality text = rsub(text, "ṽ", "vN") text = rsub(text, "ẽ", "eN") text = rsub(text, "ũ", "uN") text = rsub(text, "ã", "aN") text = rsub(text, "õ", "oN") text = rsub(text, "ĩ", "iN") text = rsub(text, "̃", "N") -- consonants text = rsub(text, "c", "tʃ") text = rsub(text, "r", "ɬ") text = rsub(text, "([veęuųaąēoǫiįHLNmnlwy]))p([veęuųaąēoǫiįHLNmnlwy])", "%1b%2")	text = rsub(text, "([veęuųaąēoǫiįHLNmnlwy]))t([veęuųaąēoǫiįHLNmnlwy])", "%1d%2") text = rsub(text, "([veęuųaąēoǫiįHLNmnlwy]))tʃ([veęuųaąēoǫiįHLNmnlwy])", "%1dʒ%2")	text = rsub(text, "([veęuųaąēoǫiįHLNmnlwy]))k([veęuųaąēoǫiįHLNmnlwy])", "%1ɡ%2") text = rsub(text, "([veęuųaąēoǫiįHLNmnlwy]))f([veęuųaąēoǫiįHLNmnlwy])", "%1v%2")	text = rsub(text, "([veęuųaąēoǫiįHLNmnlwy]))s([veęuųaąēoǫiįHLNmnlwy])", "%1z%2") text = rsub(text, "(oH?L?N?)h", "%1χ") text = rsub(text, "χh", "χχ") text = rsub(text, "y", "j") text = rsub(text, "([ptkfsɬχmnlwj])%1", "%1ː") text = rsub(text, "tʃtʃ", "tʃː") end