Module:it-flexion

Bonjour, vous êtes venu ici pour chercher la signification du mot Module:it-flexion. Dans DICTIOUS, vous trouverez non seulement toutes les significations du dictionnaire pour le mot Module:it-flexion, mais vous apprendrez également son étymologie, ses caractéristiques et comment dire Module:it-flexion au singulier et au pluriel. Tout ce que vous devez savoir sur le mot Module:it-flexion est ici. La définition du mot Module:it-flexion vous aidera à être plus précis et correct lorsque vous parlerez ou écrirez vos textes. Connaître la définition deModule:it-flexion, ainsi que celles d'autres mots, enrichit votre vocabulaire et vous fournit des ressources linguistiques plus nombreuses et de meilleure qualité.

 Documentation

Ce module regroupe les fonctions pour afficher les infoboites de flexion en italien. This module handles the most common Italian inflexions, a few other are available in the category Catégorie:Modèles d’accord en italien.


--========================================================================================
-- Module:it-flexion
-- (fr) génération des tableaux de flexions des mots en italien
-- (en) module building inflexion tables for Italian
------------------------------------------------------------------------------------------
-- basé sur le module fr-flexion écrit par ArséniureDeGallium
-- licence / license : CC-BY-SA 3.0
--========================================================================================
local lib_pron = require('Module:prononciation')
local bases = require('Module:bases')
local exports = {}

------------------------------------------------------
-- raccourci pour prononciation(s) en français
-- NB : nil est géré par lua_pron()
function pron(api, pref, api2, pref2)
	if api then
		api = mw.text.trim(api)
	end
	if api2 then
		api2 = mw.text.trim(api2)
	end

    local p = '<br>'..(pref or '')..lib_pron.lua_pron({ api }, 'it')
    if api2 and api2 ~= '' then
    	p = p..'<br><small>ou</small> '..(pref2 or '')..lib_pron.lua_pron({ api2 }, 'it')
    end
    
    return p
end

-- lien vers une page en italien
function lien_it(page)
	--return ']'
	return bases.lien_modele(page, 'it')
end

-- catégorie pluriel manquant
function pluriel_manquant(mot, page)
	if mot and mot ~= '' and mot ~= page and (not bases.page_existe(mot)) then
		return ']'
	end

	return ''
end

------------------------------------------------------
-- tableau de flexions générique à 2 formes (habituellement singulier/pluriel)
function tableau_generique_2(prm)
    -- génération tableau
    local txt = '{| class="wikitable flextable flextable-it-mfsp"\n'
    
    if prm.titre then
    	txt = txt..'|+'..prm.titre..'\n'
    end

    txt = txt..
        '|-\n'..
        '!scope="col"| Singulier\n'..
        '!scope="col"| Pluriel\n'..
        '|-\n'..
        '|'..lien_it(prm.s)..pron(prm.pron_s,prm.S1pref1, prm.pron2_s,prm.S1pref2)..'\n'..
        '|'..lien_it(prm.p)..pron(prm.pron_p,prm.P1pref1, prm.pron2_p,prm.P1pref2)..'\n'..
        '|-\n'..
        '|}'

	-- catégorie pluriels manquants
	txt = txt .. pluriel_manquant(prm.p, prm.page)

    return txt
end

------------------------------------------------------
-- tableau de flexions générique à 3 formes (1 singulier et 2 pluriels)
function tableau_generique_3(prm, mf)
    -- génération tableau
    local txt = '{| class="wikitable flextable flextable-it-mfsp"\n'
    
    if prm.titre then
    	txt = txt..'|+'..prm.titre..'\n'
    end

    txt = txt..
        '|-\n'
        
    if mf then
    	txt = txt..
        '| class="invisible" |\n'
    end
    
    txt = txt..
        '!scope="col"| Singulier\n'..
        '!scope="col"| Pluriel\n'..
        '|-\n'

    if mf then
    	txt = txt..
        '! Masculin\n'
    end
    
    txt = txt..
        '|rowspan="2"|'..lien_it(prm.s)..pron(prm.pron_s,prm.S1pref1, prm.pron2_s,prm.S1pref2)..'\n'..
        '|'..lien_it(prm.p)..pron(prm.pron_p,prm.P1pref1, prm.pron2_p,prm.P1pref2)..'\n'..
        '|-\n'

    if mf then
    	txt = txt..
        '! Féminin\n'
    end

    txt = txt..
        '|'..lien_it(prm.p2)..pron(prm.pron_p2,prm.P1pref1, prm.pron2_p,prm.P1pref2)..'\n'..
        '|}'

	-- catégorie pluriels manquants
	txt = txt .. pluriel_manquant(prm.p, prm.page)
	txt = txt .. pluriel_manquant(prm.p2, prm.page)

    return txt
end

------------------------------------------------------
-- tableau de flexions générique à 4 formes (masculin singulier et pluriel, féminin singulier et pluriel)
function tableau_generique_4(prm)
    -- génération tableau
    local txt = '{| class="wikitable flextable flextable-it-mfsp"\n'
    
    if prm.titre then
    	txt = txt..'|+'..prm.titre..'\n'
    end

    txt = txt..
        '|-\n'..
        '| class="invisible" |\n'..
        '!scope="col"| Singulier\n'..
        '!scope="col"| Pluriel\n'

	-- titre et lien 'positif' pour les formes avec superlatifs
	if prm.superlatif then
		txt = txt..'|- align="center"\n'..
		'! colspan="3"|&nbsp;\'\']\'\'&nbsp;\n'
	end

    local postposition = ''
    local postposition_p = ''
    if prm.postposition then
    	postposition = ' '..prm.postposition
    end
    if prm.postposition_p then
    	postposition_p = ' '..prm.postposition_p
    end

	txt = txt..
        '|-\n'..
        '! Masculin\n'..
        '|'..lien_it(prm.s..postposition)..pron(prm.pron_s..postposition_p,prm.S1pref1, prm.pron2_s,prm.S1pref2)..'\n'..
        '|'..lien_it(prm.p..postposition)..pron(prm.pron_p..postposition_p,prm.P1pref1, prm.pron2_p,prm.P1pref2)..'\n'..
        '|-\n'..
        '! Féminin\n'..
        '|'..lien_it(prm.s2..postposition)..pron(prm.pron_s2..postposition_p,prm.P1pref1, prm.pron2_s2,prm.P1pref2)..'\n'..
        '|'..lien_it(prm.p2..postposition)..pron(prm.pron_p2..postposition_p,prm.P1pref1, prm.pron2_p2,prm.P1pref2)..'\n'

	-- ajout des 4 formes de superlatif
	if prm.superlatif then
		txt = txt..'|- align="center"\n'..
		'! colspan="3"|&nbsp;\'\']\'\'&nbsp;\n'..
		'|- align="center"\n'..
        '|-\n'..
        '! Masculin\n'..
        '|'..lien_it(prm.ss..postposition)..pron(prm.pron_ss,prm.S1pref1)..'\n'..
        '|'..lien_it(prm.sp..postposition)..pron(prm.pron_sp,prm.P1pref1)..'\n'..
        '|-\n'..
        '! Féminin\n'..
        '|'..lien_it(prm.ss2..postposition)..pron(prm.pron_ss2,prm.P1pref1)..'\n'..
        '|'..lien_it(prm.sp2..postposition)..pron(prm.pron_sp2,prm.P1pref1)..'\n'
	end

	txt = txt..
        '|}'

	-- catégorie pluriels manquants
	txt = txt .. pluriel_manquant(prm.p, prm.page)
	txt = txt .. pluriel_manquant(prm.p2, prm.page)

	if prm.superlatif then
		txt = txt .. pluriel_manquant(prm.sp..postposition, prm.page)
		txt = txt .. pluriel_manquant(prm.sp2..postposition, prm.page)
	end

    return txt
end

------------------------------------------------------
-- tableau de flexions générique à 2 formes + 4 superlatifs
function tableau_superlatif_2_4(prm)
    -- génération tableau
    local txt = '{| class="wikitable flextable flextable-it-mfsp"\n'
    
    if prm.titre then
    	txt = txt..'|+'..prm.titre..'\n'
    end

    txt = txt..
        '|-\n'..
        '| class="invisible" |\n'..
        '! Singulier\n'..
        '! Pluriel\n'..
        '| class="invisible" |\n'..
		'|- align="center"\n'..
		'! colspan="3"|&nbsp;\'\']\'\'&nbsp;\n'..
		'|- align="center"\n'..
        '! Masculin et <br/>Féminin\n'..
        '|'..lien_it(prm.s)..pron(prm.pron_s,prm.S1pref1, prm.pron2_s,prm.S1pref2)..'\n'..
        '|'..lien_it(prm.p)..pron(prm.pron_p,prm.P1pref1, prm.pron2_p,prm.P1pref2)..'\n'..
		'|- align="center"\n'..
		'! colspan="3"|&nbsp;\'\']\'\'&nbsp;\n'..
		'|- align="center"\n'..
        '|-\n'..
        '! Masculin\n'..
        '|'..lien_it(prm.ss)..pron(prm.pron_ss,prm.S1pref1)..'\n'..
        '|'..lien_it(prm.sp)..pron(prm.pron_sp,prm.P1pref1)..'\n'..
        '|-\n'..
        '! Féminin\n'..
        '|'..lien_it(prm.ss2)..pron(prm.pron_ss2,prm.P1pref1)..'\n'..
        '|'..lien_it(prm.sp2)..pron(prm.pron_sp2,prm.P1pref1)..'\n'..
        '|}'

	-- catégorie pluriels manquants
	txt = txt .. pluriel_manquant(prm.p, prm.page)
	txt = txt .. pluriel_manquant(prm.p2, prm.page)

	if prm.superlatif then
		txt = txt .. pluriel_manquant(prm.sp, prm.page)
		txt = txt .. pluriel_manquant(prm.sp2, prm.page)
	end

    return txt
end


function racine(mot, liste_terminaisons)
	-- enlève la terminaison trouvée dans la liste
	local len_mot = mw.ustring.len(mot)
	local racine_mot = ''

	for k, t in pairs(liste_terminaisons) do
		local len_t = mw.ustring.len(t)
		local mot_t = mw.ustring.sub(mot, len_mot - len_t + 1, len_mot)
		if mot_t == t then
			-- le mot se termine en t
			racine_mot = mw.ustring.sub(mot, 1, len_mot - len_t)
		end
	end

	return racine_mot
end

function tableau_2(params, mot_s, mot_p, terminaisons, pron_terminaisons)

	if params.superlatif and string.find(mot_s, params.superlatif) then
		-- on enlève l’extension du superlatif
		local term_super = {params.superlatif..'o', params.superlatif..'i',
						params.superlatif..'a', params.superlatif..'e'}
		local r = racine(mot_s, term_super)
    	mot_s = r..'o'
    	if racine(mot_s, terminaisons) == '' then
    		mot_s = r..terminaisons
    	end
    	mot_p = mot_s
	end

    params.s = racine(mot_s, terminaisons)..terminaisons
    params.p = racine(mot_p, terminaisons)..terminaisons
    if params.racine_pron_s and params.racine_pron_s ~= '' then
    	params.pron_s = params.racine_pron_s..pron_terminaisons
    end
    if params.racine_pron2_s and params.racine_pron2_s ~= '' then
    	params.pron2_s = params.racine_pron2_s..pron_terminaisons
    end
    if params.racine_pron_p and params.racine_pron_p ~= '' then
    	params.pron_p = params.racine_pron_p..pron_terminaisons
    end
    if params.racine_pron2_p and params.racine_pron2_p ~= '' then
    	params.pron2_p = params.racine_pron2_p..pron_terminaisons
    end

	if params.superlatif or params.superlatif_r then
		local r = ''
		if params.superlatif_r then
			-- racine différente
			r = params.superlatif_r
		else
			r = racine(mot_s, terminaisons)
			if r ~= '' then
				-- ajout du suffixe pour le superlatif
				r = r..params.superlatif
			end
		end

		if r ~= '' then
			-- ajout de la terminaison
			params.ss = r..'o'
			params.sp = r..'i'
			params.ss2 = r..'a'
			params.sp2 = r..'e'
		end

		-- prononciation du superlatif
		if params.superlatif_p then
	    	params.pron_ss = params.superlatif_p..'o'
	    	params.pron_ss2 = params.superlatif_p..'a'
	    	params.pron_sp = params.superlatif_p..'i'
	    	params.pron_sp2 = params.superlatif_p..'e'
		end
		
		return tableau_superlatif_2_4(params)
	end

    return tableau_generique_2(params)
end

function tableau_3(params, mot, mot_p, mot_p2, terminaisons, pron_terminaisons)
    params.s = racine(mot, terminaisons)..terminaisons
    params.p = racine(mot_p, terminaisons)..terminaisons
    params.p2 = racine(mot_p2, terminaisons)..terminaisons
    if params.racine_pron_s and params.racine_pron_s ~= '' then
    	params.pron_s = params.racine_pron_s..pron_terminaisons
    end
    if params.racine_pron2_s and params.racine_pron2_s ~= '' then
    	params.pron2_s = params.racine_pron2_s..pron_terminaisons
    end
    if params.racine_pron_p and params.racine_pron_p ~= '' then
    	params.pron_p = params.racine_pron_p..pron_terminaisons
    	params.pron_p2 = params.racine_pron_p..pron_terminaisons
    end
    if params.racine_pron2_p and params.racine_pron2_p ~= '' then
    	params.pron2_p = params.racine_pron2_p..pron_terminaisons
    	params.pron2_p2 = params.racine_pron2_p..pron_terminaisons
    end
    
    return tableau_generique_3(params, 1)
end

function tableau_4(params, mot_s, mot_s2, mot_p, mot_p2, terminaisons, pron_terminaisons)

	if params.superlatif and string.find(mot_s, params.superlatif) then
		-- on enlève l’extension du superlatif
		local term_super = {params.superlatif..'o', params.superlatif..'i',
						params.superlatif..'a', params.superlatif..'e'}
		local r = racine(mot_s, term_super)
    	mot_s = r..'o'
    	if racine(mot_s, terminaisons) == '' then
    		mot_s = r..terminaisons
    	end
    	mot_p = mot_s
    	mot_s2 = mot_s
    	mot_p2 = mot_s
	end

    params.s = racine(mot_s, terminaisons)..terminaisons
    params.p = racine(mot_p, terminaisons)..terminaisons
    params.s2 = racine(mot_s2, terminaisons)..terminaisons
    params.p2 = racine(mot_p2, terminaisons)..terminaisons
    if params.racine_pron_s and params.racine_pron_s ~= '' then
    	params.pron_s = params.racine_pron_s..pron_terminaisons
    	params.pron_s2 = params.racine_pron_s..pron_terminaisons
    end
    if params.racine_pron2_s and params.racine_pron2_s ~= '' then
    	params.pron2_s = params.racine_pron2_s..pron_terminaisons
    	params.pron2_s2 = params.racine_pron2_s..pron_terminaisons
    end
    if params.racine_pron_p and params.racine_pron_p ~= '' then
    	params.pron_p = params.racine_pron_p..pron_terminaisons
    	params.pron_p2 = params.racine_pron_p..pron_terminaisons
    end
    if params.racine_pron2_p and params.racine_pron2_p ~= '' then
    	params.pron2_p = params.racine_pron2_p..pron_terminaisons
    	params.pron2_p2 = params.racine_pron2_p..pron_terminaisons
    end

	if params.superlatif then
		local r = racine(mot_s, terminaisons)
		if r ~= '' then
			-- ajout du suffixe pour le superlatif
			r = r..params.superlatif
			-- ajout de la terminaison
			params.ss = r..'o'
			params.sp = r..'i'
			params.ss2 = r..'a'
			params.sp2 = r..'e'
		end

		-- prononciation du superlatif
		if params.superlatif_p then
	    	params.pron_ss = params.superlatif_p..'o'
	    	params.pron_ss2 = params.superlatif_p..'a'
	    	params.pron_sp = params.superlatif_p..'i'
	    	params.pron_sp2 = params.superlatif_p..'e'
		end
	end

    return tableau_generique_4(params)
end

function tableau_2_4(params, mot_s, mot_p, terminaisons, pron_terminaisons)

	if params.superlatif and string.find(mot_s, params.superlatif) then
		-- on enlève l’extension du superlatif
		local term_super = {params.superlatif..'o', params.superlatif..'i',
						params.superlatif..'a', params.superlatif..'e'}
		local r = racine(mot_s, term_super)
    	mot_s = r..'o'
    	if racine(mot_s, terminaisons) == '' then
    		mot_s = r..terminaisons
    	end
    	mot_p = mot_s
	end

    params.s = racine(mot_s, terminaisons)..terminaisons
    params.p = racine(mot_p, terminaisons)..terminaisons
    if params.racine_pron_s and params.racine_pron_s ~= '' then
    	params.pron_s = params.racine_pron_s..pron_terminaisons
    end
    if params.racine_pron2_s and params.racine_pron2_s ~= '' then
    	params.pron2_s = params.racine_pron2_s..pron_terminaisons
    end
    if params.racine_pron_p and params.racine_pron_p ~= '' then
    	params.pron_p = params.racine_pron_p..pron_terminaisons
    end
    if params.racine_pron2_p and params.racine_pron2_p ~= '' then
    	params.pron2_p = params.racine_pron2_p..pron_terminaisons
    end

	if params.superlatif or params.superlatif_r then
		local r = ''
		if params.superlatif_r then
			-- racine différente
			r = params.superlatif_r
		else
			r = racine(mot_s, terminaisons)
			if r ~= '' then
				-- ajout du suffixe pour le superlatif
				r = r..params.superlatif
			end
		end

		if r ~= '' then
			-- ajout de la terminaison
			params.ss = r..'o'
			params.sp = r..'i'
			params.ss2 = r..'a'
			params.sp2 = r..'e'
		end

		-- prononciation du superlatif
		if params.superlatif_p then
	    	params.pron_ss = params.superlatif_p..'o'
	    	params.pron_ss2 = params.superlatif_p..'a'
	    	params.pron_sp = params.superlatif_p..'i'
	    	params.pron_sp2 = params.superlatif_p..'e'
		end
	end

    return tableau_superlatif_2_4(params)
end


------------------------------------------------------------------------
function exports.boite_sp(frame) -- pour Modèle:it-flexion
------------------------------------------------------------------------
    -- récupération des paramètres passés au modèle
    local args = frame:getParent().args
    local page_particuliere = args
	local flexion = args
	if not flexion then
		flexion = args
	end
    local singulier = args
    local pluriel = args
    local singulier2 = args
    local pluriel2 = args
    local superlatif = args -- type suffixe : issim, hissim
    local superlatif_r = args -- racine superlatif (remplace suffixe)
    local superlatif_p = args -- type suffixe prononciation
    local racine_pron_s = args
    local racine_pron_p = args
    local racine_pron_s2 = args
    local racine_pron_p2 = args
    local racine_pron2_s = args -- deuxième prononciation pour le singulier
    local racine_pron2_p = args -- deuxième prononciation pour le pluriel
    local masculinfeminin = args -- affichage Masculin Féminin pour le tableau à 3 éléments
    local postposition = args -- postposition invariable
    local postposition_p = args -- prononciation de la postposition invariable
    
    -- chaîne vide si les paramètres n'existent pas
    if flexion == nil then
    	flexion = ''
    end

    if not racine_pron_p then
    	-- si un seul paramètre, les deux racines sont identiques
    	racine_pron_p = racine_pron_s
    end
    if not racine_pron2_p then
    	-- si un seul paramètre, les deux racines sont identiques
    	racine_pron2_p = racine_pron2_s
    end

    -- construction de la structure de paramètres pour les tableaux
    local params = {}
    params.titre = args
    params.flexion = flexion
    params.s = ''
    params.p = ''
    params.s2 = ''
    params.p2 = ''
    params.pron_s = ''
    params.pron_p = ''
    params.pron_s2 = ''
    params.pron_p2 = ''
    params.pron2_s = ''
    params.pron2_p = ''
    params.pron2_s2 = ''
    params.pron2_p2 = ''
    params.racine_pron_s = racine_pron_s
    params.racine_pron_p = racine_pron_p
    params.racine_pron2_s = racine_pron2_s
    params.racine_pron2_p = racine_pron2_p
    params.superlatif = superlatif
    params.superlatif_r = superlatif_r
    params.superlatif_p = superlatif_p
    params.postposition = postposition
    params.postposition_p = postposition_p

    -- récupération du nom de la page
    local page = mw.title.getCurrentTitle().text
    if page_particuliere then
    	page = page_particuliere
    end
    params.page = page

    local mot = page
    local mot_s2 = mot
    -- prise en du singulier ou du pluriel non régulier
    local mot_p = mot
    local mot_p2 = mot
    if singulier then
    	mot = singulier
    	mot_s2 = singulier
    end
    if args then
    	mot_p = pluriel
    	mot_p2 = pluriel
    end
    if singulier2 then
    	mot_s2 = singulier2
    end
    if pluriel2 then
    	mot_p2 = pluriel2
    end


	-- cas simple où singulier(s) et pluriel(s) sont spécifiés sans flexion
	if (singulier or pluriel) and (flexion == '') then
			params.s = mot
			params.p = mot_p
			params.s2 = mot_s2
			params.p2 = mot_p2
			if racine_pron_s then
				params.pron_s = racine_pron_s
			end
			if racine_pron_p then
				params.pron_p = racine_pron_p
			end
			if racine_pron_s2 then
				params.pron_s2 = racine_pron_s2
			end
			if racine_pron_p2 then
				params.pron_p2 = racine_pron_p2
			end

		if not singulier2 then
			-- exception : deuxième pluriel
			if params.p2 and params.p2 ~= params.p then
				return tableau_generique_3(params, masculinfeminin)
			end

			-- tableau 2
			return tableau_generique_2(params)
		else
			-- tableau 4
			return tableau_generique_4(params)
		end
	end


	-- flexion par défaut selon la dernière lettre du mot (singulier uniquement)
    local len_mot = mw.ustring.len(mot)
    local derniere_lettre_mot = mw.ustring.sub(mot, len_mot, len_mot)
	if flexion == '' then
		if derniere_lettre_mot == 'a' then
			flexion = 'ae'
		elseif derniere_lettre_mot == 'e' then
			flexion = 'ei'
		elseif derniere_lettre_mot == 'o' then
			flexion = 'oi'
		end
	end

	-- construction du tableau
    if flexion == 'ae' then
    	-- singulier en a, pluriel en e
    	return tableau_2(params, mot, mot_p, {'a', 'e'}, {'a', 'e'})
    elseif flexion == 'ahe' then
    	-- singulier en a, pluriel en he
    	return tableau_2(params, mot, mot_p, {'a', 'he'}, {'a', 'e'})
    elseif flexion == 'ahi' then
    	-- singulier en a, pluriel en hi
    	return tableau_2(params, mot, mot_p, {'a', 'hi'}, {'a', 'i'})
    elseif flexion == 'ai' then
    	-- singulier en a, pluriel en i
    	return tableau_2(params, mot, mot_p, {'a', 'i'}, {'a', 'i'})
    elseif flexion == 'ei' then
    	-- singulier en e, pluriel en i
    	return tableau_2(params, mot, mot_p, {'e', 'i'}, {'e', 'i'})
    elseif flexion == 'iae' then
    	-- singulier en cia, pluriel en ce
    	return tableau_2(params, mot, mot_p, {'ia', 'e'}, {'a', 'e'})
    elseif flexion == 'ioi' then
    	-- singulier en io, pluriel en i
    	return tableau_2(params, mot, mot_p, {'io', 'i'}, {'jo', 'i'})
    elseif flexion == 'ioî' then
    	-- singulier en io, pluriel en î
    	return tableau_2(params, mot, mot_p, {'io', 'î'}, {'jo', 'i'})
    elseif flexion == 'joj' then
    	-- singulier en jo, pluriel en j
    	return tableau_2(params, mot, mot_p, {'jo', 'j'}, {'jo', 'i'})
    elseif flexion == 'coci' then
    	-- singulier en co, pluriel en ci
    	return tableau_2(params, mot, mot_p, {'co', 'ci'}, {'ko', 't͡ʃi'})
    elseif flexion == 'gogi' then
    	-- singulier en go, pluriel en gi
    	return tableau_2(params, mot, mot_p, {'go', 'gi'}, {'ɡo', 'd͡ʒi'})
    elseif flexion == 'oi' then
    	-- singulier en o, pluriel en i
    	return tableau_2(params, mot, mot_p, {'o', 'i'}, {'o', 'i'})
    elseif flexion == 'ohi' then
    	-- singulier en o, pluriel en hi
    	return tableau_2(params, mot, mot_p, {'o', 'hi'}, {'o', 'i'})
    elseif flexion == 'oa' then
    	-- singulier en o, pluriel en a
    	return tableau_2(params, mot, mot_p, {'o', 'a'}, {'o', 'a'})
    elseif flexion == 'o' then
    	-- singulier en io, pluriel en i (ii)
    	return tableau_2(params, mot, mot_p, {'io', 'i'}, {'o', 'i'})
    elseif flexion == 'e' then
    	-- singulier en ie, pluriel en i (ii)
    	return tableau_2(params, mot, mot_p, {'ie', 'i'}, {'e', 'i'})
    elseif flexion == 'si' then
    	-- singulier en os, pluriel en oi
    	return tableau_2(params, mot, mot_p, {'s', 'i'}, {'s', 'i'})

    elseif flexion == 'aie' then
    	-- singulier en a, pluriels en i ou e
    	return tableau_3(params, mot, mot_p, mot_p2, {'a', 'i', 'e'}, {'a', 'i', 'e'})
    elseif flexion == 'oia' then
    	-- singulier en o, pluriels en i ou a
    	return tableau_3(params, mot, mot_p, mot_p2, {'o', 'i', 'a'}, {'o', 'i', 'a'})
    elseif flexion == 'gagighe' then
    	-- singulier en ga, pluriels en gi ou ghe
    	return tableau_3(params, mot, mot_p, mot_p2, {'ga', 'gi', 'ghe'}, {'ɡa', 'd͡ʒi', 'ɡe'})
    elseif flexion == 'gaghighe' then
    	-- singulier en ga, pluriels en ghi ou ghe
    	return tableau_3(params, mot, mot_p, mot_p2, {'ga', 'ghi', 'ghe'}, {'ɡa', 'ɡi', 'ɡe'})
    elseif flexion == 'cachiche' then
    	-- singulier en ca, pluriels en chi ou che
    	return tableau_3(params, mot, mot_p, mot_p2, {'ca', 'chi', 'che'}, {'ka', 'ki', 'ke'})

    elseif flexion == 'eaie' then
    	-- masculin en e et i, féminin en a et e
    	return tableau_4(params, mot, mot_s2, mot_p, mot_p2, {'e', 'i', 'a', 'e'}, {'e', 'i', 'a', 'e'})
    elseif flexion == 'oaie' then
    	-- masculin en o et i, féminin en a et e
    	return tableau_4(params, mot, mot_s2, mot_p, mot_p2, {'o', 'i', 'a', 'e'}, {'o', 'i', 'a', 'e'})
    elseif flexion == 'oaîe' then
    	-- masculin en o et î, féminin en a et e
    	return tableau_4(params, mot, mot_s2, mot_p, mot_p2, {'o', 'î', 'a', 'e'}, {'o', 'i', 'a', 'e'})
    elseif flexion == 'oahihe' then
    	-- masculin en o et hi, féminin en a et he
    	return tableau_4(params, mot, mot_s2, mot_p, mot_p2, {'o', 'hi', 'a', 'he'}, {'o', 'i', 'a', 'e'})
    elseif flexion == 'cocaciche' then
    	-- masculin en co et ci, féminin en ca et che
    	return tableau_4(params, mot, mot_s2, mot_p, mot_p2, {'co', 'ci', 'ca', 'che'}, {'ko', 't͡ʃi', 'ka', 'ke'})
    elseif flexion == 'gogagighe' then
    	-- masculin en go et gi, féminin en ga et ghe
    	return tableau_4(params, mot, mot_s2, mot_p, mot_p2, {'go', 'gi', 'ga', 'ghe'}, {'ɡo', 'd͡ʒi', 'ɡa', 'ɡe'})
    elseif flexion == 'ioiaiie' then
    	-- masculin en io et i, féminin en ia et ie
    	return tableau_4(params, mot, mot_s2, mot_p, mot_p2, {'io', 'i', 'ia', 'ie'}, {'jo', 'i', 'ja', 'je'})
    elseif flexion == 'ioiaîie' then
    	-- masculin en io et î, féminin en ia et ie
    	return tableau_4(params, mot, mot_s2, mot_p, mot_p2, {'io', 'î', 'ia', 'ie'}, {'jo', 'i', 'ja', 'je'})
    elseif flexion == 'ioiaie' then
    	-- masculin en io et i, féminin en ia et e
    	return tableau_4(params, mot, mot_s2, mot_p, mot_p2, {'io', 'i', 'ia', 'e'}, {'o', 'i', 'a', 'e'})
    elseif flexion == 'oae' then
    	-- masculin en io et i, féminin en ia et ie, où le premier i ne se prononce pas
    	return tableau_4(params, mot, mot_s2, mot_p, mot_p2, {'io', 'i', 'ia', 'ie'}, {'o', 'i', 'a', 'e'})

    elseif flexion == 'tore' then
    	-- masculin en tore et tori, féminin en trice et trici
    	return tableau_4(params, mot, mot_s2, mot_p, mot_p2, {'tore', 'tori', 'trice', 'trici'},
    						{'ˈto.re', 'ˈto.ri', 'ˈtri.t͡ʃe', 'ˈtri.t͡ʃi'})

    elseif flexion == 'oaihe' then
    	return '<strong class="error">Pour l\'accord oaihe, utiliser soit cocaciche soit gogagighe</strong>'
    end

	-- erreur
	if flexion ~= '' and page ~= 'Modèle:it-flexion' then
		return '<strong class="error">Flexion '..flexion..' non reconnue (Modèle:it-flexion)</strong>'
	end
end

-- publication des fonctions publiques
return exports