mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-23 03:32:51 -06:00
completed Russian grammar with missing syntax functions (marked ---- AR 17/12/2008); their effects should be checked
This commit is contained in:
@@ -125,5 +125,14 @@ oper
|
|||||||
s2 = xs.s2
|
s2 = xs.s2
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
consrTable3 : (P,Q,R : Type) -> Str -> {s : P => Q => R => Str} ->
|
||||||
|
ListTable3 P Q R -> ListTable3 P Q R =
|
||||||
|
\P,Q,R,c,x,xs ->
|
||||||
|
{s1 = table P {p => table Q {q => table R {
|
||||||
|
r => x.s ! p ! q ! r ++ c ++ xs.s1 ! p ! q ! r
|
||||||
|
}}} ;
|
||||||
|
s2 = xs.s2
|
||||||
|
} ;
|
||||||
|
|
||||||
|
|
||||||
} ;
|
} ;
|
||||||
|
|||||||
@@ -16,6 +16,24 @@ flags coding=utf8 ;
|
|||||||
p = True
|
p = True
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
---- AR 17/12/2008
|
||||||
|
UseComparA bolshoj =
|
||||||
|
{s = \\af => bolshoj.s ! Compar ! af ;
|
||||||
|
p = True
|
||||||
|
} ;
|
||||||
|
|
||||||
|
---- AR 17/12/2008
|
||||||
|
CAdvAP ad ap np = let adp = ad.s in { ---- should be ad.p
|
||||||
|
s = \\af => ad.s ++ ap.s ! af ++ adp ++ np.s ! (mkPronForm Gen Yes NonPoss) ;
|
||||||
|
p = True ----?
|
||||||
|
} ;
|
||||||
|
|
||||||
|
---- AR 17/12/2008
|
||||||
|
AdjOrd a = {
|
||||||
|
s = a.s ;
|
||||||
|
p = True ---- ?
|
||||||
|
} ;
|
||||||
|
|
||||||
-- $SuperlA$ belongs to determiner syntax in $Noun$.
|
-- $SuperlA$ belongs to determiner syntax in $Noun$.
|
||||||
|
|
||||||
ComplA2 vlublen tu =
|
ComplA2 vlublen tu =
|
||||||
|
|||||||
@@ -21,6 +21,9 @@ concrete ConjunctionRus of Conjunction =
|
|||||||
|
|
||||||
ConjAP c xs = conjunctDistrTable AdjForm c xs ** {p = xs.p} ;
|
ConjAP c xs = conjunctDistrTable AdjForm c xs ** {p = xs.p} ;
|
||||||
|
|
||||||
|
---- AR 17/12/2008
|
||||||
|
ConjRS c xs = conjunctDistrTable3 GenNum Case Animacy c xs ** {p = xs.p} ;
|
||||||
|
|
||||||
-- These fun's are generated from the list cat's.
|
-- These fun's are generated from the list cat's.
|
||||||
|
|
||||||
BaseS = twoSS ;
|
BaseS = twoSS ;
|
||||||
@@ -50,6 +53,9 @@ concrete ConjunctionRus of Conjunction =
|
|||||||
anim = conjAnim x.anim y.anim
|
anim = conjAnim x.anim y.anim
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
---- AR 17/12/2008
|
||||||
|
BaseRS x y = twoTable3 GenNum Case Animacy x y ** {c = y.c} ;
|
||||||
|
ConsRS xs x = consrTable3 GenNum Case Animacy comma xs x ** {c = xs.c} ;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -63,7 +69,8 @@ concrete ConjunctionRus of Conjunction =
|
|||||||
-- if and only if all elements are prefix.
|
-- if and only if all elements are prefix.
|
||||||
[AP] = {s1,s2 : AdjForm => Str ; p : Bool} ;
|
[AP] = {s1,s2 : AdjForm => Str ; p : Bool} ;
|
||||||
|
|
||||||
|
---- AR 17/12/2008
|
||||||
|
[RS] = {s1,s2 : GenNum => Case => Animacy => Str} ;
|
||||||
|
|
||||||
oper
|
oper
|
||||||
|
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ concrete NounRus of Noun = CatRus ** open ResRus, Prelude, MorphoRus in {
|
|||||||
g = quant.g;
|
g = quant.g;
|
||||||
c = quant.c
|
c = quant.c
|
||||||
} ;
|
} ;
|
||||||
|
{-
|
||||||
DetArtOrd quant num ord = {
|
DetArtOrd quant num ord = {
|
||||||
s = \\af => quant.s !af ++ num.s! (caseAF af) ! (genAF af) ++ ord.s!af ;
|
s = \\af => quant.s !af ++ num.s! (caseAF af) ! (genAF af) ++ ord.s!af ;
|
||||||
n = num.n ;
|
n = num.n ;
|
||||||
@@ -84,7 +84,7 @@ concrete NounRus of Noun = CatRus ** open ResRus, Prelude, MorphoRus in {
|
|||||||
g = quant.g;
|
g = quant.g;
|
||||||
c = quant.c
|
c = quant.c
|
||||||
} ;
|
} ;
|
||||||
|
-}
|
||||||
-- MassDet = {s = \\_=>[] ; c=Nom; g = PNoGen; n = Sg} ;
|
-- MassDet = {s = \\_=>[] ; c=Nom; g = PNoGen; n = Sg} ;
|
||||||
|
|
||||||
MassNP okhotnik = {
|
MassNP okhotnik = {
|
||||||
@@ -92,7 +92,7 @@ concrete NounRus of Noun = CatRus ** open ResRus, Prelude, MorphoRus in {
|
|||||||
a = agrP3 Sg (PGen okhotnik.g) ;
|
a = agrP3 Sg (PGen okhotnik.g) ;
|
||||||
anim = okhotnik.anim
|
anim = okhotnik.anim
|
||||||
} ;
|
} ;
|
||||||
|
{-
|
||||||
DetArtSg kazhduj okhotnik = {
|
DetArtSg kazhduj okhotnik = {
|
||||||
s = \\c => -- art case always Nom (AR 17/6/2008)
|
s = \\c => -- art case always Nom (AR 17/6/2008)
|
||||||
kazhduj.s ! AF (extCase c) okhotnik.anim (gennum okhotnik.g Sg) ++
|
kazhduj.s ! AF (extCase c) okhotnik.anim (gennum okhotnik.g Sg) ++
|
||||||
@@ -108,7 +108,7 @@ concrete NounRus of Noun = CatRus ** open ResRus, Prelude, MorphoRus in {
|
|||||||
n = agrP3 Pl (case kazhduj.g of {PNoGen => PGen okhotnik.g; _ => kazhduj.g}) ;
|
n = agrP3 Pl (case kazhduj.g of {PNoGen => PGen okhotnik.g; _ => kazhduj.g}) ;
|
||||||
anim = okhotnik.anim
|
anim = okhotnik.anim
|
||||||
} ;
|
} ;
|
||||||
|
-}
|
||||||
PossPron p = {s = \\af => p.s ! mkPronForm (caseAF af) No (Poss (gennum (genAF af) (numAF af) )); c=Nom; g = PNoGen} ;
|
PossPron p = {s = \\af => p.s ! mkPronForm (caseAF af) No (Poss (gennum (genAF af) (numAF af) )); c=Nom; g = PNoGen} ;
|
||||||
|
|
||||||
NumCard c = c ;
|
NumCard c = c ;
|
||||||
@@ -158,6 +158,22 @@ concrete NounRus of Noun = CatRus ** open ResRus, Prelude, MorphoRus in {
|
|||||||
c2 = f.c3 ;
|
c2 = f.c3 ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
---- AR 17/12/2008
|
||||||
|
Use2N3 f = {
|
||||||
|
s = f.s ;
|
||||||
|
g = f.g ;
|
||||||
|
anim = f.anim ;
|
||||||
|
c2 = f.c2
|
||||||
|
} ;
|
||||||
|
|
||||||
|
---- AR 17/12/2008
|
||||||
|
Use3N3 f = {
|
||||||
|
s = f.s ;
|
||||||
|
g = f.g ;
|
||||||
|
anim = f.anim ;
|
||||||
|
c2 = f.c3
|
||||||
|
} ;
|
||||||
|
|
||||||
|
|
||||||
-- The two main functions of adjective are in predication ("Иван - молод")
|
-- The two main functions of adjective are in predication ("Иван - молод")
|
||||||
-- and in modification ("молодой человек"). Predication will be defined
|
-- and in modification ("молодой человек"). Predication will be defined
|
||||||
@@ -195,10 +211,20 @@ concrete NounRus of Noun = CatRus ** open ResRus, Prelude, MorphoRus in {
|
|||||||
anim = idea.anim
|
anim = idea.anim
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
---- AR 17/12/2008
|
||||||
ApposCN cn s = {
|
ApposCN cn s = {
|
||||||
s = \\nf => cn.s ! nf ++ s.s ! (case nf of {NF n c => PF c No NonPoss}) ;
|
s = \\nf => cn.s ! nf ++ s.s ! (case nf of {NF n c => PF c No NonPoss}) ;
|
||||||
g = cn.g ;
|
g = cn.g ;
|
||||||
anim = cn.anim
|
anim = cn.anim
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
RelNP np rel = {
|
||||||
|
s = \\c => np.s ! c ++ rel.s ! (gennum (pgen2gen np.a.g) np.a.n) ! extCase c ! np.anim ;
|
||||||
|
a = np.a ;
|
||||||
|
anim = np.anim ;
|
||||||
|
nComp = np.nComp
|
||||||
|
} ;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -37,16 +37,29 @@ concrete SentenceRus of Sentence = CatRus ** open Prelude, ResRus in {
|
|||||||
(sc.s ++ ne ++ vizhu ++ tebya)
|
(sc.s ++ ne ++ vizhu ++ tebya)
|
||||||
(sc.s ++ vizhu ++ ne ++ tebya)
|
(sc.s ++ vizhu ++ ne ++ tebya)
|
||||||
} ;
|
} ;
|
||||||
{-
|
|
||||||
SlashV2 ivan lubit = { s=\\b,clf => ivan.s ! PF Nom No NonPoss ++
|
|
||||||
lubit.s! (getActVerbForm clf (pgen2gen ivan.g) ivan.n ivan.p) ;
|
|
||||||
s2=lubit.s2; c=lubit.c };
|
|
||||||
|
|
||||||
SlashVVV2 ivan khotet lubit =
|
|
||||||
{ s=\\b,clf => ivan.s ! PF Nom No NonPoss ++ khotet.s! (getActVerbForm clf (pgen2gen ivan.g) ivan.n ivan.p) ++ lubit.s! VFORM Act VINF ;
|
---- AR 17/12/2008
|
||||||
s2=lubit.s2;
|
SlashVP Ya tebyaNeVizhu = {
|
||||||
c=lubit.c };
|
s = \\b,clf =>
|
||||||
-}
|
let {
|
||||||
|
ya = Ya.s ! (case clf of {
|
||||||
|
ClInfinit => (mkPronForm Acc No NonPoss);
|
||||||
|
_ => (mkPronForm Nom No NonPoss)
|
||||||
|
});
|
||||||
|
ne = case b of {Pos=>""; Neg=>"не"};
|
||||||
|
vizhu = tebyaNeVizhu.s ! clf ! (pgNum Ya.a.g Ya.a.n)! Ya.a.p;
|
||||||
|
khorosho = tebyaNeVizhu.s2 ;
|
||||||
|
tebya = tebyaNeVizhu.s3 ! (pgen2gen Ya.a.g) ! Ya.a.n
|
||||||
|
}
|
||||||
|
in
|
||||||
|
if_then_else Str tebyaNeVizhu.negBefore
|
||||||
|
(ya ++ ne ++ vizhu ++ tebya ++ khorosho)
|
||||||
|
(ya ++ vizhu ++ ne ++ tebya ++ khorosho) ;
|
||||||
|
s2=tebyaNeVizhu.s2 ;
|
||||||
|
c=tebyaNeVizhu.c
|
||||||
|
} ;
|
||||||
|
|
||||||
AdvSlash slash adv = {
|
AdvSlash slash adv = {
|
||||||
s = \\b,clf => slash.s ! b ! clf ++ adv.s ;
|
s = \\b,clf => slash.s ! b ! clf ++ adv.s ;
|
||||||
c = slash.c;
|
c = slash.c;
|
||||||
@@ -110,6 +123,8 @@ concrete SentenceRus of Sentence = CatRus ** open Prelude, ResRus in {
|
|||||||
|
|
||||||
AdvS a s = {s = a.s ++ "," ++ s.s} ; ---- AR 19/6/2007
|
AdvS a s = {s = a.s ++ "," ++ s.s} ; ---- AR 19/6/2007
|
||||||
|
|
||||||
|
---- AR 17/12/2008
|
||||||
|
RelS s r = {s = s.s ++ "," ++ r.s ! gennum Neut Sg ! Nom ! Inanimate} ; ---- ?
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -191,30 +191,82 @@ concrete VerbRus of Verb = CatRus ** open ResRus, Prelude in {
|
|||||||
c = dat.c
|
c = dat.c
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
{-
|
---- AR 17/12/2008
|
||||||
ComplV3 dat tu pivo =
|
SlashV2Q dat esliOnPridet =
|
||||||
let
|
{s = \\clf,gn,p => dat.s ! (getActVerbForm clf (genGNum gn) (numGNum gn) p) ++ esliOnPridet.s ! QDir ;
|
||||||
tebepivo = dat.s2 ++
|
|
||||||
tu.s ! PF dat.c No NonPoss ++ dat.s4 ++ pivo.s ! PF dat.c2 Yes NonPoss
|
|
||||||
in
|
|
||||||
{s = \\clf,gn,p => dat.s ! (getActVerbForm clf (genGNum gn) (numGNum gn) p) ++ tebepivo ;
|
|
||||||
asp = dat.asp ;
|
asp = dat.asp ;
|
||||||
w = Act;
|
w = Act;
|
||||||
negBefore = True;
|
negBefore = True;
|
||||||
s2 = "";
|
s2 = "";
|
||||||
s3 = \\g,n=> ""
|
s3 = \\g,n=> "" ;
|
||||||
|
sc = dat.s2 ;
|
||||||
|
c = dat.c
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
---- AR 17/12/2008
|
||||||
|
SlashV2S vidit tuUlubaeshsya =
|
||||||
|
{s = \\clf,gn,p => vidit.s ! (getActVerbForm clf (genGNum gn) (numGNum gn) p)
|
||||||
|
++ [", что"] ++ tuUlubaeshsya.s ;
|
||||||
|
asp = vidit.asp;
|
||||||
|
w = Act;
|
||||||
|
s2="";
|
||||||
|
negBefore = True;
|
||||||
|
s3 = \\g,n => "" ;
|
||||||
|
sc = vidit.s2 ;
|
||||||
|
c = vidit.c
|
||||||
|
} ;
|
||||||
|
|
||||||
ReflV2 v =
|
---- AR 17/12/2008
|
||||||
{ s = \\clf,gn,p => v.s ! (getActVerbForm clf (genGNum gn) (numGNum gn) p) ++ v.s2 ++ sebya!v.c;
|
SlashV2V putatsya bezhat =
|
||||||
asp = v.asp ;
|
{ s = \\clf,gn,p => putatsya.s ! (getActVerbForm clf (genGNum gn)
|
||||||
|
(numGNum gn) p) ++ bezhat.s!ClInfinit !gn!p ;
|
||||||
|
asp = putatsya.asp ;
|
||||||
w = Act;
|
w = Act;
|
||||||
negBefore = True;
|
negBefore = True;
|
||||||
s2 = "";
|
s2 = "";
|
||||||
|
s3 =\\g,n => "" ;
|
||||||
|
sc = putatsya.s2 ;
|
||||||
|
c = putatsya.c
|
||||||
|
} ;
|
||||||
|
|
||||||
|
---- AR 17/12/2008
|
||||||
|
ReflVP vp =
|
||||||
|
{ s = \\clf,gn,p => vp.s ! clf ! gn ! p ++ vp.s2 ++ sebya ! vp.c;
|
||||||
|
asp = vp.asp ;
|
||||||
|
w = Act ;
|
||||||
|
negBefore = True;
|
||||||
|
s2 = "";
|
||||||
s3 = \\g,n=> ""
|
s3 = \\g,n=> ""
|
||||||
} ;
|
} ;
|
||||||
-}
|
|
||||||
|
---- AR 17/12/2008
|
||||||
|
SlashVV putatsya bezhat =
|
||||||
|
{ s = \\clf,gn,p => putatsya.s ! (getActVerbForm clf (genGNum gn)
|
||||||
|
(numGNum gn) p) ++ bezhat.s!ClInfinit !gn!p ;
|
||||||
|
asp = putatsya.asp ;
|
||||||
|
w = Act;
|
||||||
|
negBefore = True;
|
||||||
|
s2 = "";
|
||||||
|
s3 =\\g,n => "" ;
|
||||||
|
sc = bezhat.s2 ;
|
||||||
|
c = bezhat.c
|
||||||
|
} ;
|
||||||
|
|
||||||
|
---- AR 17/12/2008
|
||||||
|
SlashV2VNP putatsya np bezhat =
|
||||||
|
{ s = \\clf,gn,p =>
|
||||||
|
putatsya.s ! (getActVerbForm clf (genGNum gn) (numGNum gn) p) ++
|
||||||
|
np.s ! (mkPronForm putatsya.c No NonPoss) ++ ---- ?
|
||||||
|
bezhat.s!ClInfinit !gn!p ;
|
||||||
|
asp = putatsya.asp ;
|
||||||
|
w = Act;
|
||||||
|
negBefore = True;
|
||||||
|
s2 = "";
|
||||||
|
s3 =\\g,n => "" ;
|
||||||
|
sc = bezhat.s2 ; ---- ?
|
||||||
|
c = bezhat.c
|
||||||
|
} ;
|
||||||
|
|
||||||
|
|
||||||
-- To generate "сказал, что Иван гуляет" / "не сказал, что Иван гуляет":
|
-- To generate "сказал, что Иван гуляет" / "не сказал, что Иван гуляет":
|
||||||
ComplVS vidit tuUlubaeshsya =
|
ComplVS vidit tuUlubaeshsya =
|
||||||
@@ -226,6 +278,8 @@ concrete VerbRus of Verb = CatRus ** open ResRus, Prelude in {
|
|||||||
negBefore = True;
|
negBefore = True;
|
||||||
s3 = \\g,n => ""
|
s3 = \\g,n => ""
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|
||||||
-- To generate "can walk"/"can't walk"; "tries to walk"/"does not try to walk":
|
-- To generate "can walk"/"can't walk"; "tries to walk"/"does not try to walk":
|
||||||
-- The contraction of "not" is not provided, since it would require changing
|
-- The contraction of "not" is not provided, since it would require changing
|
||||||
-- the verb parameter type.
|
-- the verb parameter type.
|
||||||
|
|||||||
Reference in New Issue
Block a user