1
0
forked from GitHub/gf-rgl

REPLACED old Russian RG completely

This commit is contained in:
Roman Suzi
2020-07-24 12:59:02 +03:00
parent 4d3e106148
commit 1f9e6aeaad
38 changed files with 6639 additions and 276773 deletions
+68 -58
View File
@@ -1,58 +1,68 @@
--# -path=.:../abstract:../common:../../prelude
concrete IdiomRus of Idiom = CatRus ** open Prelude, ResRus, MorphoRus in {
flags optimize=all_subs ; coding=utf8 ;
lin
ExistNP = \bar ->
{s =\\b,clf => case b of
{Pos => verbSuchestvovat.s ! (getActVerbForm clf (pgen2gen bar.g) Sg P3)
++ bar.s ! PF Nom No NonPoss;
Neg => "не" ++ verbSuchestvovat.s ! (getActVerbForm clf (pgen2gen bar.g) Sg P3)
++ bar.s ! PF Nom No NonPoss
}
} ;
ExistIP Kto =
let { kto = Kto.s ! (PF Nom No NonPoss) } in
{s = \\b,clf,_ => case b of
{Pos => kto ++ verbSuchestvovat.s ! (getActVerbForm clf (pgen2gen Kto.g) Sg P3) ;
Neg => kto ++ "не" ++ verbSuchestvovat.s ! (getActVerbForm clf (pgen2gen Kto.g) Sg P3)
}
} ;
CleftAdv adv sen = {s= \\ b, clf => let ne= case b of {Pos =>[]; Neg =>"не"}
in
"это" ++ ne ++ adv.s ++ [", "]++ sen.s };
CleftNP np rs = {s= \\ b, clf =>
let
ne= case b of {Pos =>[]; Neg =>"не"};
gn = case np.n of {Pl => GPl; _=> GSg (pgen2gen np.g)}
in
"это" ++ ne ++ np.s ! (PF Nom No NonPoss) ++
rs.s ! gn !Nom!Animate };
ImpPl1 vp = {s= "давайте" ++ vp.s! (ClIndic Future Simul)! GPl ! P1};
ImpersCl vp = {s= \\ b, clf => let ne= case b of {Pos =>[]; Neg =>"не"}
in
ne ++ vp.s! clf! (GSg Neut) ! P3 };
-- No direct correspondance in Russian. Usually expressed by infinitive:
-- "Если очень захотеть, можно в космос улететь"
-- (If one really wants one can fly into the space).
-- Note that the modal verb "can" is trasferred into adverb
-- "можно" (it is possible) in Russian
-- The closest subject is "ты" (you), which is omitted in the final sentence:
-- "Если очень захочешь, можешь в космос улететь"
GenericCl vp = {s= \\ b, clf => let ne= case b of {Pos =>[]; Neg =>"не"}
in
"ты" ++ ne ++ vp.s! clf! (GSg Masc) ! P2 };
ProgrVP vp = vp ;
}
--# -path=.:../abstract:../common:../../prelude
concrete IdiomRus of Idiom = CatRus ** open Prelude, TenseRus, ResRus, Coordination, MorphoRus in {
flags optimize=all_subs ; coding=utf8 ;
lin
-- : VP -> Cl ; -- it is hot
ImpersCl vp = let a = Ag (GSg Neut) P3 in {subj="" ; compl=vp.compl ! a ; verb=vp.verb ; dep=vp.dep ; adv=vp.adv ! a ; a=a } ;
-- : VP -> Cl ; -- one sleeps
GenericCl vp = let a = Ag (GSg Masc) P2 in {subj="" ; compl=vp.compl ! a ; verb=vp.verb ; dep=vp.dep ; adv=vp.adv ! a; a=a } ;
-- : NP -> RS -> Cl ; -- it is I who did it
CleftNP np rs = {
subj=np.s ! Nom ;
adv="это" ;
verb=nullVerb ; -- ???
dep=[] ;
compl=embedInCommas (rs.s ! agrGenNum np.a ! Animate ! Nom) ; -- TODO: here or in subj???
a=np.a
} ;
-- : Adv -> S -> Cl ; -- it is here she slept
CleftAdv adv s = {
subj="это" ++ adv.s ++ comma ++ s.s ! Ind ; -- TODO: Check what is expressed by this? Why comma?
adv=[] ;
verb=nullVerb ; -- ???
dep=[] ;
compl=[] ;
a=Ag (GSg Neut) P3
} ;
-- : NP -> Cl ; -- there is a house
ExistNP np = {subj=np.s ! Nom ; compl="" ; verb=to_exist ; dep=[] ; adv=[] ; a=np.a} ; -- TODO: Different order!
-- : IP -> QCl ; -- which houses are there
ExistIP ip = {
subj=ip.nom ; -- gen?
adv=[] ;
verb=to_exist;
dep=[] ;
compl=[];
a=ip.a
} ;
-- TODO: ExistNPAdv : NP -> Adv -> Cl ; -- there is a house in Paris
-- TODO: ExistIPAdv : IP -> Adv -> QCl ; -- which houses are there in Paris
-- : VP -> VP ; -- be sleeping
ProgrVP vp = vp ;
-- : VP -> Utt ; -- let's go
ImpPl1 vp =
let a = Ag GPl P1 in
let pol = PPos in
let parts = verbAgr vp.verb Infinitive Pres a pol.p in
let p1 = "давайте" in {
s = p1 ++ pol.s ++ vp.adv ! a ++ parts.p2 ++ vp.dep ++ vp.compl ! a
} ;
-- : NP -> VP -> Utt ; -- let John walk
ImpP3 np vp =
let a = Ag (GSg Neut) P3 in
let pol = PPos in
let parts = verbAgr vp.verb Ind Pres a pol.p in
let p1 = "пусть" in {
s = p1 ++ pol.s ++ vp.adv ! a ++ np.s ! Nom ++ parts.p2 ++ vp.dep ++ vp.compl ! a
} ;
-- TODO: SelfAdvVP : VP -> VP ; -- is at home himself
-- TODO: SelfAdVVP : VP -> VP ; -- is himself at home
-- TODO: SelfNP : NP -> NP ; -- the president himself (is at home)
}