Module:qay-pron: Difference between revisions

No edit summary
No edit summary
Line 19: Line 19:
local vowels = "[a" .. front .. back .. "ː]"
local vowels = "[a" .. front .. back .. "ː]"


local function open_to_closed(v)
local function laxen(v)
local otc = {}
local otc = {}
local switch = {["e"] = "ɛ", ["i"] = "ɪ", ["ɔ"] = "ɔ", ["u"] = "ʊ", ["a"] = "a"}
local switch = {["e"] = "ɛ", ["i"] = "ɪ", ["ɔ"] = "ɔ", ["u"] = "ʊ", ["a"] = "a"}
Line 44: Line 44:


local phonemic_rules = {
local phonemic_rules = {
{"([^nŋ]·)([tkdɡ])j", "%1%2ʲ"}, {"(" .. consonants .. ")(" .. consonants .. ")", function(c1, c2) return same(c1,c2) and c1 or c1 .. c2 end},
{"([^nŋ]·)([tkdɡ])j", "%1%2ʲ"}, {"·ˈ", "ˈ"},
{"(" .. consonants .. ")(" .. consonants .. ")", function(c1, c2) return same(c1,c2) and c1 or c1 .. c2 end},
}
}


local phonetic_rules = {
local phonetic_rules = {
{"([^nŋ]·)[tk]j", "%1ʧ"}, {"([^nŋ]·)[dɡ]j", "%1ʤ"}, {"r", "ɾ"},
{"·ˈ", "ˈ"}, {"([^nŋ]·)[tk]j", "%1ʧ"}, {"([^nŋ]·)[dɡ]j", "%1ʤ"}, {"r", "ɾ"},
{"h([" .. front .. "])", "ç%1"}, {"h([" .. back .. "])", "x%1"},  
{"h([" .. front .. "])", "ç%1"}, {"h([" .. back .. "])", "x%1"},  
--{"(" consonants .. vowel)", ""},
{"([·ˈ])(" .. consonants .. "?)(" .. vowel .. "*)(" .. consonants .. ")", function(st,c1,v,c2) return st .. c1 .. laxen(v) .. c2 end},