Module:qhv-pron: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 25: Line 25:
{"n([" .. velar .. "])", "ŋ%1"}, {"n([" .. uvular .. "])", "ɴ%1"}, {"(" .. vowels .. ")r(" .. vowels .. ")", "%1ɾ%2"},  
{"n([" .. velar .. "])", "ŋ%1"}, {"n([" .. uvular .. "])", "ɴ%1"}, {"(" .. vowels .. ")r(" .. vowels .. ")", "%1ɾ%2"},  
}
local deacuter = {
["á"] = "a", ["é"] = "e", ["í"] = "i", ["ó"] = "o", ["ú"] = "u", ["ý"] = "y",
}
}


Line 41: Line 45:
for i, syllable in ipairs(syllables) do
for i, syllable in ipairs(syllables) do
if match(syllable, "[áéíóúý]") then
if match(syllable, "[áéíóúý]") then
syllable = gsub(syllable, "([áéíóúý])", mw.ustring.toNFC("%1"))
syllable = gsub(syllable, "([áéíóúý])", deacuter)
table.insert(syllables, i, "ˈ")
table.insert(syllables, i, "ˈ")
return table.concat(syllables)
return table.concat(syllables)

Navigation menu