This module generates the IPA phonological and phonetic transcription of Central Atlas Tamazight entries. It runs Template:tzm-IPA. If no parameter is provided, it will use the page title, else it is looked upon as a respelling. The testcases are here.
This module generates the phonology, which is the same for all Central Atlas Tamazight dialects (broad), and the phonetics, which is particular for each dialect (narrow). Currently it displays only the phonetic pronunciation for the Ayt Ndhir dialect according to Penchoen (1973).[1]
For Central Atlas Tamazight, the pronunciation is more relevant than the Tifinagh orthography because it is mainly an oral language, rarely written, whence the necessity of this module.
Below you shall find the functioning of this module.
Here are the correspondences. An alternative pronunciation (a rarely used one) is next to the regular one, and in yellow if borrowed from Arabic phonology.
Tifinagh Glyph | Transliteration (Module:Tfng-translit) | Phonological transcription (IPA, all dialects) | Phonetic transcription (IPA) | ||||
---|---|---|---|---|---|---|---|
Ayt Ndhir dialect[1] | |||||||
Lax consonants/regular vowels | Tense consonants/emphatic vowels | ||||||
Frequent use | ⴰ | a | a | æ | ɑ | ||
ⴳ | g | ɡ | ʝ | ɟ | ɟː | ||
ⴷ | d | d | ð | d̪ | d̪ː | ||
ⴹ | ḍ | dˤ | ðˤ | d̪ˤ | t̪ˤː | d̪ˤː | |
ⴼ | f | f | f | fː | |||
ⵖ | ɣ | ɣ | ʁ | qː | ʁː | ||
ⵉ | i | i | i | ɪ | |||
ⴽ | k | k | ç | c | cː | ||
ⵍ | l | l | l | lː | |||
ⵎ | m | m | m | mː | |||
ⵏ | n | n | n̪ | n̪ː | |||
ⵓ | u | u | u | ʊ̙ | |||
ⵔ | r | r | r | rˤ | rː | rˤː | |
ⵙ | s | s | s | sː | |||
ⵛ | š | ʃ | ʃ | t͡ʃː | ʃː | ||
ⵜ | t | t | θ | t̪ | t̪ː | ||
ⵡ | w | w | w | ɡʷː | |||
ⵢ | y | j | j | ɟː | |||
ⵣ | z | z | z | zː | |||
ⵥ | ẓ | zˤ | zˤ | zˤː | |||
Marginal use (rarely used) | ⴱ | b | b | β | b | bː | |
ⵀ | h | h | h | ∅ | hː | ||
ⵅ | x | x | χ | χː | |||
ⵊ | j | ʒ | ʒ | d͡ʒː | ʒː | ||
ⴳⵯ | gʷ | ɡʷ | ɣʷ | ɡʷ | ɡʷː | ||
ⵕ¹ | ṛ | rˤ | rˤ | rˤː | |||
Arabic borrowings (only in loanwords) | ⵚ | ṣ | sˤ | sˤ | ∅ | sˤː | |
ⵟ | ṭ | tˤ | t̪ˤ | ðˤ | ∅ | ||
ⵇ | q | q | q | ∅ | |||
ⵃ | ḥ | ħ | ħ | ħː | |||
ⵄ | ɛ | ʕ | ʕ | ʕː | |||
Inexistant (absent of the corpus) | ⴻ | e | ə | ə | ∅ | ||
ⴽⵯ | kʷ | kʷ | xʷ | kʷ | kʷː |
¹ only if relevant to distinguish with normal non-emphatic
The module gets the transcription of the entry name, then it generates the phonological transcription using columns 2 and 3 above. In order to generate the phonetic transcription from the phonological one, these sound laws are used.
Here are the rules for the Ayt Ndhir dialect, spoken in Central Morocco.[1]
local export = {}
local m_IPA = require("Module:IPA")
local m_scripts = require("Module:scripts")
local m_scripts_util = require("Module:script utilities")
local m_a = require("Module:accent qualifier")
local lang = require("Module:languages").getByCode("tzm")
local s = mw.ustring.gsub
local c = {
= "ɡ",
= "dˤ",
= "ð",
= "ʃ",
= "ʒ",
= "j",
= "zˤ",
= "rˤ",
= "sˤ",
= "tˤ",
= "ħ",
= "ʕ",
= "ə"
}
local p = {
= "ʁ",
= "ɣʷ",
= "Tˤ",
= "χ",
= "xʷ",
= "æ",
= "ʝ",
= "ð",
= "ðˤ",
= "ç",
= "N",
= "θ",
= "β"
}
local t = {
= "ɟː",
= "Dː",
= "Tˤː",
= "fː",
= "qː",
= "cː",
= "lː",
= "mː",
= "Nː",
= "rː",
= "sː",
= "Cː",
= "Tː",
= "wː",
= "ɟː",
= "zː",
= "zˤː",
= "bː",
= "χː",
= "Jː",
= "ɡʷː",
= "rˤː",
= "sˤː",
= "Tˤː",
= "qː",
= "ħː",
= "ʕː",
= "kʷː"
}
local C = ""
local V = ""
local r = {
= {
?ː?" .. C .. "??" .. V .. ")ʝ(" .. V .. "%(?" .. C .. "?%)??ː?" .. C .. "??)$"] = "%1jː%2",
?ː?" .. C .. "??" .. V .. ")ɣʷ(" .. V .. "%(?" .. C .. "?%)??ː?" .. C .. "??)$"] = "%1wː%2",
?ː?" .. C .. "??" .. V .. ")ʁ(" .. V .. "%(?" .. C .. "?%)??ː?" .. C .. "??)$"] = "%1ʁː%2",
?ː?" .. C .. "??" .. V .. ")ʝ(" .. V .. "%(?" .. C .. "?%)??ː?" .. C .. "??)"] = "%1jː%2",
?ː?" .. C .. "??" .. V .. ")ɣʷ(" .. V .. "%(?" .. C .. "?%)??ː?" .. C .. "??)"] = "%1wː%2",
?ː?" .. C .. "??" .. V .. ")ʁ(" .. V .. "%(?" .. C .. "?%)??ː?" .. C .. "??)"] = "%1ʁː%2",
?ː?" .. C .. "??" .. V .. ")ʝ(" .. V .. "%(?" .. C .. "?%)??ː?" .. C .. "??)$"] = "%1jː%2",
?ː?" .. C .. "??" .. V .. ")ɣʷ(" .. V .. "%(?" .. C .. "?%)??ː?" .. C .. "??)$"] = "%1wː%2",
?ː?" .. C .. "??" .. V .. ")ʁ(" .. V .. "%(?" .. C .. "?%)??ː?" .. C .. "??)$"] = "%1ʁː%2",
?ː?" .. C .. "??" .. V .. ")ʝ(" .. V .. "%(?" .. C .. "?%)??ː?" .. C .. "??)"] = "%1jː%2",
?ː?" .. C .. "??" .. V .. ")ɣʷ(" .. V .. "%(?" .. C .. "?%)??ː?" .. C .. "??)"] = "%1wː%2",
?ː?" .. C .. "??" .. V .. ")ʁ(" .. V .. "%(?" .. C .. "?%)??ː?" .. C .. "??)"] = "%1ʁː%2"
},
= {
)(-ˤ)"] = "%1ˤ%2",
-)()"] = "%1ˤ%2",
-)$"] = "%1ˤ"
},
= {
?)"] = "β%1",
?)"] = "ð%1",
?)"] = "D%1",
?)"] = "z%1",
?)"] = "ʒ%1",
?)"] = "ʝ%1",
?)"] = "ɟ%1",
?)"] = "ɣ%1",
?)"] = "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2%3",
)w( ?)(ʷ)$"] = "%1%3%2%3",
)ʷ( ?)w()"] = "%1ɡʷ%2ɡʷ%3",
)ʷ( ?)w()$"] = "%1ɡʷ%2ɡʷ%3",
)ʷ( ?)w()"] = "%1ɡʷ%2ɡʷ%3",
ʷ( ?)w()"] = "ɡʷ%1ɡʷ%2",
ʷ( ?)w()$"] = "ɡʷ%1ɡʷ%2",
ʷ( ?)w()"] = "ɡʷ%1ɡʷ%2",
)ʷ( ?)w$"] = "%1ɡʷ%2ɡʷ",
)( ?)()()"] = "%1%3%2%3%4",
( ?)()()"] = "%2%1%2%3",
)( ?)()$"] = "%1%3%2%3",
)( ?)()()"] = "%1%3%2%3%4",
( ?)()()"] = "%2%1%2%3",
)( ?)()$"] = "%1%3%2%3"
},
= {?)"] = "T%1", ?)"] = "D%1"},
= {
)()( ?)n(?)"] = "%1%2%3%2%4",
)()( ?)n(?)$"] = "%1%2%3%2%4"
},
= { = "ll", = "l l", = "rr", = "r r"},
= { = "ɡʷ%1ɡʷ"},
= {
= "i%1",
)j(" .. C .. ")"] = "%1i%2",
= "u%1",
)w(" .. C .. ")"] = "%1u%2"
},
= {ˤ?)ː"] = "%1", ə?)(ˤ?)ː"] = "%1%2"},
= {?)ː "] = "%1(ː) ", ?)ː$"] = "%1(ː)"},
= {
ː?)æ"] = "%1ɑ",
ː?)i"] = "%1ɪ̙",
ː?)u"] = "%1ʊ̙",
)"] = "ɑ%1",
)"] = "ɪ̙%1",
)"] = "ʊ̙%1",
-ˤ)"] = "ɑ%1",
-ˤ)"] = "ɪ̙%1",
-ˤ)"] = "ʊ̙%1",
-)æ"] = "%1ɑ",
-)i"] = "%1ɪ̙",
-)u"] = "%1ʊ̙"
},
= {
?ː)"] = "æ̝%1",
?ː)"] = "i̞%1",
?ː)"] = "u̞%1",
?ː)"] = "ɑ̝%1",
?ː)"] = "ɪ̙̞%1",
?ː)"] = "ʊ̙̞%1",
?" .. C .. "?)"] = "æ̝%1",
?" .. C .. "?)"] = "i̞%1",
?" .. C .. "?)"] = "u̞%1",
?" .. C .. "?)"] = "ɑ̝%1",
?" .. C .. "?)"] = "ɪ̙̞%1",
?" .. C .. "?)"] = "ʊ̙̞%1",
?)$"] = "æ̝%1",
?)$"] = "i̞%1",
?)$"] = "u̞%1",
?)$"] = "ɑ̝%1",
?)$"] = "ɪ̙̞%1",
?)$"] = "ʊ̙̞%1",
?)"] = "æ̝%1",
?)"] = "i̞%1",
?)"] = "u̞%1",
?)"] = "ɑ̝%1",
?)"] = "ɪ̙̞%1",
?)"] = "ʊ̙̞%1"
},
= { = "ɑ", )"] = "ɑ%1"},
= {
?ː?" .. C .. "??)(ˤ?)$"] = "%1ə%2",
?ː?" .. C .. "??)(ˤ?)"] = "%1ə%2",
" .. V .. "?" .. C .. "?ː?" .. C .. "??)(ˤ?)$"] = "%1ə%2",
" .. V .. "?" .. C .. "?ː?" .. C .. "??)(ˤ?)"] = "%1ə%2",
?ː?)(" .. C .. "?ː?ˤ?)"] = "%1ə%2",
?ː?)(" .. C .. "?ː?ˤ?)$"] = "%1ə%2",
?ː?)(?ː?)"] = "%1ə%2",
?ː?)(?ː?)$"] = "%1ə%2",
?ː?" .. C .. "??)(" .. C .. "?ː?)$"] = "%1ə%2",
?ː?" .. C .. "??)(" .. C .. "?ː?)"] = "%1ə%2",
" .. C .. "??ː?" .. C .. "??)(" .. C .. "?ː?)$"] = "%1ə%2",
" .. C .. "??ː?" .. C .. "??)(" .. C .. "?ː?)"] = "%1ə%2"
},
= {
?ː?)ə(" .. C .. "?)"] = "%1%2",
?ː?)"] = "%1",
" .. C .. "?ː?)ə(" .. C .. "?)"] = "%1%2",
)ə(" .. C .. "?ː?)"] = "%1%2",
?ː?)ə(" .. C .. "?)"] = "%1%2",
)ə(" .. C .. "?ː?)$"] = "%1%2",
" .. C .. "?ː?)ə(" .. C .. "?)$"] = "%1%2",
?ː?)ə(" .. C .. "?)$"] = "%1%2"
},
= {
?ː?)(" .. C .. "?" .. C .. "?)"] = "%1ə%2",
?ː?)(" .. C .. "?ː)"] = "%1ə%2",
?ː?)(" .. C .. "?" .. C .. "?)"] = "%1ə%2",
?ː?)(" .. C .. "?ː)"] = "%1ə%2",
" .. C .. "?ː?)(" .. C .. "?" .. C .. "?)"] = "%1ə%2",
" .. C .. "?ː?)(" .. C .. "?ː)"] = "%1ə%2",
?" .. C .. "?ː?)(" .. C .. "?" .. C .. "?)"] = "%1ə%2",
?" .. C .. "?ː?)(" .. C .. "?ː)"] = "%1ə%2",
?" .. C .. "?" .. C .. "?)(" .. C .. "?)"] = "%1ə%2",
},
= { = "m̩", = "n̪̩", = "l̩", = "r̩"},
= {
= "ij",
= "iʝ",
= "uw"
},
= {
)"] = "i(j)%1",
)"] = "i(ʝ)%1",
)"] = "u(w)%1",
= "i(j)",
= "i(ʝ)",
= "u(w)"
},
= {
?" .. C .. "??" .. C .. "??" .. V .. "?)$"] = "ɑ%1",
?" .. C .. "??" .. C .. "??" .. V .. "?)"] = "ɑ%1",
?" .. C .. "??" .. C .. "??" .. V .. "?)$"] = "(ij)%1",
?" .. C .. "??" .. C .. "??" .. V .. "?)"] = "(ij)%1",
?" .. C .. "??" .. C .. "??" .. V .. "?)$"] = "u%1",
?" .. C .. "??" .. C .. "??" .. V .. "?)"] = "u%1",
?" .. C .. "??" .. C .. "??" .. V .. "?)$"] = "uj%1",
?" .. C .. "??" .. C .. "??" .. V .. "?)"] = "uj%1",
?" .. C .. "??" .. C .. "??" .. V .. "?)$"] = "(ɑj)%1",
?" .. C .. "??" .. C .. "??" .. V .. "?)"] = "(ɑj)%1"
},
= {j" .. C .. "??" .. C .. "?" .. C .. "?)a a"] = "%1‿a", ?" .. C .. "?" .. C .. "?)a a"] = "%1‿a"},--include every verbal prefix to recognize only the a-final conjugated forms
= {) ()"] = "%1‿j%2"},
= {‿j)i"] = "%1"},
= { = "kʷkʷ", = "ɡʷɡʷ"}
}
local dialects = {}
dialects = {
{{"u", "h", "r", "s", "i", "d", "f", "g"}, {true, "b"}},
{{"o", "ø"}, {true, "O"}, {"q", "Q", "t", "T", "n", "e", "c", "j", "a"}, {true, "l"}, {"m", "k", "p"}}
}
function export.pronunciation_phonemic(word)
m_scripts_util.checkScript(word, "Tfng")
translit = (lang:transliterate(word))
return mw.ustring.gsub(translit, '.', c)
end
function export.pronunciation_phonetic(word, dialect)
local word = export.pronunciation_phonemic(word)
local o = dialects
for j = 1, #o do -- set of rules
if o == true then
local N = ""
while N ~= word do
N = word
for k = 2, #o do -- rule
for x, y in pairs(r]) do
word = s(word, x, y)
end
end
end
else
for k = 1, #o do -- rule
for x, y in pairs(r]) do
word = s(word, x, y)
end
end
end
end
word = s(word, '.?', p)
for d, g in pairs(t) do
word = s(word, d .. d, g)
word = s(word, d .. " " .. d .. "()", g .. "‿" .. "%1")
word = s(word, d .. " " .. d .. "$", "‿" .. g)
end
for j = 1, #o do -- set of o
if o == true then
local N = ""
while N ~= word do
N = word
for k = 2, #o do -- rule
for x, y in pairs(r]) do
word = s(word, x, y)
end
end
end
else
for k = 1, #o do -- rule
for x, y in pairs(r]) do
word = s(word, x, y)
end
end
end
end
word = s(word, "T", "t̪")
word = s(word, "D", "d̪")
word = s(word, "N", "n̪")
word = s(word, "C", "t͡ʃ")
word = s(word, "J", "d͡ʒ")
return word
end
function export.show(frame)
local args = frame:getParent().args
local page_title = mw.title.getCurrentTitle().text
local p, results, results_ayt_ndhir = {}, {}, {}
if args then
for index, item in ipairs(args) do
table.insert(p, (item ~= "") and item or nil)
end
else
p = {page_title}
end
if args then
for _, word in ipairs(p) do
table.insert(results, {pron = "/" .. export.pronunciation_phonemic(word) .. "/"})
table.insert(results_ayt_ndhir, {pron = " .. "]"})
end
else
for _, word in ipairs(p) do
table.insert(results, {pron = "/" .. export.pronunciation_phonemic(word) .. "/"})
table.insert(results_ayt_ndhir, {pron = ""})
end
end
return "* " .. m_IPA.format_IPA_full { lang = lang, items = results } .. "\n** " .. m_a.format_qualifiers(lang, {"Ayt Ndhir"}) .. " " .. m_IPA.format_IPA_full { lang = lang, items = results_ayt_ndhir }
end
return export