Module:User:Thadh/sandbox

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

This is a private module sandbox of Thadh, for their own experimentation. Items in this module may be added and removed at Thadh's discretion; do not rely on this module's stability.


local export = {}

local m_IPA = require("Module:IPA")
local lang = require("Module:languages").getByCode("inh")
local rsub = mw.ustring.gsub
local rlower = mw.ustring.lower

local V = "̯?ː?"
local C = "ʼ?ˤ?̥?͡?"

local iot = { ="jа", ="jэ", ="jо", ="у" }
local cons = { 
	="p", ="t", ="k", ="ʡ", ="ʔ",
	="b", ="d", ="ɡ", ="z", ="ʒ",
	="f", ="s", ="ʃ", ="x",
	="m", ="n", ="l", ="r",
}

local function phonetic(text)
	text = rlower(text)
	text = rsub(text, ".", iot)
	-- vowels
	text = rsub(text, "а̄", "a")
	text = rsub(text, "аь", "æ")
	text = rsub(text, "а", "ʌ")
	text = rsub(text, "ӭ", "ʌ")
	text = rsub(text, "э", "ɛ")
	text = rsub(text, "ӣ", "i")
	text = rsub(text, "и", "ɪ")
	text = rsub(text, "ы", "ɨ")
	text = rsub(text, "оа", "ɔ")
	text = rsub(text, "о", "o")
	text = rsub(text, "ӯ", "u")
	text = rsub(text, "у", "ʊ")
	-- semivowels
	text = rsub(text, "й", "j")
	text = rsub(text, "в", "w")
	-- consonants
	text = rsub(text, "(ӏ", "%1ʼ")
	text = rsub(text, "ќӏ", "ќʼ")
	text = rsub(text, "къ", "кхʼ")
	text = rsub(text, "кх", "q")
	text = rsub(text, "ќ", "c")
	text = rsub(text, "ѓ", "ɟ")
	text = rsub(text, "хь", "ħ")
	text = rsub(text, "хӏ", "h")
	text = rsub(text, "гӏ", "ʁ")
	text = rsub(text, "рхӏ", "r̥")
	text = rsub(text, ".", cons)
	text = rsub(text, "()ʡ", "%1ˤ")
	text = rsub(text, "ц", "t͡s")
	text = rsub(text, "ч", "t͡ʃ")
	-- phonetic vowels
	text = rsub(text, "i(" .. C .. "*" .. V .. ")", "iː%1")
	text = rsub(text, "i$", "iː")
	text = rsub(text, "u(" .. C .. "*" .. V .. ")", "uː%1")
	text = rsub(text, "u$", "uː")
	text = rsub(text, "ɛ(" .. C .. "*" .. V .. ")", "iɛ̯%1")
	text = rsub(text, "ɛ$", "iɛ̯")
	text = rsub(text, "o(" .. C .. "*" .. V .. ")", "uo̯%1")
	text = rsub(text, "o$", "uo̯")
	text = rsub(text, "æ(" .. C .. "*" .. V .. ")", "ɛ̯æː")
	text = rsub(text, "æ$", "ɛ̯æː")
	text = rsub(text, "a(" .. C .. "*" .. V .. ")", "aː%1")
	text = rsub(text, "a$", "aː")
	text = rsub(text, "ɔ(" .. C .. "*" .. V .. ")", "ɔa̯")
	text = rsub(text, "ɔ$", "ɔa̯")
	text = rsub(text, "()ɪ", "%1i")
	text = rsub(text, "ɪ()", "i%1")
	text = rsub(text, "(" .. V .. "*" .. C .. "*)(" .. V .. ")", "%1ə")
end