455
edits
Aleisi Galan (talk | contribs) No edit summary |
Aleisi Galan (talk | contribs) No edit summary |
||
Line 7: | Line 7: | ||
local split = mw.text.split | local split = mw.text.split | ||
local gsplit = mw.text.gsplit | local gsplit = mw.text.gsplit | ||
-- To avoid weird annoying cursor behavior | -- To avoid weird annoying cursor behavior | ||
Line 22: | Line 23: | ||
local palatal = "[ʨjʎʃʒʥʤʧʦʣ]" | local palatal = "[ʨjʎʃʒʥʤʧʦʣ]" | ||
local sonorant = "[rl]" | local sonorant = "[rl]" | ||
local plosives = "[ | local plosives = "[ptkbdg]" | ||
local velar = "[ɡkx]" | local velar = "[ɡkx]" | ||
local consonants = "[mnptkbdɡfvszxrljɲŋʋʎʨjʎʃʒʥʤʧʤʣʦ]" | local consonants = "[mnptkbdɡfvszxrljɲŋʋʎʨjʎʃʒʥʤʧʤʣʦ]" | ||
local export = {} | local export = {} | ||
Line 41: | Line 36: | ||
{"(" .. vowels .. ")[lv]$", "%1ʋ"}, {"(" .. acuted .. ")[lv]$", "%1ʋ"}, | {"(" .. vowels .. ")[lv]$", "%1ʋ"}, {"(" .. acuted .. ")[lv]$", "%1ʋ"}, | ||
{ | {"(" .. plosives .. ")[ptkbdg]$", "[ptkbdg]"}, | ||
{" | {"pt" , "t"}, {"pk" , "k"}, {"tp" , "p"}, {"tk" , "k"}, {"kp" , "p"}, {"kt" , "t"}, | ||
{"bd" , "d"}, {"bg" , "g"}, {"db" , "b"}, {"dg" , "g"}, {"gb" , "b"}, {"gd" , "d"}, | |||
{"(" .. consonants ..")([rŕ])(" .. consonants ..")", "%1(ə)%2" .. SYLL .. "%3"}, {"(" .. consonants ..")r$", "%1ər"}, | {"(" .. consonants ..")([rŕ])(" .. consonants ..")", "%1(ə)%2" .. SYLL .. "%3"}, {"(" .. consonants ..")r$", "%1ər"}, | ||
{"n(" .. velar .. ")", "ŋ%1"}, | {"n(" .. velar .. ")", "ŋ%1"}, | ||
{"( | {"p(" .. vowels .. ")", "pʰ%1"}, {"t(" .. vowels .. ")", "tʰ%1"}, {"k(" .. vowels .. ")", "kʰ%1"}, | ||
{"p(" .. acuted .. ")", "pʰ%1"}, {"t(" .. acuted .. ")", "tʰ%1"}, {"k(" .. acuted .. ")", "kʰ%1"}, | |||
{"(" .. palatal .. ")e", "%1ɛ"}, {"(" .. palatal .. ")é", "%1É"}, | {"(" .. palatal .. ")e", "%1ɛ"}, {"(" .. palatal .. ")é", "%1É"}, | ||
Line 53: | Line 50: | ||
{"É", "ɛ" .. ACUTE}, {"Ó", "ɔ" .. ACUTE}, {"ý", "ɪ" .. ACUTE}, | {"É", "ɛ" .. ACUTE}, {"Ó", "ɔ" .. ACUTE}, {"ý", "ɪ" .. ACUTE}, | ||
} | } | ||
Line 72: | Line 55: | ||
{"ʥ", "d͡ʑ"}, {"ʤ", "d͡ʒ"}, {"ʦ", "t͡s"}, {"ʨ", "t͡ɕ"}, {"ʧ", "t͡ʃ"}, {"ʣ", "d͡z"}, | {"ʥ", "d͡ʑ"}, {"ʤ", "d͡ʒ"}, {"ʦ", "t͡s"}, {"ʨ", "t͡ɕ"}, {"ʧ", "t͡ʃ"}, {"ʣ", "d͡z"}, | ||
} | } | ||
function export.crux(term, d) | function export.crux(term, d) | ||
term = mw.ustring.lower(term) | term = mw.ustring.lower(term) | ||
for _, rule in ipairs(rules) do | for _, rule in ipairs(rules) do | ||
term = gsub(term, rule[1], rule[2]) | term = gsub(term, rule[1], rule[2]) | ||
end | end | ||
if d == "c" then term = gsub(term, "ʨ", "ʧ"); term = gsub(term, "ʥ", "ʤ") end | |||
if d == "s" then term = gsub(term, "ʨ", "ʦ"); term = gsub(term, "ʥ", "ʣ") end | |||
if d == "s" then term = gsub(term, "aj", "ɛː"); term =gsub(term, "ej", "ɛː") end | |||
end | if d == "c" then term = gsub(term, "aj", "ɛː"); term =gsub(term, "ej", "ɛː") end | ||
if d == "c" then term = gsub(term, "a", "ɐ"); term = gsub(term, "e", "ɪ"); term = gsub(term, "i", "ɪ"); term = gsub(term, "o", "ɔ"); term = gsub(term, "u", "ʊ") end | |||
if d == "s" then term = gsub(term, "a", "ɐ"); term = gsub(term, "e", "ɛ"); term = gsub(term, "i", "e"); term = gsub(term, "o", "ɔ"); term = gsub(term, "u", "o"); term = gsub(term, "ɪ", "i"); term = gsub(term, "ɪ́", "í"); term = gsub(term, "ų", "u") end | |||
if d == "n" then term = gsub(term, "a", "ə"); term = gsub(term, "e", "ə"); term = gsub(term, "i", "y"); term = gsub(term, "o", "ɔ"); term = gsub(term, "u", "ʊ"); term = gsub(term, "ɪ", "ɨ"); term = gsub(term, "ɪ́", "ɨ́"); term = gsub(term, "y", "ɪ") end | |||
for _, aff in ipairs(affricates) do | for _, aff in ipairs(affricates) do | ||
term = gsub(term, aff[1], aff[2]) | term = gsub(term, aff[1], aff[2]) | ||
Line 136: | Line 120: | ||
ipa = ipa .. line_format(separate_word(term), {'Standard'}) | ipa = ipa .. line_format(separate_word(term), {'Standard'}) | ||
if export.crux(term, " | if export.crux(term, "c") ~= export.crux(term) then | ||
ipa = ipa .. "\n* " | ipa = ipa .. "\n* " | ||
ipa = ipa .. line_format(separate_word(term, "n"), {'Northern'}) | ipa = ipa .. line_format(separate_word(term, "n"), {'Northern'}) | ||
end | end | ||
if export.crux(term, " | if export.crux(term, "s") ~= export.crux(term) then | ||
ipa = ipa .. "\n* " | ipa = ipa .. "\n* " | ||
ipa = ipa .. line_format(separate_word(term, "c"), {'Central'}) | ipa = ipa .. line_format(separate_word(term, "c"), {'Central'}) | ||
end | end | ||
if export.crux(term, " | if export.crux(term, "n") ~= export.crux(term) then | ||
ipa = ipa .. "\n* " | ipa = ipa .. "\n* " | ||
ipa = ipa .. line_format(separate_word(term, "s"), {'Southern'}) | ipa = ipa .. line_format(separate_word(term, "s"), {'Southern'}) |
edits