Module:ga-common

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

This module needs documentation.
Please document this module by describing its purpose and usage on the documentation page.

local export = {}

local eclipsis_prefixes = {
	 = "m",
	 = "g",
	 = "n",
	 = "bh",
	 = "n",
	 = "b",
	 = "d",
}

function export.mutations(word, tag)
	local ret = {normal = word, len = word, ecl = word, an = word, tpro = word, hpro = word}
	
	local word_l = mw.ustring.lower(word)
	
	if tag ~= "nolen" then
		if mw.ustring.find(word_l, "^") then
			ret.len = mw.ustring.gsub(word, "^(.)", "%1h")
		elseif mw.ustring.find(word_l, "^s") then
			ret.len = mw.ustring.gsub(word, "^(.)", "%1h")
			ret.an = "t" .. word
		end
	end
	
	if eclipsis_prefixes then
		ret.ecl = eclipsis_prefixes .. word
	end
	
	if mw.ustring.find(word, "^") then
		ret.ecl  = "n-" .. word
		ret.hpro = "h" .. word
		
		-- Masculine singular nouns have different lenition after the article "an"
		if tag == "msn" then
			ret.tpro = "t-" .. word
		end
	elseif mw.ustring.find(word, "^") then
		ret.ecl  = "n" .. word
		ret.hpro = "h" .. word
		
		-- Masculine singular nouns have different lenition after the article "an"
		if tag == "msn" then
			ret.tpro = "t" .. word
		end
	end
	
	return ret
end

return export