45,639
edits
No edit summary |
mNo edit summary |
||
(30 intermediate revisions by the same user not shown) | |||
Line 32: | Line 32: | ||
local oral = "[aeiouàèìòù]" | local oral = "[aeiouàèìòù]" | ||
local sonorant = "[rmnɳɖɲlŋᴟ]" | |||
local click = "ǀǃʘǂǁ" | local click = "ǀǃʘǂǁ" | ||
Line 44: | Line 45: | ||
local rules = { | local rules = { | ||
{"ʇ", "ǀ"}, {"õ", "ṍ"}, {"o", "ɔ"}, {"ṭ", "ʈ"}, {"j", "ɟ"}, {"ñ", "ɲ"}, {"ch", "tʃ"}, {"ʈr", "ʈʂ"}, {"ṇ", "ɳ"}, {"ṣ", "ʂ"}, {"š", "ʃ"}, | {"ʇ", "ǀ"}, {"õ", "ṍ"}, {"o", "ɔ"}, {"ṭ", "ʈ"}, {"j", "ɟ"}, {"ñ", "ɲ"}, {"ch", "tʃ"}, {"ʈr", "ʈʂ"}, {"ṇ", "ɳ"}, {"ṣ", "ʂ"}, {"š", "ʃ"}, | ||
{"([" .. front_vowel .. "]) | {"ṯ([" .. front_vowel .. "])", "s%1"}, | ||
{"k([" .. front_vowel .. "])", "kx%1"}, {"k([" .. back_vowel .. "])", "q%1"}, | {"k([" .. front_vowel .. "])", "kx%1"}, {"k([" .. back_vowel .. "])", "q%1"}, | ||
{"([ḛḭṵaɔ]" .. TILDEBELOW .. "?)", {["ḛ"] = "è", ["ḭ"] = "ì", ["ṵ"] = "ù", ["a" .. TILDEBELOW] = "à", ["ɔ" .. TILDEBELOW] = "ò"}}, | {"([ḛḭṵaɔ]" .. TILDEBELOW .. "?)", {["ḛ"] = "è", ["ḭ"] = "ì", ["ṵ"] = "ù", ["a" .. TILDEBELOW] = "à", ["ɔ" .. TILDEBELOW] = "ò"}}, | ||
{"m(" .. oral .. ")", " | |||
{" | {"([" .. 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 58: | Line 63: | ||
{"(" .. glottalic .. ")([" .. front_vowel .. "])", | {"(" .. glottalic .. ")([" .. front_vowel .. "])", | ||
function(s1, s2) | function(s1, s2) | ||
return same(s1, s2) and s1 .. "ː˦" or | return same(s1, s2) and s1 .. "ː˦" or s1 .. modal_to_glottal[s2] .. "˦" | ||
end | end | ||
}, | }, | ||
{"(" .. glottalic .. ")([" .. back_vowel .. "])", | {"(" .. glottalic .. ")([" .. back_vowel .. "])", | ||
function(s1, s2) | function(s1, s2) | ||
return same(s1, s2) and s1 .. "ː˨" or | return same(s1, s2) and s1 .. "ː˨" or s1 .. modal_to_glottal[s2] .. "˨" | ||
end | end | ||
}, | }, | ||
Line 74: | 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" .. CREAKY .. NASAL, "ᴍ" .. CREAKY}, | {"([^uɯɔɑieaʼ])m([^uɯɔɑieaʼ])", "%1ᴍ%2"}, {"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 .. "ː"}, | ||
{"ᴍ" .. CREAKY, "m" .. CREAKY .. SYLLABICA}, {"ṍ", "ɔ" .. NASAL}, {"(" .. glottalic .. ")", function(s1) return glottal_to_modal[s1] end}, | {"ᴍ" .. CREAKY, "m" .. CREAKY .. SYLLABICA}, {"ṍṍ", "ṍː"}, {"ṍ", "ɔ" .. NASAL}, {"(" .. glottalic .. ")", function(s1) return glottal_to_modal[s1] end}, | ||
{"ᴍ", "m" .. SYLLABIC}, | {"ᴍ", "m" .. SYLLABIC}, | ||
Line 83: | 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 .. "ᵑ"}, | |||
{"([" .. click .. "][qʛχʁ]?ʼ?)a", "%1ɑ"}, {"([" .. click .. "][qʛχʁ]?ʼ?)ã", "%1ɑ" .. NASAL}, {"ɑ" .. SPH, "ɑ" .. CREAKY}, -- A-backening | |||
{"([ʈʂɳɖ])u", "%1ɯ"}, {"([ʘǃǁ][qχʁʛ]?ʼ?)u", "%1ɯ"}, -- U-unrounding | |||
{"([ʈtk])([ʂʃɬxs])", "%1" .. AFFR .. "%2"}, {"ᴟ", "m"}, | |||
{"s", "s" .. DENTAL}, {"ṯ", "t" .. INTERDENTAL .. AFFR .. "s" .. DENTAL}, {"ṉ", "n" .. INTERDENTAL .. VOICELESS}, | |||
{"([" .. click .. "])([qχʁʛ])", "%1" .. AFFR .. "%2"}, {"u" .. NASAL, "m" .. SYLLABIC}, {"ɔ" .. CREAKY .. "ɔ" .. CREAKY, "ɔ" .. CREAKY .. "ː"}, | |||
} | } | ||
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 109: | 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 116: | Line 121: | ||
function format_IPA(items) | function format_IPA(items) | ||
return "[[w:IPA chart|IPA]]<sup>([[IPA for | return "[[w:IPA chart|IPA]]<sup>([[IPA for ǂA Ṇṵĩ|key]])</sup>: " .. IPA_span(items) | ||
end | end | ||
Line 138: | Line 143: | ||
function export.show(frame) | function export.show(frame) | ||
local params = { | local params = { | ||
[1] = { default = mw.title.getCurrentTitle().nsText == 'Template' and " | [1] = { default = mw.title.getCurrentTitle().nsText == 'Template' and "ǂAː Ṇṵĩ" or mw.title.getCurrentTitle().text }, | ||
} | } | ||
local args = require("Module:parameters").process(frame:getParent().args, params) | local args = require("Module:parameters").process(frame:getParent().args, params) |