Module:qlu-pron: Difference between revisions

No edit summary
Tag: Manual revert
No edit summary
Line 69: Line 69:
{"ḱ", "kʷ"}, {"ǵ", "ɡʷ"}, {"ʈ", "t"},
{"ḱ", "kʷ"}, {"ǵ", "ɡʷ"}, {"ʈ", "t"},
{"·+", "."}
{"·", "."}
}
}


Line 85: Line 85:
if #syllables == 1 then return table.concat(syllables) end -- account for monosyllables
if #syllables == 1 then return table.concat(syllables) end -- account for monosyllables
for i, syllable in ipairs(syllables) do
if match(syllable, "[áéíóúý]") then -- if the user inputted manual stress, ignore all the rest
local manual_stress = "[áéíóú" .. c.acute .. "]"
for i, syll in ipairs(syllables) do
if match(word, manual_stress) and not match(syll, manual_stress) then
break
elseif match(syll, manual_stress) then
syll = "ˈ" .. gsub(mw.ustring.toNFD(syll), c.acute, "")
return table.concat(syllables, "·")
elseif match(syll, "ː") then
table.insert(syllables, i, "ˈ")
table.insert(syllables, i, "ˈ")
return table.concat(syllables, "·")
return table.concat(syllables, "·")
elseif match(word, "ŋ$") or match(syllables[#syllables], "[aeiouɛɪɔʊ][aeiouɛɪɔʊj]") then
table.insert(syllables, #syllables, "ˈ")
return table.concat(syllables, "·")
--[[else
table.insert(syllables, #syllables-1, "ˈ")
return ret]]
end
end
end
end