45,645
edits
No edit summary |
No edit summary |
||
Line 59: | Line 59: | ||
{"ï", "ai̯"}, | {"ï", "ai̯"}, | ||
{"[·%.]ˈ", "ˈ"}, {"·", "."}, {"([áéíóú])", function(v) return deacuter[v] .. "ː" end}, | {"[·%.]ˈ", "ˈ"}, {"·", "."}, {"([áéíóú])", function(v) return deacuter[v] .. "ː" end}, | ||
} | |||
local sandhi_rules = { | |||
{"(" .. consonants .. ")u%sˈ?(" .. vowels .. ")", "%1w%2"}, | |||
{"(" .. consonants .. ")i%sˈ?(" .. vowels .. ")", "%1j%2"}, | |||
{"[mnŋ]%s(ˈ?[mpbβ])", "m·%1"}, {"[mnŋ]%s(ˈ?v)", "ɱ·%1"}, | |||
{"[mnŋ]%s(ˈ?[tdɾlsn])", "n·%1"}, {"[mnŋ]%s(ˈ?[ʧʤ])", "n̠·%1"}, | |||
{"[mnŋ]%s(ˈ?[ŋkɡqƕy])", "ŋ·%1"}, | |||
{"([mnŋ]) βə", "%1 bə"}, | |||
} | } | ||
Line 103: | Line 112: | ||
for _, rule in ipairs(phonetic_rules) do | for _, rule in ipairs(phonetic_rules) do | ||
phonetic = gsub(phonetic, rule[1], rule[2]) | phonetic = gsub(phonetic, rule[1], rule[2]) | ||
end | end | ||
Line 123: | Line 127: | ||
end | end | ||
local phonemicAll = table.concat(phonemic, " ") | |||
local phoneticAll = table.concat(phonetic, " ") | |||
for _, rule in ipairs(sandhi_rules) do | |||
phoneticAll = gsub(phoneticAll, rule[1], rule[2]) | |||
end | |||
for _, rule in ipairs(last_rules) do | |||
phonemicAll = gsub(phonemicAll, rule[1], rule[2]) | |||
phoneticAll = gsub(phoneticAll, rule[1], rule[2]) | |||
end | |||
return | |||
end | end | ||
Line 135: | Line 151: | ||
local phonemic, phonetic = separate_word(term) | local phonemic, phonetic = separate_word(term) | ||
for _, rule in ipairs(sandhi_rules) do | |||
phonetic = gsub(phonetic, rule[1], rule[2]) | |||
end | |||
local IPA_args = {{pron = '/' .. phonemic .. '/'}, {pron = '[' .. phonetic .. ']'}} | local IPA_args = {{pron = '/' .. phonemic .. '/'}, {pron = '[' .. phonetic .. ']'}} | ||