Module:eee-IPA

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


export = {}

local m_pron_utilities = require("Module:pron utilities")
local m_str_utils = require("Module:string utilities")
local gsub = m_str_utils.gsub
local match = m_str_utils.match

local tones = {
	 = "⁵¹",
	 = "³¹",
	 = "⁵⁵",
	 = "³⁵",
	 = "²⁴",
	 = "⁵⁴",
	 = "²⁴",
}

local function respelling_to_IPA(data)
	local text = data.pagename
	
	if match(text, "") then
		error("Please check the tone number.")
	end
	
	text = gsub(text, "", tones)
	text = gsub(text, "%fh", "ʰ") -- non-initial h
	
	return "/" .. text .. "/"
end

function export.eee_IPA(frame)
	local parent_args = frame:getParent().args
	return m_pron_utilities.format_prons {
		lang = require("Module:languages").getByCode("eee"),
		respelling_to_IPA = respelling_to_IPA,
		raw_args = parent_args,
		track_module = "eee-IPA",
	}
end

return export