Module:User:Sarri.greek/el-tin

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

User:Sarri.greek (CAT) » Module tin (την) doc » Template:User:Sarri.greek/el-tin

Choose the correct Modern Greek feminine accusative singular article την OR τη
depending on the sound that follows.
Call it at templates with: {{#invoke:el-tin|tin|term=<word>}}


-- at el.wikationary 2019.05.16. Sarri.greek
-- 2024.03.06. ]
-- 2019.07.24. Thanks to Erutuon

-- Recognizes the first letter of a Modern Greek noun (feminine, accusative, singular) 
-- and produces the correct article την (tin) or τη (ti)
-- Called by ].

local p = {}

-- by Erutuon: remove error "attempt to call method 'getParent' (a nil value)" by accepting string as argument
function p.tin(arg)
	local term
	if type(arg) == 'table' and type(arg.getParent) == 'function' then
		local frame = arg
		local args = frame:getParent().args
		term = args or ''  -- ] {{#invoke:el-tin|tin|term=<word>}}
	else
		term = arg
	end

	PAGENAME = mw.title.getCurrentTitle().text
PAGENAME = PAGENAME:match( "^%s*(.-)%s*$" ) -- Do i need this always? It is about trimming empty beginning and end
	-- when the lemma is a feminine suffix with -xxx
	-- (1, 1) start at 1st character, stop at 1st character
	-- when param 1 is empty, see PAGENAME
	if term:sub(1, 1) == '-' or PAGENAME:sub(1, 1) == "-" then
		return 'τη(ν)'
	end

	-- when the lemma is a feminine word
	-- begninning with βδθφχλρσζΒΔΘΦΧΛΡΣΖ return 'τη'
	if mw.ustring.find(term, '^')
	or mw.ustring.find(PAGENAME, '^')
		then
				return 'τη'
				else
	
	-- μ  - μπ
	if mw.ustring.find(term, '^')
	or mw.ustring.find(PAGENAME, '^')
		then
			return 'την'
			else if mw.ustring.find(term, '^') then return 'τη' end
	end
	-- ν  - ντ
	if mw.ustring.find(term, '^')
	or mw.ustring.find(PAGENAME, '^')
		then
			return 'την'
			else if mw.ustring.find(term, '^') then return 'τη' end
	end
	-- γ  - γκ
	if mw.ustring.find(term, '^')
		then
			return 'την'
			else if mw.ustring.find(term, '^') 
				or mw.ustring.find(PAGENAME, '^') 
				then 
					return 'τη'	end
	end
	
	-- else, if NOT begninning with βδθφχλρσζΒΓΔΘΦΧΛΡΣΖ return 'τηv'
				return 'την'
	end --close beginning with...
end --close function

-- the same function for transliteration
function p.tin_translit(arg)
--p = function(arg)
	local term
	if type(arg) == 'table' and type(arg.getParent) == 'function' then
		local frame = arg
		local args = frame:getParent().args
		term = args or ''  -- ] {{#invoke:el-tin|tin|term=<word>}}
	else
		term = arg
	end

	PAGENAME = mw.title.getCurrentTitle().text
PAGENAME:match( "^%s*(.-)%s*$" )  -- Do i need this always? It is about trimming empty beginning and end
	-- when the lemma is a feminine suffix with -xxx
	-- (1, 1) start at 1st character, stop at 1st character
	-- when param 1 is empty, see PAGENAME
	if term:sub(1, 1) == '-' or PAGENAME:sub(1, 1) == "-" then
		return 'tī(n)'
	end

	-- when the lemma is a feminine word
	-- begninning with βδθφχλρσζΒΔΘΦΧΛΡΣΖ return 'τη'
	if mw.ustring.find(term, '^')
	or mw.ustring.find(PAGENAME, '^')
		then
				return 'tī'
				else
	
	-- μ  - μπ
	if mw.ustring.find(term, '^')
	or mw.ustring.find(PAGENAME, '^')
		then
			return 'tīn'
			else if mw.ustring.find(term, '^') then return 'tī' end
	end
	-- ν  - ντ
	if mw.ustring.find(term, '^')
	or mw.ustring.find(PAGENAME, '^')
		then
			return 'tīn'
			else if mw.ustring.find(term, '^') then return 'tī' end
	end
	-- γ  - γκ
	if mw.ustring.find(term, '^')
		then
			return 'tīn'
			else if mw.ustring.find(term, '^') 
				or mw.ustring.find(PAGENAME, '^') 
				then 
					return 'tī'	end
	end
	
	-- else, if NOT begninning with βδθφχλρσζΒΓΔΘΦΧΛΡΣΖ return 'τηv'
				return 'tīn'
	end --close beginning with...
end --close function


return p