From ed45089b83d153520f217571a1488a4e8c327bcd Mon Sep 17 00:00:00 2001 From: aarne Date: Fri, 7 Feb 2014 09:53:38 +0000 Subject: [PATCH] completed lifting Eng verbs categories to Pred.V --- lib/src/experimental/PredEng.gf | 6 ++--- lib/src/experimental/Trans.gf | 2 +- lib/src/experimental/TransEng.gf | 43 ++++++++++++++++---------------- 3 files changed, 26 insertions(+), 25 deletions(-) diff --git a/lib/src/experimental/PredEng.gf b/lib/src/experimental/PredEng.gf index e315614cb..19e8160ab 100644 --- a/lib/src/experimental/PredEng.gf +++ b/lib/src/experimental/PredEng.gf @@ -57,7 +57,7 @@ oper noObj : Agr => Str = \\_ => [] ; NAgr = Number ; - AAgr = Unit ; + AAgr = Agr ; -- because of reflexives: "happy with itself" IPAgr = Number ; defaultAgr : Agr = AgP3Sg Neutr ; @@ -69,7 +69,7 @@ oper _ => VAPl } ; - agr2aagr : Agr -> AAgr = \n -> UUnit ; + agr2aagr : Agr -> AAgr = \a -> a ; agr2nagr : Agr -> NAgr = \a -> case a of { AgP1 n => n ; @@ -213,7 +213,7 @@ linref PrCl = \cl -> declCl cl ; ---- PrQCl = \qcl -> questCl (lin PrQCl qcl) ; PrAdv = \adv -> adv.c1 ++ adv.s ; - PrAP = \ap -> ap.s ! UUnit ++ ap.obj1 ! defaultAgr ; + PrAP = \ap -> ap.s ! defaultAgr ++ ap.obj1 ! defaultAgr ; PrCN = \cn -> cn.s ! Sg ++ cn.obj1 ! defaultAgr ; ---------------------------- diff --git a/lib/src/experimental/Trans.gf b/lib/src/experimental/Trans.gf index 843fc33c7..af8cc3972 100644 --- a/lib/src/experimental/Trans.gf +++ b/lib/src/experimental/Trans.gf @@ -29,7 +29,7 @@ fun LiftV2N : V2A -> PrV (aNP aN) ; ---- LiftAP : AP -> PrAP aNone ; - LiftCN : AP -> PrCN aNone ; + LiftCN : CN -> PrCN aNone ; LiftAdv : Adv -> PrAdv aNone ; LiftAdV : Adv -> PrAdv aNone ; diff --git a/lib/src/experimental/TransEng.gf b/lib/src/experimental/TransEng.gf index 4dc9bd92f..6eca24f8e 100644 --- a/lib/src/experimental/TransEng.gf +++ b/lib/src/experimental/TransEng.gf @@ -5,36 +5,37 @@ concrete TransEng of Trans = ,PredEng ,DictionaryEng - [Pol] - ** open ResEng, Prelude in { + ** open ResEng, Prelude, (Pr = PredEng) in { flags literal=Symb ; -lin - LiftV v = {s = v.s ; p = v.p ; c1,c2 = [] ; isSubjectControl = False ; vtype = VTAct ; vvtype = VVInf} ; - LiftV2 v = {s = v.s ; p = v.p ; c1 = v.c2 ; c2 = [] ; isSubjectControl = False ; vtype = VTAct ; vvtype = VVInf} ; - LiftVS v = {s = v.s ; p = v.p ; c1,c2 = [] ; isSubjectControl = False ; vtype = VTAct ; vvtype = VVInf} ; - LiftVQ v = {s = v.s ; p = v.p ; c1,c2 = [] ; isSubjectControl = False ; vtype = VTAct ; vvtype = VVInf} ; - LiftVV v = {s = \\f => v.s ! VVF f ; p = v.p ; c1,c2 = [] ; isSubjectControl = False ; vtype = VTAct ; vvtype = VVInf} ; ---- c1? +oper + liftV : ResEng.Verb -> Pr.PrV = \v -> lin PrV {s = v.s ; p = v.p ; c1,c2 = [] ; isSubjectControl = False ; vtype = VTAct ; vvtype = VVInf} ; - LiftAP ap = {s = \\_ => ap.s ! AgP3Sg Neutr ; c1,c2 = [] ; obj1 = \\_ => []} ; --- agr, isPre +lin + LiftV v = liftV v ; + LiftV2 v = liftV v ** {c1 = v.c2} ; + LiftVS v = liftV v ; + LiftVQ v = liftV v ; + LiftVA v = liftV v ; ---- c1? + LiftVN v = liftV v ; ---- c1? + LiftVV v = {s = \\f => v.s ! VVF f ; p = v.p ; c1,c2 = [] ; isSubjectControl = False ; vtype = VTAct ; vvtype = VVInf} ; ---- c1? ---- VVF + + LiftV3 v = liftV v ** {c1 = v.c2 ; c2 = v.c3} ; + LiftV2S v = liftV v ** {c1 = v.c2} ; + LiftV2Q v = liftV v ** {c1 = v.c2} ; + LiftV2V v = liftV v ** {c1 = v.c2 ; c2 = v.c3 ; isSubjectControl = False ; vvtype = v.typ} ; ---- subj control should be defined in V2V + LiftV2A v = liftV v ** {c1 = v.c2} ; + LiftV2N v = liftV v ** {c1 = v.c2} ; + + + LiftAP ap = ap ** {c1,c2 = [] ; obj1 = \\_ => []} ; --- isPre + LiftCN cn = {s = \\n => cn.s ! n ! Nom ; c1,c2 = [] ; obj1 = \\_ => []} ; LiftAdv a = a ** {isAdV = False ; c1 = []} ; LiftAdV a = a ** {isAdV = True ; c1 = []} ; LiftPrep p = {s = [] ; isAdV = False ; c1 = p.s} ; -{- - LiftVA : VA -> PrV aA ; - LiftVN : VA -> PrV aN ; ---- - - LiftV3 : V3 -> PrV (aNP (aNP aNone)) ; - LiftV2S : V2S -> PrV (aNP aS) ; - LiftV2Q : V2Q -> PrV (aNP aQ) ; --} - LiftV2V v = {s = v.s ; p = v.p ; c1 = v.c2 ; c2 = v.c3 ; isSubjectControl = False ; vtype = VTAct ; vvtype = v.typ} ; ---- subj control -{- - LiftV2A : V2A -> PrV (aNP aA) ; - LiftV2N : V2A -> PrV (aNP aN) ; ---- --} }