45,322
edits
No edit summary |
(Thanks Juelos!) |
||
(8 intermediate revisions by the same user not shown) | |||
Line 7: | Line 7: | ||
local split = mw.text.split | local split = mw.text.split | ||
local gsplit = mw.text.gsplit | local gsplit = mw.text.gsplit | ||
local m_table = require("Module:table") | |||
local export = {} | local export = {} | ||
local palatal = "ɲʎɟj" | |||
local velar = "kɡxɣ" | local velar = "kɡxɣ" | ||
local uvular = "q" | local uvular = "q" | ||
local consonants = "[ | local consonants = "[mpbvwθntdszlrɾŋɴhɥṛ" .. palatal .. velar .. uvular .. "]" | ||
local NONSYLLABIC = u(0x032F) -- non-syllabic, combining inverted breve below | local NONSYLLABIC = u(0x032F) -- non-syllabic, combining inverted breve below | ||
local DIPHTHONG = u(0x035C) -- double articulation, combining double breve below | local DIPHTHONG = u(0x035C) -- double articulation, combining double breve below | ||
Line 18: | Line 21: | ||
local rules = { | local rules = { | ||
{"rh", "ṛ"}, {"th", "θ"}, {"lj", "ʎ"}, {"ñ", "ɲ"}, {"kh", "x"}, {"[gɡ]h", "ɣ"}, {"g", "ɡ"}, | {"rh", "ṛ"}, {"mh", "m"}, {"th", "θ"}, {"lj", "ʎ"}, {"ñ", "ɲ"}, {"kh", "x"}, {"[gɡ]h", "ɣ"}, {"g", "ɡ"}, | ||
{"([aāáà][eo])", "%1" .. NONSYLLABIC}, {"([iíuú])([aāeēoōáéóàèò])", "%1" .. DIPHTHONG .. "%2"}, | {"([aāáà][eo])", "%1" .. NONSYLLABIC}, {"([iíuú])([aāeēoōáéóàèò])", "%1" .. DIPHTHONG .. "%2"}, | ||
Line 24: | Line 27: | ||
{"à", "áː"}, {"è", "éː"}, {"ì", "íː"}, {"ò", "óː"}, {"ù", "úː"}, {"ỳ", "ýː"}, | {"à", "áː"}, {"è", "éː"}, {"ì", "íː"}, {"ò", "óː"}, {"ù", "úː"}, {"ỳ", "ýː"}, | ||
{"n([" .. velar .. "])", "ŋ%1"}, {"n([" .. uvular .. "])", "ɴ%1"}, {"(" .. vowels .. ")r(" .. vowels .. ")", "%1ɾ%2"}, | {"n([" .. palatal .. "])", "ɲ%1"}, {"n([" .. velar .. "])", "ŋ%1"}, {"n([" .. uvular .. "])", "ɴ%1"}, | ||
{"(" .. vowels .. ")r(" .. vowels .. ")", "%1ɾ%2"}, {"ɲi", "ni"}, {"ʎi", "li"}, | |||
} | } | ||
Line 36: | Line 40: | ||
term = gsub(term, pattern, "·%1") | term = gsub(term, pattern, "·%1") | ||
term = gsub(term, "^·", "") | term = gsub(term, "^·", "") | ||
term = gsub(term, "·$", "") | |||
term = gsub(term, "·(" .. consonants .. ")·", "·%1") | term = gsub(term, "·(" .. consonants .. ")·", "·%1") | ||
term = gsub(term, "·(" .. consonants .. ")$", "%1") | term = gsub(term, "·(" .. consonants .. ")$", "%1") | ||
Line 41: | Line 46: | ||
term = gsub(term, "([ptkbdɡ])·([rlṛsz])", "·%1%2") | term = gsub(term, "([ptkbdɡ])·([rlṛsz])", "·%1%2") | ||
term = gsub(term, "·(" .. consonants .. "?" .. consonants .. ")$", "%1") | term = gsub(term, "·(" .. consonants .. "?" .. consonants .. ")$", "%1") | ||
local syllables = split(term, "·") | local syllables = split(term, "·") | ||
Line 82: | Line 86: | ||
local oldrules = { | local oldrules = { | ||
{"v([ou])", "w%1"}, {"v([ay])", "ɥ%1"}, {"(" .. vowels .. ")v(ˈ?" .. consonants .. ")", "%1u%2"}, | {"v([ou])", "w%1"}, {"v([ay])", "ɥ%1"}, {"(" .. vowels .. ")v(ˈ?" .. consonants .. ")", "%1u%2"}, | ||
{"j([iy])", "ɟ%1"}, | {"j([iy])", "ɟ%1"}, {"sˈ?ri(".. vowels .. ")", "ˈɟ%1"}, {"sr", "ɟ"}, {"sˈ?r", "ˈɟ"}, | ||
} | } | ||
Line 133: | Line 137: | ||
local ipa = "* " | local ipa = "* " | ||
ipa = ipa .. line_format(separate_word(term, false), {' | ipa = ipa .. line_format(separate_word(term, false), {'Post-Classical'}) | ||
if export.crux(term) ~= export.antique_crux(term) then | if export.crux(term) ~= export.antique_crux(term) then | ||
ipa = ipa .. "\n* " .. line_format(separate_word(term, true), {' | ipa = ipa .. "\n* " .. line_format(separate_word(term, true), {'Classical'}) | ||
end | end | ||