45,647
edits
Aleisi Galan (talk | contribs) No edit summary |
No edit summary |
||
Line 22: | Line 22: | ||
local palatal = "[ʨjʎʃʒʥʤʧʦʣ]" | local palatal = "[ʨjʎʃʒʥʤʧʦʣ]" | ||
local sonorant = "[rl]" | local sonorant = "[rl]" | ||
local plosives = "[ | local plosives = "[ptkbdɡ]" | ||
local velar = "[ɡkx]" | local velar = "[ɡkx]" | ||
local consonants = "[mnptkbdɡfvszxrljɲŋʋʎʨjʎʃʒʥʤʧʤʣʦ]" | local consonants = "[mnptkbdɡfvszxrljɲŋʋʎʨjʎʃʒʥʤʧʤʣʦ]" | ||
Line 35: | Line 35: | ||
{"(" .. vowels .. ")[lv]$", "%1ʋ"}, {"(" .. acuted .. ")[lv]$", "%1ʋ"}, | {"(" .. vowels .. ")[lv]$", "%1ʋ"}, {"(" .. acuted .. ")[lv]$", "%1ʋ"}, | ||
{"(" .. plosives .. ") | {plosives .. "(" .. plosives .. ")$", "%1"}, | ||
{" | {"[ptk]([ptk])", "%1"}, {"[bdɡ]([bdɡ])", "%1"}, | ||
{"(" .. 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"}, | ||
{" | {"([ptk])(" .. vowels .. ")", "%1ʰ%2"}, {"([ptk])(" .. acuted .. ")", "%1ʰ%2"}, | ||
{"(" .. palatal .. ")e", "%1ɛ"}, {"(" .. palatal .. ")é", "%1É"}, | {"(" .. palatal .. ")e", "%1ɛ"}, {"(" .. palatal .. ")é", "%1É"}, | ||
Line 49: | Line 47: | ||
{"É", "ɛ" .. ACUTE}, {"Ó", "ɔ" .. ACUTE}, {"ý", "ɪ" .. ACUTE}, | {"É", "ɛ" .. ACUTE}, {"Ó", "ɔ" .. ACUTE}, {"ý", "ɪ" .. ACUTE}, | ||
} | |||
local c_rules = { | |||
{"ʨ", "ʧ"}, {"ʥ", "ʤ"}, | |||
{"[ae]j", "ɛː"}, {"a", "ɐ"}, {"[ei]", "ɪ"}, {"o", "ɔ"}, {"u", "ʊ"} | |||
} | |||
local s_rules = { | |||
{"ʨ", "ʦ"}, {"ʥ", "ʣ"}, | |||
{"[ae]j", "ɛː"}, {"a", "ɐ"}, {"e", "ɛ"}, {"i", "e"}, {"o", "ɔ"}, {"u", "o"}, {"ɪ", "i"}, | |||
} | |||
local n_rules = { | |||
{"[ae]", "ə"}, {"ɪ", "ɨ"}, {"y", "ɪ"}, {"i", "y"}, {"o", "ɔ"}, {"u", "ʊ"}, | |||
} | } | ||
Line 54: | Line 66: | ||
{"ʥ", "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) | ||
-- General | |||
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 | ||
-- Dialects | |||
for _, dia_rule in ipairs(d == "c" and c_rules or d == "n" and n_rules or d == "s" and s_rules) do | |||
term = gsub(term, dia_rule[1], dia_rule[2]) | |||
end | |||
-- Affricates | |||
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 119: | Line 130: | ||
ipa = ipa .. line_format(separate_word(term), {'Standard'}) | ipa = ipa .. line_format(separate_word(term), {'Standard'}) | ||
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, "n"), {'Northern'}) | ipa = ipa .. line_format(separate_word(term, "n"), {'Northern'}) | ||
end | end | ||
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, "c"), {'Central'}) | ipa = ipa .. line_format(separate_word(term, "c"), {'Central'}) | ||
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, "s"), {'Southern'}) | ipa = ipa .. line_format(separate_word(term, "s"), {'Southern'}) |