diff --git a/src/hungarian/ParadigmsHun.gf b/src/hungarian/ParadigmsHun.gf index 5dfb718a..120cccd9 100644 --- a/src/hungarian/ParadigmsHun.gf +++ b/src/hungarian/ParadigmsHun.gf @@ -58,6 +58,7 @@ oper -- Verbs mkV : overload { mkV : (sg3 : Str) -> V ; -- Predictable verb. Takes singular P3 form in present tense. + mkV : (x1,_,_,_,_,_,_,_,_,_,_,_,x13 : Str) -> V ; -- Full present, past, and infinitive forms. -- mkV : (nore : Str) -> (hada : V) -> V ; -- Add a prefix to an existing verb, e.g. 노래+하다 } ; @@ -228,6 +229,11 @@ oper -- s = \\vf => nore + hada.s ! vf} ; mkV : (x1,_,_,_,_,_,x7 : Str) -> V = \sg1,sg2,sg3,pl1,pl2,pl3,inf -> lin V (mkVerbFull sg1 sg2 sg3 pl1 pl2 pl3 inf) ; + mkV : (x1,_,_,_,_,_,_,_,_,_,_,_,x13 : Str) -> V = + \sg1,sg2,sg3,pl1,pl2,pl3,pastSg1,pastSg2,pastSg3,pastPl1,pastPl2,pastPl3,inf -> + lin V (mkVerbFullPast sg1 sg2 sg3 pl1 pl2 pl3 + pastSg1 pastSg2 pastSg3 pastPl1 pastPl2 pastPl3 + inf) ; } ; copula = lin V ResHun.copula ; diff --git a/src/hungarian/ParamHun.gf b/src/hungarian/ParamHun.gf index b884185f..bc40edc4 100644 --- a/src/hungarian/ParamHun.gf +++ b/src/hungarian/ParamHun.gf @@ -198,13 +198,14 @@ param VForm = VInf - | VPres Person Number ; + | VPres Person Number + | VPast Person Number ; oper - - agr2vf : Person*Number -> VForm = \pn -> - case of { - => VPres p n + agr2vf : Tense -> Person*Number -> VForm = \t,pn -> + case of { + => VPast p n ; + <_,p,n> => VPres p n } ; -------------------------------------------------------------------------------- diff --git a/src/hungarian/ResHun.gf b/src/hungarian/ResHun.gf index 568be7df..c202c7c6 100644 --- a/src/hungarian/ResHun.gf +++ b/src/hungarian/ResHun.gf @@ -395,6 +395,24 @@ oper => harm "nak" "nek" -- TODO allomorphs -anak, -enek } ; + endingsPastIndef : VerbEndings = table { + => harm3 "tam" "tem" "tem" ; + => harm "tál" "tél" ; + => harm1 "t" ; + => harm "tunk" "tünk" ; + => harm3 "tatok" "tetek" "tötök" ; + => harm "tak" "tek" + } ; + + endingsPastDef : VerbEndings = table { + => harm3 "tam" "tem" "tem" ; + => harm "tad" "ted" ; + => harm "ta" "te" ; + => harm "tuk" "tük" ; + => harm "tátok" "tétek" ; + => harm "ták" "ték" + } ; + BaseVerb : Type = { sc : SubjCase ; -- subject case } ; @@ -420,7 +438,8 @@ oper vtov2 : Verb -> Verb2 = \v -> v ** { s = table { - Def => let vDef : Verb = mkVerbReg endingsDef (v.s ! VInf) (v.s ! VPres P3 Sg) + Def => let vDef : Verb = mkVerbRegPast endingsDef endingsPastDef + (v.s ! VInf) (v.s ! VPres P3 Sg) in vDef.s ; Indef => v.s } ; c2 = Acc @@ -435,7 +454,10 @@ oper } in mkVerbReg endingsIndef inf sg3 ; - mkVerbReg : VerbEndings -> (inf, stem : Str) -> Verb = \hf,inf,stem -> + mkVerbReg : VerbEndings -> (inf, stem : Str) -> Verb = + \hf,inf,stem -> mkVerbRegPast hf endingsPastIndef inf stem ; + + mkVerbRegPast : VerbEndings -> VerbEndings -> (inf, stem : Str) -> Verb = \hf,pastHf,inf,stem -> let h : Harm = getHarm stem ; sg1 : Str = stem + hf ! ! h ; sg2 : Str = stem + hf ! ! h ; @@ -443,10 +465,31 @@ oper pl1 : Str = stem + hf ! ! h ; pl2 : Str = stem + hf ! ! h ; pl3 : Str = stem + hf ! ! h ; - in mkVerbFull sg1 sg2 sg3 pl1 pl2 pl3 inf ; + pastSg1 : Str = stem + pastHf ! ! h ; + pastSg2 : Str = stem + pastHf ! ! h ; + pastSg3 : Str = stem + pastHf ! ! h ; + pastPl1 : Str = stem + pastHf ! ! h ; + pastPl2 : Str = stem + pastHf ! ! h ; + pastPl3 : Str = stem + pastHf ! ! h ; + in mkVerbFullPast sg1 sg2 sg3 pl1 pl2 pl3 + pastSg1 pastSg2 pastSg3 pastPl1 pastPl2 pastPl3 + inf ; mkVerbFull : (x1,_,_,_,_,_,x7 : Str) -> Verb = - \sg1,sg2,sg3,pl1,pl2,pl3,inf -> { + \sg1,sg2,sg3,pl1,pl2,pl3,inf -> + let h : Harm = getHarm sg3 ; + pastSg1 : Str = sg3 + endingsPastIndef ! ! h ; + pastSg2 : Str = sg3 + endingsPastIndef ! ! h ; + pastSg3 : Str = sg3 + endingsPastIndef ! ! h ; + pastPl1 : Str = sg3 + endingsPastIndef ! ! h ; + pastPl2 : Str = sg3 + endingsPastIndef ! ! h ; + pastPl3 : Str = sg3 + endingsPastIndef ! ! h ; + in mkVerbFullPast sg1 sg2 sg3 pl1 pl2 pl3 + pastSg1 pastSg2 pastSg3 pastPl1 pastPl2 pastPl3 + inf ; + + mkVerbFullPast : (x1,_,_,_,_,_,_,_,_,_,_,_,x13 : Str) -> Verb = + \sg1,sg2,sg3,pl1,pl2,pl3,pastSg1,pastSg2,pastSg3,pastPl1,pastPl2,pastPl3,inf -> { s = table { VInf => inf ; VPres P1 Sg => sg1 ; @@ -454,18 +497,30 @@ oper VPres P3 Sg => sg3 ; VPres P1 Pl => pl1 ; VPres P2 Pl => pl2 ; - VPres P3 Pl => pl3 + VPres P3 Pl => pl3 ; + VPast P1 Sg => pastSg1 ; + VPast P2 Sg => pastSg2 ; + VPast P3 Sg => pastSg3 ; + VPast P1 Pl => pastPl1 ; + VPast P2 Pl => pastPl2 ; + VPast P3 Pl => pastPl3 } ; sc = SCNom } ; - copula : Verb = mkVerbFull + copula : Verb = mkVerbFullPast "vagyok" "vagy" "van" "vagyunk" "vagytok" "vannak" + "voltam" + "voltál" + "volt" + "voltunk" + "voltatok" + "voltak" "lenni" ; megvan : Verb = copula ** { @@ -521,7 +576,7 @@ oper SCDat => Dat } in linNP' NoPoss subjcase np ++ if_then_Pol p [] "nem" - ++ vp.s ! agr2vf np.agr + ++ vp.s ! agr2vf t np.agr ++ vp.obj -- ! np.agr ++ vp.adv ++ np.empty -- standard trick for prodrop+metavariable problem @@ -542,7 +597,7 @@ oper ++ if_then_Pol p [] "nem" ++ vp.obj -- ! ++ vp.adv - ++ vp.s ! VPres rp.agr.p1 n -- variable by number + ++ vp.s ! agr2vf t -- variable by number } ; relSlash : RP -> ClSlash -> RClause = \rp,cls -> { diff --git a/src/hungarian/VerbHun.gf b/src/hungarian/VerbHun.gf index 15ba59ef..0b4afc72 100644 --- a/src/hungarian/VerbHun.gf +++ b/src/hungarian/VerbHun.gf @@ -164,9 +164,13 @@ insertObj : ResHun.VPSlash -> NounPhrase -> VerbPhrase = \vps,np -> vps ** { => let agr : Person*Number = case vf of { VPres p n => ; + VPast p n => ; _ => } ; + objvf : VForm = case vf of { + VPast _ _ => VPast np.agr.p1 np.agr.p2 ; + _ => VPres np.agr.p1 np.agr.p2 } ; in np.s ! Poss agr.p1 agr.p2 ! vps.c2 - ++ vps.s ! np.objdef ! agr2vf np.agr ; + ++ vps.s ! np.objdef ! objvf ; -- Default case: Verb agrees in person and number with subject _ => vps.s ! np.objdef ! vf } ;