Fixed direct object negation cases

This commit is contained in:
Roman Suzi
2020-08-09 17:20:03 +03:00
parent f9467bffd3
commit 13ee63e25d
19 changed files with 386 additions and 106 deletions

View File

@@ -196,8 +196,10 @@ oper
= \n -> noMinorCases (immutableNounCases "" n.g n.anim) ;
AgrTable = Agr => Str ;
ComplTable = Polarity => Agr => Str ;
PolarityTable = Polarity => Str ;
from2 = {s="из"; c=Gen; hasPrep=True} ;
from2 = {s="из" ; c=Gen ; neggen=True ; hasPrep=True} ;
mkCompoundN : NounForms -> Str -> NounForms -> NounForms
= \n1,link,n2 ->
@@ -1452,7 +1454,7 @@ oper
-- Misc
oper
ComplementCase : Type = {s : Str ; c : Case ; hasPrep : Bool} ;
ComplementCase : Type = {s : Str ; c : Case ; neggen : Bool ; hasPrep : Bool} ;
applyPrep : ComplementCase -> NounPhrase -> Str
= \prep,np -> case <np.pron, prep.hasPrep, prep.c> of {
@@ -1460,6 +1462,12 @@ oper
_ => prep.s ++ np.s ! prep.c
} ;
applyPolPrep : Polarity -> ComplementCase -> NounPhrase -> Str
= \pol,prep,np ->
let prep'=prep ** {
c=case <pol, prep.neggen> of {<Neg, True> => Gen ; _ => prep.c}
} in applyPrep prep' np ;
applyIPronPrep : ComplementCase -> IPronounForms -> Str
= \prep,ip -> prep.s ++ selectIPronCase ip prep.c ;