Module:qay-pron: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 73: Line 73:
term = gsub(term, "(" .. consonants .. ")·(" .. consonants .. ")([pbmvstdnrɾlkɡŋhxçʤʧçx])", "%1%2·%3")
term = gsub(term, "(" .. consonants .. ")·(" .. consonants .. ")([pbmvstdnrɾlkɡŋhxçʤʧçx])", "%1%2·%3")
local syllables = split(term, "·"); local ret = table.concat(syllables, "·")
local syllables = split(term, "·");
if #syllables ~= 1 then
if #syllables ~= 1 then
Line 79: Line 79:
if match(syll, "´") or match(syll, "ː") then
if match(syll, "´") or match(syll, "ː") then
table.insert(syllables, i, "ˈ")
table.insert(syllables, i, "ˈ")
return ret
return table.concat(syllables, "·")
elseif match(term, "ŋ$") or match(syllables[#syllables], "[aɛɪɔʊ][ɪʊ]") then
elseif match(term, "ŋ$") or match(syllables[#syllables], "[aɛɪɔʊ][ɪʊ]") then
table.insert(syllables, #syllables, "ˈ")
table.insert(syllables, #syllables, "ˈ")
--syllables[#syllables-1] = gsub(syllables[#syllables-1], "ˈ", "")
--syllables[#syllables-1] = gsub(syllables[#syllables-1], "ˈ", "")
return ret
return table.concat(syllables, "·")
else
--[[else
table.insert(syllables, #syllables-1, "ˈ")
table.insert(syllables, #syllables-1, "ˈ")
return ret
return ret]]
end
end
end
end
--[[if not match(ret, "ˈ") then
ret = table.concat(syllables, "·");
if not match(ret, "ˈ") then
--ret = string.reverse(ret)
--ret = string.reverse(ret)
ret = gsub(ret, "·", "ˈ·", -2)
ret = gsub(ret, "·", "ˈ·", -2)
ret = gsub(ret, "ˈ·", "·", -1)
ret = gsub(ret, "ˈ·", "·", -1)
--ret = string.reverse(ret)
--ret = string.reverse(ret)
end]]
end
end
end

Navigation menu