La documentation pour ce module peut être créée à Module:ga-common/Documentation
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