Module:qhv-pron: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 39: Line 39:
syllables = split(term, "·")
syllables = split(term, "·")
for i, syllable in ipairs(syllables) do
for i, syllable in ipairs(syllables) do
if match(syllable, "'") then
syllable = gsub(syllable, "'", "ˈ")
return table.concat(syllables)
end
weight[i] = match(syllable, "[aeiouy" .. NONSYLLABIC .. "]$") and "l" or "h"
weight[i] = match(syllable, "[aeiouy" .. NONSYLLABIC .. "]$") and "l" or "h"
end
end