Pronunciation module for Central Kurdish. See {{ckb-IPA}}
.
For testcases, see Module:ckb-pron/testcases.
-- Authors: Ghybu, Calak
local m_IPA = require("Module:IPA")
local lang = require("Module:languages").getByCode("ckb")
local export = {}
local letters1_phonemes = {
= "aː",
= "b",
= "d͡ʒ",
= "t͡ʃ",
= "d",
= "a",
= "e̞ː",
= "f",
= "ɡ",
= "h",
= "ħ",
= "ə",
= "iː",
= "ʒ",
= "k",
= "l",
= "m",
= "n",
= "o̞ː",
= "p",
= "q",
= "ɾ",
= "s",
= "ʃ",
= "t",
= "ʊ",
= "uː",
= "v",
= "w",
= "x",
= "ɣ",
= "j",
= "z",
= "ʕ",
}
function export.phonemic(word)
word = mw.ustring.gsub(word,'ئ','ʔ')
word = lang:transliterate(word)
word = mw.ustring.gsub(word, '.', letters1_phonemes)
word = mw.ustring.gsub(word, '()j()', "%1i̯%2") -- diphthongs: ay, oy, ûy, êy, ey
word = mw.ustring.gsub(word, '()j$', "%1i̯") -- diphthongs: ay, oy, ûy, êy, ey
word = mw.ustring.gsub(word, '()w()', "%1u̯%2") -- diphthongs: aw, ow, îw, êw, ew
word = mw.ustring.gsub(word, '()w$', "%1u̯") -- diphthongs: aw, ow, îw, êw, ew
word = mw.ustring.gsub(word, 'ai̯', "ɛi̯") -- diphthong ey
word = mw.ustring.gsub(word, '̞ː()', "ː%1") -- removing ̞
word = mw.ustring.gsub(word, '()weː()', "%1øe%2") -- diphthong öy, öw
word = mw.ustring.gsub(word, '()we̞ː', "%1øe̯") -- diphthong ö
word = mw.ustring.gsub(word,'n()',"ŋ%1") -- velarized n before velar plosive consonants
word = mw.ustring.gsub(word, 'k()', "c%1") -- palataized k before y and front vowels
word = mw.ustring.gsub(word, 'ɡ()', "ɟ%1") -- palataized g before y and front vowels
word = mw.ustring.gsub(word, '^ɾ', "r") -- initial r should be trill
word = mw.ustring.gsub(word,'ɾɾ',"r") -- trill r
word = mw.ustring.gsub(word, 'll', "ɫ") -- velarized l
word = mw.ustring.gsub(word, 'ja()', "jɛ%1") -- ye
word = mw.ustring.gsub(word, 'o̞ː()', "ɔː%1") -- or(r)
return word
end
function export.show(frame)
local terms = {}
local args = frame:getParent().args
local currentTitle = mw.title.getCurrentTitle().text
for _, term in ipairs(args) do
if term == currentTitle then track("redundant") end
table.insert(terms, term)
end
if #terms == 0 then
terms = {currentTitle}
end
local results = {}
for _, term in ipairs(terms) do
table.insert(results, {pron = "/" .. export.phonemic(term) .. "/"})
end
return "*" .. m_IPA.format_IPA_full { lang = lang, items = results }
end
return export