Module:User:Lunabunn/jje-pron

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


local export = {}

local ko_translit = require("Module:User:Lunabunn/ko-translit")
local gsub = ko_translit.gsub
local ko_pron = require("Module:User:Lunabunn/ko-pron")
local shallowCopy = require("Module:table").shallowCopy
local lang_jje = require("Module:languages").getByCode("jje")
local pagename = mw.loadData("Module:headword/data").pagename

function export.phonetic(text, params)
	local forms = ko_pron.phonetic(text, params)
	for i = #forms,1,-1 do
		local remove = false
		-- remove forms with wo(a)y
		local start = mw.ustring.find(forms, "woa?y")
		if start then remove = true end
		-- remove forms with yay
		start = mw.ustring.find(forms, "yay")
		if start then remove = true end
		if remove then table.remove(forms, i) end
	end
	return forms
end

function export.ipa_morphophonemic(text)
	-- consonants
	text = gsub(text, "^G", "^")
	text = gsub(text, "G$", "ŋ$")
	text = gsub(text, "()h", "%1ʰ")
	text = gsub(text, "()%1", "%1͈")
	text = gsub(text, "cc", "t͈͡ɕ")
	text = gsub(text, "c", "t͡ɕ")
	-- vowels
	text = gsub(text, "e", "ə")
	text = gsub(text, "əy", "e")
	text = gsub(text, "ay", "æ")
	text = gsub(text, "u", "ɨ")
	text = gsub(text, "wɨ", "u")
	text = gsub(text, "ɨy", "ɰi")
	text = gsub(text, "o", "ɒ")
	text = gsub(text, "wɒ", "o")
	text = gsub(text, "uy", "wi")
	text = gsub(text, "ue", "we")
	text = gsub(text, "y", "j")
	-- cleanup
	text = ko_translit.strip_separators(text)
	text = { { pron = "⫽" .. text .. "⫽" } }
	return text
end

function export.ipa_jeju_city(og)
	local forms = shallowCopy(og)
	for i = 1,#forms do
		-- consonants
		forms = gsub(forms, "^G", "^")
		forms = gsub(forms, "G$", "ŋ$")
		forms = gsub(forms, "()h", "%1ʰ")
		forms = gsub(forms, "()%1", "%1͈")
		forms = gsub(forms, "cc", "t͈͡ɕ")
		forms = gsub(forms, "c", "t͡ɕ")
		forms = gsub(forms, "s()", "sʰ")
		-- initial allophony
		forms = gsub(forms, "^^()()", "^%1⁽ʰ⁾%2")
		forms = gsub(forms, "^^t͡ɕ()", "^t͡ɕʰ%2")
		-- medial allophony
		forms = gsub(forms, "(#)k()", "%1g%2")
		forms = gsub(forms, "(#)t()", "%1d%2")
		forms = gsub(forms, "(#)p()", "%1b%2")
		forms = gsub(forms, "(#)t͡ɕ()", "%1d͡ʑ%2")
		-- final allophony
		forms = gsub(forms, "()$", "%1$̚")
		-- l allophony
		forms = gsub(forms, "^l", "^ɾ")
		forms = gsub(forms, "l(#)h", "ɾ%1h")
		-- h allophony
		forms = gsub(forms, "hw", "ɸw")
		forms = gsub(forms, "h()", "ç%1")
		forms = gsub(forms, "(#)h", "%1ɦ")
		-- vowels
		forms = gsub(forms, "e", "ə")
		forms = gsub(forms, "əy", "e")
		forms = gsub(forms, "ay", "æ")
		forms = gsub(forms, "u", "ɨ")
		forms = gsub(forms, "wɨ", "u")
		forms = gsub(forms, "ɨy", "ɰi")
		forms = gsub(forms, "o", "ɒ")
		forms = gsub(forms, "wɒ", "o")
		forms = gsub(forms, "uy", "wi")
		forms = gsub(forms, "ue", "we")
		forms = gsub(forms, "y", "j")
		-- cleanup
		forms = ko_translit.strip_separators(forms)
		forms = { pron = " .. "]" }
	end
	return forms
end

function export.make(frame)
	local parent_args = frame:getParent().args
	local args = require("Module:parameters").process(parent_args, {
		 = { default = pagename },
		 = {},
	})
	local params = ko_pron.parse_params(parent_args)
	
	local raw = ko_translit.raw(args)
	local forms = export.phonetic(raw, params)
	return ko_pron.format(
		lang_jje,
		raw,
		forms,
		{
			{ items = export.ipa_morphophonemic(raw), q = { "Morphophonemic" } },
			{ items = export.ipa_jeju_city(forms), a = { "Jeju City" }, audio = args }
		},
		{
			{ "Revised Romanization", ko_translit.rr(args, false) },
			{ "Revised Romanization (translit.)", ko_translit.rr(args, true) },
			{ "Yale Romanization", ko_translit.yale(args, true, false) }
		}
	)
end

return export