48,355
edits
No edit summary |
No edit summary |
||
| (10 intermediate revisions by the same user not shown) | |||
| Line 16: | Line 16: | ||
local consonants = "[pbmvstdnrɾlkɡŋhxçʤʧjwçx2]" | local consonants = "[pbmvstdnrɾlkɡŋhxçʤʧjwçx2]" | ||
local front = "iɪeɛ" | local front = "iɪeɛ" | ||
local back = " | local back = "oɔuʊ" | ||
local vowels = "[a" .. front .. back .. "ː´2]" | local vowels = "[a" .. front .. back .. "ː´2]" | ||
local function laxen(v) | local function laxen(v) | ||
local otc = {} | local otc = {} | ||
local switch = {["e"] = "ɛ", ["i"] = "ɪ", ["o"] = "ɔ", ["u"] = "ʊ | local switch = {["e"] = "ɛ", ["i"] = "ɪ", ["o"] = "ɔ", ["u"] = "ʊ"} | ||
for vc in gmatch(v, ".") do | for vc in gmatch(v, ".") do | ||
vc = gsub(vc, vc, switch[vc]) | if switch[vc] then vc = gsub(vc, vc, switch[vc]) end | ||
table.insert(otc, vc) | table.insert(otc, vc) | ||
end | end | ||
| Line 37: | Line 37: | ||
local first_rules = { | local first_rules = { | ||
{"n(·?)([kg])", "ŋ%1%2"}, {"ŋg", "ŋ"}, {"c", "ʧ"}, {"j", "ʤ"}, {"y", "j"}, {"g", "ɡ"}, {"%- | {"n(·?)([kg])", "ŋ%1%2"}, {"ŋg", "ŋ"}, {"c", "ʧ"}, {"j", "ʤ"}, {"y", "j"}, {"g", "ɡ"}, {"%-", ""}, | ||
-- Long vowels | -- Long vowels | ||
{"ā", "aː"}, {"ē", "eː"}, {"ī", "iː"}, {"ō", "oː"}, {"ū", "uː"}, | {"ā", "aː"}, {"ē", "eː"}, {"ī", "iː"}, {"ō", "oː"}, {"ū", "uː"}, | ||
| Line 75: | Line 75: | ||
word = gsub(word, "·(" .. consonants .. ")·", "%1·") | word = gsub(word, "·(" .. consonants .. ")·", "%1·") | ||
word = gsub(word, "(" .. consonants .. ")·(" .. consonants .. ")([pbmvstdnrɾlkɡŋhxçʤʧçx])", "%1%2·%3") | word = gsub(word, "(" .. consonants .. ")·(" .. consonants .. ")([pbmvstdnrɾlkɡŋhxçʤʧçx])", "%1%2·%3") | ||
word = gsub(word, "a·ʊ", "aʊ·") | |||
local syllables = split(word, "·"); | local syllables = split(word, "·"); | ||
| Line 150: | Line 151: | ||
table.insert(IPA_args, {pron = '[' .. phonetic .. ']'}) | table.insert(IPA_args, {pron = '[' .. phonetic .. ']'}) | ||
return "* " .. m_IPA.format_IPA_full(lang, IPA_args) | return "* " .. m_IPA.format_IPA_full({lang = lang, items = IPA_args}) | ||
end | end | ||
return export | return export | ||