Module:User:Sarri.greek/recognizeaffix

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

-- ] wrote this, in 2019, for our use at el.wikt. Thank you!!
-- 2024.03.12. ]
-- ]
-- Used at ]
-- it cuts off the first character, if at 1 i put {{PAGENAME}}  I added ...or PAGENAME

local p = {}

function p.affix(frame)
	local term = frame.args or frame:getParent().args -- {{#invoke:recognizeaffix|affix|<a word>}}

	PAGENAME = mw.title.getCurrentTitle().text
	
	-- (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
		
		-- (-1) is the last letter (1st from the end)
		if term:sub(-1) == '-' then
			return 'infix'
		else
			return 'suffix'
		end
	elseif term:sub(-1) == '-' then
		return 'prefix'
	else
		return 'combining form'
	end
end

return p