From 263ae295518a244724999be111ad87b870ebe0b8 Mon Sep 17 00:00:00 2001 From: aarne Date: Tue, 4 Feb 2014 07:46:43 +0000 Subject: [PATCH] contractions of auxiliaries and negations in PredicationEng --- lib/src/experimental/PredicationEng.gf | 38 ++++++++++++++++++++------ lib/src/experimental/exx.gfs | 2 ++ 2 files changed, 32 insertions(+), 8 deletions(-) diff --git a/lib/src/experimental/PredicationEng.gf b/lib/src/experimental/PredicationEng.gf index 1eca86a45..901fdcbe5 100644 --- a/lib/src/experimental/PredicationEng.gf +++ b/lib/src/experimental/PredicationEng.gf @@ -156,7 +156,7 @@ lin } ; UseAP a t p _ ap = { - v = \\agr => tenseV (a.s ++ t.s ++ p.s) t.t a.a p.p Act agr be_V ; + v = \\agr => be_Aux (a.s ++ t.s ++ p.s) t.t a.a p.p agr ; inf = tenseInfV a.s a.a p.p Act be_V ; c1 = ap.c1 ; c2 = ap.c2 ; @@ -371,7 +371,7 @@ oper case v.isAux of { True => ; False => case p of { - Pos => <[], sta ++ v.v ! vt, []> ; + Pos => <[], sta ++ v.v ! vt, []> ; -- this is the deviating case Neg => | } @@ -386,7 +386,7 @@ oper tensePassV : Str -> STense -> Anteriority -> Polarity -> Agr -> V -> Str * Str * Str = \sta,t,a,p,agr,v -> let - be = tenseActV sta t a p agr be_V ; + be = be_Aux sta t a p agr ; done = v.v ! VPastPart in ; @@ -397,6 +397,28 @@ oper Anter => -- hon vill (ha) sovit } ; + be_Aux : Str -> STense -> Anteriority -> Polarity -> Agr -> Str * Str * Str = \sta,t,a,p,agr -> + let + beV = tenseActV sta t a p agr be_V + in + case of { + => <"is" ++ sta, [], []> + | ; + => <"are" ++ sta, [], []> + | ; + => <"is" ++ sta, "not", []> + | + | <"isn't" ++ sta, [], []> ; + => <"are" ++ sta, "not", []> + | + | <"aren't" ++ sta, [], []> ; + => <"were" ++ sta, [], []> ; + => <"was" ++ sta, "not", []> + | <"wasn't" ++ sta, [], []> ; + => <"were" ++ sta, "not", []> + | <"weren't" ++ sta, [], []> ; + _ => beV + } ; declCl : Clause -> Str = \cl -> cl.subj ++ cl.v.p1 ++ cl.adV ++ cl.v.p2 ++ restCl cl ; declSubordCl : Clause -> Str = declCl ; @@ -502,18 +524,18 @@ oper ingV : Str -> Str = \s -> case s of {us + "e" => us ; _ => s} + "ing" ; will_Aux : VForm -> Polarity -> Str = \vf,p -> case of { - => "will" ; + => "will" | Predef.BIND ++ "'ll" ; => "won't" ; - => "would" ; + => "would" | Predef.BIND ++ "'d" ; => "wouldn't" } ; have_Aux : VForm -> Polarity -> Str = \vf,p -> case of { - => "have" ; + => "have" | Predef.BIND ++ "'ve" ; --- slightly overgenerating as used in infinitive => "haven't" ; - => "has" ; + => "has" | Predef.BIND ++ "'s" ; => "hasn't" ; - => "had" ; + => "had" | Predef.BIND ++ "'d" ; => "hadn't" } ; diff --git a/lib/src/experimental/exx.gfs b/lib/src/experimental/exx.gfs index b0bfce33f..aa0a99e96 100644 --- a/lib/src/experimental/exx.gfs +++ b/lib/src/experimental/exx.gfs @@ -75,4 +75,6 @@ hon skulle befordras till professor av oss +gt UttS (UseCl (PredVP aNone ? (UseAP ? ? ? aNone old_A))) | l -list -bind +gt UttS (UseCl (PredVP aNone ? (UseV ? ? ? aNone sleep_V))) | l -list -bind \ No newline at end of file