% Stammformenlexikon und Erzeugung der Vollform aus Stammform+Merkmale

:- use_module(['wortformen.pl']).

% verbflexion_slex(Stammform+,Konjugationsklasse+,Formmerkmale?,Vollform-).

/* Konjugationsklassen:
   - regelmaessig, kein betontes Praefix:           rg(-)
   - regelmaessig, betontes(=abtrennbares) Praefix: rg(Praef)
   - unregelmaessig, bet.Praefix, Ablautfolge:      urg(Praef,Vokaltripel,Stammlautposition)

*/

verbflexion_slex(Konjugationsklasse,Stammform) :-
	form(vfin,Formmerkmale),
	konjugiere(Konjugationsklasse,Stammform,Formmerkmale,Vollform),
	write(Formmerkmale),write(': '),write(Vollform),nl,
	fail.          % weitere Formmerkmale und Stammformen suchen
verbflexion_slex(_,_). % fertig.


% ---------------------- Regelmaessige Konjugation (Finite Verbformen ) --------

% konjugiere(Konjugationsklasse+,Infinitiv+,[Pers,Num,Temp,Mod]+,Vollform-)

konjugiere(rg(_Praefix),Infinitiv,[Pers,Num,Temp,Mod],Vfinit) :-  
  	concat(Stamm,'en',Infinitiv),
  	(dentalstamm(Stamm)
        -> konjugation(rge,[Pers,Num,Temp,Mod],Endung)  % Konjugationstabellen s.u.
        ;  konjugation(rg, [Pers,Num,Temp,Mod],Endung)
        ),
 	concat(Stamm,Endung,Vfinit).

dentalstamm(Stamm) :- 
	concat(_,'d',Stamm) ; concat(_,'t',Stamm).

% ---------------- Konjugationstabelle fuer regelm.Konjugation -----------

konjugation(rg,[1,sg,praes,ind], 'e').
konjugation(rg,[1,sg,praes,konj],'e').
konjugation(rg,[1,sg,praet,ind], 'te').
konjugation(rg,[1,sg,praet,konj],'te').

konjugation(rg,[1,pl,praes,ind], 'en').
konjugation(rg,[1,pl,praes,konj],'en').
konjugation(rg,[1,pl,praet,ind], 'ten').
konjugation(rg,[1,pl,praet,konj],'ten').

konjugation(rg,[2,sg,praes,ind], 'st').
konjugation(rg,[2,sg,praes,konj],'est').
konjugation(rg,[2,sg,praet,ind], 'test').
konjugation(rg,[2,sg,praet,konj],'test').

konjugation(rg,[2,pl,praes,ind], 't').
konjugation(rg,[2,pl,praes,konj],'et').
konjugation(rg,[2,pl,praet,ind], 'tet').
konjugation(rg,[2,pl,praet,konj],'tet').

konjugation(rg,[3,sg,praes,ind], 't').
konjugation(rg,[3,sg,praes,konj],'e').
konjugation(rg,[3,sg,praet,ind], 'te').
konjugation(rg,[3,sg,praet,konj],'te').

konjugation(rg,[3,pl,praes,ind], 'en').
konjugation(rg,[3,pl,praes,konj],'en').
konjugation(rg,[3,pl,praet,ind], 'ten').
konjugation(rg,[3,pl,praet,konj],'ten').

% ---- mit e-Erweiterung:

konjugation(rge,[1,sg,praes,ind], 'e').
konjugation(rge,[1,sg,praes,konj],'e').
konjugation(rge,[1,sg,praet,ind], 'ete').
konjugation(rge,[1,sg,praet,konj],'ete').

konjugation(rge,[1,pl,praes,ind], 'en').
konjugation(rge,[1,pl,praes,konj],'en').
konjugation(rge,[1,pl,praet,ind], 'eten').
konjugation(rge,[1,pl,praet,konj],'eten').

konjugation(rge,[2,sg,praes,ind], 'est').
konjugation(rge,[2,sg,praes,konj],'est').
konjugation(rge,[2,sg,praet,ind], 'etest').
konjugation(rge,[2,sg,praet,konj],'etest').

konjugation(rge,[2,pl,praes,ind], 'et').
konjugation(rge,[2,pl,praes,konj],'et').
konjugation(rge,[2,pl,praet,ind], 'etet').
konjugation(rge,[2,pl,praet,konj],'etet').

konjugation(rge,[3,sg,praes,ind], 'et').
konjugation(rge,[3,sg,praes,konj],'e').
konjugation(rge,[3,sg,praet,ind], 'ete').
konjugation(rge,[3,sg,praet,konj],'ete').

konjugation(rge,[3,pl,praes,ind], 'en').
konjugation(rge,[3,pl,praes,konj],'en').
konjugation(rge,[3,pl,praet,ind], 'eten').
konjugation(rge,[3,pl,praet,konj],'eten').

% ------------------- Unregelmaessige Konjugation (Finite Verbformen ) --------
