Module:User:Sarri.greek/el-articles

From Wiktionary, the free dictionary
Jump to navigation Jump to search

User:Sarri.greek (CAT) » Module el-articles doc - test User:Sarri.greek/template4

Monotonic el (Modern Greek) articles for all varieties using them

Call if from a declension module by placing EXACTLY where it is needed:

require ('Module:User:Sarri.greek/el-articles').articles (args)

-- 2024.03.08. [[wikt:en:User:Sarri.greek]] test articles in inflection tables

local tinti = require("Module:User:Sarri.greek/el-tin")
	--tinti function:tin; chooses the correct acc.singular feminine article [[την]] (tin) or [[τη]] (ti)


-- font colours
local c_stem = '#000000'

local function stem_color (thema)
	thema = thema or '' -- otherwise, it does not work
    return '<span style="color:' .. c_stem ..'; font-weight:normal;">' .. thema .. '</span>'
end

--[=[
-- ================================ Links
function create_link (page, text)
	
			if args['tsd'] == '1' or args['psd'] == '1'
			-- or or or
			or args['el'] == '1'
			then 
				lang_iso = 'el'
			end

		if text then
		return '[[' .. page .. '|' .. text .. ']]'
			.. '<div style="font-size:83%; letter-spacing:2px; line-height:100%; color:#777777">{{xlit|'
			.. lang_iso .. '|' .. text .. '}}</div>'
		end

end
--]=]
-- tests at  [[User:Sarri.greek/tesmplate4]]
function create_link (page, text)
-- ?? need translit. BELOW with small grey letters.
--  line 40: attempt to concatenate global 'tr' (a nil value)
-- tr = args['tr'] or ''		args['tr'] = args['tr'] or ''
-- check at line 300
		if text then
			tr = tr or ''
		return '[[' .. page .. '#Greek|' .. text .. ']]' 
-- go and write
--		.. '<br><div style="white-space:nowrap; font-size:11px; line-height:100%; color:#777777;">' ..  tr .. '</div>'
		else
		return '[[' .. page .. '#Greek|' .. page .. ']]'
--		.. '<br><div style="white-space:nowrap; font-size:11px; line-height:100%; color:#777777;">' ..  tr .. '</div>'
		end

end

--[=[
-- ? how  xxx = frame:preprocess(xxx) ? ..	frame:expandTemplate{ title = 'l', args = {'?' } } 
function create_link (page, text)

		if text then
		mylink = '{{l|el|' .. page .. '|' .. text .. '}}'
		else
		mylink = '{{l|el|' .. page .. '|' .. page .. '}}'
		end
return ?
end
]=]--
--[=[
-- Lua error in Module:User:Sarri.greek/el-articles at line 56: attempt to call method 'preprocess' (a nil value)
function create_link (frame)
-- ?? need translit. BELOW with small grey letters.
--	local args = frame:getParent().args	-- for Templates
	local args = frame.args				-- invoke
	page = page or ''
	text = text or ''
		if text then
		mylink = '{{l|el|' .. page .. '|' .. text .. '}}'
		else
		mylink = '{{l|el|' .. page .. '|' .. page .. '}}'
		end
return frame:preprocess(page, text)
end
]=]--

--[=[ this needs theses 'args' things
function create_link (page, text)
	-- same articles for: MAKE lang_name = 
	if args['grc'] == '1' or args['grc-koi'] == '1' or args['grc-koi'] == '2'
	or args['gkm'] == '1' or args['gkm'] == '2' or args['grk-gkm'] == '1' or args['grk-gkm'] == '2'
	or args['el-kth'] == '1' or args['kath'] == '1'
	then
		if text then
		return '[[' .. page .. '#' .. Ancient_Greek .. '|' .. text .. ']]'
		else
		return '[[' .. page .. '#' .. Ancient_Greek .. '|' .. page .. ']]'
		end
	elseif args['el'] == '1' -- or or or
	then
		if text then
		return '[[' .. page .. '#' .. Greek .. '|' .. text .. ']]'
		else
		return '[[' .. page .. '#' .. Greek .. '|' .. page .. ']]'
		end
	end
end
]=]--


--[[--------------------------< I S _ S E T >------------may by used optionally

Returns true if argument is set; false otherwise. Argument is 'set' when it exists (not nil) or when it is not an empty string.

]]
--[=[ explanation:
The is_set() function may be added so that tests like this:
	if args['ακε'] ~= '' and args['ακε'] ~= nil then args['ακε'] = args['ακε'] else args['ακε'] = '' end
can be reduced to:
	if not is_set (args['ακε']) then args['ακε'] = '' end
]=]--

local function is_set (var)
	return not (var == nil or var == '');
end

--------------------------------------------------------------------------
--                             START PARAMS                            --
--------------------------------------------------------------------------
local function articles (args)


-- erase datives, if the main module has them
	args['aDS'] = ''	args['aDP'] = ''	args['aDD'] = '' -- Dative Dual does not exist in reality
-- erase all duals, if the main module has them
	args['aND'] = ''	args['aGD'] = ''

	-- vocatives are empty. (The interjection ε! could be placed outside, as it is not an article)
	if args['aVS'] ~= '' and args['aVS'] ~= nil then args['aVS'] = args['aVS'] else args['aVS'] = '' end
	if args['aVP'] ~= '' and args['aVP'] ~= nil then args['aVP'] = args['aVP'] else args['aVP'] = '' end
	-- of a second row
	args['aVS2'] = ''	args['aVP2'] = ''	args['aVD2'] = ''
	-- of a second column
	args['a2VS'] = ''	args['a2VP'] = ''	args['a2VD'] = ''

-- ABBREVIATIONS
-- masc
o = create_link('ο', stem_color('ο'))
	.. '<br><div style="white-space:nowrap; font-size:11px; line-height:100%; color:#777777;">' ..  'o' .. '</div>'
tou = create_link('του', stem_color('του'))
	.. '<br><div style="white-space:nowrap; font-size:11px; line-height:100%; color:#777777;">' ..  'tou /tu/' .. '</div>'
ton = create_link('τον', stem_color('τον'))
	.. '<br><div style="white-space:nowrap; font-size:11px; line-height:100%; color:#777777;">' ..  'ton' .. '</div>'
oi = create_link('οι', stem_color('οι'))
	.. '<br><div style="white-space:nowrap; font-size:11px; line-height:100%; color:#777777;">' ..  'oi /i/' .. '</div>'
toon = create_link('των', stem_color('των'))
	.. '<br><div style="white-space:nowrap; font-size:11px; line-height:100%; color:#777777;">' ..  'tōn' .. '</div>'
tous = create_link('τους', stem_color('τους'))
	.. '<br><div style="white-space:nowrap; font-size:11px; line-height:100%; color:#777777;">' ..  'tous /tus/' .. '</div>'
-- fem
i = create_link('η', stem_color('η'))
	.. '<br><div style="white-space:nowrap; font-size:11px; line-height:100%; color:#777777;">' ..  'ī' .. '</div>'
tes = create_link('της', stem_color('της'))
	.. '<br><div style="white-space:nowrap; font-size:11px; line-height:100%; color:#777777;">' ..  'tīs' .. '</div>'
tin = create_link('την', stem_color(tinti.tin(args['lemma']))) -- REQUIRE [[Module:el-tin]]
	.. '<br><div style="white-space:nowrap; font-size:11px; line-height:100%; color:#777777;">' ..  tinti.tin_translit(args['lemma']) .. '</div>'
tis = create_link('τις', stem_color('τις'))
	.. '<br><div style="white-space:nowrap; font-size:11px; line-height:100%; color:#777777;">' ..  'tis' .. '</div>'
-- neu
to = create_link('το', stem_color('το'))
	.. '<br><div style="white-space:nowrap; font-size:11px; line-height:100%; color:#777777;">' ..  'to' .. '</div>'
ta = create_link('τα', stem_color('τα'))
	.. '<br><div style="white-space:nowrap; font-size:11px; line-height:100%; color:#777777;">' ..  'ta' .. '</div>'
-- common or mf
o_i = create_link('ο', stem_color('ο')) .. ' / ' .. create_link('η', stem_color('η'))
	.. '<br><div style="white-space:nowrap; font-size:11px; line-height:100%; color:#777777;">' ..  'o / ī' .. '</div>'
o_br_i = create_link('ο', stem_color('ο')) .. '<br>' .. create_link('η', stem_color('η'))
	.. '<br><div style="white-space:nowrap; font-size:11px; line-height:100%; color:#777777;">' ..  'o / ī' .. '</div>'
tou_tes = create_link('του', stem_color('του')) .. ' / ' .. create_link('της', stem_color('της'))
	.. '<br><div style="white-space:nowrap; font-size:11px; line-height:100%; color:#777777;">' ..  'tou /tu/ - tīs' .. '</div>'
tou_br_tes = create_link('του', stem_color('του')) .. '<br>' .. create_link('της', stem_color('της'))
	.. '<br><div style="white-space:nowrap; font-size:11px; line-height:100%; color:#777777;">' ..  'tou /tu/ - tīs' .. '</div>'
ton_tin = create_link('τον', stem_color('τον')) .. ' / ' .. create_link('την', stem_color(tinti.tin(args['lemma']))) -- REQUIRE [[Module:el-tin]]
	.. '<br><div style="white-space:nowrap; font-size:11px; line-height:100%; color:#777777;">' ..  'ton / ' ..  tinti.tin_translit(args['lemma']) .. '</div>'
ton_br_tin = create_link('τον', stem_color('τον')) .. '<br>' .. create_link('την', stem_color(tinti.tin(args['lemma']))) -- REQUIRE [[Module:el-tin]]
	.. '<br><div style="white-space:nowrap; font-size:11px; line-height:100%; color:#777777;">' ..  'ton / ' ..  tinti.tin_translit(args['lemma']) .. '</div>'
tous_tis = create_link('τους', stem_color('τους')) .. ' / ' .. create_link('τις', stem_color('τις'))
	.. '<br><div style="white-space:nowrap; font-size:11px; line-height:100%; color:#777777;">' ..  'tous /tus/ - tis' .. '</div>'
tous_br_tis = create_link('τους', stem_color('τους')) .. '<br>' .. create_link('τις', stem_color('τις'))
	.. '<br><div style="white-space:nowrap; font-size:11px; line-height:100%; color:#777777;">' ..  'tous /tus/ - tis' .. '</div>'


-- ??TODO do i need a function here, so that I will not have to repeat at 'by whole table?'
-- =========== for INDIVIDUAL cells
-- NOMINATIVE SINGULAR
if args['aNS'] == "m" then args['aNS'] = o elseif args['aNS'] == '-' then args['aNS'] = '' else args['aNS'] = args['aNS'] or '' end
if args['aNS'] == "f" then args['aNS'] = i elseif args['aNS'] == '-' then args['aNS'] = '' else args['aNS'] = args['aNS'] or '' end
if args['aNS'] == "n" then args['aNS'] = to elseif args['aNS'] == '-' then args['aNS'] = '' else args['aNS'] = args['aNS'] or '' end
if args['aNS'] == "c" then args['aNS'] = o_i elseif args['aNS'] == '-' then args['aNS'] = '' else args['aNS'] = args['aNS'] or '' end
if args['aNS'] == "mf" then args['aNS'] = o_br_i elseif args['aNS'] == '-' then args['aNS'] = '' else args['aNS'] = args['aNS'] or '' end
-- at a second row, break line
if args['aNS2'] == "m" then args['aNS2'] = '<br>' .. o elseif args['aNS2'] == '-' then args['aNS2'] = '' else args['aNS2'] = args['aNS2'] or '' end
if args['aNS2'] == "f" then args['aNS2'] = '<br>' .. i elseif args['aNS2'] == '-' then args['aNS2'] = '' else args['aNS2'] = args['aNS2'] or '' end
if args['aNS2'] == "n" then args['aNS2'] = '<br>' .. to elseif args['aNS2'] == '-' then args['aNS2'] = '' else args['aNS2'] = args['aNS2'] or '' end
if args['aNS2'] == "c" then args['aNS2'] = '<br>' .. o_i elseif args['aNS2'] == '-' then args['aNS2'] = '' else args['aNS2'] = args['aNS2'] or '' end
if args['aNS2'] == "mf" then args['aNS2'] = '<br>' .. o_br_i elseif args['aNS2'] == '-' then args['aNS2'] = '' else args['aNS2'] = args['aNS2'] or '' end	
-- at a second COLUMN
if args['a2NS'] == "m" then args['a2NS'] = o elseif args['aNS'] == '-' then args['a2NS'] = '' else args['a2NS'] = args['a2NS'] or '' end
if args['a2NS'] == "f" then args['a2NS'] = i elseif args['aNS'] == '-' then args['a2NS'] = '' else args['a2NS'] = args['a2NS'] or '' end
if args['a2NS'] == "n" then args['a2NS'] = to elseif args['aNS'] == '-' then args['a2NS'] = '' else args['a2NS'] = args['a2NS'] or '' end
if args['a2NS'] == "c" then args['a2NS'] = o_i elseif args['a2NS'] == '-' then args['a2NS'] = '' else args['a2NS'] = args['a2NS'] or '' end
if args['a2NS'] == "mf" then args['a2NS'] = o_br_i elseif args['a2NS'] == '-' then args['a2NS'] = '' else args['a2NS'] = args['a2NS'] or '' end
-- adjectives TEST
if args['aNS-m'] ~= "-" and args['aNS-m'] ~= "c" then
	args['aNS-m'] = o elseif args['aNS-m'] == "c" then args['aNS-m'] = o_i
	elseif args['aNS-m'] == '-' then args['aNS-m'] = '' else args['aNS-m'] = args['aNS-m'] or '' end
if args['aNS-f'] ~= "-" then args['aNS-f'] = i elseif args['aNS-f'] == '-' then args['aNS-f'] = '' else args['aNS-f'] = args['aNS-f'] or '' end
if args['aNS-n'] ~= "-" then args['aNS-n'] = to elseif args['aNS-n'] == '-' then args['aNS-n'] = '' else args['aNS-n'] = args['aNS-n'] or '' end

-- GENITIVE SINGULAR
if args['aGS'] == "m" then args['aGS'] = tou elseif args['aGS'] == '-' then args['aGS'] = '' else args['aGS'] = args['aGS'] or '' end
if args['aGS'] == "f" then args['aGS'] = tes elseif args['aGS'] == '-' then args['aGS'] = '' else args['aGS'] = args['aGS'] or '' end
if args['aGS'] == "n" then args['aGS'] = tou elseif args['aGS'] == '-' then args['aGS'] = '' else args['aGS'] = args['aGS'] or '' end
if args['aGS'] == "c" then args['aGS'] = tou_tes elseif args['aGS'] == '-' then args['aGS'] = '' else args['aGS'] = args['aGS'] or '' end
if args['aGS'] == "mf" then args['aGS'] = tou_br_tes elseif args['aGS'] == '-' then args['aGS'] = '' else args['aGS'] = args['aGS'] or '' end
-- at a second row, break line
if args['aGS2'] == "m" then args['aGS2'] = '<br>' .. tou elseif args['aGS2'] == '-' then args['aGS2'] = '' else args['aGS2'] = args['aGS2'] or '' end
if args['aGS2'] == "f" then args['aGS2'] = '<br>' .. tes elseif args['aGS2'] == '-' then args['aGS2'] = '' else args['aGS2'] = args['aGS2'] or '' end
if args['aGS2'] == "n" then args['aGS2'] = '<br>' .. tou_tes elseif args['aGS2'] == '-' then args['aGS2'] = '' else args['aGS2'] = args['aGS2'] or '' end
if args['aGS2'] == "c" then args['aGS2'] = '<br>' .. tou_br_tes elseif args['aGS2'] == '-' then args['aGS2'] = '' else args['aGS2'] = args['aGS2'] or '' end
if args['aGS2'] == "mf" then args['aGS2'] = '<br>' .. tou_br_tes elseif args['aGS2'] == '-' then args['aGS2'] = '' else args['aGS2'] = args['aGS2'] or '' end
-- at a second COLUMN
if args['a2GS'] == "m" then args['a2GS'] = tou elseif args['a2GS'] == '-' then args['a2GS'] = '' else args['a2GS'] = args['a2GS'] or '' end
if args['a2GS'] == "f" then args['a2GS'] = tes elseif args['a2GS'] == '-' then args['a2GS'] = '' else args['a2GS'] = args['a2GS'] or '' end	
if args['a2GS'] == "n" then args['a2GS'] = tou elseif args['a2GS'] == '-' then args['a2GS'] = '' else args['a2GS'] = args['a2GS'] or '' end
if args['a2GS'] == "c" then args['a2GS'] = tou_tes elseif args['a2GS'] == '-' then args['a2GS'] = '' else args['a2GS'] = args['a2GS2'] or '' end
if args['a2GS'] == "mf" then args['a2GS'] = tou_br_tes elseif args['a2GS'] == '-' then args['a2GS'] = '' else args['a2GS'] = args['a2GS2'] or '' end
-- adjectives TEST
if args['aGS-m'] ~= "-"  and args['aGS-m'] ~= "c" then
	args['aGS-m'] = tu elseif args['aGS-m'] == "c" then args['aGS-m'] = tou_tes
	elseif args['aGS-m'] == '-' then args['aGS-m'] = '' else args['aGS-m'] = args['aGS-m'] or '' end
if args['aGS-f'] ~= "-" then args['aGS-f'] = tes elseif args['aGS-f'] == '-' then args['aGS-f'] = '' else args['aGS-f'] = args['aGS-f'] or '' end
if args['aGS-n'] ~= "-" then args['aGS-n'] = tou elseif args['aGS-n'] == '-' then args['aGS-n'] = '' else args['aGS-n'] = args['aGS-n'] or '' end

-- DATIVE SINGULAR (only for gkm=1, not for gkm=2 or el)

-- accusative singular
if args['aAS'] == "m" then args['aAS'] = ton elseif args['aAS'] == '-' then args['aAS'] = '' else args['aAS'] = args['aAS'] or '' end
if args['aAS'] == "f" then args['aAS'] = tin elseif args['aAS'] == '-' then args['aAS'] = '' else args['aAS'] = args['aAS'] or '' end
if args['aAS'] == "n" then args['aAS'] = to elseif args['aAS'] == '-' then args['aAS'] = '' else args['aAS'] = args['aAS'] or '' end
if args['aAS'] == "c" then args['aAS'] = ton_tin elseif args['aAS'] == '-' then args['aAS'] = '' else args['aAS'] = args['aAS'] or '' end
if args['aAS'] == "mf" then args['aAS'] = ton_br_tin elseif args['aAS'] == '-' then args['aAS'] = '' else args['aAS'] = args['aAS'] or '' end	
-- at a second row, break line
if args['aAS2'] == "m" then args['aAS2'] = '<br>' .. ton elseif args['aAS2'] == '-' then args['aAS2'] = '' else args['aAS2'] = args['aAS2'] or '' end
if args['aAS2'] == "f" then args['aAS2'] = '<br>' .. tin elseif args['aAS2'] == '-' then args['aAS2'] = '' else args['aAS2'] = args['aAS2'] or '' end
if args['aAS2'] == "n" then args['aAS2'] = '<br>' .. to elseif args['aAS2'] == '-' then args['aAS2'] = '' else args['aAS2'] = args['aAS2'] or '' end
if args['aAS2'] == "c" then args['aAS2'] = '<br>' .. ton_tin elseif args['aAS2'] == '-' then args['aAS2'] = '' else args['aAS2'] = args['aAS2'] or '' end

-- at a second column
-- adjectives

-- nominative plural
if args['aNP'] == "m" then args['aNP'] = oi elseif args['aNP'] == '-' then args['aNP'] = '' else args['aNP'] = args['aNP'] or '' end
if args['aNP'] == "f" then args['aNP'] = oi elseif args['aNP'] == '-' then args['aNP'] = '' else args['aNP'] = args['aNP'] or '' end
if args['aNP'] == "n" then args['aNP'] = ta elseif args['aNP'] == '-' then args['aNP'] = '' else args['aNP'] = args['aNP'] or '' end
if args['aNP'] == "c" then args['aNP'] = oi elseif args['aNP'] == '-' then args['aNP'] = '' else args['aNP'] = args['aNP'] or '' end
if args['aNP'] == "mf" then args['aNP'] = oi elseif args['aNP'] == '-' then args['aNP'] = '' else args['aNP'] = args['aNP'] or '' end
-- at a second row, break line
if args['aNP2'] == "m" then args['aNP2'] = '<br>' .. oi elseif args['aNP2'] == '-' then args['aNP2'] = '' else args['aNP2'] = args['aNP2'] or '' end
if args['aNP2'] == "f" then args['aNP2'] = '<br>' .. oi elseif args['aNP2'] == '-' then args['aNP2'] = '' else args['aNP2'] = args['aNP2'] or '' end
if args['aNP2'] == "n" then args['aNP2'] = '<br>' .. ta elseif args['aNP2'] == '-' then args['aNP2'] = '' else args['aNP2'] = args['aNP2'] or '' end
if args['aNP2'] == "c" then args['aNP2'] = '<br>' .. oi elseif args['aNP2'] == '-' then args['aNP2'] = '' else args['aNP2'] = args['aNP2'] or '' end
-- at a second column
-- adjectives

-- genitive plural
if args['aGP'] == "m" then args['aGP'] = toon elseif args['aGP'] == '-' then args['aGP'] = '' else args['aGP'] = args['aGP'] or '' end
if args['aGP'] == "f" then args['aGP'] = toon elseif args['aGP'] == '-' then args['aGP'] = '' else args['aGP'] = args['aGP'] or '' end
if args['aGP'] == "n" then args['aGP'] = toon elseif args['aGP'] == '-' then args['aGP'] = '' else args['aGP'] = args['aGP'] or '' end
if args['aGP'] == "c" then args['aGP'] = toon elseif args['aGP'] == '-' then args['aGP'] = '' else args['aGP'] = args['aGP'] or '' end
if args['aGP'] == "mf" then args['aGP'] = toon elseif args['aGP'] == '-' then args['aGP'] = '' else args['aGP'] = args['aGP'] or '' end
-- at a second row, break line
if args['aGP2'] == "m" then args['aGP2'] = '<br>' .. toon elseif args['aGP2'] == '-' then args['aGP2'] = '' else args['aGP2'] = args['aGP2'] or '' end
if args['aGP2'] == "f" then args['aGP2'] = '<br>' .. toon elseif args['aGP2'] == '-' then args['aGP2'] = '' else args['aGP2'] = args['aGP2'] or '' end
if args['aGP2'] == "n" then args['aGP2'] = '<br>' .. toon elseif args['aGP2'] == '-' then args['aGP2'] = '' else args['aGP2'] = args['aGP2'] or '' end
if args['aGP2'] == "c" then args['aGP2'] = '<br>' .. toon elseif args['aGP2'] == '-' then args['aGP2'] = '' else args['aGP2'] = args['aGP2'] or '' end
-- at a second column
-- adjectives

-- accusative plural
if args['aAP'] == "m" then args['aAP'] = tous elseif args['aAP'] == '-' then args['aAP'] = '' else args['aAP'] = args['aAP'] or '' end
if args['aAP'] == "f" then args['aAP'] = tis elseif args['aAP'] == '-' then args['aAP'] = '' else args['aAP'] = args['aAP'] or '' end
if args['aAP'] == "n" then args['aAP'] = ta elseif args['aAP'] == '-' then args['aAP'] = '' else args['aAP'] = args['aAP'] or '' end
if args['aAP'] == "c" then args['aAP'] = tous_tis elseif args['aAP'] == '-' then args['aAP'] = '' else args['aAP'] = args['aAP'] or '' end
if args['aAP'] == "mf" then args['aAP'] = tous_br_tis elseif args['aAP'] == '-' then args['aAP'] = '' else args['aAP'] = args['aAP'] or '' end
-- at a second row, break line
if args['aAP2'] == "m" then args['aAP2'] = '<br>' .. tous elseif args['aAP2'] == '-' then args['aAP2'] = '' else args['aAP2'] = args['aAP2'] or '' end
if args['aAP2'] == "f" then args['aAP2'] = '<br>' .. tis elseif args['aAP2'] == '-' then args['aAP2'] = '' else args['aAP2'] = args['aAP2'] or '' end
if args['aAP2'] == "m" then args['aAP2'] = '<br>' .. ta elseif args['aAP2'] == '-' then args['aAP2'] = '' else args['aAP2'] = args['aAP2'] or '' end
if args['aAP2'] == "c" then args['aAP2'] = '<br>' .. tous_tis elseif args['aAP2'] == '-' then args['aAP2'] = '' else args['aAP2'] = args['aAP2'] or '' end
-- at a second column
-- adjectives




-- no articles	================== for the WHOLE TABLE ?TODO also by column
if args['articles'] == '0' or args['articles'] == '-'
	then
		args['aNS'] = '&nbsp;&nbsp;&nbsp;&nbsp;...'	args['aGS'] = ''	args['aAS'] = ''
		args['aNP'] = '&nbsp;&nbsp;&nbsp;&nbsp;'	args['aGP'] = ''	args['aAP'] = ''	
else


-- MASCULINE ARTICLES monotonic
if args['m'] == '1' then
	if args['aNS'] == "-" then args['aNS'] = ''
		elseif args['aNS'] ~= '-' and args['aNS'] ~= '' and args['aNS'] ~= nil then args['aNS'] = args['aNS']
		else args['aNS'] = o
		end
	if args['aGS'] == "-" then args['aGS'] = ''
		elseif args['aGS'] ~= '-' and args['aGS'] ~= '' and args['aGS'] ~= nil then args['aGS'] = args['aGS']
		else args['aGS'] = tou
		end
	if args['aAS'] == "-" then args['aAS'] = ''
		elseif args['aAS'] ~= '-' and args['aAS'] ~= '' and args['aAS'] ~= nil then args['aAS'] = args['aAS']
		else args['aAS'] = ton
		end
		if -- vocative is empty
			args['aVS'] ~= '' and args['aVS'] ~= nil then args['aVS'] = args['aVS']
			else args['aVS'] = ''
		end
	if args['aNP'] == "-" then args['aNP'] = ''
		elseif args['aNP'] ~= '-' and args['aNP'] ~= '' and args['aNP'] ~= nil then args['aNP'] = args['aNP']
		else args['aNP'] = oi
		end
	if args['aGP'] == "-" then args['aGP'] = ''
		elseif args['aGP'] ~= '-' and args['aGP'] ~= '' and args['aGP'] ~= nil then args['aGP'] = args['aGP']
		else args['aGP'] = toon
		end
	if args['aAP'] == "-" then args['aAP'] = ''
		elseif args['aAP'] ~= '-' and args['aAP'] ~= '' and args['aAP'] ~= nil then args['aAP'] = args['aAP']
		else args['aAP'] = tous
		end
		if -- vocative is empty
			args['aVP'] ~= '' and args['aVP'] ~= nil then args['aVP'] = args['aVP']
			else args['aVP'] = ''
		end
-- at a second row, break line
	if args['aNS2'] == "-" then args['aNS2'] = ''
		elseif args['aNS2'] ~= '-' and args['aNS2'] ~= '' and args['aNS2'] ~= nil then args['aNS2'] = args['aNS2']
		else args['aNS2'] = o
		end
	if args['aGS2'] == "-" then args['aGS2'] = ''
		elseif args['aGS2'] ~= '-' and args['aGS2'] ~= '' and args['aGS2'] ~= nil then args['aGS2'] = args['aGS2']
		else args['aGS2'] = tou
		end
	if args['aAS2'] == "-" then args['aAS2'] = ''
		elseif args['aAS2'] ~= '-' and args['aAS2'] ~= '' and args['aAS2'] ~= nil then args['aAS2'] = args['aAS2']
		else args['aAS2'] = ton
		end
		if -- vocative is empty
			args['aVS2'] ~= '' and args['aVS2'] ~= nil then args['aVS2'] = args['aVS2']
			else args['aVS2'] = ''
		end
	if args['aNP2'] == "-" then args['aNP2'] = ''
		elseif args['aNP2'] ~= '-' and args['aNP2'] ~= '' and args['aNP2'] ~= nil then args['aNP2'] = args['aNP2']
		else args['aNP2'] = oi
		end
	if args['aGP2'] == "-" then args['aGP2'] = ''
		elseif args['aGP2'] ~= '-' and args['aGP2'] ~= '' and args['aGP2'] ~= nil then args['aGP2'] = args['aGP2']
		else args['aGP2'] = toon
		end
	if args['aAP2'] == "-" then args['aAP2'] = ''
		elseif args['aAP2'] ~= '-' and args['aAP2'] ~= '' and args['aAP2'] ~= nil then args['aAP2'] = args['aAP2']
		else args['aAP2'] = tous
		end
		if -- vocative is empty
			args['aVP2'] ~= '' and args['aVP2'] ~= nil then args['aVP2'] = args['aVP2']
			else args['aVP2'] = ''
		end
-- at a second COLUMN
	if args['a2NS'] == "-" then args['a2NS'] = ''
		elseif args['a2NS'] ~= '-' and args['a2NS'] ~= '' and args['a2NS'] ~= nil then args['a2NS'] = args['a2NS']
		else args['a2NS'] = o
		end
	if args['a2GS'] == "-" then args['a2GS'] = ''
		elseif args['a2GS'] ~= '-' and args['a2GS'] ~= '' and args['a2GS'] ~= nil then args['a2GS'] = args['a2GS']
		else args['a2GS'] = tou
		end
	if args['a2AS'] == "-" then args['a2AS'] = ''
		elseif args['a2AS'] ~= '-' and args['a2AS'] ~= '' and args['a2AS'] ~= nil then args['a2AS'] = args['a2AS']
		else args['a2AS'] = ton
		end
		if -- vocative is empty
			args['a2VS'] ~= '' and args['a2VS'] ~= nil then args['a2VS'] = args['a2VS']
			else args['a2VS'] = ''
		end
	if args['a2NP'] == "-" then args['a2NP'] = ''
		elseif args['a2NP'] ~= '-' and args['a2NP'] ~= '' and args['a2NP'] ~= nil then args['a2NP'] = args['a2NP']
		else args['a2NP'] = oi
		end
	if args['a2GP'] == "-" then args['a2GP'] = ''
		elseif args['a2GP'] ~= '-' and args['a2GP'] ~= '' and args['a2GP'] ~= nil then args['a2GP'] = args['a2GP']
		else args['a2GP'] = toon
		end
	if args['a2AP'] == "-" then args['a2AP'] = ''
		elseif args['a2AP'] ~= '-' and args['a2AP'] ~= '' and args['a2AP'] ~= nil then args['a2AP'] = args['a2AP']
		else args['a2AP'] = tous
		end
		if -- vocative is empty
			args['a2VP'] ~= '' and args['a2VP'] ~= nil then args['a2VP'] = args['a2VP']
			else args['a2VP'] = ''
		end

-- FEMININE ARTICLES monotonic
elseif args['f'] == '1' then
	if args['aNS'] == "-" then args['aNS'] = ''
		elseif args['aNS'] ~= '-' and args['aNS'] ~= '' and args['aNS'] ~= nil then args['aNS'] = args['aNS']
		else args['aNS'] = i
		end
	if args['aGS'] == "-" then args['aGS'] = ''
		elseif args['aGS'] ~= '-' and args['aGS'] ~= '' and args['aGS'] ~= nil then args['aGS'] = args['aGS']
		else args['aGS'] = tes
		end
	if args['aAS'] == "-" then args['aAS'] = ''
		elseif args['aAS'] ~= '-' and args['aAS'] ~= '' and args['aAS'] ~= nil then args['aAS'] = args['aAS']
		else args['aAS'] = tin
		end
		if -- vocative is empty
			args['aVS'] ~= '' and args['aVS'] ~= nil then args['aVS'] = args['aVS']
			else args['aVS'] = ''
		end
	if args['aNP'] == "-" then args['aNP'] = ''
		elseif args['aNP'] ~= '-' and args['aNP'] ~= '' and args['aNP'] ~= nil then args['aNP'] = args['aNP']
		else args['aNP'] = oi
		end
	if args['aGP'] == "-" then args['aGP'] = ''
		elseif args['aGP'] ~= '-' and args['aGP'] ~= '' and args['aGP'] ~= nil then args['aGP'] = args['aGP']
		else args['aGP'] = toon
		end
	if args['aAP'] == "-" then args['aAP'] = ''
		elseif args['aAP'] ~= '-' and args['aAP'] ~= '' and args['aAP'] ~= nil then args['aAP'] = args['aAP']
		else args['aAP'] = tis
		end
		if -- vocative is empty
			args['aVP'] ~= '' and args['aVP'] ~= nil then args['aVP'] = args['aVP']
			else args['aVP'] = ''
		end
-- at a second row, break line
	if args['aNS2'] == "-" then args['aNS2'] = ''
		elseif args['aNS2'] ~= '-' and args['aNS2'] ~= '' and args['aNS2'] ~= nil then args['aNS2'] = args['aNS2']
		else args['aNS2'] = i
		end
	if args['aGS2'] == "-" then args['aGS2'] = ''
		elseif args['aGS2'] ~= '-' and args['aGS2'] ~= '' and args['aGS2'] ~= nil then args['aGS2'] = args['aGS2']
		else args['aGS2'] = tes
		end
	if args['aAS2'] == "-" then args['aAS2'] = ''
		elseif args['aAS2'] ~= '-' and args['aAS2'] ~= '' and args['aAS2'] ~= nil then args['aAS2'] = args['aAS2']
		else args['aAS2'] = tin
		end
		if -- vocative is empty
			args['aVS2'] ~= '' and args['aVS2'] ~= nil then args['aVS2'] = args['aVS2']
			else args['aVS2'] = ''
		end
	if args['aNP2'] == "-" then args['aNP2'] = ''
		elseif args['aNP2'] ~= '-' and args['aNP2'] ~= '' and args['aNP2'] ~= nil then args['aNP2'] = args['aNP2']
		else args['aNP2'] = oi
		end
	if args['aGP2'] == "-" then args['aGP2'] = ''
		elseif args['aGP2'] ~= '-' and args['aGP2'] ~= '' and args['aGP2'] ~= nil then args['aGP2'] = args['aGP2']
		else args['aGP2'] = toon
		end
	if args['aAP2'] == "-" then args['aAP2'] = ''
		elseif args['aAP2'] ~= '-' and args['aAP2'] ~= '' and args['aAP2'] ~= nil then args['aAP2'] = args['aAP2']
		else args['aAP2'] = tis
		end
		if -- vocative is empty
			args['aVP2'] ~= '' and args['aVP2'] ~= nil then args['aVP2'] = args['aVP2']
			else args['aVP2'] = ''
		end
-- at a second COLUMN
	if args['a2NS'] == "-" then args['a2NS'] = ''
		elseif args['a2NS'] ~= '-' and args['a2NS'] ~= '' and args['a2NS'] ~= nil then args['a2NS'] = args['a2NS']
		else args['a2NS'] = i
		end
	if args['a2GS'] == "-" then args['a2GS'] = ''
		elseif args['a2GS'] ~= '-' and args['a2GS'] ~= '' and args['a2GS'] ~= nil then args['a2GS'] = args['a2GS']
		else args['a2GS'] = tes
		end
	if args['a2AS'] == "-" then args['a2AS'] = ''
		elseif args['a2AS'] ~= '-' and args['a2AS'] ~= '' and args['a2AS'] ~= nil then args['a2AS'] = args['a2AS']
		else args['a2AS'] = tin
		end
		if -- vocative is empty
			args['a2VS'] ~= '' and args['a2VS'] ~= nil then args['a2VS'] = args['a2VS']
			else args['a2VS'] = ''
		end
	if args['a2NP'] == "-" then args['a2NP'] = ''
		elseif args['a2NP'] ~= '-' and args['a2NP'] ~= '' and args['a2NP'] ~= nil then args['a2NP'] = args['a2NP']
		else args['a2NP'] = oi
		end
	if args['a2GP'] == "-" then args['a2GP'] = ''
		elseif args['a2GP'] ~= '-' and args['a2GP'] ~= '' and args['a2GP'] ~= nil then args['a2GP'] = args['a2GP']
		else args['a2GP'] = toon
		end
	if args['a2AP'] == "-" then args['a2AP'] = ''
		elseif args['a2AP'] ~= '-' and args['a2AP'] ~= '' and args['a2AP'] ~= nil then args['a2AP'] = args['a2AP']
		else args['a2AP'] = tis
		end
		if -- vocative is empty
			args['a2VP'] ~= '' and args['a2VP'] ~= nil then args['a2VP'] = args['a2VP']
			else args['a2VP'] = ''
		end

-- NEUTER ARTICLES monotonic
elseif args['n'] == '1' then
	if args['aNS'] == "-" then args['aNS'] = ''
		elseif args['aNS'] ~= '-' and args['aNS'] ~= '' and args['aNS'] ~= nil then args['aNS'] = args['aNS']
		else args['aNS'] = to
		end
	if args['aGS'] == "-" then args['aGS'] = ''
		elseif args['aGS'] ~= '-' and args['aGS'] ~= '' and args['aGS'] ~= nil then args['aGS'] = args['aGS']
		else args['aGS'] = tou
		end
	if args['aAS'] == "-" then args['aAS'] = ''
		elseif args['aAS'] ~= '-' and args['aAS'] ~= '' and args['aAS'] ~= nil then args['aAS'] = args['aAS']
		else args['aAS'] = to
		end
		if -- vocative is empty
			args['aVS'] ~= '' and args['aVS'] ~= nil then args['aVS'] = args['aVS']
			else args['aVS'] = ''
		end
	if args['aNP'] == "-" then args['aNP'] = ''
		elseif args['aNP'] ~= '-' and args['aNP'] ~= '' and args['aNP'] ~= nil then args['aNP'] = args['aNP']
		else args['aNP'] = ta
		end
	if args['aGP'] == "-" then args['aGP'] = ''
		elseif args['aGP'] ~= '-' and args['aGP'] ~= '' and args['aGP'] ~= nil then args['aGP'] = args['aGP']
		else args['aGP'] = toon
		end
	if args['aAP'] == "-" then args['aAP'] = ''
		elseif args['aAP'] ~= '-' and args['aAP'] ~= '' and args['aAP'] ~= nil then args['aAP'] = args['aAP']
		else args['aAP'] = ta
		end
		if -- vocative is empty
			args['aVP'] ~= '' and args['aVP'] ~= nil then args['aVP'] = args['aVP']
			else args['aVP'] = ''
		end
-- at a second row, break line
	if args['aNS2'] == "-" then args['aNS2'] = ''
		elseif args['aNS2'] ~= '-' and args['aNS2'] ~= '' and args['aNS2'] ~= nil then args['aNS2'] = args['aNS2']
		else args['aNS2'] = to
		end
	if args['aGS2'] == "-" then args['aGS2'] = ''
		elseif args['aGS2'] ~= '-' and args['aGS2'] ~= '' and args['aGS2'] ~= nil then args['aGS2'] = args['aGS2']
		else args['aGS2'] = tou
		end
	if args['aAS2'] == "-" then args['aAS2'] = ''
		elseif args['aAS2'] ~= '-' and args['aAS2'] ~= '' and args['aAS2'] ~= nil then args['aAS2'] = args['aAS2']
		else args['aAS2'] = to
		end
		if -- vocative is empty
			args['aVS2'] ~= '' and args['aVS2'] ~= nil then args['aVS2'] = args['aVS2']
			else args['aVS2'] = ''
		end
	if args['aNP2'] == "-" then args['aNP2'] = ''
		elseif args['aNP2'] ~= '-' and args['aNP2'] ~= '' and args['aNP2'] ~= nil then args['aNP2'] = args['aNP2']
		else args['aNP2'] = ta
		end
	if args['aGP2'] == "-" then args['aGP2'] = ''
		elseif args['aGP2'] ~= '-' and args['aGP2'] ~= '' and args['aGP2'] ~= nil then args['aGP2'] = args['aGP2']
		else args['aGP2'] = toon
		end
	if args['aAP2'] == "-" then args['aAP2'] = ''
		elseif args['aAP2'] ~= '-' and args['aAP2'] ~= '' and args['aAP2'] ~= nil then args['aAP2'] = args['aAP2']
		else args['aAP2'] = ta
		end
		if -- vocative is empty
			args['aVP2'] ~= '' and args['aVP2'] ~= nil then args['aVP2'] = args['aVP2']
			else args['aVP2'] = ''
		end
-- at a second COLUMN
	if args['a2NS'] == "-" then args['a2NS'] = ''
		elseif args['a2NS'] ~= '-' and args['a2NS'] ~= '' and args['a2NS'] ~= nil then args['a2NS'] = args['a2NS']
		else args['a2NS'] = to
		end
	if args['a2GS'] == "-" then args['a2GS'] = ''
		elseif args['a2GS'] ~= '-' and args['a2GS'] ~= '' and args['a2GS'] ~= nil then args['a2GS'] = args['a2GS']
		else args['a2GS'] = tou
		end
	if args['a2AS'] == "-" then args['a2AS'] = ''
		elseif args['a2AS'] ~= '-' and args['a2AS'] ~= '' and args['a2AS'] ~= nil then args['a2AS'] = args['a2AS']
		else args['a2AS'] = ta
		end
		if -- vocative is empty
			args['a2VS'] ~= '' and args['a2VS'] ~= nil then args['a2VS'] = args['a2VS']
			else args['a2VS'] = ''
		end
	if args['a2NP'] == "-" then args['a2NP'] = ''
		elseif args['a2NP'] ~= '-' and args['a2NP'] ~= '' and args['a2NP'] ~= nil then args['a2NP'] = args['a2NP']
		else args['a2NP'] = ta
		end
	if args['a2GP'] == "-" then args['a2GP'] = ''
		elseif args['a2GP'] ~= '-' and args['a2GP'] ~= '' and args['a2GP'] ~= nil then args['a2GP'] = args['a2GP']
		else args['a2GP'] = toon
		end
	if args['a2AP'] == "-" then args['a2AP'] = ''
		elseif args['a2AP'] ~= '-' and args['a2AP'] ~= '' and args['a2AP'] ~= nil then args['a2AP'] = args['a2AP']
		else args['a2AP'] = ta
		end
		if -- vocative is empty
			args['a2VP'] ~= '' and args['a2VP'] ~= nil then args['a2VP'] = args['a2VP']
			else args['a2VP'] = ''
		end


-- COMMON GENDER of living beings articles monotonic
elseif args['c'] == '1' then
	if args['aNS'] == "-" then args['aNS'] = ''
		elseif args['aNS'] ~= '-' and args['aNS'] ~= '' and args['aNS'] ~= nil then args['aNS'] = args['aNS']
		else args['aNS'] = o_i
		end
	if args['aGS'] == "-" then args['aGS'] = ''
		elseif args['aGS'] ~= '-' and args['aGS'] ~= '' and args['aGS'] ~= nil then args['aGS'] = args['aGS']
		else args['aGS'] = tou_tis
		end
	if args['aAS'] == "-" then args['aAS'] = ''
		elseif args['aAS'] ~= '-' and args['aAS'] ~= '' and args['aAS'] ~= nil then args['aAS'] = args['aAS']
		else args['aAS'] = ton_tin
		end
		if -- vocative is empty
			args['aVS'] ~= '' and args['aVS'] ~= nil then args['aVS'] = args['aVS']
			else args['aVS'] = ''
		end
	if args['aNP'] == "-" then args['aNP'] = ''
		elseif args['aNP'] ~= '-' and args['aNP'] ~= '' and args['aNP'] ~= nil then args['aNP'] = args['aNP']
		else args['aNP'] = oi
		end
	if args['aGP'] == "-" then args['aGP'] = ''
		elseif args['aGP'] ~= '-' and args['aGP'] ~= '' and args['aGP'] ~= nil then args['aGP'] = args['aGP']
		else args['aGP'] = toon
		end
	if args['aAP'] == "-" then args['aAP'] = ''
		elseif args['aAP'] ~= '-' and args['aAP'] ~= '' and args['aAP'] ~= nil then args['aAP'] = args['aAP']
		else args['aAP'] = tous_tis
		end
		if -- vocative is empty
			args['aVP'] ~= '' and args['aVP'] ~= nil then args['aVP'] = args['aVP']
			else args['aVP'] = ''
		end
-- at a second row, break line
	if args['aNS2'] == "-" then args['aNS2'] = ''
		elseif args['aNS2'] ~= '-' and args['aNS2'] ~= '' and args['aNS2'] ~= nil then args['aNS2'] = args['aNS2']
		else args['aNS2'] = o_i
		end
	if args['aGS2'] == "-" then args['aGS2'] = ''
		elseif args['aGS2'] ~= '-' and args['aGS2'] ~= '' and args['aGS2'] ~= nil then args['aGS2'] = args['aGS2']
		else args['aGS2'] = tou_tis
		end
	if args['aAS2'] == "-" then args['aAS2'] = ''
		elseif args['aAS2'] ~= '-' and args['aAS2'] ~= '' and args['aAS2'] ~= nil then args['aAS2'] = args['aAS2']
		else args['aAS2'] = ton_tin
		end
		if -- vocative is empty
			args['aVS2'] ~= '' and args['aVS2'] ~= nil then args['aVS2'] = args['aVS2']
			else args['aVS2'] = ''
		end
	if args['aNP2'] == "-" then args['aNP2'] = ''
		elseif args['aNP2'] ~= '-' and args['aNP2'] ~= '' and args['aNP2'] ~= nil then args['aNP2'] = args['aNP2']
		else args['aNP2'] = oi
		end
	if args['aGP2'] == "-" then args['aGP2'] = ''
		elseif args['aGP2'] ~= '-' and args['aGP2'] ~= '' and args['aGP2'] ~= nil then args['aGP2'] = args['aGP2']
		else args['aGP2'] = toon
		end
	if args['aAP2'] == "-" then args['aAP2'] = ''
		elseif args['aAP2'] ~= '-' and args['aAP2'] ~= '' and args['aAP2'] ~= nil then args['aAP2'] = args['aAP2']
		else args['aAP2'] = tous_tis
		end
		if -- vocative is empty
			args['aVP2'] ~= '' and args['aVP2'] ~= nil then args['aVP2'] = args['aVP2']
			else args['aVP2'] = ''
		end
-- at a second COLUMN
	if args['a2NS'] == "-" then args['a2NS'] = ''
		elseif args['a2NS'] ~= '-' and args['a2NS'] ~= '' and args['a2NS'] ~= nil then args['a2NS'] = args['a2NS']
		else args['a2NS'] = o_i
		end
	if args['a2GS'] == "-" then args['a2GS'] = ''
		elseif args['a2GS'] ~= '-' and args['a2GS'] ~= '' and args['a2GS'] ~= nil then args['a2GS'] = args['a2GS']
		else args['a2GS'] = tou_tis
		end
	if args['a2AS'] == "-" then args['a2AS'] = ''
		elseif args['a2AS'] ~= '-' and args['a2AS'] ~= '' and args['a2AS'] ~= nil then args['a2AS'] = args['a2AS']
		else args['a2AS'] = ton_tin
		end
		if -- vocative is empty
			args['a2VS'] ~= '' and args['a2VS'] ~= nil then args['a2VS'] = args['a2VS']
			else args['a2VS'] = ''
		end
	if args['a2NP'] == "-" then args['a2NP'] = ''
		elseif args['a2NP'] ~= '-' and args['a2NP'] ~= '' and args['a2NP'] ~= nil then args['a2NP'] = args['a2NP']
		else args['a2NP'] = oi
		end
	if args['a2GP'] == "-" then args['a2GP'] = ''
		elseif args['a2GP'] ~= '-' and args['a2GP'] ~= '' and args['a2GP'] ~= nil then args['a2GP'] = args['a2GP']
		else args['a2GP'] = toon
		end
	if args['a2AP'] == "-" then args['a2AP'] = ''
		elseif args['a2AP'] ~= '-' and args['a2AP'] ~= '' and args['a2AP'] ~= nil then args['a2AP'] = args['a2AP']
		else args['a2AP'] = tous_tis
		end
		if -- vocative is empty
			args['a2VP'] ~= '' and args['a2VP'] ~= nil then args['a2VP'] = args['a2VP']
			else args['a2VP'] = ''
		end

-- try this
-- make space for absent articles, to balance the placing of nouns
--	if args['articles'] == '-' or args['articles'] == '' or args['articles'] == nil
--	if args['articles'] == nil 
--	then 
--else
--		args['aNS'] = '&nbsp;  &nbsp;  &nbsp;  &nbsp; &nbsp;  &nbsp;  &nbsp;  &nbsp;'


	end -- close if m=1, if f=1....

end -- close if articles = 0


-- -------------------------------
end -- close  function articles

return {articles = articles}