diff --git a/lib/src/experimental/LiftEng.gf b/lib/src/experimental/LiftEng.gf index 95442c95a..5e5d09576 100644 --- a/lib/src/experimental/LiftEng.gf +++ b/lib/src/experimental/LiftEng.gf @@ -7,7 +7,11 @@ concrete LiftEng of Lift = --flags literal=Symb ; oper - liftV : ResEng.Verb -> Pr.PrV = \v -> lin PrV {s = v.s ; p = v.p ; c1,c2 = [] ; isSubjectControl = True ; vtype = VTAct ; vvtype = VVInf} ; + liftV : ResEng.Verb -> Pr.PrV = \v -> lin PrV { + s = table {VVF f => v.s ! f ; VVPresNeg | VVPastNeg => v.s ! VInf} ; ---- only used for Aux + p = v.p ; + c1,c2 = [] ; isSubjectControl = True ; vtype = VTAct ; vvtype = VVInf + } ; lin LiftV v = liftV v ; @@ -16,8 +20,8 @@ lin 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 = True ; - vtype = case v.typ of {VAux => VTAux ; _ => VTAct} ; vvtype = v.typ} ; ---- c1? ---- VVF + LiftVV v = {s = v.s ; p = v.p ; c1,c2 = [] ; isSubjectControl = True ; + vtype = case v.typ of {VVAux => VTAux ; _ => VTAct} ; vvtype = v.typ} ; ---- c1? ---- VVF LiftV3 v = liftV v ** {c1 = v.c2 ; c2 = v.c3} ; LiftV2S v = liftV v ** {c1 = v.c2} ; diff --git a/lib/src/experimental/PredChi.gf b/lib/src/experimental/PredChi.gf index 7a24bdc03..bf3a4b115 100644 --- a/lib/src/experimental/PredChi.gf +++ b/lib/src/experimental/PredChi.gf @@ -29,7 +29,6 @@ lin obj1 = vp.part ++ strComplCase vp.c1 ++ vp.obj1.p1 ! rpa ; ---- apply complCase ---- place of part depends on obj obj2 = strComplCase vp.c2 ++ vp.obj2.p1 ! (case vp.obj2.p2 of {True => rpa ; False => vp.obj1.p2}) ; ---- apply complCase c3 = noComplCase ; -- for one more prep to build ClSlash - qforms = qformsVP vp (agr2vagr rpa) ; } in {s = declCl cl ; c = subjCase} ; @@ -47,7 +46,6 @@ lin obj1 = vp.part ++ strComplCase vp.c1 ++ vp.obj1.p1 ! npa ; ---- apply complCase ---- place of part depends on obj obj2 = strComplCase vp.c2 ++ vp.obj2.p1 ! npa ; c3 = vp.c1 ; -- in case there is any free slot left ---- could be c2 - qforms = qformsVP vp (agr2vagr npa) ; } ; StartVPC x c v w = { ---- some loss of quality seems inevitable @@ -112,7 +110,6 @@ lin adv = vp.adv ; adV = vp.adV ; ext = vp.ext ; - qforms = qformsVP vp (ipagr2vagr UUnit) ; } ; QuestSlash x ip cl = diff --git a/lib/src/experimental/PredFin.gf b/lib/src/experimental/PredFin.gf index db44a60cf..116ad169b 100644 --- a/lib/src/experimental/PredFin.gf +++ b/lib/src/experimental/PredFin.gf @@ -15,6 +15,7 @@ concrete PredFin of Pred = -- overridden ,UseV ,UseAP + ,UseNP ,UseCN ,QuestVP ,PredVP @@ -36,6 +37,10 @@ lin adj = \\a => ap.s ! agr2aagr a ; } ; + UseNP a t p np = useCopula a t p ** { + adj = \\a => np.s ! subjCase ; + } ; + UseCN x a t p cn = useCopula a t p ** { c1 = cn.c1 ; c2 = cn.c2 ; diff --git a/lib/src/experimental/PredInstanceChi.gf b/lib/src/experimental/PredInstanceChi.gf index db7f6a215..a40af332d 100644 --- a/lib/src/experimental/PredInstanceChi.gf +++ b/lib/src/experimental/PredInstanceChi.gf @@ -114,9 +114,6 @@ oper impVP : Number -> PrVerbPhrase -> Str = \n,vp -> infVP UUnit UUnit vp ; - qformsV : Str -> STense -> Anteriority -> Polarity -> VAgr -> PrVerb -> Str * Str = - \sta,t,a,p,agr,v -> <[],[]> ; ----- not needed in Chinese - declCl : PrClause -> Str = \cl -> cl.subj ++ cl.v.p1 ++ cl.adV ++ cl.adv ++ cl.v.p2 ++ restCl cl ; declSubordCl : PrClause -> Str = declCl ; diff --git a/lib/src/experimental/PredInstanceEng.gf b/lib/src/experimental/PredInstanceEng.gf index 32d9db8cd..2ab117137 100644 --- a/lib/src/experimental/PredInstanceEng.gf +++ b/lib/src/experimental/PredInstanceEng.gf @@ -55,7 +55,7 @@ oper Agr = ResEng.Agr ; Case = ResEng.Case ; NPCase = ResEng.NPCase ; - VForm = ResEng.VForm ; ---- VVForm to get contracted aux verbs + VForm = ResEng.VVForm ; ---- VVForm to get contracted aux verbs VVType = ResEng.VVType ; SVoice = Voice ; @@ -138,8 +138,8 @@ oper VAPl => AgP3Pl } ; - vPastPart : PrVerb -> AAgr -> Str = \v,_ -> v.s ! VPPart ; - vPresPart : PrVerb -> AAgr -> Str = \v,_ -> v.s ! VPresPart ; + vPastPart : PrVerb -> AAgr -> Str = \v,_ -> v.s ! VVF VPPart ; + vPresPart : PrVerb -> AAgr -> Str = \v,_ -> v.s ! VVF VPresPart ; vvInfinitive : VVType = VVInf ; @@ -205,7 +205,7 @@ oper -} ; tenseActV : Str -> STense -> Anteriority -> Polarity -> VAgr -> PrVerb -> Str * Str * Str = \sta,t,a,p,agr,v -> - let vt : VForm = case of { + let vt : ResEng.VForm = case of { => VPres ; => VPast ; _ => VInf @@ -215,55 +215,58 @@ oper => case v.vtype of { VTAux => case t of { - Pres => ; -- can I/she/we - _ => -- could ... + Pres => ; -- can I/she/we + _ => -- could ... } ; _ => case p of { - Pos => <[], sta ++ v.s ! vt, []> ; -- this is the deviating case - Neg => + Pos => <[], sta ++ v.s ! VVF vt, []> ; -- this is the deviating case + Neg => } } ; - => ; - => ; - => + => ; + => ; + => } ; tenseActVContracted : Str -> STense -> Anteriority -> Polarity -> VAgr -> PrVerb -> Str * Str * Str = \sta,t,a,p,agr,v -> - let vt : VForm = case of { - => VPres ; - => VPast ; - _ => VInf + let vt : ResEng.VForm * VVForm = case of { + => ; + => ; + _ => } ; in case of { => case v.vtype of { - VTAux => ; - _ => case p of { - Pos => <[], sta ++ v.s ! vt, []> ; -- this is the deviating case - Neg => + VTAux => case p of { + Pos => ; + Neg => + } ; + _ => case p of { + Pos => <[], sta ++ v.s ! VVF vt.p1, []> ; -- this is the deviating case + Neg => } } ; - => - | ; - => - | ; - => - | + => + | ; + => + | ; + => + | } ; tensePassV : Str -> STense -> Anteriority -> Polarity -> VAgr -> PrVerb -> Str * Str * Str = \sta,t,a,p,agr,v -> let be = be_AuxL sta t a p agr ; - done = v.s ! VPPart + done = v.s ! VVF VPPart in ; tensePassVContracted : Str -> STense -> Anteriority -> Polarity -> VAgr -> PrVerb -> Str * Str * Str = \sta,t,a,p,agr,v -> let be = be_AuxC sta t a p agr ; - done = v.s ! VPPart + done = v.s ! VVF VPPart in ; @@ -274,25 +277,25 @@ oper case vt of { VVInf => case a of { - Simul => not ++ "to" ++ sa ++ v.s ! VInf ; -- (she wants) (not) to sleep - Anter => not ++ "to" ++ have_Aux VInf Pos ++ sa ++ v.s ! VPPart -- (she wants) (not) to have slept + Simul => not ++ "to" ++ sa ++ v.s ! VVF VInf ; -- (she wants) (not) to sleep + Anter => not ++ "to" ++ have_Aux VInf Pos ++ sa ++ v.s ! VVF VPPart -- (she wants) (not) to have slept } ; VVAux => case a of { - Simul => not ++ sa ++ v.s ! VInf ; -- (she must) (not) sleep - Anter => not ++ have_Aux VInf Pos ++ sa ++ v.s ! VPPart -- (she must) (not) have slept + Simul => not ++ sa ++ v.s ! VVF VInf ; -- (she must) (not) sleep + Anter => not ++ have_Aux VInf Pos ++ sa ++ v.s ! VVF VPPart -- (she must) (not) have slept } ; VVPresPart => case a of { - Simul => not ++ sa ++ v.s ! VPresPart ; -- (she starts) (not) sleeping - Anter => not ++ "having" ++ sa ++ v.s ! VPPart -- (she starts) (not) having slept + Simul => not ++ sa ++ v.s ! VVF VPresPart ; -- (she starts) (not) sleeping + Anter => not ++ "having" ++ sa ++ v.s ! VVF VPPart -- (she starts) (not) having slept } } ; imperativeV : Str -> Polarity -> ImpType -> PrVerb -> Str = \s,p,it,v -> s ++ case p of { - Pos => v.s ! VInf ; - Neg => ("do not" | "don't") ++ v.s ! VInf + Pos => v.s ! VVF VInf ; + Neg => ("do not" | "don't") ++ v.s ! VVF VInf } ; @@ -373,11 +376,13 @@ oper oper be_V : PrVerb = { s = table { - VInf => "be" ; - VPres => "is" ; - VPast => "was" ; - VPPart => "been" ; - VPresPart => "being" + VVF VInf => "be" ; + VVF VPres => "is" ; + VVF VPast => "was" ; + VVF VPPart => "been" ; + VVF VPresPart => "being" ; + VVPresNeg => "isn't" ; + VVPastNeg => "wasn't" } ; p,c1,c2 = [] ; vtype = VTAux ; vvtype = VVInf ; isSubjectControl = False } ; @@ -389,20 +394,20 @@ oper oper ---- have to split the tables to two to get reasonable PMCFG generation - will_Aux : VForm -> Polarity -> Str = \vf,p -> case of { + will_Aux : ResEng.VForm -> Polarity -> Str = \vf,p -> case of { => varAux "will" "ll" ; => "won't" ; => varAux "would" "d" ; => "wouldn't" } ; - will_AuxC : VForm -> Polarity -> Str = \vf,p -> case of { + will_AuxC : ResEng.VForm -> Polarity -> Str = \vf,p -> case of { => varAuxC "will" "ll" ; => "won't" ; => varAuxC "would" "d" ; => "wouldn't" } ; - have_Aux : VForm -> Polarity -> Str = \vf,p -> case of { + have_Aux : ResEng.VForm -> Polarity -> Str = \vf,p -> case of { => varAux "have" "ve" ; --- slightly overgenerating if used in infinitive => "haven't" ; => varAux "has" "s" ; @@ -410,7 +415,7 @@ oper => varAux "had" "d" ; => "hadn't" } ; - have_AuxC : VForm -> Polarity -> Str = \vf,p -> case of { + have_AuxC : ResEng.VForm -> Polarity -> Str = \vf,p -> case of { => varAuxC "have" "ve" ; --- slightly overgenerating if used in infinitive => "haven't" ; => varAuxC "has" "s" ; @@ -419,7 +424,7 @@ oper => "hadn't" } ; - do_Aux : VForm -> Polarity -> Str = \vf,p -> case of { + do_Aux : ResEng.VForm -> Polarity -> Str = \vf,p -> case of { => "do" ; => "don't" ; => "does" ; diff --git a/lib/src/experimental/PredInstanceFin.gf b/lib/src/experimental/PredInstanceFin.gf index 031b032f4..d9ce9538c 100644 --- a/lib/src/experimental/PredInstanceFin.gf +++ b/lib/src/experimental/PredInstanceFin.gf @@ -3,6 +3,7 @@ instance PredInstanceFin of NounPhrase, PrVerb, initPrVerb, PrVerbPhrase, initPrVerbPhrase, initPrVerbPhraseV, useCopula, linrefPrVP, qformsVP, applyVerb, addObj2VP, + initBasePrVerbPhrase, initBasePrVerbPhraseV, PrClause, initPrClause ] = open ResFin, (P = ParadigmsFin), (S = StemFin), (X = ParamX), Prelude in {