45,647
edits
No edit summary |
Tag: Undo |
||
Line 15: | Line 15: | ||
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 | ||
local vowels = "[aeiouyáéíóúýàèìòùỳː" .. NONSYLLABIC .. " | local vowels = "[aeiouyáéíóúýàèìòùỳː" .. NONSYLLABIC .. DIPHTHONG .. "]" | ||
local rules = { | local rules = { | ||
{"rh", "ṛ"}, {"th", "θ"}, {"lj", "ʎ"}, {"ñ", "ɲ"}, {"kh", "x"}, {"[gɡ]h", "ɣ"}, {"g", "ɡ"}, | {"rh", "ṛ"}, {"th", "θ"}, {"lj", "ʎ"}, {"ñ", "ɲ"}, {"kh", "x"}, {"[gɡ]h", "ɣ"}, {"g", "ɡ"}, | ||
{"([aāáà][eo])", "%1" .. NONSYLLABIC}, {"([iíuú])([aāeēoōáéóàèò])", "%1 | {"([aāáà][eo])", "%1" .. NONSYLLABIC}, {"([iíuú])([aāeēoōáéóàèò])", "%1" .. DIPHTHONG .. "%2"}, | ||
{"ā", "aː"}, {"ē", "eː"}, {"ī", "iː"}, {"ō", "oː"}, {"ū", "uː"}, {"ȳ", "yː"}, | {"ā", "aː"}, {"ē", "eː"}, {"ī", "iː"}, {"ō", "oː"}, {"ū", "uː"}, {"ȳ", "yː"}, | ||
{"à", "áː"}, {"è", "éː"}, {"ì", "íː"}, {"ò", "óː"}, {"ù", "úː"}, {"ỳ", "ýː"}, | {"à", "áː"}, {"è", "éː"}, {"ì", "íː"}, {"ò", "óː"}, {"ù", "úː"}, {"ỳ", "ýː"}, | ||
Line 140: | Line 140: | ||
ipa = gsub(ipa, "ṛ", "r̥") | ipa = gsub(ipa, "ṛ", "r̥") | ||
ipa = gsub(ipa, "([áéíóú])", function(v) return deacuter[v] end) | ipa = gsub(ipa, "([áéíóú])", function(v) return deacuter[v] end) | ||
return ipa | return ipa |