Module:qlu-pron: Difference between revisions

No edit summary
No edit summary
Line 114: Line 114:
syll = "ˈ" .. gsub(mw.ustring.toNFD(syll), c.acute, "")
syll = "ˈ" .. gsub(mw.ustring.toNFD(syll), c.acute, "")
else break end
else break end
elseif match(word, first_stress) and not match(syll, first_stress) then
break
elseif match(syll, first_stress) then
elseif match(syll, first_stress) then
syll = "ˈ" .. gsub(mw.ustring.toNFD(syll), c.acute, "")
syll = "ˈ" .. gsub(mw.ustring.toNFD(syll), c.circ, "")
return table.concat(syllables, "·")
return table.concat(syllables, "·")
elseif match(syll, second_stress) then
elseif match(syll, second_stress) then
syll = "ˌ" .. gsub(mw.ustring.toNFD(syll), c.circ, "")
syll = "ˌ" .. gsub(mw.ustring.toNFD(syll), c.acute, "")
break
break
elseif match(word, "[ɛɔIÎÍ]") then
elseif match(mw.ustring.toNFD(word), "[ɛɔI]") then
if match(syll, "[ɛɔI]") and not match(syll, unstressed) then
if not match(syll, unstressed) then
syll = "ˈ" .. gsub(mw.ustring.toNFD(syll), c.acute, "")
syll = "ˈ" .. syll
return table.concat(syllables, "·")
elseif match(syll, second_stress) then
syll = "ˌ" .. gsub(mw.ustring.toNFD(syll), c.acute, "")
break
else
table.insert(syllables, #syllables-1, "ˈ")
return table.concat(syllables, "·")
return table.concat(syllables, "·")
end
end