From 769fd9af69394c413c2ee1582c35ab10eca8b835 Mon Sep 17 00:00:00 2001 From: aarne Date: Sun, 16 Feb 2014 22:02:15 +0000 Subject: [PATCH] bug fixes in PredFin passives and vvtypes --- lib/src/experimental/LiftFin.gf | 4 ++-- lib/src/experimental/PredFin.gf | 6 +++--- lib/src/experimental/PredFunctor.gf | 22 ++++++++++++++-------- lib/src/experimental/PredInstanceFin.gf | 15 ++++++++------- 4 files changed, 27 insertions(+), 20 deletions(-) diff --git a/lib/src/experimental/LiftFin.gf b/lib/src/experimental/LiftFin.gf index 5631e49b4..7e0bbc833 100644 --- a/lib/src/experimental/LiftFin.gf +++ b/lib/src/experimental/LiftFin.gf @@ -15,13 +15,13 @@ lin LiftVQ v = liftV v ; LiftVA v = liftV v ** {c1 = v.c2} ; LiftVN v = liftV v ** {c1 = v.c2} ; - LiftVV v = liftV v ** {vvType = v.vi} ; + LiftVV v = liftV v ** {vvtype = v.vi} ; 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 ; vvType = v.vi} ; + LiftV2V v = liftV v ** {c1 = v.c2 ; vvtype = v.vi} ; LiftV2A v = liftV v ** {c1 = v.c2 ; c2 = v.c3} ; LiftV2N v = liftV v ** {c1 = v.c2 ; c2 = v.c3} ; diff --git a/lib/src/experimental/PredFin.gf b/lib/src/experimental/PredFin.gf index 0fb5c705f..db44a60cf 100644 --- a/lib/src/experimental/PredFin.gf +++ b/lib/src/experimental/PredFin.gf @@ -52,7 +52,7 @@ lin adj : Str = vp.adj ! np.a ; obj1 : Str = vp.obj1 ! np.a ; obj2 : Str = vp.obj2 ! np.a ; - c3 : Compl = noComplCase ; + c3 : Compl = vp.c1 ; ---- could be c2 } ; ReflVP x vp = vp ** { @@ -137,8 +137,8 @@ lin SCNom => \\agr => finV (a.s ++ t.s ++ p.s) t.t a.a p.p Pass agr (lin PrV verb) ; _ => \\_ => finV (a.s ++ t.s ++ p.s) t.t a.a p.p Pass defaultAgr (lin PrV verb) } ; - inf : VVType => Str = \\vtt => tenseInfV (a.s ++ p.s) a.a p.p Pass (lin PrV verb) vtt ; - imp : ImpType => Str = \\it => imperativeV p.s p.p it (lin PrV verb) ; + inf : VVType => Str = \\vtt => tenseInfV (a.s ++ p.s) a.a p.p Pass (lin PrV verb) vtt ; ---- still Act + imp : ImpType => Str = \\it => imperativeV p.s p.p it (lin PrV verb) ; ---- still Act isPass : Bool = True ; c1 : Compl = noComplCase ; c2 : Compl = verb.c2 ; diff --git a/lib/src/experimental/PredFunctor.gf b/lib/src/experimental/PredFunctor.gf index 0157aa6e3..9510a342e 100644 --- a/lib/src/experimental/PredFunctor.gf +++ b/lib/src/experimental/PredFunctor.gf @@ -25,7 +25,8 @@ lincat VPC = { v : VAgr => Str ; - inf : Agr => Str ; + inf : Agr => VVType => Str ; + imp : ImpType => Str ; c1 : ComplCase ; c2 : ComplCase ; s1 : Str ; -- storing both in both-and @@ -168,7 +169,7 @@ lin adj = vp.adj ! np.a ; obj1 = vp.part ++ strComplCase vp.c1 ++ vp.obj1.p1 ! np.a ; ---- apply complCase ---- place of part depends on obj obj2 = strComplCase vp.c2 ++ vp.obj2.p1 ! (case vp.obj2.p2 of {True => np.a ; False => vp.obj1.p2}) ; ---- apply complCase - c3 = noComplCase ; -- for one more prep to build ClSlash + c3 = vp.c1 ; -- in case there is any free slot left ---- could be c2 qforms = qformsVP vp (agr2vagr np.a) ; } ; @@ -311,8 +312,10 @@ lin ++ c.s2 ++ wv.p1 ++ w.adV ++ wv.p2 ++ wv.p3 ++ w.adj ! vpa ++ ---- appComplCase w.c1 ++ w.obj1.p1 ! vpa ++ w.c2 ++ w.obj2.p1 ! vpa ++ w.adv ++ w.ext ; - inf = \\a => - infVP v.vvtype a v ++ c.s2 ++ infVP w.vvtype a w ; + inf = \\a,vt => + infVP vt a v ++ c.s2 ++ infVP vt a w ; + imp = \\i => + impVP i v ++ c.s2 ++ impVP i w ; c1 = noComplCase ; ---- w.c1 ? --- the full story is to unify v and w... c2 = noComplCase ; ---- w.c2 ? s1 = c.s1 ; @@ -329,8 +332,10 @@ lin v.c1 ++ v.obj1.p1 ! vpa ++ v.c2 ++ v.obj2.p1 ! vpa ++ v.adv ++ v.ext ---- appComplCase ++ "," ++ wv ; - inf = \\a => - infVP v.vvtype a v ++ "," ++ w.inf ! a ; + inf = \\a,vt => + infVP vt a v ++ "," ++ w.inf ! a ! vt ; + imp = \\i => + impVP i v ++ "," ++ w.imp ! i ; c1 = noComplCase ; ---- w.c1 ? --- the full story is to unify v and w... c2 = noComplCase ; ---- w.c2 ? s1 = w.s1 ; @@ -338,10 +343,11 @@ lin UseVPC x vpc = initPrVerbPhrase ** { ---- big loss of quality (overgeneration) seems inevitable v = \\a => <[], [], vpc.s1 ++ vpc.v ! a> ; - inf = \\_ => vpc.inf ! defaultAgr ; ---- agreement + inf = \\vt => vpc.inf ! defaultAgr ! vt ; ---- agr + imp = vpc.imp ; c1 = vpc.c1 ; c2 = vpc.c2 ; - qforms = \\a => <"do", vpc.inf ! defaultAgr> ; ---- do/does/did + qforms = \\a => <"do", vpc.inf ! defaultAgr ! vvInfinitive> ; ---- do/does/did } ; StartClC x c a b = { diff --git a/lib/src/experimental/PredInstanceFin.gf b/lib/src/experimental/PredInstanceFin.gf index 886719165..031b032f4 100644 --- a/lib/src/experimental/PredInstanceFin.gf +++ b/lib/src/experimental/PredInstanceFin.gf @@ -153,7 +153,7 @@ oper strComplCase : ComplCase -> Str = \c -> c.s.p1 ++ c.s.p2 ; appComplCase : ComplCase -> NounPhrase -> Str = \p,np -> appCompl True Pos p np ; - noComplCase : ComplCase = P.postGenPrep [] ; ---- + noComplCase : ComplCase = P.accPrep ; ---- noObj : Agr => Str = \\_ => [] ; @@ -207,14 +207,15 @@ oper finV : Str -> STense -> Anteriority -> Polarity -> SVoice -> Agr -> PrVerb -> {fin,inf : Str} = \sta,t,a,pol,o,agr,v -> let - ovps = (S.vp2old_vp (S.predV v)).s ! VIFin t ! a ! pol ! agr ; -- VIForm => Anteriority => Polarity => Agr => {fin, inf : Str} ; + vit = case o of {Act => VIFin t ; Pass => VIPass t} ; + ovps = (S.vp2old_vp (S.predV v)).s ! vit ! a ! pol ! agr ; -- VIForm => Anteriority => Polarity => Agr => {fin, inf : Str} ; in {fin = sta ++ ovps.fin ; inf = ovps.inf} ; infV : Str -> Anteriority -> Polarity -> SVoice -> PrVerb -> VVType -> Str = \sa,a,pol,o,v,vvt -> let - vt = Inf1 ; ----vvtype2inform vvt + vt = vvtype2infform vvt ; ovps = (S.vp2old_vp (S.predV v)).s ! VIInf vt ! a ! pol ! defaultAgr ; -- VIForm => Anteriority => Polarity => Agr => {fin, inf : Str} ; in sa ++ ovps.fin ++ ovps.inf ; @@ -248,8 +249,8 @@ oper case cl.focType of { NoFoc => cl.verb.fin ++ Predef.BIND ++ ko ++ cl.subj ++ cl.adV ++ cl.verb.inf ++ cl.adj ++ cl.obj1 ++ cl.obj2 ++ cl.adv ++ cl.ext ; - _ => cl.foc ++ cl.verb.fin ++ - cl.subj ++ cl.adV ++ cl.verb.inf ++ cl.adj ++ cl.obj1 ++ cl.obj2 ++ cl.adv ++ cl.ext + _ => cl.foc ++ cl.subj ++ cl.verb.fin ++ + cl.adV ++ cl.verb.inf ++ cl.adj ++ cl.obj1 ++ cl.obj2 ++ cl.adv ++ cl.ext } ; questSubordCl : PrQuestionClause -> Str = questCl ; @@ -264,8 +265,8 @@ oper tenseV : Str -> STense -> Anteriority -> Polarity -> SVoice -> VAgr -> PrVerb -> Str * Str * Str = \sta,t,a,pol,o,agr,v -> let - ovps = (S.vp2old_vp (S.predV v)).s ! VIFin t ! a ! pol ! agr ; -- VIForm => Anteriority => Polarity => Agr => {fin, inf : Str} ; - act = Act + vit = case o of {Act => VIFin t ; Pass => VIPass t} ; + ovps = (S.vp2old_vp (S.predV v)).s ! vit ! a ! pol ! agr ; -- VIForm => Anteriority => Polarity => Agr => {fin, inf : Str} ; in ;