Module:mnc-IPA

Hello, you have come here looking for the meaning of the word Module:mnc-IPA. In DICTIOUS you will not only get to know all the dictionary meanings for the word Module:mnc-IPA, but we will also tell you about its etymology, its characteristics and you will know how to say Module:mnc-IPA in singular and plural. Everything you need to know about the word Module:mnc-IPA you have here. The definition of the word Module:mnc-IPA will help you to be more precise and correct when speaking or writing your texts. Knowing the definition ofModule:mnc-IPA, as well as those of other words, enriches your vocabulary and provides you with more and better linguistic resources.

Manchu IPA pronunciation module. See {{mnc-IPA}}.

Testcases

Module:mnc-IPA/testcases:

All tests passed. (refresh)

TextExpectedActualComments
test_all:
Passedᠠᠪᡴᠠ (abka)ap.qʰaap.qʰa
Passedᠠᠨᡳᠶᠠ (aniya)a.ɲaa.ɲa
Passedᠠᡤᠠ (aga)a.qaa.qa
Passedᠣᡵᡳᠨ (orin)ɔ.rinɔ.rin
Passedᠨᠠᡩᠠᠨ (nadan)na.tanna.tan
Passedᠨᠠᡩᠠᠨᡷᡠ (nadanju)na.tan.t͡ʃuna.tan.t͡ʃu
Passedᠨᡳᠨᡷᡠ (ninju)nin.t͡ʃunin.t͡ʃu
Passedᠨᡳᠩᡤᡠᠨ (ninggun)niŋ.ŋunniŋ.ŋun
Passedᠨᡳᡴᠠᠨ (nikan)ni.qʰanni.qʰan
Passedᠪᡳ (bi)pipi
Passedᠪᡳᡵᠠ (bira)pi.rapi.ra
Passedᠮᠠᠨᡷᡠ (manju)man.t͡ʃuman.t͡ʃu
Passedᠮᠠᠨᡷᡠ
ᡤᡳᠰᡠᠨ
(manju gisun)
man.t͡ʃu.ki.sunman.t͡ʃu.ki.sun
Passedᠮᠣᡵᡳᠨ (morin)mɔ.rinmɔ.rin
Passedᠮᡠᠰᡝ (muse)mu.səmu.sə
Passedᠮᡠᡴᡝ (muke)mu.kʰəmu.kʰə
Passedᠮᡳᠩᡤᠠᠨ (minggan)miŋ.ŋanmiŋ.ŋan
Passedᠰᠣᠯᠣᠨᡨᡠ (solontu)sɔ.lɔn.tʰusɔ.lɔn.tʰu
Passedᠰᡠᠨᡷᠠ (sunja)sun.t͡ʃasun.t͡ʃa
Passedᠰᡠᠰᠠᡳ (susai)su.saisu.sai
Passedᠰᡠᠸᡝ (suwe)swəswə
Passedᠰᡳ (si)ɕiɕi
Passedᠴᡝ (ce)t͡ʃʰət͡ʃʰə
Passedᡷᠠᡴᡡᠨ (jakūn)t͡ʃa.qʰʊnt͡ʃa.qʰʊn
Passedᡷᠠᡴᡡᠨᡷᡠ (jakūnju)t͡ʃa.qʰʊn.t͡ʃut͡ʃa.qʰʊn.t͡ʃu
Passedᡷᡠᠸᠠᠨ (juwan)t͡ʃwant͡ʃwan
Passedᡷᡠᠸᡝ (juwe)t͡ʃwət͡ʃwə
Passedᡝᠮᡠ (emu)ə.muə.mu
Passedᡠᠰᡳᡥᠠ (usiha)u.ɕi.χau.ɕi.χa
Passedᡠᡟᡠᠨ (uyun)u.junu.jun
Passedᡠᡟᡠᠨᡷᡠ (uyunju)u.jun.t͡ʃuu.jun.t͡ʃu
Passedᡤᡡᠰᡳᠨ (gūsin)qʊ.ɕinqʊ.ɕin
Passedᡤᡳᠰᡠᠨ (gisun)ki.sunki.sun
Passedᡥᠠᡥᠠ (haha)χa.χaχa.χa
Passedᡦᠣᠣ (poo)pʰoːpʰoː
Passedᡧᠣᠯᠣᠨᡨᡠ (šolontu)ʃɔ.lɔn.tʰuʃɔ.lɔn.tʰu
Passedᡧᡠᠨ (šun)ʃunʃun
Passedᡨᠠᠩᡤᡡ (tanggū)tʰaŋ.ŋʊtʰaŋ.ŋʊ
Passedᡨᠠᠴᡳᡴᡡ (tacikū)tʰa.t͡ɕʰi.qʰʊtʰa.t͡ɕʰi.qʰʊ
Passedᡩᡝᡥᡳ (dehi)tə.xitə.xi
Passedᡩᡠᡳᠨ (duin)tuintuin
Passed (i)ii
Passedᡳᠯᠠᠨ (ilan)i.lani.lan
Passedᡳᠯᡥᠠ (ilha)il.χail.χa
Passedᡬᠠᠨ (g'an)kankan
Passedᠺᠣ (k'o)kʰɔkʰɔ
Passedᠰᡝᠩᡴᡠᠯᡝ (sengkule)səŋ.kʰu.ləsəŋ.kʰu.lə
Passedᡰᡳᠪᡝᠨ (žiben)ʐi.pənʐi.pən
Passedᡮᠠᡳᡶᡠᠩ (ts'aifung)t͡sʰai.fuŋt͡sʰai.fuŋ
Passedᡯᠠᠩ (dzang)t͡saŋt͡saŋ
Passedᡷᠶᠯᡳ (jyli)ʈ͡ʂʐ.liʈ͡ʂʐ.li
Passedᡷᡳᡥᡳᠶᠠᠨ (jyhiyan)ʈ͡ʂʐ.xjanʈ͡ʂʐ.xjan
Passedᡥᡡᠸᠠᠩᡩᡳ (hūwangdi)χwaŋ.tiχwaŋ.ti
Passedᠣᠣᡯᡝ (oodze)oː.t͡səoː.t͡sə
Passedᡥᡡᠸᠠᠵᡳᠶᠣᠣ (hūwajiyoo)χwa.t͡ɕioːχwa.t͡ɕioː
Passedᡦᡳᡟᠠᠨ (piyan)pʰjanpʰjan
Passedᠰᡟᠴᡠᠸᠠᠨ (sycuwan)sz̩.t͡ʃʰwansz̩.t͡ʃʰwan
Passedᡤᡳᠣᡳ (gioi)kyky

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