Module:aa-IPA

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

This module generates the phonemic and phonetic IPA transcription of Afar entries. It runs Template:aa-IPA. The testcases are here. The first parameter is the spelling, with stress, and there can be as many pronunciations as needed.

References

  • Francis E. Mahaffy (1979) An outline of the phonemics and morphology of the Afar (Danakil) language of Eritrea, East Africa
  • E. M. Parker, R. J. Hayward (1985) An Afar-English-French dictionary (with Grammatical Notes in English), University of London, →ISBN
  • Mohamed Hassan Kamil (2015) L’afar: description grammaticale d’une langue couchitique (Djibouti, Erythrée et Ethiopie), Paris: Université Sorbonne Paris Cité (doctoral thesis)

local export = {}

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

local V = ""
local C = ""
local Ci = ""

local phon = {
	="a", ="b", ="ħ", ="d", ="e", ="f",
	="ɡ", ="h", ="i", ="ɟ", ="k", ="l",
	="m", ="n", ="o", ="p", ="ʕ", ="r",
	="s", ="t", ="u", ="w", ="ɖ", ="j",
	="z", ="aˈ", ="eˈ", ="iˈ", ="oˈ", ="uˈ",
	="aˌ", ="eˌ", ="iˌ", ="oˌ", ="uˌ",
}

local function phonemic(text)
	text = rlower(text)
	-- general phonology
	text = rsub(text, ".", phon)
	-- digraphs
	text = rsub(text, "(" .. V .. ")(?)%1", "%1ː%2")
	text = rsub(text, "sh", "ʃ")
	text = rsub(text, "(" .. C .. "?)(" .. V .. "ː?)()", "%3%1%2")
	text = rsub(text, "(" .. C .. ")%1", "%1ː")
	text = rsub(text, "ɟ", "d͡ʒ")
	
	return(text)
end

local function phonetic(text)
	text = phonemic(text)
	-- retroflex
	text = rsub(text, "(" .. V .. "?)ɖ(" .. V .. ")", "%1ɽ%2")
	text = rsub(text, "n(?)ɖ", "ɳ%1ɖ")
	text = rsub(text, "s(?)ɖ", "ʂ%1ɖ")
	-- other consonants
	text = rsub(text, "n(?)()", "ŋ%1%2")
	text = rsub(text, "r", "ɾ")
	text = rsub(text, "ɾː", "rː")
	text = rsub(text, "ɾ()ɾ", "r%1r")
	text = rsub(text, "()()", "%1ʰ%2")
	text = rsub(text, "()$", "ʰ%1")
	-- vowels
	text = rsub(text, "^(?)(" .. V .. ")", "%1ʔ%2")
	text = rsub(text, "a", "ʌ")
	text = rsub(text, "e", "ɛ")
	text = rsub(text, "i", "ɪ")
	text = rsub(text, "o", "ɔ")
	text = rsub(text, "u", "ʊ")
	text = rsub(text, "ʕʌ", "ʕa")
	text = rsub(text, "ʕɛ", "ʕe")
	text = rsub(text, "ʕɪ", "ʕi")
	text = rsub(text, "ʕɔ", "ʕo")
	text = rsub(text, "ʕʊ", "ʕu")
	text = rsub(text, "ʌː", "aː")
	text = rsub(text, "ɛː", "eː")
	text = rsub(text, "ɪː", "iː")
	text = rsub(text, "ɔː", "oː")
	text = rsub(text, "ʊː", "uː")
	
	return(text)
end

function export.syllabify(term) --split for hyphenation
	local H, i = {}, 0
 	for a in string.gmatch(rsub(term, "(" .. Ci .. "?)(" .. Ci .. ")%f", "%1.%2"), "+") do
 		i = i+1
 		H = a
 	end
 	return H
end

function export.show(frame)
	local parent_args = frame:getParent().args
	local params = {
		 = {list = true, required = true}
	}
	local args = require("Module:parameters").process(parent_args, params)

	local p = args
	local phol = {}
	for _, word in ipairs(p) do
		table.insert(phol, {pron = "/" .. phonemic(word) .. "/ "})
	end

	local H = ""
	local title = mw.loadData("Module:headword/data").pagename
	if mw.ustring.match(title, "^.+$") then
		H = export.syllabify(title)
 		H = "\n* " .. require("Module:hyphenation").format_hyphenations { lang = lang, hyphs = {{hyph = H}} }
	end

	return "* " .. m_IPA.format_IPA_full { lang = lang, items = phol } .. H
end 

return export