Module:qhv-pron: Difference between revisions

Jump to navigation Jump to search
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(syllable)
end
weight[i] = match(syllable, "[aeiouy" .. NONSYLLABIC .. "]$") and "l" or "h"
weight[i] = match(syllable, "[aeiouy" .. NONSYLLABIC .. "]$") and "l" or "h"
end
end
Line 49: Line 53:
else table.insert(syllables, #syllables-1, "ˈ") end
else table.insert(syllables, #syllables-1, "ˈ") end
return table.concat(weight)
return table.concat(syllable)
end
end


Navigation menu