Module:anui-pron: Difference between revisions

m
no edit summary
No edit summary
mNo edit summary
 
(13 intermediate revisions by the same user not shown)
Line 32: Line 32:
local oral = "[aeiouàèìòù]"
local oral = "[aeiouàèìòù]"


local sonorant = "[rmnɳɖɲlŋ]"
local sonorant = "[rmnɳɖɲlŋᴟ]"
local click = "ǀǃʘǂǁ"
local click = "ǀǃʘǂǁ"


Line 45: Line 45:
local rules = {
local rules = {
{"ʇ", "ǀ"}, {"õ", "ṍ"}, {"o", "ɔ"}, {"ṭ", "ʈ"}, {"j", "ɟ"}, {"ñ", "ɲ"}, {"ch", "tʃ"}, {"ʈr", "ʈʂ"}, {"ṇ", "ɳ"}, {"ṣ", "ʂ"},  {"š", "ʃ"},
{"ʇ", "ǀ"}, {"õ", "ṍ"}, {"o", "ɔ"}, {"ṭ", "ʈ"}, {"j", "ɟ"}, {"ñ", "ɲ"}, {"ch", "tʃ"}, {"ʈr", "ʈʂ"}, {"ṇ", "ɳ"}, {"ṣ", "ʂ"},  {"š", "ʃ"},
{"([" .. front_vowel .. "])", "s"},
{"([" .. front_vowel .. "])", "s%1"},
{"k([" .. front_vowel .. "])", "kx%1"}, {"k([" .. back_vowel .. "])", "q%1"},
{"k([" .. front_vowel .. "])", "kx%1"}, {"k([" .. back_vowel .. "])", "q%1"},
Line 51: Line 51:
{"([" .. click .. "])(" .. glottalic .. ")", "%1ˀ%2"}, -- ꞰV̰ = ꞰˀV̰
{"([" .. click .. "])(" .. glottalic .. ")", "%1ˀ%2"}, -- ꞰV̰ = ꞰˀV̰
-- tell apart between regular and syllabic <m>
{"(" .. oral .. ")m(" .. vowel .. ")", "%1ᴟ%2"}, {"([uùm]ʼ?)m", "%1ᴍ"}, {"m(ʼᴍ)", "ᴍ%1"}, {"(" .. oral .. ")m", "%1ᴍ"},
{"(" .. sonorant .. ")(" .. glottalic .. ")", "%1" .. CREAKY .. "%2"}, -- MV̰ > M̰V̰
{"[mᴟ](" .. vowel .. ")", "ᴟᵇ%1"},  {"ŋ(" .. vowel .. ")", "ŋᶢ%1"},  {"ɳ(" .. vowel .. ")", "ᶯɖ%1"},
{"(" .. vowel .. ")(".. vowel .. ")", function(s1, s2) return same(s1, s2) and s1 .. "ː˧" or s1 .. s2 .. "˧" end},
{"(" .. vowel .. ")(".. vowel .. ")", function(s1, s2) return same(s1, s2) and s1 .. "ː˧" or s1 .. s2 .. "˧" end},
{"(" .. vowel .. ")(" .. nasalized .. ")",
{"(" .. vowel .. ")(" .. nasalized .. ")",
Line 76: Line 79:
{"(" .. glottalic .. ")ʼ(" .. nasalized .. ")", function(s1, s2) return glottal_to_modal[s1] .. NASAL .. "ʔ" .. s2 .. HIGHFALL end},
{"(" .. glottalic .. ")ʼ(" .. nasalized .. ")", function(s1, s2) return glottal_to_modal[s1] .. NASAL .. "ʔ" .. s2 .. HIGHFALL end},
{"([uùm]ʼ?)m", "%1ᴍ"}, {"m(ʼᴍ)", "ᴍ%1"}, {"(" .. oral .. ")m", "%1ᴍ"}, -- tell apart between regular and syllabic <m>
{"([^uɯɔɑieaʼ])m([^uɯɔɑieaʼ])", "%1ᴍ%2"}, {"u" .. CREAKY .. NASAL, "ᴍ" .. CREAKY},
{"(" .. sonorant .. ")(" .. glottalic .. ")", "%1" .. CREAKY .. "%2"}, -- MV̰ > M̰V̰
{"m(" .. vowel .. ")", "mᵇ%1"},  {"ŋ(" .. vowel .. ")", "ŋᶢ%1"},  {"ɳ(" .. vowel .. ")", "ᶯɖ%1"},
{"u" .. CREAKY .. NASAL, "ᴍ" .. CREAKY},
{"ᴍᴍ", "m" .. SYLLABIC .. "ː"}, {"ùᴍ", "m" .. CREAKY .. SYLLABICA .. "ː˧"},
{"ᴍᴍ", "m" .. SYLLABIC .. "ː"}, {"ùᴍ", "m" .. CREAKY .. SYLLABICA .. "ː˧"},
{"ᴍʼᴍ", "m" .. SYLLABICA .. CREAKY .. "ʔm" .. SYLLABIC .. "˧"},  {"ᴍ" .. CREAKY .. "ᴍ", "m" .. CREAKY .. SYLLABICA .. "ː"},
{"ᴍʼᴍ", "m" .. SYLLABICA .. CREAKY .. "ʔm" .. SYLLABIC .. "˧"},  {"ᴍ" .. CREAKY .. "ᴍ", "m" .. CREAKY .. SYLLABICA .. "ː"},
Line 89: Line 88:
{"ɴ", "ᵑ"}, {"([" .. click .. "])ʼ", "%1ˀ"}, {"(ᵑ[" .. click .. "])x", "%1ʁ"}, {"([" .. click .. "])x", "%1χ"}, {"([^ʈɬcq])ʼ", "%1ʔ"},
{"ɴ", "ᵑ"}, {"([" .. click .. "])ʼ", "%1ˀ"}, {"(ᵑ[" .. click .. "])x", "%1ʁ"}, {"([" .. click .. "])x", "%1χ"}, {"([^ʈɬcq])ʼ", "%1ʔ"},
{"ŋ([" .. back_vowel .. "])", "ɴ%1"}, {"(" .. vowel .. ")ᵑ", "%1" .. NASAL .. "ᵑ"},  
{"^ʼ", "ʔ"}, {"ŋ([" .. back_vowel .. "])", "ɴ%1"}, {"(" .. vowel .. ")ᵑ", "%1" .. NASAL .. "ᵑ"},  
{"([" .. click .. "][qʛχʁ]?ʼ?)a", "%1ɑ"}, {"([" .. click .. "][qʛχʁ]?ʼ?)ã", "%1ɑ" .. NASAL}, {"ɑ" .. SPH, "ɑ" .. CREAKY}, -- A-backening
{"([" .. click .. "][qʛχʁ]?ʼ?)a", "%1ɑ"}, {"([" .. click .. "][qʛχʁ]?ʼ?)ã", "%1ɑ" .. NASAL}, {"ɑ" .. SPH, "ɑ" .. CREAKY}, -- A-backening
{"([ʈʂɳɖ])u", "%1ɯ"}, {"([ʘǃǁ][qχʁʛ]?ʼ?)u", "%1ɯ"}, -- U-unrounding
{"([ʈʂɳɖ])u", "%1ɯ"}, {"([ʘǃǁ][qχʁʛ]?ʼ?)u", "%1ɯ"}, -- U-unrounding
{"([ʈtk])([ʂʃɬxs])", "%1" .. AFFR .. "%2"}, {"ᴟ", "m"},
{"([ʈtk])([ʂʃɬxs])", "%1" .. AFFR .. "%2"},
{"s", "s" .. DENTAL}, {"ṯ", "t" .. INTERDENTAL .. AFFR .. "s" .. DENTAL}, {"ṉ", "n" .. INTERDENTAL .. VOICELESS},
{"s", "s" .. DENTAL}, {"ṯ", "t" .. INTERDENTAL .. AFFR .. "s" .. DENTAL}, {"ṉ", "n" .. INTERDENTAL .. VOICELESS},
{"([" .. click .. "])([qχʁʛ])", "%1" .. AFFR .. "%2"}, {"u" .. NASAL, "m" .. SYLLABIC},
{"([" .. click .. "])([qχʁʛ])", "%1" .. AFFR .. "%2"}, {"u" .. NASAL, "m" .. SYLLABIC}, {"ɔ" .. CREAKY .. "ɔ" .. CREAKY, "ɔ" .. CREAKY .. "ː"},


Line 103: Line 101:


function export.crux(term)
function export.crux(term)
term=mw.ustring.lower(term)
term = term:gsub("N", "ɴ"); term = term:gsub("Ɠ", "ʛ")
term = mw.ustring.lower(term)
for _, rule in ipairs(rules) do
for _, rule in ipairs(rules) do
Line 115: Line 114:
local bits = {}
local bits = {}
for _, item in ipairs(items) do
for _, item in ipairs(items) do
local bit = "<span style=\"font-size:110%;font-family:Gentium,'DejaVu Sans','Segoe UI',sans-serif>" .. item.pron .. "</span>"
local bit = "<span style=\"font-size:110%;font-family:'Gentium','DejaVu Sans','Segoe UI',sans-serif>" .. item.pron .. "</span>"
table.insert(bits, bit)
table.insert(bits, bit)
end
end
Line 122: Line 121:


function format_IPA(items)
function format_IPA(items)
return "[[w:IPA chart|IPA]]<sup>([[IPA for e|key]])</sup>:&#32;" .. IPA_span(items)
return "[[w:IPA chart|IPA]]<sup>([[IPA for ǂA Ṇṵĩ|key]])</sup>:&#32;" .. IPA_span(items)
end
end