Module:mg-pron: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 8: Line 8:
local gsplit = mw.text.gsplit
local gsplit = mw.text.gsplit


local NASAL = u(0x0303) -- COMBINING TILDE, ̃
local N = u(0x0303) -- COMBINING TILDE, ̃
local NONSYLL = u(0x032F) -- COMBINING INVERTED BREVE BELOW, ̯
local NONSYLL = u(0x032F) -- COMBINING INVERTED BREVE BELOW, ̯
local ADV = u(0x031F) -- COMBINING PLUS SIGN BELOW, ̟
local ADV = u(0x031F) -- COMBINING PLUS SIGN BELOW, ̟
Line 77: Line 77:
-- rr and ss clusters, preaspirated
-- rr and ss clusters, preaspirated
{"([ɾs])·(ˈ?)([ɾs])", function(s1, st, s2) return same(s1, s2) and "·" .. st .. "ʰ" .. s1 or s1 .. st .. s2 end},
{"([ɾs])·(ˈ?)([ɾs])", function(s1, st, s2) return same(s1, s2) and "·" .. st .. "ʰ" .. s1 or s1 .. st .. s2 end},
{".$", {["a"] = "ɐ", ["e"] = "ɪ", ["o"] = "ʊ", ["n"] = NASAL}},
{".$", {["a"] = "ɐ", ["e"] = "ɪ", ["o"] = "ʊ", ["n"] = N}},
{"l·", "ɫ·"}, {"l$", "ɫ"}, -- velarized [l]
{"l·", "ɫ·"}, {"l$", "ɫ"}, -- velarized [l]
{"a(" .. velar .. ")", "ɑ" .. ADV .. "%1"}, {"(" .. velar .. ")a", "%1ɑ" .. ADV}, -- [a] retracts next to velar consonants
{"a(" .. velar .. ")", "ɑ" .. ADV .. "%1"}, {"(" .. velar .. ")a", "%1ɑ" .. ADV}, -- [a] retracts next to velar consonants
{"a(" .. palatal .. ")", "a" .. RET .. "%1"}, {"(" .. palatal .. "a)", "%1" .. RET}, -- and advances next to palatal
{"a(" .. palatal .. ")", "a" .. RET .. "%1"}, {"(" .. palatal .. "a)", "%1" .. RET}, -- and advances next to palatal
{"s·(" .. voiced .. ")", "z·%1"}, {"(" .. vowels .. ")·s(" .. vowels .. ")", "%1·z%2"}, {"%ss", "‿z"}, -- [s]-voicing
{"s·(" .. voiced .. ")", "z·%1"}, {"(" .. vowels .. ")·s(" .. vowels .. ")", "%1·z%2"}, {"%ss", "‿z"}, -- [s]-voicing
{"[Jj]m$", "y" .. NASAL}, {"m$", "u" .. NASAL}, {"n·", "ⁿ·"}, -- [m] and [n] behave as nasalizers in codas and word-finally
{"[Jj]m$", "y" .. N}, {"m$", "u" .. N}, {"n·", N .. "·"}, -- [m] and [n] behave as nasalizers in codas and word-finally
{"e(" .. consonants .. ")·(" .. consonants .. ")", "ɛ%1·%2"}, {"o(" .. consonants .. ")·(" .. consonants .. ")", "ɔ%1·%2"},  
{"e(" .. N .. "?" .. consonants .. ")·(" .. consonants .. ")", "ɛ%1·%2"}, {"o(" .. N .. "?"  .. consonants .. ")·(" .. consonants .. ")", "ɔ%1·%2"},  
{"e(" .. consonants .. ")?·(" .. consonants .. "[aɐɑąĄ])", "ɛ%1·%2"}, {"o(" .. consonants .. ")?·(" .. consonants .. "[aɐɑąĄ])", "ɔ%1·%2"},
{"e(" .. N .. "?"  .. consonants .. ")?·(" .. consonants .. "[aɐɑąĄ])", "ɛ%1·%2"}, {"o(" .. N .. "?"  .. consonants .. ")?·(" .. consonants .. "[aɐɑąĄ])", "ɔ%1·%2"},
{"(" .. vowels .. "i)", "%1" .. NONSYLL}, {"w", "u" .. NONSYLL}, {"J", "i" .. NONSYLL},  
{"(" .. vowels .. "i)", "%1" .. NONSYLL}, {"w", "u" .. NONSYLL}, {"J", "i" .. NONSYLL},  
Line 95: Line 95:
--{"a([^" .. RET .. "])", "a" .. CEN .. "%1"},
--{"a([^" .. RET .. "])", "a" .. CEN .. "%1"},
--{"([ɑa][" .. CEN .. RET .. ADV .. "])(ː?)" .. NASAL, "%1" .. NASAL .. "%2"}, {"a" .. CEN .. NASAL, "a" .. RET .. NASAL},
--{"([ɑa][" .. CEN .. RET .. ADV .. "])(ː?)" .. N, "%1" .. N .. "%2"}, {"a" .. CEN .. N, "a" .. RET .. N},
}
}


Line 118: Line 118:
term = gsub(term, "ːⁿ", "ⁿː")
term = gsub(term, "ːⁿ", "ⁿː")
term = gsub(term, "a([^" .. CEN .. ADV .. RET .. "])", "a" .. CEN .. "%1")
term = gsub(term, "a([^" .. CEN .. ADV .. RET .. "])", "a" .. CEN .. "%1")
term = gsub(term, "ą", "a" .. CEN .. NASAL); term = gsub(term, "Ą", "a" .. CEN .. NASAL .. "ː")
term = gsub(term, "ą", "a" .. CEN .. N); term = gsub(term, "Ą", "a" .. CEN .. N .. "ː")
term = gsub(term, "ɓ", "β") -- soft mutation
term = gsub(term, "ɓ", "β") -- soft mutation

Navigation menu