45,647
edits
Tag: Undo |
No edit summary |
||
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 .. "-]" | ||
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-%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) | ||
ipa = gsub(ipa, "-", DIPTHONG) | |||
return ipa | return ipa |