Module:kilta-pron: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 61: Line 61:
local function syllabify(term)
local function syllabify(term)
local iskolan = term == "kolaːn"
local iskolan = term == "kolaːn"
--local syllable = "(" .. consonants .. "*" .. vowels .. consonants .. "-)"
term = term:gsub("(" .. consonants .. ")ː", "%1·%1")
term = term:gsub("(" .. consonants .. ")ː", "%1·%1")
term = term:gsub("q·q", "k·q")
term = term:gsub("q·q", "k·q")
term = term:gsub("([pβmtsnɾlʧkxʷqhyʤɡbvdː]*[aeiouáéíóúəïüʔ]ː?[pβmtsnɾlʧkxʷqhyʤɡbvdː]-)", "·%")
term = term:gsub("([pβmtsnɾlʧkxʷqhyʤɡbvdː]*)([aeiouáéíóúəïüʔ]ː?)([pβmtsnɾlʧkxʷqhyʤɡbvdː]-)", "·%1%2%3·")
term = term:gsub("^·", "")
term = term:gsub("^·", "")
term = term:gsub("·$", "")
term = term:gsub("·$", "")