이 모듈에 대한 설명문서는 모듈:conj/설명문서에서 만들 수 있습니다

local export = {}

function export.main(frame)
	local args = frame.args
	local infinitive = args[1] -- infinitive 원형
	
	local res = chkSuffixEn(infinitive)
end

function chkSuffixEn(word)
    local length = #word
    
    if length >= 2 then
        local lastTwoChars = word:sub(length - 1, length)
        if lastTwoChars == "en" then
			chkSen(word) -- en으로 끝나는 동사인가 확인하고, sChk부터 먼저 시작
        	else
        	chkSuffixEln(word) -- 아니면 -eln 어미 동사인지 검사 
        end
    else
        return false
    end
end

function chkSen(word)
	local bwdThirdChar = word:sub(length - 2, length - 2)
    local sChk = {"s", "x", "z", "ß"} 
    local sFound = false
        	
    for i = 0, 3 do
        if sChk[i] == bwdThirdChar then
        	sFound = true
        	break
        end
    end
    
    if sFound then -- sChk의 문자열을 찾으면 s굴절
    	conj(word)
    end
    
    chkTen(word) -- 못찾으면 tChk 검사
end

function chkTen(word)
	local bwdThirdChar = word:sub(length - 2, length - 2)
	local tChk = {"t", "m", "d"}
	local tFound = false
	
	for i = 0, 2 do
		if tChk[i] == bwdThirdChar then
			tFound = true
			break
		end
	end
	
	if tFound then
		conj(word)
	end
end

function chkSuffixEln(word)
	local length = #word
	
	if length >= 3 then
		local lastThreeChars = word:sub(length - 2, length)
	end
end

return export