Module:qhv-pron: Difference between revisions

Jump to navigation Jump to search
No edit summary
No edit summary
Line 27: Line 27:


local function write_stress(term)
local function write_stress(term)
local pattern = consonants .. vowels .. "*" .. consonants .. "-"
local pattern = consonants .. "?".. vowels .. "*" .. consonants .. "-"
local syll = {}
local syll = {}
syll = split(term, pattern)
term = gsub(term, pattern, "%1·")
term = gsub(term, "^·", "")
term = gsub(term, "·(" .. consonants .. ")·", "%1·")
term = gsub(term, "·(" .. consonants .. ")$", "%1")
return table.concat(syll, "-")
return term
end
end