Module:qhv-pron: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 34: Line 34:
local pattern = "(" .. consonants .. "*".. vowels .. "*" .. consonants .. "-)"
local pattern = "(" .. consonants .. "*".. vowels .. "*" .. consonants .. "-)"
local weight = {}
local weight = {}
term = gsub(term, pattern, "·%1")
term = term
term = gsub(term, "^·", "")
:gsub(pattern, "·%1")
term = gsub(term, "·(" .. consonants .. ")·", "·%1")
:gsub("^·", "")
term = gsub(term, "·(" .. consonants .. ")$", "%1")
:gsub("·(" .. consonants .. ")·", "·%1")
term = gsub(term, "·(" .. consonants .. ")(" .. consonants .. ")", "%1·%2")   
:gsub("·(" .. consonants .. ")$", "%1")
term = gsub(term, "([ptkbdɡ])·([rlṛsz])", "·%1%2")
:gsub("·(" .. consonants .. ")(" .. consonants .. ")", "%1·%2")   
term = gsub(term, "·(" .. consonants .. "?" .. consonants .. ")$", "%1")
:gsub("([ptkbdɡ])·([rlṛsz])", "·%1%2")
term = gsub(term, "·$", "")
:gsub("·(" .. consonants .. "?" .. consonants .. ")$", "%1")
:gsub("·$", "")
local syllables = split(term, "·")
local syllables = split(term, "·")

Navigation menu