Module:onb-pron

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

This module is in beta stage.
Its interface has been stabilised, but the module may still contain errors. Do not deploy widely until the module has been tested.

--References: 临高汉词典 (Bolian), 临高语研究 (Lincheng, Longtang), 海南临高话 (Dongying, Laocheng, Longqiao), http://ling.hawaii.edu/wp-content/uploads/ChenYenlingFinal.pdf
local export = {}
local find = mw.ustring.find
local gsub = mw.ustring.gsub

local lang = require("Module:languages").getByCode("onb")

local toneConv_Lincheng = {
	   = '˨˩˧',    = '˥',    = '˧',    = '˨˩',    = '˧',    = '˥'
}
local toneConv_Bolian = {
	   = '˩˧',    = '˥',    = '˧',    = '˨˩',    = '˧',    = '˥',    = '˨˩'
}
local toneConv_Dongying = {
	   = '˨˩˧',    = '˥˧',    = '˧',    = '˨˩',    = '˧',    = '˥˧',    = '˨˩'
}
local toneConv_Qiaotou = {
	   = '˨˩˧',    = '˧˨˦',    = '˧',    = '˥',    = '˧',    = '˥'
}
local toneConv_Huangtong = {
	   = '˨˩˧',    = '˥˩',    = '˧˩',    = '˨˩',    = '˧',    = '˥'
}
local toneConv_Xinying = {
	   = '˨˩˧',    = '˥',    = '˧',    = '˨˩',    = '˧',    = '˥'
}
local toneConv_Laocheng = {
	   = '˧˥',    = '˧',    = '˩˧',    = '˨˩',    = '˥',    = '˥',    = '˩˧'
}
local toneConv_Longtang = {
	   = '˩˧',    = '˦',    = '˧',    = '˨˦',    = '˩',    = '˥',    = '˧˥',    = '˩˧',    = '˦',    = '˩',    = '˧',    = '˥',    = '˧˥' --5, 6, 9, 10 are only used in loanwords
}
local toneConv_Longqiao = {
	   = '˩˧',    = '˦˥',    = '˧˨',    = '˨˦',    = '˨˩',    = '˥',    = '˧˥',    = '˩˧',    = '˦˥',    = '˨˩',    = '˧˨',    = '˥',    = '˧˥'
}
local toneConv_Yongxing = {
	   = '˨˩˧',    = '˦',    = '˨˦',    = '˨˩',    = '˨˩',    = '˥',    = '˧'
}
local toneConv_Changliu = {
	   = '˧˥',    = '˨˦',    = '˧',    = '˨˩',    = '˥',    = '˨˩'
}

function export.show(frame)
	local params = {
		 = { },
		 = { type = "boolean" },
		 = { type = "boolean" },
		 = { type = "boolean" },
		 = { type = "boolean" },
		 = { type = "boolean" },
		 = { type = "boolean" },
		 = { type = "boolean" },
		 = { type = "boolean" },
		 = { type = "boolean" },
		 = { type = "boolean" },
		 = { type = "boolean" },
	}
	local args = require("Module:parameters").process(frame:getParent().args, params)

	local text = args
	if not text then text = mw.title.getCurrentTitle().text end
	text = gsub(text, "ȵ", "n̠ʲ")
	text = gsub(text, "b", "ɓ")
	text = gsub(text, "d", "ɗ")

	if not find(text, "") then
		error("Tones are missing")
	end

	local IPAtext = ""

	if args or args or args or args or args or args then
		IPAtext = IPAtext .. "\n*" .. require("Module:accent qualifier").format_qualifiers(lang, {"Western"})
	end

	if args then
		if find(text, "") then
			error("Invalid tones in Lincheng accent")
		end

		IPAtext = IPAtext .. "\n** " .. require("Module:accent qualifier").format_qualifiers(lang, {"]"}) .. " " ..
		require("Module:IPA").format_IPA_full {
			lang = lang,
			items = {{ pron = "/" .. gsub(text, "", toneConv_Lincheng) .. "/" }},
		}
	end

	if args then
		if find(text, "") then
			error("Invalid tones in Bolian accent")
		end

		IPAtext = IPAtext .. "\n** " .. require("Module:accent qualifier").format_qualifiers(lang, {"]"}) .. " " ..
		require("Module:IPA").format_IPA_full {
			lang = lang,
			items = {{ pron = "/" .. gsub(text, "", toneConv_Bolian) .. "/" }},
		}
	end

	if args then
		if find(text, "") then
			error("Invalid tones in Dongying accent")
		end

		IPAtext = IPAtext .. "\n** " .. require("Module:accent qualifier").format_qualifiers(lang, {"]"}) .. " " ..
		require("Module:IPA").format_IPA_full {
			lang = lang,
			items = {{ pron = "/" .. gsub(text, "", toneConv_Dongying) .. "/" }},
		}
	end

	if args then
		if find(text, "") then
			error("Invalid tones in Qiaotou accent")
		end

		IPAtext = IPAtext .. "\n** " .. require("Module:accent qualifier").format_qualifiers(lang, {"]"}) .. " " ..
		require("Module:IPA").format_IPA_full {
			lang = lang,
			items = {{ pron = "/" .. gsub(text, "", toneConv_Qiaotou) .. "/" }},
		}
	end

	if args then
		if find(text, "") then
			error("Invalid tones in Huangtong accent")
		end

		IPAtext = IPAtext .. "\n** " .. require("Module:accent qualifier").format_qualifiers(lang, {"]"}) .. " " ..
		require("Module:IPA").format_IPA_full {
			lang = lang,
			items = {{ pron = "/" .. gsub(text, "", toneConv_Huangtong) .. "/" }},
		}
	end

	if args then
		if find(text, "") then
			error("Invalid tones in Xinying accent")
		end

		IPAtext = IPAtext .. "\n** " .. require("Module:accent qualifier").format_qualifiers(lang, {"]"}) .. " " ..
		require("Module:IPA").format_IPA_full {
			lang = lang,
			items = {{ pron = "/" .. gsub(text, "", toneConv_Xinying) .. "/" }},
		}
	end

	if args or args or args or args or args then
		IPAtext = IPAtext .. "\n*" .. require("Module:accent qualifier").format_qualifiers(lang, {"Eastern"})
	end

	if args then
		if find(text, "") then
			error("Invalid tones in Laocheng accent")
		end

		IPAtext = IPAtext .. "\n** " .. require("Module:accent qualifier").format_qualifiers(lang, {"]"}) .. " " ..
		require("Module:IPA").format_IPA_full {
			lang = lang,
			items = {{ pron = "/" .. gsub(text, "", toneConv_Laocheng) .. "/" }},
		}
	end

	if args then
		text = gsub(text, "¹⁰", "十")
		text = gsub(text, "¹'", "1")
		text = gsub(text, "⁷'", "7")
		text = gsub(text, "⁸'", "8")

		IPAtext = IPAtext .. "\n** " .. require("Module:accent qualifier").format_qualifiers(lang, {"]"}) .. " " ..
		require("Module:IPA").format_IPA_full {
			lang = lang,
			items = {{ pron = "/" .. gsub(text, "", toneConv_Longtang) .. "/" }},
		}
	end


	if args then
		text = gsub(text, "¹⁰", "十")
		text = gsub(text, "¹'", "1")
		text = gsub(text, "⁷'", "7")
		text = gsub(text, "⁸'", "8")

		IPAtext = IPAtext .. "\n** " .. require("Module:accent qualifier").format_qualifiers(lang, {"]"}) .. " " ..
		require("Module:IPA").format_IPA_full {
			lang = lang,
			items = {{ pron = "/" .. gsub(text, "", toneConv_Longqiao) .. "/" }},
		}
	end

	if args then
		if find(text, "") then
			error("Invalid tones in Yongxing accent")
		end

		text = gsub(text, "⁷'", "7")

		IPAtext = IPAtext .. "\n** " .. require("Module:accent qualifier").format_qualifiers(lang, {"]"}) .. " " ..
		require("Module:IPA").format_IPA_full {
			lang = lang,
			items = {{ pron = "/" .. gsub(text, "", toneConv_Yongxing) .. "/" }},
		}
	end

	if args then
		if find(text, "") then
			error("Invalid tones in Changliu accent")
		end

		IPAtext = IPAtext .. "\n** " .. require("Module:accent qualifier").format_qualifiers(lang, {"]"}) .. " " ..
		require("Module:IPA").format_IPA_full {
			lang = lang,
			items = {{ pron = "/" .. gsub(text, "", toneConv_Changliu) .. "/" }},
		}
	end

	return IPAtext
end

return export