Manchu IPA pronunciation module. See {{mnc-IPA}}
.
All tests passed. (refresh)
Text | Expected | Actual | Comments | |
---|---|---|---|---|
ᠠᠪᡴᠠ (abka) | ap.qʰa | ap.qʰa | ||
ᠠᠨᡳᠶᠠ (aniya) | a.ɲa | a.ɲa | ||
ᠠᡤᠠ (aga) | a.qa | a.qa | ||
ᠣᡵᡳᠨ (orin) | ɔ.rin | ɔ.rin | ||
ᠨᠠᡩᠠᠨ (nadan) | na.tan | na.tan | ||
ᠨᠠᡩᠠᠨᡷᡠ (nadanju) | na.tan.t͡ʃu | na.tan.t͡ʃu | ||
ᠨᡳᠨᡷᡠ (ninju) | nin.t͡ʃu | nin.t͡ʃu | ||
ᠨᡳᠩᡤᡠᠨ (ninggun) | niŋ.ŋun | niŋ.ŋun | ||
ᠨᡳᡴᠠᠨ (nikan) | ni.qʰan | ni.qʰan | ||
ᠪᡳ (bi) | pi | pi | ||
ᠪᡳᡵᠠ (bira) | pi.ra | pi.ra | ||
ᠮᠠᠨᡷᡠ (manju) | man.t͡ʃu | man.t͡ʃu | ||
ᠮᠠᠨᡷᡠ ᡤᡳᠰᡠᠨ (manju gisun) | man.t͡ʃu.ki.sun | man.t͡ʃu.ki.sun | ||
ᠮᠣᡵᡳᠨ (morin) | mɔ.rin | mɔ.rin | ||
ᠮᡠᠰᡝ (muse) | mu.sə | mu.sə | ||
ᠮᡠᡴᡝ (muke) | mu.kʰə | mu.kʰə | ||
ᠮᡳᠩᡤᠠᠨ (minggan) | miŋ.ŋan | miŋ.ŋan | ||
ᠰᠣᠯᠣᠨᡨᡠ (solontu) | sɔ.lɔn.tʰu | sɔ.lɔn.tʰu | ||
ᠰᡠᠨᡷᠠ (sunja) | sun.t͡ʃa | sun.t͡ʃa | ||
ᠰᡠᠰᠠᡳ (susai) | su.sai | su.sai | ||
ᠰᡠᠸᡝ (suwe) | swə | swə | ||
ᠰᡳ (si) | ɕi | ɕi | ||
ᠴᡝ (ce) | t͡ʃʰə | t͡ʃʰə | ||
ᡷᠠᡴᡡᠨ (jakūn) | t͡ʃa.qʰʊn | t͡ʃa.qʰʊn | ||
ᡷᠠᡴᡡᠨᡷᡠ (jakūnju) | t͡ʃa.qʰʊn.t͡ʃu | t͡ʃa.qʰʊn.t͡ʃu | ||
ᡷᡠᠸᠠᠨ (juwan) | t͡ʃwan | t͡ʃwan | ||
ᡷᡠᠸᡝ (juwe) | t͡ʃwə | t͡ʃwə | ||
ᡝᠮᡠ (emu) | ə.mu | ə.mu | ||
ᡠᠰᡳᡥᠠ (usiha) | u.ɕi.χa | u.ɕi.χa | ||
ᡠᡟᡠᠨ (uyun) | u.jun | u.jun | ||
ᡠᡟᡠᠨᡷᡠ (uyunju) | u.jun.t͡ʃu | u.jun.t͡ʃu | ||
ᡤᡡᠰᡳᠨ (gūsin) | qʊ.ɕin | qʊ.ɕin | ||
ᡤᡳᠰᡠᠨ (gisun) | ki.sun | ki.sun | ||
ᡥᠠᡥᠠ (haha) | χa.χa | χa.χa | ||
ᡦᠣᠣ (poo) | pʰoː | pʰoː | ||
ᡧᠣᠯᠣᠨᡨᡠ (šolontu) | ʃɔ.lɔn.tʰu | ʃɔ.lɔn.tʰu | ||
ᡧᡠᠨ (šun) | ʃun | ʃun | ||
ᡨᠠᠩᡤᡡ (tanggū) | tʰaŋ.ŋʊ | tʰaŋ.ŋʊ | ||
ᡨᠠᠴᡳᡴᡡ (tacikū) | tʰa.t͡ɕʰi.qʰʊ | tʰa.t͡ɕʰi.qʰʊ | ||
ᡩᡝᡥᡳ (dehi) | tə.xi | tə.xi | ||
ᡩᡠᡳᠨ (duin) | tuin | tuin | ||
ᡳ (i) | i | i | ||
ᡳᠯᠠᠨ (ilan) | i.lan | i.lan | ||
ᡳᠯᡥᠠ (ilha) | il.χa | il.χa | ||
ᡬᠠᠨ (g'an) | kan | kan | ||
ᠺᠣ (k'o) | kʰɔ | kʰɔ | ||
ᠰᡝᠩᡴᡠᠯᡝ (sengkule) | səŋ.kʰu.lə | səŋ.kʰu.lə | ||
ᡰᡳᠪᡝᠨ (žiben) | ʐi.pən | ʐi.pən | ||
ᡮᠠᡳᡶᡠᠩ (ts'aifung) | t͡sʰai.fuŋ | t͡sʰai.fuŋ | ||
ᡯᠠᠩ (dzang) | t͡saŋ | t͡saŋ | ||
ᡷᠶᠯᡳ (jyli) | ʈ͡ʂʐ.li | ʈ͡ʂʐ.li | ||
ᡷᡳᡥᡳᠶᠠᠨ (jyhiyan) | ʈ͡ʂʐ.xjan | ʈ͡ʂʐ.xjan | ||
ᡥᡡᠸᠠᠩᡩᡳ (hūwangdi) | χwaŋ.ti | χwaŋ.ti | ||
ᠣᠣᡯᡝ (oodze) | oː.t͡sə | oː.t͡sə | ||
ᡥᡡᠸᠠᠵᡳᠶᠣᠣ (hūwajiyoo) | χwa.t͡ɕioː | χwa.t͡ɕioː | ||
ᡦᡳᡟᠠᠨ (piyan) | pʰjan | pʰjan | ||
ᠰᡟᠴᡠᠸᠠᠨ (sycuwan) | sz̩.t͡ʃʰwan | sz̩.t͡ʃʰwan | ||
ᡤᡳᠣᡳ (gioi) | ky | ky |
local export = {}
local lang = require("Module:languages").getByCode("mnc")
local sc = require("Module:scripts").getByCode("mnc-Mong")
local m_IPA = require("Module:IPA")
local gsub = mw.ustring.gsub
local sub = mw.ustring.sub
local gmatch = mw.ustring.gmatch
local find = mw.ustring.find
local len = mw.ustring.len
local correspondences = {
= "ɲ", = "j", = "ʃ", = "χ",
= "tʰ", = "t", = "k", = "p", = "t͡ʃ",
= "kʰ", = "pʰ", = "t͡ʃʰ",
= "ə", = "ɔ", = "ʊ",
}
local function transliterate(text)
return (lang:transliterate(text, sc))
end
local dialects = {
= { name = "peking", link = "]" },
= { name = "alcuka", link = "]" },
= { name = "sibe", link = "]" },
= { name = "ningguta", link = "]" },
= { name = "mukden", link = "]" },
= { name = "sanjiazi", link = "]" },
}
function export.link(term)
if find(term, "") then
term = require("Module:mnc-Latn-translit").tr(term)
end
return require("Module:links").full_link{ term = term, lang = lang, sc = sc }
end
local function syllabify(term)
for i = 1, 2 do
term = gsub(term, "()(+)()", function(a, b, c)
return len(b) > 1 and a .. sub(b, 1, 1) .. "." .. sub(b, 2, -1) .. c or a .. "." .. b .. c end)
end
return term
end
function export.toIPA(text, style)
text = gsub(text, "", "")
local text = transliterate(text)
text = mw.ustring.lower(text)
text = gsub(text, "niy", "ñ")
text = gsub(text, "uw", "w")
text = gsub(text, "ūw", "w")
text = gsub(text, "iya", "ya")
text = gsub(text, "iye", "ye")
text = gsub(text, "iyo", "yo")
text = gsub(text, "iyoo", "yoo") --iy + V need to be specified since there are Chinese loanwords that use a different approach in transliteration
for original in gmatch(text, "+") do
word = gsub(original, "ng", "ŋ")
word = syllabify(word)
word = gsub(word, ".", correspondences)
word = gsub(word, "ɔɔ", "oː")
word = gsub(word, "ŋ%.k", "ŋ.ŋ")
word = gsub(word, "ŋ%.ŋʰ", "ŋ.kʰ")
word = gsub(word, "χi", "xi")
word = gsub(word, "(ʰ?)()", "ɕ%1%2")
word = gsub(word, "k(ʰ?)()", "q%1%2")
word = gsub(word, "tʰ()", "t͡sʰ")
word = gsub(word, "t()", "t͡s")
text = gsub(text, "k'", "k")
text = gsub(text, "s'", "s")
text = gsub(text, "h'", "x")
text = gsub(text, "ž", "ʐ")
text = gsub(text, original, word, 1)
end
text = gsub(text, "%.? %.?", ".")
text = gsub(text, "χj", "xj")
text = gsub(text, "t͡ɕj", "ʈ͡ʂʐ.")
text = gsub(text, "ɕj", "sz̩.")
text = gsub(text, "t.z", ".t͡s")
text = gsub(text, ".t͡sj", ".t͡sz̩")
text = gsub(text, "t͡ʃ.j", ".t͡ɕi")
text = gsub(text, "iɔi", "y")
text = gsub(text, "\n", "")
return text
end
function export.make(frame)
local args = frame:getParent().args
local pagetitle = mw.title.getCurrentTitle().text
local p, output_t = {}, {}
local results = {
= {},
= {},
= {},
= {},
= {},
= {},
= {},
}
if args then
for index, item in ipairs(args) do
table.insert(p, (item ~= "") and item or nil)
end
else
p = { pagetitle }
end
for _, Manchu in ipairs(p) do
table.insert(results, { pron = "" })
end
table.insert(output_t, "* ('']'') " .. m_IPA.format_IPA_full { lang = lang, items = results })
for _, data in pairs(dialects) do
if args then
for dial_pronunciation in mw.text.gsplit(args, "/") do
table.insert(results, { pron = "" })
end
table.insert(output_t, "* (''" .. data.link .. "'') " .. m_IPA.format_IPA_full { lang = lang, items = results })
end
end
return table.concat(output_t, "\n")
end
return export