Module:kilta-pron: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 37: Line 37:


local phonetic_rules = {
local phonetic_rules = {
{"a(ː?·?ˈ?)([nm])", "æ%1%2"},
{"a(ː?%.?ˈ?)([nm])", "æ%1%2"},
{"n(ː?·?ˈ?)([kxqƕ])", "ŋ%1%2"},
{"n(ː?%.?ˈ?)([kxqƕ])", "ŋ%1%2"},
{"([nm])·?k", "%1·ɡ"}, {"([nm])·?q", "%1·y"}, {"([nm])·?p", "%1·b"}, {"([nm])·?ʧ", "%1·ʤ"},
{"([nm])%.?k", "%1%.ɡ"}, {"([nm])%.?q", "%1%.y"}, {"([nm])%.?p", "%1%.b"}, {"([nm])%.?ʧ", "%1%.ʤ"},
{"([nm])·?t", "%1·d"},  
{"([nm])%.?t", "%1%.d"},  
{"([nm])(ː?·?ˈ?)β", "%1%2b"},
{"([nm])(ː?%.?ˈ?)β", "%1%2b"},
{"β([ie])", "v%1"},
{"β([ie])", "v%1"},
{"^(ˈ?)(" .. vowels .. ")", "%1ʔ%2"},
{"^(ˈ?)(" .. vowels .. ")", "%1ʔ%2"},
Line 62: Line 62:
local iskolan = term == "kolaːn"
local iskolan = term == "kolaːn"
local syllable = "(" .. consonants .. "?)(" .. vowels .. ")(" .. consonants .. "-)"
local syllable = "(" .. consonants .. "?)(" .. vowels .. ")(" .. consonants .. "-)"
term = gsub(term, syllable, ".%1.")
term = gsub(term, syllable, "%.%1%.")
term = gsub(term, "^%.", "")
term = gsub(term, "^%.", "")
term = gsub(term, "%.$", "")
term = gsub(term, "%.$", "")
term = gsub(term, "%.%.+", ".")
term = gsub(term, "%.%.+", "%.")
local syllables = split(term, ".")
local syllables = split(term, ".")