Module:qay-pron: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 68: Line 68:
local syllables = split(term, "·");
local syllables = split(term, "·");
for i, syll in ipairs(syllables) do
if # syllables ~= 1 then
if match(syll, "´") or match(syll, "ː") then
for i, syll in ipairs(syllables) do
table.insert(syllables, i, "ˈ")
if match(syll, "´") or match(syll, "ː") then
return table.concat(syllables, "·")
table.insert(syllables, i, "ˈ")
elseif match(syll, "ŋ$") or match(syll, "[aɛɪɔʊ][ɪʊ]") then
return table.concat(syllables, "·")
table.insert(syllables, #syllables, "ˈ")
elseif match(syll, "ŋ$") or match(syll, "[aɛɪɔʊ][ɪʊ]") then
return table.concat(syllables, "·")
table.insert(syllables, #syllables, "ˈ")
else
return table.concat(syllables, "·")
table.insert(syllables, #syllables-1, "ˈ")
else
return table.concat(syllables, "·")
table.insert(syllables, #syllables-1, "ˈ")
return table.concat(syllables, "·")
end
end
end
end
end