Модул:el-c-conj
Изглед
Документацијата за овој модул можете да ја создадете на Модул:el-c-conj/док
local export = {} --p stands for package
stem=""
debug=""
function export.Nominativ_case (frame)
local args = frame:getParent().args
local str = args[1]
local svr = args[2]
local ed1="" ed2="" ed3="" mn1="" mn2="" mn3=""
local base=""
local rtyval=""
local lstem=""
svr=mw.text.trim(svr)
str=mw.text.trim(str)
lstr=mw.ustring.len(str)
base=mw.ustring.sub( str, 1, lstr-2 )
lstem=mw.ustring.sub( str, lstr-1, lstr-1 )
if lstem=="ό" then
ne1="[["..base.."ός]]"
if svr=="α" then
ne2="[["..base.."ά]]"
else
ne2="[["..base.."ή]]"
end
ne3="[["..base.."ό]]"
nm1="[["..base.."οί]]"
nm2="[["..base.."ές]]"
nm3="[["..base.."ά]]"
else
ne1="[["..base.."ος]]"
if svr=="α" then
ne2="[["..base.."α]]"
else
ne2="[["..base.."η]]"
end
ne3="[["..base.."ο]]"
nm1="[["..base.."οι]]"
nm2="[["..base.."ες]]"
nm3="[["..base.."α]]"
end
rtyval="|-\n |'''Номинатив''' ||"..ne1.."||"..ne2.."||"..ne3.."||"..nm1.."||"..nm2.."||"..nm3
return rtyval
end
function export.Genitiv_case (frame)
local args = frame:getParent().args
local str = args[1]
local svr = args[2]
local ed1="" ed2="" ed3="" mn1="" mn2="" mn3=""
local base=""
local rtyval=""
local lstem=""
svr=mw.text.trim(svr)
str=mw.text.trim(str)
lstr=mw.ustring.len(str)
base=mw.ustring.sub( str, 1, lstr-2 )
lstem=mw.ustring.sub( str, lstr-1, lstr-1 )
if lstem=="ό" then
ne1="[["..base.."ού]]"
if svr=="α" then
ne2="[["..base.."άς]]"
else
ne2="[["..base.."ής]]"
end
ne3="[["..base.."ού]]"
nm1="[["..base.."ών]]"
nm2="[["..base.."ών]]"
nm3="[["..base.."ών]]"
else
ne1="[["..base.."ου]]"
if svr=="α" then
ne2="[["..base.."ας]]"
else
ne2="[["..base.."ης]]"
end
ne3="[["..base.."ου]]"
nm1="[["..base.."ων]]"
nm2="[["..base.."ων]]"
nm3="[["..base.."ων]]"
end
rtyval="|-\n |'''Генитив''' ||"..ne1.."||"..ne2.."||"..ne3.."||"..nm1.."||"..nm2.."||"..nm3
return rtyval
end
function export.Acusativ_case (frame)
local args = frame:getParent().args
local str = args[1]
local svr = args[2]
local ed1="" ed2="" ed3="" mn1="" mn2="" mn3=""
local base=""
local rtyval=""
local lstem=""
svr=mw.text.trim(svr)
str=mw.text.trim(str)
lstr=mw.ustring.len(str)
base=mw.ustring.sub( str, 1, lstr-2 )
lstem=mw.ustring.sub( str, lstr-1, lstr-1 )
if lstem=="ό" then
ne1="[["..base.."ό]]"
if svr=="α" then
ne2="[["..base.."ά]]"
else
ne2="[["..base.."ή]]"
end
ne3="[["..base.."ό]]"
nm1="[["..base.."ούς]]"
nm2="[["..base.."οές]]"
nm3="[["..base.."ά]]"
else
ne1="[["..base.."ο]]"
if svr=="α" then
ne2="[["..base.."α]]"
else
ne2="[["..base.."η]]"
end
ne3="[["..base.."ο]]"
nm1="[["..base.."ους]]"
nm2="[["..base.."οες]]"
nm3="[["..base.."α]]"
end
rtyval="|-\n |'''Акузатив''' ||"..ne1.."||"..ne2.."||"..ne3.."||"..nm1.."||"..nm2.."||"..nm3
return rtyval
end
function export.Vocativ_case (frame)
local args = frame:getParent().args
local str = args[1]
local svr = args[2]
local ed1="" ed2="" ed3="" mn1="" mn2="" mn3=""
local base=""
local rtyval=""
local lstem=""
svr=mw.text.trim(svr)
str=mw.text.trim(str)
lstr=mw.ustring.len(str)
base=mw.ustring.sub( str, 1, lstr-2 )
lstem=mw.ustring.sub( str, lstr-1, lstr-1 )
if lstem=="ό" then
ne1="[["..base.."έ]]"
if svr=="α" then
ne2="[["..base.."ά]]"
else
ne2="[["..base.."ή]]"
end
ne3="[["..base.."ό]]"
nm1="[["..base.."οί]]"
nm2="[["..base.."ές]]"
nm3="[["..base.."ά]]"
else
ne1="[["..base.."ε]]"
if svr=="α" then
ne2="[["..base.."α]]"
else
ne2="[["..base.."η]]"
end
ne3="[["..base.."ο]]"
nm1="[["..base.."οι]]"
nm2="[["..base.."ες]]"
nm3="[["..base.."α]]"
end
rtyval="|-\n |'''Вокатив''' ||"..ne1.."||"..ne2.."||"..ne3.."||"..nm1.."||"..nm2.."||"..nm3
return rtyval
end
return export