forked from GitHub/gf-rgl
Fixed direct object negation cases
This commit is contained in:
@@ -8,7 +8,10 @@ concrete ExtendRus of Extend =
|
||||
-- VPS, ListVPS, VPI, ListVPI, VPS2, ListVPS2, VPI2, ListVPI2, RNP, RNPList,
|
||||
-- UseComp, RelNP, UseComp_estar, SubjRelNP, PredAPVP, ImpersCl, UseComp, CompAP, EmbedVP, ExistNP, UseQCl,
|
||||
-- QuestCl, ExistNP, UseQCl, ExistIP, AdvVP, AdvVP, AdvVP, UseComp, CompAP, ExistS, ExistNPQS, ExistIPQS,
|
||||
-- ComplDirectVS, ComplDirectVQ, AdvIsNPAP, AdAdV, AdjAsNP,
|
||||
--
|
||||
ComplDirectVS,
|
||||
ComplDirectVQ,
|
||||
-- AdvIsNPAP, AdAdV, AdjAsNP,
|
||||
ApposNP,
|
||||
-- BaseVPS, ConsVPS, BaseVPI, ConsVPI, BaseVPS2, ConsVPS2, BaseVPI2, ConsVPI2,
|
||||
-- MkVPS, ConjVPS, PredVPS, MkVPI, ConjVPI, ComplVPIVV,
|
||||
@@ -21,18 +24,24 @@ concrete ExtendRus of Extend =
|
||||
ExistsNP,
|
||||
-- ExistCN, ExistMassCN, ExistPluralCN,
|
||||
--ProDrop,
|
||||
-- FocusAP, FocusAdV, FocusAdv, FocusObj, GenIP, GenModIP, GenModNP, GenNP, GenRP,
|
||||
-- FocusAP, FocusAdV, FocusAdv,
|
||||
FocusObj,
|
||||
-- GenIP, GenModIP, GenModNP, GenNP, GenRP,
|
||||
-- GerundAdv, GerundCN, GerundNP, IAdvAdv, ICompAP,
|
||||
InOrderToVP,
|
||||
-- MkVPS, NominalizeVPSlashNP,
|
||||
-- PassAgentVPSlash, PassVPSlash, ProgrVPSlash,
|
||||
PastPartAP,
|
||||
-- PastPartAgentAP, PositAdVAdj, PredVPS, PredVPSVV, PredetRNP, PrepCN,
|
||||
-- PastPartAgentAP,
|
||||
PositAdVAdj,
|
||||
-- PredVPS, PredVPSVV, PredetRNP, PrepCN,
|
||||
-- EmbedSSlash, PresPartAP,
|
||||
PurposeVP,
|
||||
-- ReflPoss, ReflPron, ReflRNP, SlashBareV2S, SlashV2V, StrandQuestSlash, StrandRelSlash,
|
||||
PredIAdvVP,
|
||||
-- UncontractedNeg, UttAccIP, UttAccNP,
|
||||
FrontComplDirectVS,
|
||||
FrontComplDirectVQ,
|
||||
UttAdV
|
||||
-- UttDatIP, UttDatNP, UttVPShort, WithoutVP, BaseVPS2, ConsVPS2, ConjVPS2, ComplVPS2, MkVPS2
|
||||
]
|
||||
@@ -56,21 +65,28 @@ lin
|
||||
|
||||
-- : VP -> Adv ; -- (in order) to publish the document
|
||||
InOrderToVP vp = lin Adv ({
|
||||
s = "чтобы" ++ vp.adv ! Ag (GSg Neut) P3 ++ (verbInf vp.verb) ++ vp.dep ++ vp.compl ! Ag (GSg Neut) P3
|
||||
s = "чтобы"
|
||||
++ vp.adv ! Ag (GSg Neut) P3
|
||||
++ (verbInf vp.verb)
|
||||
++ vp.dep
|
||||
++ vp.compl ! Pos ! Ag (GSg Neut) P3
|
||||
}) ;
|
||||
|
||||
-- : VP -> Adv ; -- to become happy
|
||||
PurposeVP vp = lin Adv ({
|
||||
s = vp.adv ! Ag (GSg Neut) P3 ++ (verbInf vp.verb) ++ vp.dep ++ vp.compl ! Ag (GSg Neut) P3
|
||||
s = vp.adv ! Ag (GSg Neut) P3 ++ (verbInf vp.verb) ++ vp.dep ++ vp.compl ! Pos ! Ag (GSg Neut) P3
|
||||
}) ;
|
||||
|
||||
-- : NP -> Cl ; -- there exists a number / there exist numbers
|
||||
ExistsNP np = {
|
||||
subj=[] ;
|
||||
adv=[] ;
|
||||
compl=np.s ! Nom ;
|
||||
verb=M.to_exist ;
|
||||
dep=[] ;
|
||||
compl=table {
|
||||
Pos => np.s ! Nom ;
|
||||
Neg => np.s ! Gen
|
||||
} ;
|
||||
a=np.a
|
||||
} ;
|
||||
|
||||
@@ -82,9 +98,17 @@ lin
|
||||
|
||||
-- VPSlash -> AP ; -- lost (opportunity) ; (opportunity) lost in space
|
||||
PastPartAP vps = {
|
||||
s=\\gn,anim,cas => vps.adv ! (genNumAgrP3 gn)
|
||||
++ (shortPastPassPart vps.verb gn) ++ vps.dep ++ vps.compl ! (genNumAgrP3 gn) ;
|
||||
short=\\a => vps.adv ! a ++ (shortPastPassPart vps.verb (agrGenNum a)) ++ vps.dep ++ vps.compl ! a ++ vps.c.s ; --
|
||||
s=\\gn,anim,cas =>
|
||||
vps.adv ! (genNumAgrP3 gn)
|
||||
++ (shortPastPassPart vps.verb gn)
|
||||
++ vps.dep
|
||||
++ vps.compl ! Pos ! (genNumAgrP3 gn) ;
|
||||
short=\\a =>
|
||||
vps.adv ! a
|
||||
++ (shortPastPassPart vps.verb (agrGenNum a))
|
||||
++ vps.dep
|
||||
++ vps.compl ! Pos ! a
|
||||
++ vps.c.s ; --
|
||||
isPost = False ;
|
||||
preferShort=PreferFull
|
||||
} ;
|
||||
@@ -102,4 +126,41 @@ lin
|
||||
|
||||
-- : AdV -> Utt ; -- always(!)
|
||||
UttAdV adv = {s=adv.s} ;
|
||||
|
||||
-- : A -> AdV ; -- (that she) positively (sleeps)
|
||||
PositAdVAdj a = ss a.sn ;
|
||||
|
||||
-- : NP -> SSlash -> Utt ; -- her I love
|
||||
FocusObj np ss = {
|
||||
s = applyPrep ss.c np ++ ss.s ! Ind
|
||||
} ;
|
||||
|
||||
-- In Russian, sentence usually ends here (or special punctuation is needed after direct phrase)
|
||||
-- : VS -> Utt -> VP ; -- say: "today"
|
||||
ComplDirectVS vs utt =
|
||||
AdvVP (UseV <lin V vs : V>) (lin Adv {s = ":" ++ rus_quoted utt.s}) ;
|
||||
-- : VQ -> Utt -> VP ; -- ask: "when"
|
||||
ComplDirectVQ vq utt =
|
||||
AdvVP (UseV <lin V vq : V>) (lin Adv {s = ":" ++ rus_quoted utt.s}) ;
|
||||
|
||||
-- : NP -> VS -> Utt -> Cl ; -- "I am here", she said
|
||||
FrontComplDirectVS np vs utt = {
|
||||
subj = (rus_quoted utt.s) ++ "," ++ "—" ++ np.s ! Nom ;
|
||||
adv = [] ;
|
||||
verb = vs;
|
||||
dep = [] ;
|
||||
compl = \\_ => [] ;
|
||||
a = np.a
|
||||
} ;
|
||||
-- : NP -> VQ -> Utt -> Cl ; -- "where", she asked
|
||||
FrontComplDirectVQ np vq utt = {
|
||||
subj = (rus_quoted utt.s) ++ "," ++ "—" ++ np.s ! Nom ;
|
||||
adv = [] ;
|
||||
verb = vq;
|
||||
dep = [] ;
|
||||
compl = \\_ => [] ;
|
||||
a = np.a
|
||||
} ;
|
||||
oper
|
||||
rus_quoted : Str -> Str = \s -> "«" ++ s ++ "»" ; ---- TODO bind ; move to Prelude?
|
||||
} ;
|
||||
|
||||
Reference in New Issue
Block a user