From 6661bdff9591f8efa0d95d68253e90b892f24108 Mon Sep 17 00:00:00 2001 From: Inari Listenmaa Date: Sat, 12 Sep 2020 18:45:44 +0200 Subject: [PATCH] Guess that Nom+Acc become Gen in negative, remove neggen field This removes around 70k concrete categories (in PGFs compiled with --optimize-pgf.) Unsure if that is actually useful -- the number of concrete functions only went down by a couple hundred. --- src/russian/ParamRus.gf | 9 ++++++++- src/russian/ResRus.gf | 2 +- src/russian/VerbRus.gf | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/russian/ParamRus.gf b/src/russian/ParamRus.gf index 3e9f2969c..efe174a16 100644 --- a/src/russian/ParamRus.gf +++ b/src/russian/ParamRus.gf @@ -105,7 +105,7 @@ oper -- refl : Reflexivity ; -- tran : Transitivity } ; - ComplementCase : Type = {s : Str ; c : Case ; neggen : Bool ; hasPrep : Bool} ; + ComplementCase : Type = {s : Str ; c : Case ; hasPrep : Bool} ; VerbForms2 : Type = VerbForms ** {c : ComplementCase} ; VerbForms3 : Type = VerbForms ** {c : ComplementCase ; c2 : ComplementCase} ; @@ -115,4 +115,11 @@ oper <_,Transitive> => Trans ; <_,Intransitive> => Intrans } ; + + -- Whether the noun that the preposition governs turns genitive in negative context + -- NB. I'm just guessing here, this is an exercise in shaving concrete categories. /IL + neggen : ComplementCase -> Bool = \c -> case c.c of { + Nom|Acc => True ; + _ => False + } ; } diff --git a/src/russian/ResRus.gf b/src/russian/ResRus.gf index d3581c83f..1dd595dfe 100644 --- a/src/russian/ResRus.gf +++ b/src/russian/ResRus.gf @@ -1563,7 +1563,7 @@ oper applyPolPrep : Polarity -> ComplementCase -> NounPhrase -> Str = \pol,prep,np -> let prep'=prep ** { - c=case of { => Gen ; _ => prep.c} + c=case of { => Gen ; _ => prep.c} } in applyPrep prep' np ; applyIPronPrep : ComplementCase -> IPronounForms -> Str diff --git a/src/russian/VerbRus.gf b/src/russian/VerbRus.gf index afc3c52c4..88d535631 100644 --- a/src/russian/VerbRus.gf +++ b/src/russian/VerbRus.gf @@ -114,7 +114,7 @@ lin PrefShort => ap.short } ; Neg => case ap.preferShort of { - PreferFull => case v2a.c.neggen of { + PreferFull => case neggen v2a.c of { False => \\a => ap.s ! agrGenNum a ! Animate ! v2a.c.c ; True => \\a => ap.s ! agrGenNum a ! Animate ! Gen } ;