summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkrasimir <krasimir@chalmers.se>2008-11-26 14:43:05 +0000
committerkrasimir <krasimir@chalmers.se>2008-11-26 14:43:05 +0000
commitd0116c395839cd53dd24cfe1cb26b3f64ddc9430 (patch)
tree74665c6353429f714a973437fb49a7b80a1ac12a
parent66785b20208f9ea2fca7b6ff3355cd8ce87636c3 (diff)
add Russian in next-lib
-rw-r--r--next-lib/src/russian/AdjectiveRus.gf48
-rw-r--r--next-lib/src/russian/AdverbRus.gf24
-rw-r--r--next-lib/src/russian/AllRus.gf6
-rw-r--r--next-lib/src/russian/AllRusAbs.gf6
-rw-r--r--next-lib/src/russian/CatRus.gf99
-rw-r--r--next-lib/src/russian/ConjunctionRus.gf100
-rw-r--r--next-lib/src/russian/ExtraLexRus.gf74
-rw-r--r--next-lib/src/russian/ExtraRus.gf3
-rw-r--r--next-lib/src/russian/ExtraRusAbs.gf3
-rw-r--r--next-lib/src/russian/GrammarRus.gf17
-rw-r--r--next-lib/src/russian/IdiomRus.gf58
-rw-r--r--next-lib/src/russian/IrregRus.gf182
-rw-r--r--next-lib/src/russian/LangRus.gf10
-rw-r--r--next-lib/src/russian/LexiconRus.gf358
-rw-r--r--next-lib/src/russian/MorphoRus.gf1315
-rw-r--r--next-lib/src/russian/NounRus.gf236
-rw-r--r--next-lib/src/russian/NumeralRus.gf143
-rw-r--r--next-lib/src/russian/ParadigmsRus.gf470
-rw-r--r--next-lib/src/russian/PhraseRus.gf27
-rw-r--r--next-lib/src/russian/QuestionRus.gf72
-rw-r--r--next-lib/src/russian/RelativeRus.gf37
-rw-r--r--next-lib/src/russian/ResRus.gf400
-rw-r--r--next-lib/src/russian/SentenceRus.gf115
-rw-r--r--next-lib/src/russian/StructuralRus.gf128
-rw-r--r--next-lib/src/russian/VerbRus.gf289
25 files changed, 4220 insertions, 0 deletions
diff --git a/next-lib/src/russian/AdjectiveRus.gf b/next-lib/src/russian/AdjectiveRus.gf
new file mode 100644
index 000000000..1cd91e71e
--- /dev/null
+++ b/next-lib/src/russian/AdjectiveRus.gf
@@ -0,0 +1,48 @@
+
+--# -path=.:../abstract:../common:../../prelude
+
+
+concrete AdjectiveRus of Adjective = CatRus ** open ResRus, Prelude in {
+flags coding=utf8 ;
+
+ lin
+
+ PositA a = { s = a.s!Posit; p = False};
+ -- Comparative forms are used with an object of comparison, as
+ -- adjectival phrases ("больше тебя").
+
+ ComparA bolshoj tu =
+ {s = \\af => bolshoj.s ! Compar ! af ++ tu.s ! (mkPronForm Gen Yes NonPoss) ;
+ p = True
+ } ;
+
+-- $SuperlA$ belongs to determiner syntax in $Noun$.
+
+ ComplA2 vlublen tu =
+ {s = \\af => vlublen.s !Posit! af ++ vlublen.s2 ++
+ tu.s ! (mkPronForm vlublen.c No NonPoss) ;
+ p = True
+ } ;
+
+ ReflA2 vlublen =
+ {s = \\af => vlublen.s !Posit! af ++ vlublen.s2 ++ sam.s ! vlublen.c;
+ p = True
+ } ;
+
+ SentAP vlublen sent=
+ {s = \\af => vlublen.s ! af ++ [", "] ++ sent.s;
+ p = True
+ } ;
+
+
+ AdAP ada ap = {
+ s = \\af => ada.s ++ ap.s ! af ;
+ p = True
+ } ;
+
+ UseA2 a = {
+ s = \\af => a.s ! Posit ! af ;
+ p = True
+ } ;
+}
+
diff --git a/next-lib/src/russian/AdverbRus.gf b/next-lib/src/russian/AdverbRus.gf
new file mode 100644
index 000000000..4e283431d
--- /dev/null
+++ b/next-lib/src/russian/AdverbRus.gf
@@ -0,0 +1,24 @@
+--# -path=.:../abstract:../common:../../prelude
+
+concrete AdverbRus of Adverb = CatRus ** open ResRus, Prelude in {
+flags coding=utf8 ;
+
+ lin
+ PositAdvAdj a = {s = a.s !Posit! AdvF} ;
+ ComparAdvAdj cadv a np = {
+ s = cadv.s ++ a.s !Posit! AdvF ++ "чем" ++ np.s ! PF Nom No NonPoss
+ } ;
+ ComparAdvAdjS cadv a s = {
+ s = cadv.s ++ a.s !Posit! AdvF ++ "чем" ++ s.s
+ } ;
+
+ PrepNP na stol = ss (na.s ++ stol.s ! PF na.c Yes NonPoss) ;
+
+ AdAdv = cc2 ;
+
+ SubjS = cc2 ;
+
+ AdnCAdv cadv = {s = cadv.s ++ "чем"} ;
+
+}
+
diff --git a/next-lib/src/russian/AllRus.gf b/next-lib/src/russian/AllRus.gf
new file mode 100644
index 000000000..024ce67e1
--- /dev/null
+++ b/next-lib/src/russian/AllRus.gf
@@ -0,0 +1,6 @@
+--# -path=.:../abstract:../common:prelude
+
+concrete AllRus of AllRusAbs =
+ LangRus,
+ ExtraRus
+ ** {flags coding=utf8 ;} ;
diff --git a/next-lib/src/russian/AllRusAbs.gf b/next-lib/src/russian/AllRusAbs.gf
new file mode 100644
index 000000000..eff645337
--- /dev/null
+++ b/next-lib/src/russian/AllRusAbs.gf
@@ -0,0 +1,6 @@
+--# -path=.:../abstract:../common:prelude
+
+abstract AllRusAbs =
+ Lang,
+ ExtraRusAbs
+ ** {} ;
diff --git a/next-lib/src/russian/CatRus.gf b/next-lib/src/russian/CatRus.gf
new file mode 100644
index 000000000..b3e3809c9
--- /dev/null
+++ b/next-lib/src/russian/CatRus.gf
@@ -0,0 +1,99 @@
+--# -path=.:../abstract:../common:../../prelude
+
+concrete CatRus of Cat = CommonX ** open ResRus, Prelude in {
+
+ flags optimize=all_subs ; coding=utf8 ;
+
+ lincat
+
+-- Tensed/Untensed
+
+ S = {s : Str} ;
+ QS = {s : QForm => Str} ;
+ RS = {s : GenNum => Case => Animacy => Str} ;
+ SSlash = {s : Str; s2: Str ; c: Case} ;
+
+-- Sentence
+ -- clause (variable tense) e.g. "John walks"/"John walked"
+ Cl ={s : Polarity => ClForm => Str} ;
+ ClSlash = {s : Polarity => ClForm => Str; s2: Str; c: Case} ;
+ Imp = { s: Polarity => Gender => Number => Str } ;
+
+-- Question
+
+ QCl = {s :Polarity => ClForm => QForm => Str};
+ IP = { s : PronForm => Str ; n : Number ; p : Person ;
+ g: PronGen ; anim : Animacy ; pron: Bool} ;
+ IComp = {s : Str} ;
+ IDet = Adjective ** {n: Number; g: PronGen; c: Case} ;
+ IQuant = {s : Number => AdjForm => Str; g: PronGen; c: Case} ; -- AR 16/6/2008
+
+-- Relative
+
+ RCl = {s : Polarity => ClForm => GenNum => Case => Animacy => Str} ;
+ RP = {s : GenNum => Case => Animacy => Str} ;
+
+-- Verb
+ -- Polarity =>
+ Comp, VP = VerbPhrase ;
+ VPSlash = VerbPhrase ** {sc : Str ; c : Case} ;
+
+-- Adjective
+
+ AP = {s : AdjForm => Str; p : IsPostfixAdj} ;
+
+-- Noun
+
+ CN = {s : Number => Case => Str; g : Gender; anim : Animacy} ;
+ NP = { s : PronForm => Str ; n : Number ; p : Person ;
+ g: PronGen ; anim : Animacy ; pron: Bool} ;
+ Pron = { s : PronForm => Str ; n : Number ; p : Person ;
+ g: PronGen ; pron: Bool} ;
+
+-- Determiners (only determinative pronouns
+-- (or even indefinite numerals: "много" (many)) in Russian) are inflected
+-- according to the gender of nouns they determine.
+-- extra parameters (Number and Case) are added for the sake of
+-- the determinative pronoun "bolshinstvo" ("most");
+-- Gender parameter is due to multiple determiners (Numerals in Russian)
+-- like "mnogo"
+-- The determined noun has the case parameter specific for the determiner
+
+ Det = {s : AdjForm => Str; n: Number; g: PronGen; c: Case} ;
+ Predet, Quant, Art = {s : AdjForm => Str; g: PronGen; c: Case} ;
+
+-- Numeral
+
+ Num, Numeral, Card = {s : Case => Gender => Str ; n : Number} ;
+ Digits = {s : Str ; n : Number} ; ----
+
+-- Structural
+-- The conjunction has an inherent number, which is used when conjoining
+-- noun phrases: "Иван и Маша поют" vs. "Иван или Маша поет"; in the
+-- case of "или", the result is however plural if any of the disjuncts is.
+
+ Conj = {s1,s2 : Str ; n : Number} ;
+ Subj = {s : Str} ;
+ Prep = {s : Str ; c: Case } ;
+
+-- Open lexical classes, e.g. Lexicon
+
+ V, VS, VV, VQ, VA = Verbum ; -- = {s : VerbForm => Str ; asp : Aspect } ;
+ V2, V2A = Verbum ** Complement ;
+ V2V, V2S, V2Q = Verbum ** Complement ; --- AR
+ V3 = Verbum ** Complement** {s4 : Str; c2: Case} ;
+-- VV = {s : VVForm => Str ; isAux : Bool} ;
+
+ Ord = {s : AdjForm => Str} ;
+ A = {s : Degree => AdjForm => Str} ;
+ A2 = A ** Complement ;
+
+ -- Substantives moreover have an inherent gender.
+ N = {s : SubstForm => Str ; g : Gender ; anim : Animacy } ;
+ N2 = {s : Number => Case => Str; g : Gender; anim : Animacy} ** Complement ;
+ N3 = {s : Number => Case => Str; g : Gender; anim : Animacy} ** Complement ** {s3 : Str; c2: Case} ;
+ PN = {s : Case => Str ; g : Gender ; anim : Animacy} ;
+
+
+}
+
diff --git a/next-lib/src/russian/ConjunctionRus.gf b/next-lib/src/russian/ConjunctionRus.gf
new file mode 100644
index 000000000..25423b2bb
--- /dev/null
+++ b/next-lib/src/russian/ConjunctionRus.gf
@@ -0,0 +1,100 @@
+--# -path=.:../abstract:../common:../../prelude
+
+concrete ConjunctionRus of Conjunction =
+ CatRus ** open ResRus, Coordination, Prelude in {
+
+ flags optimize=all_subs ; coding=utf8 ;
+
+ lin
+
+ ConjS = conjunctDistrSS ;
+
+ ConjAdv = conjunctDistrSS ;
+
+ ConjNP c xs =
+ conjunctDistrTable PronForm c xs ** {n = conjNumber c.n xs.n ;
+ p = xs.p ; pron = xs.pron ; anim = xs.anim ;
+ g = xs.g } ;
+
+
+ ConjAP c xs = conjunctDistrTable AdjForm c xs ** {p = xs.p} ;
+
+-- These fun's are generated from the list cat's.
+
+ BaseS = twoSS ;
+ ConsS = consrSS comma ;
+ BaseAdv = twoSS ;
+ ConsAdv = consrSS comma ;
+
+
+ ConsNP x xs =
+ consTable PronForm comma xs x **
+ {n = conjNumber xs.n x.n ; g = conjPGender x.g xs.g ;
+ anim = conjAnim x.anim xs.anim ;
+ p = conjPerson xs.p x.p; pron = conjPron xs.pron x.pron} ;
+
+ ConsAP x xs = consTable AdjForm comma xs x ** {p = andB xs.p x.p} ;
+
+
+ BaseAP x y = twoTable AdjForm x y ** {p = andB x.p y.p} ;
+
+ BaseNP x y = twoTable PronForm x y ** {n = conjNumber x.n y.n ;
+ g = conjPGender x.g y.g ; p = conjPerson x.p y.p ;
+ pron = conjPron x.pron y.pron ; anim = conjAnim x.anim y.anim } ;
+
+
+
+
+ lincat
+ [S] = {s1,s2 : Str} ;
+ [Adv] = {s1,s2 : Str} ;
+ -- The structure is the same as for sentences. The result is either always plural
+ -- or plural if any of the components is, depending on the conjunction.
+ [NP] = { s1,s2 : PronForm => Str ; g: PronGen ;
+ anim : Animacy ; n : Number ; p : Person ; pron : Bool } ;
+ -- The structure is the same as for sentences. The result is a prefix adjective
+ -- if and only if all elements are prefix.
+ [AP] = {s1,s2 : AdjForm => Str ; p : Bool} ;
+
+
+
+oper
+
+-- We have to define a calculus of numbers of persons. For numbers,
+-- it is like the conjunction with $Pl$ corresponding to $False$.
+--
+-- The following are given in $ParamX$.
+--
+-- conjNumber : Number -> Number -> Number = \m,n -> case <m,n> of {
+-- <Sg,Sg> => Sg ;
+-- _ => Pl
+-- } ;
+
+-- For persons, we let the latter argument win ("либо ты, либо я пойду"
+-- but "либо я, либо ты пойдешь"). This is not quite clear.
+
+-- conjPerson : Person -> Person -> Person = \_,p ->
+-- p ;
+
+-- For pron, we let the latter argument win - "Маша или моя мама" (Nominative case)
+-- but - "моей или Машина мама" (Genetive case) both corresponds to
+-- "Masha's or my mother"), which is actually not exactly correct, since
+-- different cases should be used - "Машина или моя мама".
+
+ conjPron : Bool -> Bool -> Bool = \_,p ->
+ p ;
+
+-- For gender in a similar manner as for person:
+-- Needed for adjective predicates like:
+-- "Маша или Оля - красивая", "Антон или Олег - красивый",
+-- "Маша или Олег - красивый".
+-- The later is not totally correct, but there is no correct way to say that.
+
+ conjGender : Gender -> Gender -> Gender = \_,m -> m ;
+ conjPGender : PronGen -> PronGen -> PronGen = \_,m -> m ;
+
+ conjAnim : Animacy -> Animacy -> Animacy = \_,m -> m ;
+
+
+}
+
diff --git a/next-lib/src/russian/ExtraLexRus.gf b/next-lib/src/russian/ExtraLexRus.gf
new file mode 100644
index 000000000..a58868309
--- /dev/null
+++ b/next-lib/src/russian/ExtraLexRus.gf
@@ -0,0 +1,74 @@
+--# -path=.:abstract:common
+concrete ExtraLexRus of ExtraLexRusAbs = CatRus **
+ open ParadigmsRus in {
+flags
+ coding=utf8 ;
+lin
+--- bridge_N = mkN "мост" ;
+--- candle_N = nSvecha "свеч" ; -- +++ MG_UR: added +++
+--- citizen_N = nGrazhdanin "господ" ; -- +++ MG_UR: added +++
+ daughter_N =
+ {s = table {
+ SF Sg Nom => "дочь" ;
+ SF Sg Gen => "дочери" ;
+ SF Sg Dat => "дочери" ;
+ SF Sg Acc => "дочь" ;
+ SF Sg Inst => "дочерью" ;
+ SF Sg (Prepos _) => "дочери" ;
+ SF Pl Nom => "дочери" ;
+ SF Pl Gen => "дочерей" ;
+ SF Pl Dat => "дочерям" ;
+ SF Pl Acc => "дочерей" ;
+ SF Pl Inst => "дочерьми" ;
+ SF Pl (Prepos _) => "дочерях"
+ } ;
+ g = Fem ; anim = Animate
+ } ;
+
+--- desk_N = nStol "стол" ;
+--- dictionary_N = nSlovar "словар" ;
+--- fellow_N = nTovarish "товарищ" ; -- +++ MG_UR: added +++
+--- flag_N = nVremja "зна" ;
+--- heaven_N = nNebo "неб" ; -- +++ MG_UR: added +++
+--- museum_N = nMusej "музе" ; -- +++ MG_UR: added +++
+-- name_N = mkN "имя" "имени" "имени" "имя" "именем" "имени" "имени" "имена" "имён" "именам" "имена" "именами" "именах" neuter inanimate ;
+--- ocean_N = nMorje "мор" ; -- +++ MG_UR: added +++
+ son_N =
+ {s = table
+ { SF Sg Nom => syn ;
+ SF Sg Gen => syn+"а" ;
+ SF Sg Dat => syn+"у" ;
+ SF Sg Acc => syn +"а";
+ SF Sg Inst => syn+"ом" ;
+ SF Sg (Prepos _) => syn+"е" ;
+ SF Pl Nom => syn+"ья" ;
+ SF Pl Gen => syn+"ьев" ;
+ SF Pl Dat => syn+"ьям" ;
+ SF Pl Acc => syn +"ьев";
+ SF Pl Inst => syn+"ьями" ;
+ SF Pl (Prepos _) => syn+"ьяах"
+ } ;
+ g = Masc ; anim = Animate
+ } ;
+--- time_N = nVremja "вре" ; -- +++ MG_UR: added +++
+--- vocationalschool_N = nUchilishe "училищ" ; -- +++ MG_UR: added +++
+ way_N =
+ {s = table
+ { SF Sg Nom => put+"ь" ;
+ SF Sg Gen => put+"и" ;
+ SF Sg Dat => put+"и" ;
+ SF Sg Acc => put+"ь" ;
+ SF Sg Inst => put+"ём" ;
+ SF Sg (Prepos _) => put+"и" ;
+ SF Pl Nom => put+"и" ;
+ SF Pl Gen => put+"ей" ;
+ SF Pl Dat => put+"ям" ;
+ SF Pl Acc => put+"и" ;
+ SF Pl Inst => put+"ями" ;
+ SF Pl (Prepos _) => put+"ях"
+ } ;
+ g = Masc ; anim = Inanimate
+ } ;
+
+--- word_N = nSlovo "слов" ; -- +++ MG_UR: added +++
+} \ No newline at end of file
diff --git a/next-lib/src/russian/ExtraRus.gf b/next-lib/src/russian/ExtraRus.gf
new file mode 100644
index 000000000..d592b6e64
--- /dev/null
+++ b/next-lib/src/russian/ExtraRus.gf
@@ -0,0 +1,3 @@
+concrete ExtraRus of ExtraRusAbs = CatRus ** {
+flags coding=utf8 ;
+}
diff --git a/next-lib/src/russian/ExtraRusAbs.gf b/next-lib/src/russian/ExtraRusAbs.gf
new file mode 100644
index 000000000..e1a9d8e9d
--- /dev/null
+++ b/next-lib/src/russian/ExtraRusAbs.gf
@@ -0,0 +1,3 @@
+abstract ExtraRusAbs = {
+
+}
diff --git a/next-lib/src/russian/GrammarRus.gf b/next-lib/src/russian/GrammarRus.gf
new file mode 100644
index 000000000..052d5204c
--- /dev/null
+++ b/next-lib/src/russian/GrammarRus.gf
@@ -0,0 +1,17 @@
+--# -path=.:../abstract:../common:../../prelude
+
+concrete GrammarRus of Grammar =
+ NounRus,
+ VerbRus,
+ AdjectiveRus,
+ AdverbRus,
+ NumeralRus,
+ SentenceRus,
+ QuestionRus,
+ RelativeRus,
+ ConjunctionRus,
+ PhraseRus,
+ TextX,
+ StructuralRus,
+ IdiomRus
+ ** { flags startcat = Phr ; unlexer = text ; lexer = text ; coding=utf8 ;} ;
diff --git a/next-lib/src/russian/IdiomRus.gf b/next-lib/src/russian/IdiomRus.gf
new file mode 100644
index 000000000..d2db6c33c
--- /dev/null
+++ b/next-lib/src/russian/IdiomRus.gf
@@ -0,0 +1,58 @@
+--# -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 => APl; _=> ASg (pgen2gen np.g)}
+ in
+ "это" ++ ne ++ np.s ! (PF Nom No NonPoss) ++
+ rs.s ! gn !Nom!Animate };
+
+ ImpPl1 vp = {s= "давайте" ++ vp.s! (ClIndic Future Simul)! APl ! P1};
+
+ ImpersCl vp = {s= \\ b, clf => let ne= case b of {Pos =>[]; Neg =>"не"}
+ in
+ ne ++ vp.s! clf! (ASg 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! (ASg Masc) ! P2 };
+
+ ProgrVP vp = vp ;
+
+}
+
diff --git a/next-lib/src/russian/IrregRus.gf b/next-lib/src/russian/IrregRus.gf
new file mode 100644
index 000000000..37e109b68
--- /dev/null
+++ b/next-lib/src/russian/IrregRus.gf
@@ -0,0 +1,182 @@
+--# -path=.:../abstract:../common:../../prelude
+
+--
+concrete IrregRus of IrregRusAbs = CatRus ** open ParadigmsRus in {
+--
+flags optimize=values ; coding=utf8 ;
+--
+-- lin
+-- awake_V = irregV "awake" "awoke" "awoken" ;
+-- bear_V = irregV "bear" "bore" "born" ;
+-- beat_V = irregV "beat" "beat" "beat" ;
+-- become_V = irregV "become" "became" "become" ;
+-- begin_V = irregV "begin" "began" "begun" ;
+-- bend_V = irregV "bend" "bent" "bent" ;
+-- beset_V = irregV "beset" "beset" "beset" ;
+-- bet_V = irregDuplV "bet" "bet" "bet" ;
+-- bid_V = irregDuplV "bid" (variants {"bid" ; "bade"}) (variants {"bid" ; "bidden"}) ;
+-- bind_V = irregV "bind" "bound" "bound" ;
+-- bite_V = irregV "bite" "bit" "bitten" ;
+-- bleed_V = irregV "bleed" "bled" "bled" ;
+-- blow_V = irregV "blow" "blew" "blown" ;
+-- break_V = irregV "break" "broke" "broken" ;
+-- breed_V = irregV "breed" "bred" "bred" ;
+-- bring_V = irregV "bring" "brought" "brought" ;
+-- broadcast_V = irregV "broadcast" "broadcast" "broadcast" ;
+-- build_V = irregV "build" "built" "built" ;
+-- burn_V = irregV "burn" (variants {"burned" ; "burnt"}) (variants {"burned" ; "burnt"}) ;
+-- burst_V = irregV "burst" "burst" "burst" ;
+-- buy_V = irregV "buy" "bought" "bought" ;
+-- cast_V = irregV "cast" "cast" "cast" ;
+-- catch_V = irregV "catch" "caught" "caught" ;
+-- choose_V = irregV "choose" "chose" "chosen" ;
+-- cling_V = irregV "cling" "clung" "clung" ;
+-- come_V = irregV "come" "came" "come" ;
+-- cost_V = irregV "cost" "cost" "cost" ;
+-- creep_V = irregV "creep" "crept" "crept" ;
+-- cut_V = irregDuplV "cut" "cut" "cut" ;
+-- deal_V = irregV "deal" "dealt" "dealt" ;
+-- dig_V = irregDuplV "dig" "dug" "dug" ;
+-- dive_V = irregV "dive" (variants {"dived" ; "dove"}) "dived" ;
+-- do_V = mkV "do" "does" "did" "done" "doing" ;
+-- draw_V = irregV "draw" "drew" "drawn" ;
+-- dream_V = irregV "dream" (variants {"dreamed" ; "dreamt"}) (variants {"dreamed" ; "dreamt"}) ;
+-- drive_V = irregV "drive" "drove" "driven" ;
+-- drink_V = irregV "drink" "drank" "drunk" ;
+-- eat_V = irregV "eat" "ate" "eaten" ;
+-- fall_V = irregV "fall" "fell" "fallen" ;
+-- feed_V = irregV "feed" "fed" "fed" ;
+-- feel_V = irregV "feel" "felt" "felt" ;
+-- fight_V = irregV "fight" "fought" "fought" ;
+-- find_V = irregV "find" "found" "found" ;
+-- fit_V = irregDuplV "fit" "fit" "fit" ;
+-- flee_V = irregV "flee" "fled" "fled" ;
+-- fling_V = irregV "fling" "flung" "flung" ;
+-- fly_V = irregV "fly" "flew" "flown" ;
+-- forbid_V = irregDuplV "forbid" "forbade" "forbidden" ;
+-- forget_V = irregDuplV "forget" "forgot" "forgotten" ;
+-- forgive_V = irregV "forgive" "forgave" "forgiven" ;
+-- forsake_V = irregV "forsake" "forsook" "forsaken" ;
+-- freeze_V = irregV "freeze" "froze" "frozen" ;
+-- get_V = irregDuplV "get" "got" "gotten" ;
+-- give_V = irregV "give" "gave" "given" ;
+-- go_V = irregV "go" "went" "gone" ;
+-- grind_V = irregV "grind" "ground" "ground" ;
+-- grow_V = irregV "grow" "grew" "grown" ;
+-- hang_V = irregV "hang" "hung" "hung" ;
+-- have_V = mkV "have" "has" "had" "had" "having" ;
+-- hear_V = irregV "hear" "heard" "heard" ;
+-- hide_V = irregV "hide" "hid" "hidden" ;
+-- hit_V = irregDuplV "hit" "hit" "hit" ;
+-- hold_V = irregV "hold" "held" "held" ;
+-- hurt_V = irregV "hurt" "hurt" "hurt" ;
+-- keep_V = irregV "keep" "kept" "kept" ;
+-- kneel_V = irregV "kneel" "knelt" "knelt" ;
+-- knit_V = irregDuplV "knit" "knit" "knit" ;
+-- know_V = irregV "know" "knew" "know" ;
+-- lay_V = irregV "lay" "laid" "laid" ;
+-- lead_V = irregV "lead" "led" "led" ;
+-- leap_V = irregV "leap" (variants {"leaped" ; "lept"}) (variants {"leaped" ; "lept"}) ;
+-- learn_V = irregV "learn" (variants {"learned" ; "learnt"}) (variants {"learned" ; "learnt"}) ;
+-- leave_V = irregV "leave" "left" "left" ;
+-- lend_V = irregV "lend" "lent" "lent" ;
+-- let_V = irregDuplV "let" "let" "let" ;
+-- lie_V = irregV "lie" "lay" "lain" ;
+-- light_V = irregV "light" (variants {"lighted" ; "lit"}) "lighted" ;
+-- lose_V = irregV "lose" "lost" "lost" ;
+-- make_V = irregV "make" "made" "made" ;
+-- mean_V = irregV "mean" "meant" "meant" ;
+-- meet_V = irregV "meet" "met" "met" ;
+-- misspell_V = irregV "misspell" (variants {"misspelled" ; "misspelt"}) (variants {"misspelled" ; "misspelt"}) ;
+-- mistake_V = irregV "mistake" "mistook" "mistaken" ;
+-- mow_V = irregV "mow" "mowed" (variants {"mowed" ; "mown"}) ;
+-- overcome_V = irregV "overcome" "overcame" "overcome" ;
+-- overdo_V = mkV "overdo" "overdoes" "overdid" "overdone" "overdoing" ;
+-- overtake_V = irregV "overtake" "overtook" "overtaken" ;
+-- overthrow_V = irregV "overthrow" "overthrew" "overthrown" ;
+-- pay_V = irregV "pay" "paid" "paid" ;
+-- plead_V = irregV "plead" "pled" "pled" ;
+-- prove_V = irregV "prove" "proved" (variants {"proved" ; "proven"}) ;
+-- put_V = irregDuplV "put" "put" "put" ;
+-- quit_V = irregDuplV "quit" "quit" "quit" ;
+-- read_V = irregV "read" "read" "read" ;
+-- rid_V = irregDuplV "rid" "rid" "rid" ;
+-- ride_V = irregV "ride" "rode" "ridden" ;
+-- ring_V = irregV "ring" "rang" "rung" ;
+-- rise_V = irregV "rise" "rose" "risen" ;
+-- run_V = irregDuplV "run" "ran" "run" ;
+-- saw_V = irregV "saw" "sawed" (variants {"sawed" ; "sawn"}) ;
+-- say_V = irregV "say" "said" "said" ;
+-- see_V = irregV "see" "saw" "seen" ;
+-- seek_V = irregV "seek" "sought" "sought" ;
+-- sell_V = irregV "sell" "sold" "sold" ;
+-- send_V = irregV "send" "sent" "sent" ;
+-- set_V = irregDuplV "set" "set" "set" ;
+-- sew_V = irregV "sew" "sewed" (variants {"sewed" ; "sewn"}) ;
+-- shake_V = irregV "shake" "shook" "shaken" ;
+-- shave_V = irregV "shave" "shaved" (variants {"shaved" ; "shaven"}) ;
+-- shear_V = irregV "shear" "shore" "shorn" ;
+-- shed_V = irregDuplV "shed" "shed" "shed" ;
+-- shine_V = irregV "shine" "shone" "shone" ;
+-- shoe_V = irregV "shoe" "shoed" (variants {"shoed" ; "shod"}) ;
+-- shoot_V = irregV "shoot" "shot" "shot" ;
+-- show_V = irregV "show" "showed" (variants {"showed" ; "shown"}) ;
+-- shrink_V = irregV "shrink" "shrank" "shrunk" ;
+-- shut_V = irregDuplV "shut" "shut" "shut" ;
+-- sing_V = irregV "sing" "sang" "sung" ;
+-- sink_V = irregV "sink" "sank" "sunk" ;
+-- sit_V = irregDuplV "sit" "sat" "sat" ;
+-- sleep_V = irregV "sleep" "slept" "slept" ;
+-- slay_V = irregV "slay" "slew" "slain" ;
+-- slide_V = irregV "slide" "slid" "slid" ;
+-- sling_V = irregV "sling" "slung" "slung" ;
+-- slit_V = irregDuplV "slit" "slit" "slit" ;
+-- smite_V = irregV "smite" "smote" "smitten" ;
+-- sow_V = irregV "sow" "sowed" (variants {"sowed" ; "sown"}) ;
+-- speak_V = irregV "speak" "spoke" "spoken" ;
+-- speed_V = irregV "speed" "sped" "sped" ;
+-- spend_V = irregV "spend" "spent" "spent" ;
+-- spill_V = irregV "spill" (variants {"spilled" ; "spilt"}) (variants {"spilled" ; "spilt"}) ;
+-- spin_V = irregDuplV "spin" "spun" "spun" ;
+-- spit_V = irregDuplV "spit" (variants {"spit" ; "spat"}) "spit" ;
+-- split_V = irregDuplV "split" "split" "split" ;
+-- spread_V = irregV "spread" "spread" "spread" ;
+-- spring_V = irregV "spring" (variants {"sprang" ; "sprung"}) "sprung" ;
+-- stand_V = irregV "stand" "stood" "stood" ;
+-- steal_V = irregV "steal" "stole" "stolen" ;
+-- stick_V = irregV "stick" "stuck" "stuck" ;
+-- sting_V = irregV "sting" "stung" "stung" ;
+-- stink_V = irregV "stink" "stank" "stunk" ;
+-- stride_V = irregV "stride" "strod" "stridden" ;
+-- strike_V = irregV "strike" "struck" "struck" ;
+-- string_V = irregV "string" "strung" "strung" ;
+-- strive_V = irregV "strive" "strove" "striven" ;
+-- swear_V = irregV "swear" "swore" "sworn" ;
+-- sweep_V = irregV "sweep" "swept" "swept" ;
+-- swell_V = irregV "swell" "swelled" (variants {"swelled" ; "swollen"}) ;
+-- swim_V = irregDuplV "swim" "swam" "swum" ;
+-- swing_V = irregV "swing" "swung" "swung" ;
+-- take_V = irregV "take" "took" "taken" ;
+-- teach_V = irregV "teach" "taught" "taught" ;
+-- tear_V = irregV "tear" "tore" "torn" ;
+-- tell_V = irregV "tell" "told" "told" ;
+-- think_V = irregV "think" "thought" "thought" ;
+-- thrive_V = irregV "thrive" (variants {"thrived" ; "throve"}) "thrived" ;
+-- throw_V = irregV "throw" "threw" "thrown" ;
+-- thrust_V = irregV "thrust" "thrust" "thrust" ;
+-- tread_V = irregV "tread" "trod" "trodden" ;
+-- understand_V = irregV "understand" "understood" "understood" ;
+-- uphold_V = irregV "uphold" "upheld" "upheld" ;
+-- upset_V = irregDuplV "upset" "upset" "upset" ;
+-- wake_V = irregV "wake" "woke" "woken" ;
+-- wear_V = irregV "wear" "wore" "worn" ;
+-- weave_V = irregV "weave" (variants {"weaved" ; "wove"}) (variants {"weaved" ; "woven"}) ;
+-- wed_V = irregDuplV "wed" "wed" "wed" ;
+-- weep_V = irregV "weep" "wept" "wept" ;
+-- wind_V = irregV "wind" "wound" "wound" ;
+-- win_V = irregDuplV "win" "won" "won" ;
+-- withhold_V = irregV "withhold" "withheld" "withheld" ;
+-- withstand_V = irregV "withstand" "withstood" "withstood" ;
+-- wring_V = irregV "wring" "wrung" "wrung" ;
+-- write_V = irregV "write" "wrote" "written" ;
+}
diff --git a/next-lib/src/russian/LangRus.gf b/next-lib/src/russian/LangRus.gf
new file mode 100644
index 000000000..c3126dcfe
--- /dev/null
+++ b/next-lib/src/russian/LangRus.gf
@@ -0,0 +1,10 @@
+--# -path=.:../abstract:../common:prelude
+
+concrete LangRus of Lang =
+ GrammarRus,
+ LexiconRus
+ ** {
+
+flags startcat = Phr ; unlexer = text ; lexer = text ; coding=utf8 ;
+
+} ;
diff --git a/next-lib/src/russian/LexiconRus.gf b/next-lib/src/russian/LexiconRus.gf
new file mode 100644
index 000000000..229b07ed1
--- /dev/null
+++ b/next-lib/src/russian/LexiconRus.gf
@@ -0,0 +1,358 @@
+--# -path=.:abstract:common
+concrete LexiconRus of Lexicon = CatRus **
+ open ParadigmsRus, Prelude, StructuralRus, MorphoRus in {
+flags
+ optimize=values ;
+ coding=utf8 ;
+lin
+ add_V3 = mkV3 (regV imperfective first "складыва" "ю" "складывал" "складывай" "складывать" ) "" "в" accusative accusative;
+ airplane_N = mkN "самолёт" ;
+ already_Adv = mkAdv "уже" ;
+ animal_N = mkN "животное" animate;
+ answer_V2S = dirV2 (regV imperfective first "отвеча" "ю" "отвечал" "отвечай" "отвечать" );
+ apartment_N = mkN "квартира" ;
+ apple_N = mkN "яблоко" ;
+ art_N = mkN "искусство" ;
+ ashes_N = mkN "пепел" ;
+ ask_V2Q = dirV2 (regV imperfective first "спрашива" "ю" "спрашивал" "спрашивай" "спрашивать") ;
+ baby_N = mkN "малыш" animate;
+ back_N = mkN "спина" ;
+ bad_A = mkA "плохой" "хуже";
+ bank_N = mkN "банк" ;
+ bark_N = mkN "кора";
+ beautiful_A = mkA "красивый";
+ become_VA = regV perfective second "станов" "лю" "стал" "стань" "стать" ;
+ beer_N = mkN "пиво" ;
+ beg_V2V = dirV2 (mkV imperfective "прошу" "просишь" "просит" "просим" "просите" "просят" "просил" "проси" "просить" );
+ belly_N = mkN "живот" ;
+ big_A = mkA "большой" "больше" ;
+ bike_N = mkN "велосипед" ;
+ bird_N = mkN "птица" animate;
+ bite_V2 = dirV2 (regV imperfective first "куса" "ю" "кусал" "кусай" "кусать");
+ black_A = mkA "чёрный";
+ blood_N = mkN "кровь" ;
+ blow_V = regV imperfective first "ду" "ю" "дул" "дуй" "дуть" ;
+ blue_A = mkA "голубой" ;
+ boat_N = mkN "лодка" ;
+ bone_N = mkN "кость" ;
+ book_N = mkN "книга" ;
+ boot_N = mkN "сапог" ;
+ boss_N = mkN "начальник" animate;
+ boy_N = mkN "мальчик" animate;
+ bread_N = mkN "хлеб" ;
+ break_V2 = dirV2 (regV imperfective first "прерыва" "ю" "прерывал" "прерывай" "прерывать" );
+ breast_N = mkN "грудь" ;
+ breathe_V = regV imperfective second "дыш" "у" "дышал" "дыши" "дышать" ;
+ broad_A = mkA "широкий" "шире";
+ brother_N2 = mkN2 (mkN "брат" animate) ; -- FIXME: special case
+ brown_A = mkA "коричневый";
+ burn_V = regV imperfective second "гор" "ю" "горел" "гори" "гореть" ;
+ butter_N = mkN "масло";
+ buy_V2 = dirV2 (regV imperfective first "покупа" "ю" "покупал" "покупай" "покупать" );
+ camera_N = mkN "фотоаппарат" ;
+ cap_N = mkN "чашка" ; -- vowel change
+ car_N = mkN "машина" ;
+ carpet_N = mkN "ковёр"; -- vowel change
+ cat_N = mkN "кошка" animate ; -- vowel change
+ ceiling_N = mkN "потолок" ; -- vowel change
+ chair_N = mkN "стул" ; -- irregular
+ cheese_N = mkN "сыр" ;
+ child_N = mkN "ребёнок" "ребёнка" "ребёнку" "ребёнка" "ребёнком" "ребёнке" "ребёнке" "дети" "детей" "детям" "детей" "детьми" "детях" masculine animate ;
+ church_N = mkN "церковь" "церкви" "церкви" "церковь" "церковью" "церкви" "церкви" "церкви" "церквей" "церквям" "церкви" "церквями" "церквях" masculine inanimate ;
+ city_N = mkN "город" ;
+ clean_A = mkA "чистый" "чище";
+ clever_A = mkA "умный";
+ close_V2= dirV2 (regV imperfective first "закрыва" "ю" "закрывал" "закрывай" "закрывать" );
+ cloud_N = mkN "облако" ; -- irregular
+ coat_N = mkIndeclinableNoun "пальто" masculine inanimate ;
+ cold_A = mkA "холодный";
+ come_V = regV imperfective first "прихо" "жу" "приходил" "приходи" "приходить" ;
+ computer_N = mkN "компьютер" ;
+ correct_A = mkA "правильный" ;
+ count_V2 = dirV2 (regV imperfective first "счита" "ю" "считал" "считай" "считать" ) ;
+ country_N = mkN "страна" ;
+ cousin_N = mkN "кузен" ; -- FIXME: is this really correct? can't find it in the dictionary
+ cow_N = mkN "корова" animate ;
+ cut_V2 = dirV2 (regV imperfective first "реж" "у" "резал" "режь" "резать" ) ;
+ day_N = mkN "день" "дня" "дню" "день" "днём" "дне" "дне" "дни" "дней" "дням" "дни" "днями" "днях" masculine inanimate ;
+ die_V = regV imperfective first "умира" "ю" "умирал" "умирай" "умирать" ;
+ dig_V = regV imperfective first "копа" "ю" "копал" "копай" "копать" ;
+ dirty_A = mkA "грязный" ;
+ distance_N3 = mkN3 (mkN "расстояние") from_Prep to_Prep ;
+ do_V2 = dirV2 (regV imperfective first "дела" "ю" "делал" "делай" "делать" );
+ doctor_N = mkN "доктор" animate ;
+ dog_N = mkN "собака" animate;
+ door_N = mkN "дверь" ;
+ drink_V2 = dirV2 (regV imperfective firstE "пь" "ю" "пил" "пей" "пить" );
+ dry_A = mkA "сухой" "суше";
+ dull_A = mkA "скучный" ;
+ dust_N = mkN "пыль" ;
+ ear_N = mkN "ухо" ;
+ earth_N = mkN "земля" ;
+ easy_A2V = mkA2 (mkA "лёгкий" "легче") "для" genitive ;
+ eat_V2 = dirV2 (regV imperfective first "куша" "ю" "кушал" "кушай" "кушать" );
+ egg_N = mkN "яйцо" ;
+ empty_A = mkA "пустой" ;
+ enemy_N = mkN "враг" animate ;
+ eye_N = mkN "глаз" ; -- FIXME: Pl -a
+ factory_N = mkN "фабрика" ;
+ fall_V = regV imperfective first "пада" "ю" "падал" "падай" "падать" ;
+ far_Adv = mkAdv "далеко";
+ fat_N = mkN "жир" ;
+ father_N2 = mkN2 (mkN "отец" "отца" "отцу" "отца" "отцом" "отце" "отце" "отцы" "отцов" "отцам" "отцов" "отцами" "отцах" masculine animate);
+ fear_V2 =dirV2 (regV imperfective first "бо" "ю" "боял" "бой" "боять" );
+ fear_VS = regV imperfective second "бо" "ю" "боял" "бой" "боять" ;
+ feather_N = mkN "перо" "пера" "перу" "пера" "пером" "пере" "пере" "перья" "перьев" "перьям" "перьев" "перьями" "перьях" neuter inanimate ;
+ fight_V2 = dirV2 (regV imperfective firstE "дер" "у" "драл" "дери" "драть" ) ;
+ find_V2 = dirV2 (mkV imperfective "нахожу" "находишь" "находит" "находим" "находите" "находят" "находил" "находи" "находить" );
+ fingernail_N = mkN "ноготь" "ногтя" "ногтю" "ногтя" "ногтем" "ногте" "ногте" "ногти" "ногтей" "ногтям" "ногтей" "ногтями" "ногтях" masculine inanimate ;
+ fire_N = mkN "огонь" "огня" "огню" "огня" "огнём" "огне" "огне" "огни" "огней" "огням" "огней" "огнями" "огнях" masculine inanimate ;
+ fish_N = mkN "рыба" animate;
+ float_V = regV imperfective firstE "плыв" "у" "плыл" "плыви" "плыть" ;
+ floor_N = mkN "пол" ;
+ flow_V = regV imperfective firstE "тек" "у" "тёк" "теки" "течь" ;
+ flower_N = mkN "цветок";
+ fly_V = regV imperfective second "лета" "ю" "летал" "летай" "летать" ;
+ fog_N = mkN "туман" ;
+ foot_N = mkN "ступня" ;
+ forest_N = mkN "лес" ; -- prepos -u
+ forget_V2= dirV2 (regV imperfective first "забыва" "ю" "забывал" "забывай" "забывать" );
+ freeze_V = regV imperfective first "замерза" "ю" "замерзал" "замерзай" "замерзать" ;
+ fridge_N = mkN "холодильник" ;
+ friend_N = mkN "друг" "друга" "другу" "друга" "другом" "друге" "друге" "друзья" "друзей" "друзьям" "друзей" "дузьями" "друзьях" masculine animate ;
+ fruit_N = mkN "фрукт" ;
+ full_A = mkA "полный";
+ fun_AV = mkA "весёлый";
+ garden_N = mkN "сад" ;
+ girl_N = mkN "девочка" animate; -- vowel change
+ give_V3 = tvDirDir (regV imperfective firstE "да" "ю" "давал" "давай" "давать" ) ;
+ glove_N = mkN "перчатка" ; -- vowel change
+ go_V= regV imperfective second "хо" "жу" "ходил" "ходи" "ходить" ;
+ gold_N = mkN "золото" ;
+ good_A = mkA "хороший" "лучше" ;
+ grammar_N = mkN "грамматикa";
+ grass_N = mkN "трава";
+ green_A = mkA "зелёный" ;
+ guts_N = mkN "внутренность" ;
+ hair_N = mkN "волос" ; -- FIXME: always plural?
+ hand_N = mkN "рука" ;
+ harbour_N = mkN "порт" ; -- prepos -u
+ hat_N = mkN "шляпа" ;
+ hate_V2= dirV2 (regV imperfective second "ненави" "жу" "ненавидел" "ненавидь" "ненавидеть" );
+ have_V2= dirV2 (regV imperfective first "име" "ю" "имел" "имей" "иметь" );
+ head_N = mkN "голова" ;
+ hear_V2= dirV2 (regV imperfective first "слуша" "ю" "слушал" "слушай" "слушать" );
+ heart_N = mkN "сердце" "сердца" "сердцу" "сердца" "сердцем" "сердце" "сердце" "сердца" "сердец" "сердцам" "сердец" "сердцами" "сердцах" neuter inanimate ;
+ heavy_A = mkA "тяжёлый" ;
+ hill_N = mkN "холм" ;
+ hit_V2 = dirV2 (regV imperfective first "ударя" "ю" "ударял" "ударяй" "ударять" );
+ hold_V2 = dirV2 (regV imperfective second "держ" "у" "держал" "держи" "держать" );
+ hope_VS= regV imperfective first "наде" "ю" "надеял" "надей" "надеять" ;
+ horn_N = mkN "рог" ;
+ horse_N = mkN "лошадь" animate; -- irregular
+ hot_A = mkA "горячий" ;
+ house_N = mkN "дом" ;
+ hunt_V2 = dirV2 (regV imperfective second "охоч" "у" "охотил" "охоть" "охотить" ) ;
+ husband_N = mkN "муж" "мужа" "мужу" "мужа" "мужем" "муже" "муже" "мужья" "мужей" "мужьям" "мужей" "мужьями" "мужьях" masculine animate ;
+ ice_N = mkN "лёд" "льда" "льду" "льда" "льдом" "льде" "льде" "льды" "льдов" "льдам" "льдов" "льдами" "льдах" masculine inanimate ;
+ important_A = mkA "важный" ;
+ industry_N = mkN "промышленность" ;
+ iron_N = mkN "железо" ;
+ john_PN = mkPN "Иван" Masc Animate ;
+ jump_V = regV imperfective first "прыга" "ю" "прыгал" "прыгай" "прыгать" ;
+ kill_V2 = dirV2 (regV imperfective first "убива" "ю" "убивал" "убивай" "убивать" ) ;
+ king_N = mkN "король" "короля" "королю" "короля" "королем" "короле" "короле" "короли" "королей" "королям" "королей" "королями" "королях" masculine animate ;
+ knee_N = mkN "колено" "колена" "колену" "колена" "коленом" "колене" "колене" "колени" "колен" "коленам" "колен" "коленями" "коленях" neuter inanimate ;
+ know_V2= dirV2 (regV imperfective first "зна" "ю" "знал" "знай" "знать" );
+ lake_N = mkN "озеро" ; -- gen pl "озёр"
+ lamp_N = mkN "лампа" ;
+ language_N = mkN "язык" ;
+ laugh_V = regV imperfective firstE "сме" "ю" "смеял" "смей" "смеять" ;
+ leaf_N = mkN "лист" ; -- irregular pl
+ learn_V2= dirV2 (regV imperfective second "уч" "у" "учил" "учи" "учить" );
+ leather_N = mkN "кожа" ;
+ leave_V2= dirV2 (regV imperfective second "ухож" "у" "уходил" "уходи" "уходить" );
+ left_Ord = (uy_j_EndDecl "лев" ) ** {lock_A = <>};
+ leg_N = mkN "нога" ;
+ lie_V = regV imperfective firstE "лг" "у" "лгал" "лги" "лгать" ;
+ like_V2= dirV2 (regV imperfective second "нрав" "лю" "нравил" "нравь" "нравить" );
+ listen_V2= dirV2 (regV imperfective first "слуша" "ю" "слушал" "слушай" "слушать" );
+ live_V= regV imperfective firstE "жив" "у" "жил" "живи" "жить" ;
+ liver_N = mkN "печень" ;
+ long_A = mkA "длинный" ;
+ lose_V2 = dirV2 (regV imperfective first "теря" "ю" "терял" "теряй" "терять" );
+ louse_N = mkN "вошь" "вши" "вши" "вошь" "вошью" "вше" "вше" "вши" "вшей" "вшам" "вшей" "вшами" "вшах" feminine animate ;
+ love_N = mkN "любовь" ; -- vowel change
+ love_V2= dirV2 (regV imperfective second "люб" "лю" "любил" "люби" "любить" );
+ man_N = mkN "человек" ; -- null gen pl
+ married_A2 = mkA2 (mkA "замужем") "за" instructive ;
+ meat_N = mkN "мясо" ;
+ milk_N = mkN "молоко" ;
+ moon_N = mkN "луна" ;
+ mother_N2 = mkN2 (mkN "мать" "матери" "матери" "мать" "матерью" "матери" "матери" "матери" "матерей" "матерям" "матерей" "матерями" "матерях" feminine animate) ;
+ mountain_N = mkN "гора" ;
+ mouth_N = mkN "рот" "рта" "рту" "рот" "ртом" "рте" "рте" "рты" "ртов" "ртам" "рты" "ртами" "ртах" masculine inanimate ;
+ music_N = mkN "музыка" ;
+ name_N = mkN "имя" ;
+ narrow_A = mkA "узкий" "уже" ;
+ near_A = mkA "близкий" "ближе";
+ neck_N = mkN "шея" ;
+ new_A = mkA "новый" ;
+ newspaper_N = mkN "газета" ;
+ night_N = mkN "ночь" ;
+ nose_N = mkN "нос" ;
+ now_Adv = mkAdv "сейчас" ;
+ number_N = mkN "число" ; -- gen pl "чисел"
+ oil_N = mkN "нефть" ;
+ old_A = mkA "старый" "старше" ;
+ open_V2= dirV2 (regV imperfective first "открыва" "ю" "открывал" "открывай" "открывать" );
+--- organise_V2 = dirV2 (regV imperfective foreign "организу" "ю" "организовал" "организуй" "организовать" ); -- +++ MG_UR: added +++
+ paint_V2A = dirV2 (regV imperfective first "рису" "ю" "рисовал" "рисуй" "рисовать" ) ;
+--- palace_N = nDvorec "двор" ; -- +++ MG_UR: added +++
+ paper_N = mkN "бумага" ;
+ paris_PN = mkPN "Париж" Masc Inanimate ;
+ peace_N = mkN "мир" ;
+ pen_N = mkN "ручка" ;
+ person_N = mkN "лицo" animate ; -- irregular
+ planet_N = mkN "планета" ;
+ plastic_N = mkN "пластмасса" ;
+ play_V = regV imperfective first "игра" "ю" "играл" "играй" "играть" ;
+ play_V2 = mkV2 (regV imperfective first "игра" "ю" "играл" "играй" "играть" ) "c" instructive;
+ policeman_N = mkN "милиционер" animate ;
+ priest_N = mkN "священник" animate;
+ probable_AS = mkA "возможный" ;
+ pull_V2 = dirV2 (regV imperfective first "тян" "у" "тянул" "тяни" "тянуть" ) ;
+ push_V2 = dirV2 (regV imperfective first "толка" "ю" "толкал" "толкай" "толкать" );
+ put_V2 = dirV2 (regV imperfective firstE "клад" "у" "клал" "клади" "класть" );
+ queen_N = mkN "королева" animate ;
+ question_N = mkN "вопрос" ;
+ radio_N = mkIndeclinableNoun "радио" neuter inanimate;
+ rain_N = mkN "дождь" ;
+ rain_V0 = idetDozhd verbIdti; -- No such verb in Russian!
+ read_V2 = dirV2 (regV imperfective first "чита" "ю" "читал" "читай" "читать" );
+-- ready_A = ;
+ reason_N = mkN "причина";
+ red_A = mkA "красный" ;
+ religion_N = mkN "религия" ;
+ restaurant_N = mkN "ресторан" ;
+ right_Ord = (uy_j_EndDecl "прав") ** {lock_A = <>} ;
+ river_N = mkN "рекa" ;
+ road_N = mkN "дорогa" ;
+ rock_N = mkN "камень" ;
+ roof_N = mkN "крыша" ;
+ root_N = mkN "корень" ;
+ rope_N = mkN "верёвка" ;
+ rotten_A = mkA "гнилой";
+ round_A = mkA "круглый";
+ rub_V2 = dirV2 (regV imperfective firstE "тр" "у" "тёр" "три" "тереть" );
+ rubber_N = mkN "резина" ;
+ rule_N = mkN "правило" ;
+ run_V = regV imperfective first "бега" "ю" "бегал" "бегай" "бегать" ;
+ salt_N = mkN "соль" ;
+ sand_N = mkN "песок" "песка" "песку" "песок" "песком" "песке" "песке" "пески" "песков" "пескам" "песков" "песками" "песках" masculine inanimate ;
+ say_VS = regV imperfective second "говор" "ю" "говорил" "говори" "говорить" ;
+ school_N = mkN "школа" ;
+ science_N = mkN "наука" ;
+ scratch_V2 = dirV2 (regV imperfective first "чеш" "у" "чесал" "чеши" "чесать" ) ;
+ sea_N = mkN "море" ;
+ see_V2 = dirV2 (regV imperfective second "ви" "жу" "видел" "видь" "видеть" );
+ seed_N = mkN "семя";
+ seek_V2 = dirV2 (regV imperfective first "ищ" "у" "искал" "ищи" "искать" );
+ sell_V3 = tvDirDir (regV imperfective firstE "прода" "ю" "продавал" "продавай" "продавать" );
+ send_V3 = tvDirDir (regV imperfective first "посыла" "ю" "посылал" "посылай" "посылать" );
+ sew_V = regV imperfective firstE "шь" "ю" "шил" "шей" "шить" ;
+ sharp_A = mkA "острый";
+ sheep_N = mkN "овца" animate ;
+ ship_N = mkN "корабль" ;
+ shirt_N = mkN "рубашка" ;
+ shoe_N = mkN "туфля" "туфли" "туфле" "туфлю" "туфлей" "туфле" "туфле" "туфли" "туфель" "туфлям" "туфли" "туфлями" "туфлях" masculine inanimate ;
+ shop_N = mkN "магазин" ;
+ short_A = mkA "короткий" "короче" ;
+ silver_N = mkN "серебро" ;
+ sing_V = regV imperfective firstE "по" "ю" "пел" "пой" "петь" ;
+ sister_N = mkN "сестра" animate ;
+ sit_V = mkV imperfective "сижу" "сидишь" "сидит" "сидим" "сидите" "сидят" "сидел" "сиди" "сидеть" ;
+ skin_N = mkN "кожа" ;
+ sky_N = mkN "небо" "неба" "небу" "небо" "небом" "небе" "небе" "небеса" "небес" "небесам" "небес" "небесами" "небесах" neuter inanimate ;
+ sleep_V = regV imperfective second "сп" "лю" "спал" "спи" "спать" ;
+ small_A = mkA "маленький" "меньше" ;
+ smell_V = regV imperfective first "пахн" "у" "пахнул" "пахни" "пахнуть" ;
+ smoke_N = mkN "дым" ;
+ smooth_A = mkA "гладкий" "глаже";
+ snake_N = mkN "змея" animate ;
+ snow_N = mkN "снег" ;
+ sock_N = mkN "носок" ;
+ song_N = mkN "песня" ;
+ speak_V2 = mkV2 (regV imperfective secondA "говор" "ю" "говорил" "говори" "говорить")
+ "на" prepositional ;
+ spit_V = regV imperfective firstE "плю" "ю" "плевал" "плюй" "плевать" ;
+ split_V2 = dirV2 (regV imperfective first "разбива" "ю" "разбивал" "разбей" "разбивать" ) ;
+ squeeze_V2 = dirV2 (regV imperfective first "сжима" "ю" "сжимал" "сжимай" "сжимать" ) ;
+ stab_V2 = dirV2 (regV imperfective first "кол" "ю" "колол" "коли" "колоть" ) ;
+ stand_V = regV imperfective second "сто" "ю" "стоял" "стой" "стоять" ;
+ star_N = mkN "звезда" ;
+ steel_N = mkN "сталь" ;
+ stick_N = mkN "палка" ;
+ stone_N = mkN "камень" ;
+ stop_V = regV imperfective first "останавлива" "ю" "останавливал" "останавливай" "останавливать";
+ stove_N = mkN "печь" ;
+ straight_A = mkA "прямой" ;
+ student_N = mkN "студент" animate ;
+ stupid_A = mkA "тупой" "тупее" ;
+ suck_V2 = dirV2 (regV imperfective firstE "сос" "у" "сосал" "соси" "сосать") ;
+ sun_N = mkN "солнце" "солнца" "солнцу" "солнце" "солнцем" "солнце" "солнце" "солнца" "солнц" "солнцам" "солнца" "солнцами" "солнцах" neuter inanimate ;
+ swell_V = regV imperfective first "опуха" "ю" "опухал" "опухай" "опухать" ;
+ swim_V = regV imperfective first "плава" "ю" "плавал" "плавай" "плавать" ;
+ switch8off_V2 = dirV2 (regV imperfective first "выключа" "ю" "выключал" "выключай" "выключать") ;
+ switch8on_V2 = dirV2 (regV imperfective first "включа" "ю" "включал" "включай" "включать") ;
+ table_N = mkN "стол" ;
+ tail_N = mkN "хвост" ;
+ talk_V3 = mkV3 (regV imperfective second "говор" "ю" "говорил" "говори" "говорить" ) "с" "о" instructive prepositional;
+ teach_V2 = dirV2 (regV imperfective second "уч" "у" "учил" "учи" "учить" );
+ teacher_N = mkN "учитель" animate ;
+ television_N = mkN "телевидение" ; -- FIXME: televizor?
+ thick_A = mkA "толстый" "толще" ;
+ thin_A = mkA "тонкий" "тоньше" ;
+ think_V = regV imperfective first "дума" "ю" "думал" "думай" "думать" ;
+ throw_V2 = dirV2 (regV imperfective first "броса" "ю" "бросал" "бросай" "бросать" ) ;
+ tie_V2 = dirV2 (regV imperfective first "вяж" "у" "вязал" "вяжи" "вязать") ;
+-- today_Adv = ;
+ tongue_N = mkN "язык" ;
+ tooth_N = mkN "зуб" ;
+ train_N = mkN "поезд" ;
+ travel_V = regV imperfective first "путешеству" "ю" "путешествовал" "путешествуй" "путешествовать" ;
+ tree_N = mkN "дерево" ; -- irregular
+ turn_V = regV imperfective first "поворачива" "ю" "поворачивал" "поворачивай" "поворачивать" ;
+ ugly_A = mkA "некрасивый" ;
+-- uncertain_A = ;
+ understand_V2 = dirV2 (regV imperfective first "понима" "ю" "понимал" "понимай" "понимать" );
+ university_N = mkN "университет" ;
+ village_N = mkN "деревня" ;
+ vomit_V = regV imperfective firstE "рв" "у" "рвал" "рви" "рвать" ;
+ wait_V2 = dirV2 (regV imperfective firstE "жд" "у" "ждал" "жди" "ждать" );
+ walk_V = regV imperfective first "гуля" "ю" "гулял" "гуляй" "гулять" ;
+--- want_V2 = dirV2 (regV imperfective mixed "хо" "чу" "хотел" "хоти" "хотеть" );
+ war_N = mkN "война" ;
+ warm_A = mkA "тёплый" ;
+ wash_V2 = dirV2 (regV imperfective first "мо" "ю" "мыл" "мой" "мыть" ) ;
+ watch_V2 = dirV2 (regV imperfective second "смотр" "ю" "смотрел" "смотри" "смотреть" );
+ water_N = mkN "вода" ;
+ wet_A = mkA "мокрый" ;
+ white_A = mkA "белый" ;
+ wide_A = mkA "широкий" "шире";
+ wife_N = mkN "жена" animate ;
+ win_V2 = dirV2 (regV imperfective first "выигрыва" "ю" "выигрывал" "выигрывай" "выигрывать" );
+ wind_N = mkN "ветер" "ветра" "ветру" "ветер" "ветром" "ветра" "ветра" "ветров" "ветра" "ветрам" "ветров" "ветрами" "ветрах" masculine inanimate ;
+ window_N = mkN "окно" ; -- "окон"
+ wine_N = mkN "вино" ;
+ wing_N = mkN "крыло" ; -- pl крылья крыльев etc
+ wipe_V2 = dirV2 (regV imperfective first "вытира" "ю" "вытирал" "вытирай" "вытирать" );
+ woman_N = mkN "женщина" ;
+ wonder_VQ = regV imperfective first "интересу" "ю" "интересовал" "интересуй" "интересовать";
+ wood_N = mkN "дерево" ;
+ worm_N = mkN "черв" ;
+ write_V2 = dirV2 (regV imperfective first "пиш" "у" "писал" "пиши" "писать" );
+ year_N = mkN "годь" ;
+ yellow_A = mkA "жёлтый" ;
+ young_A = mkA "молодой" "моложе";
+}
diff --git a/next-lib/src/russian/MorphoRus.gf b/next-lib/src/russian/MorphoRus.gf
new file mode 100644
index 000000000..15a497dd1
--- /dev/null
+++ b/next-lib/src/russian/MorphoRus.gf
@@ -0,0 +1,1315 @@
+--# -path=.:../../prelude:../common
+
+--1 A Simple Russian Resource Morphology
+
+-- Aarne Ranta, Janna Khegai 2006
+
+-- This resource morphology contains definitions of the lexical entries
+-- needed in the resource syntax.
+-- It moreover contains copies of the most usual inflectional patterns.
+
+-- We use the parameter types and word classes defined for morphology.
+
+resource MorphoRus = ResRus ** open Prelude in {
+
+flags coding=utf8 ;
+
+----2 Personal (together with possesive) pronouns.
+
+oper pronYa : Pronoun =
+ let nonPoss = { s = table { Nom => "я" ;
+ Gen => "меня" ;
+ Dat => "мне" ;
+ Acc => "меня" ;
+ Inst => "мной" ;
+ Prepos _ => "мне" } }
+ in pronYaTu nonPoss "мо" P1 ;
+
+oper pronTu : Pronoun =
+ let nonPoss = { s = table { Nom => "ты" ;
+ Gen => "тебя" ;
+ Dat => "тебе" ;
+ Acc => "тебя" ;
+ Inst => "тобой" ;
+ Prepos _ => "тебе" } }
+ in pronYaTu nonPoss "тво" P2 ;
+
+-- Pronouns ya, tu, svoj
+oper pronYaTu : { s : Case => Str } -> Str -> Person -> Pronoun =
+ \nonPoss, mo, pers ->
+ { s = table {
+ PF c _ NonPoss => nonPoss.s!c ;
+ PF c _ (Poss gn) => case <c, gn> of {
+ <Nom, ASg Neut > => mo + "ё" ;
+ <Nom, ASg Masc > => mo + "й" ;
+ <Gen, ASg (Masc | Neut)> => mo + "его" ;
+ <Dat, ASg (Masc | Neut)> => mo + "ему" ;
+ <Acc, ASg (Masc | Neut)> => mo + "его" ;
+ <Inst, ASg (Masc | Neut)> => mo + "им" ;
+ <Prepos _, ASg (Masc | Neut)> => mo + "ём" ;
+
+ <Nom, ASg Fem> => mo + "я" ;
+ <Gen, ASg Fem> => mo + "ей" ;
+ <Dat, ASg Fem> => mo + "ей" ;
+ <Acc, ASg Fem> => mo + "ю" ;
+ <Inst, ASg Fem> => mo + "ей" ;
+ <Prepos _, ASg Fem> => mo + "ей" ;
+
+ <Nom, APl> => mo + "и" ;
+ <Gen, APl> => mo + "их" ;
+ <Dat, APl> => mo + "им" ;
+ <Acc, APl> => mo + "их" ;
+ <Inst, APl> => mo + "им" ;
+ <Prepos _, APl> => mo + "их"
+
+ }
+ } ;
+ g = PNoGen ; n = Sg ; p = pers ; pron = True
+ } ;
+
+oper pronNAfterPrep : Pronoun -> Pronoun = \p ->
+ { s = table {
+ PF c Yes NonPoss => case p.s!(PF c No NonPoss) of {
+ x@(("е"|"ё"|"и")+_) => "н"+x;
+ x => x };
+ pf => p.s!pf };
+ g = p.g ; n = p.n ; p = p.p ; pron = p.pron
+ } ;
+
+oper pronOn : Pronoun = pronNAfterPrep
+ { s = table {
+ PF _ _ (Poss _) => "его" ;
+ PF Nom _ _ => "он" ;
+ PF (Gen|Acc) _ _ => "его" ;
+ PF Dat _ _ => "ему" ;
+ PF Inst _ _ => "им" ;
+ PF (Prepos _) _ _ => "ём"
+ } ;
+ g = PGen Masc ; n = Sg ; p = P3 ; pron = True
+ } ;
+
+oper pronOna : Pronoun = pronNAfterPrep
+ { s = table {
+ PF _ _ (Poss _ ) => "её" ;
+ PF Nom _ NonPoss => "она" ;
+ PF (Gen|Acc) _ _ => "её" ;
+ PF (Dat|Inst|Prepos _) _ _ => "ей"
+ } ;
+ g = PGen Fem ; n = Sg ; p = P3 ; pron = True
+ } ;
+
+oper pronOno: Pronoun =
+ { s = table {
+ PF Nom _ NonPoss => "оно" ;
+ pf => pronOn.s!pf
+ } ;
+ g = PGen Neut ; n = Sg ; p = P3 ; pron = True
+ } ;
+
+oper pronMuVu : Str -> Str -> Person -> Pronoun =
+ \mu,na,pers ->
+ { s = table {
+ PF Nom _ NonPoss => mu ;
+ PF Gen _ NonPoss => na + "с" ;
+ PF Dat _ NonPoss => na + "м" ;
+ PF Acc _ NonPoss => na + "с" ;
+ PF Inst _ NonPoss => na + "ми" ;
+ PF (Prepos _) _ NonPoss => na + "с" ;
+
+ PF Nom _ (Poss (ASg Masc)) => na + "ш" ;
+ PF Nom _ (Poss (ASg Neut)) => na + "ше" ;
+ PF Gen _ (Poss (ASg (Masc | Neut))) => na + "шего" ;
+ PF Dat _ (Poss (ASg (Masc | Neut))) => na + "шему" ;
+ PF Acc _ (Poss (ASg (Masc | Neut))) => na + "шего" ;
+ PF Inst _ (Poss (ASg (Masc | Neut))) => na + "шим" ;
+ PF (Prepos _) _ (Poss (ASg (Masc | Neut))) => na + "шем" ;
+
+ PF Nom _ (Poss (ASg Fem)) => na + "ша" ;
+ PF Gen _ (Poss (ASg Fem)) => na + "шей" ;
+ PF Dat _ (Poss (ASg Fem)) => na + "шей" ;
+ PF Acc _ (Poss (ASg Fem)) => na + "шу" ;
+ PF Inst _ (Poss (ASg Fem)) => na + "шею" ;
+ PF (Prepos _) _ (Poss (ASg Fem)) => na + "шей" ;
+
+ PF Nom _ (Poss APl) => na + "ши" ;
+ PF Gen _ (Poss APl) => na + "ших" ;
+ PF Dat _ (Poss APl) => na + "шим" ;
+ PF Acc _ (Poss APl) => na + "ших" ;
+ PF Inst _ (Poss APl) => na + "шими" ;
+ PF (Prepos _) _ (Poss APl) => na + "ших"
+ };
+ g = PNoGen ; n = Pl ; p = pers ; pron = True
+ } ;
+
+oper pronMu: Pronoun = pronMuVu "мы" "на" P1;
+
+oper pronVu: Pronoun = pronMuVu "вы" "ва" P2;
+
+oper pronOni: Pronoun = pronNAfterPrep
+ { s = table {
+ PF _ _ (Poss _) => "их" ;
+ PF Nom _ _ => "они" ;
+ PF Dat _ _ => "им" ;
+ PF (Gen|Acc|Prepos _) _ _ => "их" ;
+ PF Inst _ _ => "ими"
+ } ;
+ g = PNoGen ; n = Pl ; p = P3 ; pron = True
+ } ;
+
+oper pronKto: Pronoun =
+ { s = table {
+ PF Nom _ _ => "кто" ;
+ PF Gen _ _ => "кого" ;
+ PF Dat _ _ => "кому" ;
+ PF Acc _ _ => "кого" ;
+ PF Inst _ _ => "кем" ;
+ PF (Prepos _) _ _ => "ком"
+ } ;
+ g = PGen Masc;
+ n = Sg ;
+ p = P3 ;
+ pron = False
+ } ;
+
+oper pronChto: Pronoun =
+ { s = table {
+ PF Nom _ _ => "что" ;
+ PF Gen _ _ => "чего" ;
+ PF Dat _ _ => "чему" ;
+ PF Acc _ _ => "что" ;
+ PF Inst _ _ => "чем" ;
+ PF (Prepos _) _ _ => "чём"
+ } ;
+ g = PGen Masc;
+ n = Sg ;
+ p = P3 ;
+ pron = False
+ } ;
+
+oper pron_add_to : Pronoun -> Pronoun = \p ->
+ { s = \\pf => (p.s!pf) + "-то" ;
+ g = p.g ;
+ n = p.n ;
+ p = p.p ;
+ pron = p.pron
+ } ;
+
+oper pronKtoTo : Pronoun = pron_add_to pronKto ;
+
+oper pronChtoTo: Pronoun = pron_add_to pronChto ;
+
+oper pronEti: Pronoun =
+ { s = table {
+ PF Nom _ _ => "эти" ;
+ PF Gen _ _ => "этих" ;
+ PF Dat _ _ => "этим" ;
+ PF Acc _ _ => "этих" ;
+ PF Inst _ _ => "этими" ;
+ PF (Prepos _) _ _ => "этих"
+ } ;
+ n = Pl;
+ p = P3;
+ g= PGen Fem ;
+ anim = Animate ;
+ pron = False
+ } ;
+
+oper pronTe: Pronoun =
+ { s = table {
+ PF Nom _ _ => "те" ;
+ PF Gen _ _ => "тех" ;
+ PF Dat _ _ => "тем" ;
+ PF Acc _ _ => "тех" ;
+ PF Inst _ _ => "теми" ;
+ PF (Prepos _) _ _ => "тех"
+ } ;
+ n = Pl;
+ p = P3;
+ g=PGen Fem ;
+ anim = Animate ;
+ pron = False
+ } ;
+
+
+--oper pronNikto: Pronoun =
+-- { s = table {
+-- PF Nom _ _ => "никто" ;
+-- PF Gen _ _ => "никого" ;
+-- PF Dat _ _ => "никому" ;
+-- PF Acc _ _ => "никого" ;
+-- PF Inst _ _ => "никем" ;
+-- PF (Prepos _) _ _ => ["ни о ком"] -- only together with a preposition;
+-- } ;
+-- g = PGen Masc;
+-- n = Sg ;
+-- p = P3 ;
+-- pron = False
+-- } ;
+--
+--oper pronNichto: Pronoun =
+-- { s = table {
+-- PF Nom _ _ => "ничто" ;
+-- PF Gen _ _ => "ничего" ;
+-- PF Dat _ _ => "ничему" ;
+-- PF Acc _ _ => "ничего" ;
+-- PF Inst _ _ => "ничем" ;
+-- PF (Prepos _) _ _ => ["ни о чём"] -- only together with preposition;
+-- } ;
+-- g = PGen Masc;
+-- n = Sg ;
+-- p = P3 ;
+-- pron = False
+-- } ;
+--
+
+oper pronVseInanimate: Pronoun =
+ { s = table {
+ PF Nom _ _ => "всё" ;
+ PF Gen _ _ => "всего" ;
+ PF Dat _ _ => "всему" ;
+ PF Acc _ _ => "всё" ;
+ PF Inst _ _ => "всем" ;
+ PF (Prepos _) _ _ => "всём"
+ } ;
+ g = PGen Neut;
+ n = Sg ;
+ p = P3 ;
+ pron = False
+ } ;
+
+
+
+----2 Nouns
+--
+---- Help type SubstFormDecl is introduced to reduce repetition in
+---- the declination definitions. It allows us to define a declination type,
+---- namely, the String component "s" of the CommNoun type
+---- without any reference to the Gender parameter "g".
+--
+
+{-
+
+Paradigms:
+1. hard regular
+ Masc -Consonant
+ Neut -o
+ Fem -a
+1*. with vowel changes, Masc in Gen Sg, Fem and Neut in Gen Pl
+2. soft regular:
+ Masc -ь
+ Neut -е
+ Fem -я
+2*. with vowel changes, Masc in Gen Sg, Fem in Gen Pl (no Neut)
+3. stem ending in г, к, х
+ - Masc, Fem same as 1 but use и instead of ы (Nom/Acc Pl, Gen Sg)
+ - Neut -кo has Nom Pl -ки instead of -кa
+3* with vowel changes, Masc in Gen Sg, Fem and Neut in Gen Pl
+4. stem ending in ш, ж, ч, щ, hard endings,
+ use и instead of ы, and use е instead of unstressed o
+5. stem ending in ц, hard endings, use е instead of unstressed o
+5*. with vowel changes, Masc in Gen Sg, Fem and Neut in Gen Pl
+6. Masc ending in -й, Fem stem ending in vowel, Neut ending in ь?
+6* with vowel changes
+7. stem ending in и
+8. F2, Fem ending in -ь
+ all -чь, -щь, -шь, -жь
+ all -пь, -энь, -мь, -фь,
+ most -дь, -ть, -сть, -сь, -вь, -бь,
+8*. with vowel changes in Ins Sg, Gen Sg
+9. Neut ending in -мя
+10. Masc in -oнoк
+11. Masc in -aнин
+12. Nom Pl in -ья
+
+-}
+
+
+ oper iAfter : Str -> Str = \stem ->
+ case stem of {
+ _ + ("г"|"к"|"х") => "и" ;
+ _ + ("ш"|"ж"|"ч"|"щ") => "и" ;
+ _ => "ы"
+ };
+
+ oper oAfter : Str -> Str = \stem ->
+ case stem of {
+ _ + ("ш"|"ж"|"ч"|"щ") => "е" ;
+ _ + "ц" => "е" ;
+ _ => "о"
+ };
+
+ -- 1. Hard regular masculine inanimate, e.g. spor.
+ -- 3. stem ending in г, к, х
+ -- 4. stem ending in ш, ж, ч, щ
+ -- 5. stem ending in ц
+ oper nRegHardMasc : Str ->CommNoun= \stem ->
+ let i = iAfter stem in
+ let o = oAfter stem in
+ { s = table {
+ SF Sg Nom => stem ;
+ SF Sg Gen => stem+"а" ;
+ SF Sg Dat => stem+"у" ;
+ SF Sg Acc => stem ;
+ SF Sg Inst => stem+o+"м" ;
+ SF Sg (Prepos _) => stem+"е" ;
+ SF Pl Nom => stem+i ;
+ SF Pl Gen => stem+case stem of { _+("ш"|"ж"|"ч"|"щ") => "ей"; _ => "ов" } ;
+ SF Pl Dat => stem+"ам" ;
+ SF Pl Acc => stem+i ;
+ SF Pl Inst => stem+"ами" ;
+ SF Pl (Prepos _) => stem+"ах" };
+ g = Masc; anim = Inanimate };
+
+ -- 1. Hard regular neuter inanimate, e.g. pravilo.
+ -- 3. stem ending in г, к, х
+ -- 4. stem ending in ш, ж, ч, щ
+ -- 5. stem ending in ц
+ oper nRegHardNeut : Str ->CommNoun= \stem ->
+ let o = oAfter stem in
+ { s = table {
+ SF Sg Nom => stem+o ;
+ SF Sg Gen => stem+"а" ;
+ SF Sg Dat => stem+"у" ;
+ SF Sg Acc => stem+o ;
+ SF Sg Inst => stem+o+"м" ;
+ SF Sg (Prepos _) => stem+"е" ;
+ SF Pl Nom => stem+case stem of { _+"к" => "и" ; _ => "а" } ;
+ SF Pl Gen => stem ;
+ SF Pl Dat => stem+"ам" ;
+ SF Pl Acc => stem+"а" ;
+ SF Pl Inst => stem+"ами" ;
+ SF Pl (Prepos _) => stem+"ах" };
+ g = Neut; anim = Inanimate };
+
+ -- 1. Hard regular feminine inanimate, e.g. karta.
+ -- 3. stem ending in г, к, х
+ -- 4. stem ending in ш, ж, ч, щ
+ -- 5. stem ending in ц
+ oper nRegHardFem : Str ->CommNoun= \stem ->
+ let i = iAfter stem in
+ let o = oAfter stem in
+ { s = table {
+ SF Sg Nom => stem+"а" ;
+ SF Sg Gen => stem+i ;
+ SF Sg Dat => stem+"е" ;
+ SF Sg Acc => stem+"у" ;
+ SF Sg Inst => stem+o+"й" ;
+ SF Sg (Prepos _) => stem+"е" ;
+ SF Pl Nom => stem+i ;
+ SF Pl Gen => stem ;
+ SF Pl Dat => stem+"ам" ;
+ SF Pl Acc => stem+i ;
+ SF Pl Inst => stem+"ами" ;
+ SF Pl (Prepos _) => stem+"ах" };
+ g = Fem; anim = Inanimate };
+
+ -- 2. Soft regular masculine inanimate, e.g. vichr'
+ oper nRegSoftMasc : Str ->CommNoun= \stem ->
+ { s = table {
+ SF Sg Nom => stem+"ь";
+ SF Sg Gen => stem+"я" ;
+ SF Sg Dat => stem+"ю" ;
+ SF Sg Acc => stem+"ь" ;
+ SF Sg Inst => stem+"ем" ;
+ SF Sg (Prepos _) => stem+"е" ;
+ SF Pl Nom => stem+"и" ;
+ SF Pl Gen => stem+"ей" ;
+ SF Pl Dat => stem+"ям" ;
+ SF Pl Acc => stem+"и" ;
+ SF Pl Inst => stem+"ями" ;
+ SF Pl (Prepos _) => stem+"ях" };
+ g = Masc; anim = Inanimate };
+
+ -- 2. Soft regular neuter inanimate, e.g. more
+ oper nRegSoftNeut : Str ->CommNoun= \stem ->
+ { s = table {
+ SF Sg Nom => stem+"е";
+ SF Sg Gen => stem+"я" ;
+ SF Sg Dat => stem+"ю" ;
+ SF Sg Acc => stem+"е" ;
+ SF Sg Inst => stem+"ем" ;
+ SF Sg (Prepos _) => stem+"е" ;
+ SF Pl Nom => stem+"я" ;
+ SF Pl Gen => stem+"ей" ;
+ SF Pl Dat => stem+"ям" ;
+ SF Pl Acc => stem+"я" ;
+ SF Pl Inst => stem+"ями" ;
+ SF Pl (Prepos _) => stem+"ях" };
+ g = Neut; anim = Inanimate };
+
+ -- 2. Soft regular feminine inanimate, e.g. burya
+ oper nRegSoftFem : Str ->CommNoun= \stem ->
+ { s = table {
+ SF Sg Nom => stem+"я";
+ SF Sg Gen => stem+"и" ;
+ SF Sg Dat => stem+"е" ;
+ SF Sg Acc => stem+"ю" ;
+ SF Sg Inst => stem+"ей" ;
+ SF Sg (Prepos _) => stem+"е" ;
+ SF Pl Nom => stem+"и" ;
+ SF Pl Gen => stem+"ь" ;
+ SF Pl Dat => stem+"ям" ;
+ SF Pl Acc => stem+"и" ;
+ SF Pl Inst => stem+"ями" ;
+ SF Pl (Prepos _) => stem+"ях" };
+ g = Fem; anim = Inanimate };
+
+ -- 6. Masc ending in -Vй (V = vowel)
+ oper nDecl6Masc : Str ->CommNoun= \stem ->
+ let n = nRegSoftMasc stem in
+ { s = table {
+ SF Sg (Nom|Acc) => stem+"й";
+ SF Pl Gen => stem+"ев" ;
+ sf => n.s!sf };
+ g = n.g; anim = n.anim };
+
+ -- 6. Neut ending in -Ve (V = vowel) (not adjectives)
+ oper nDecl6Neut : Str ->CommNoun= \stem ->
+ let n = nRegSoftNeut stem in
+ { s = table {
+ SF Pl Gen => stem+"й" ;
+ sf => n.s!sf };
+ g = n.g; anim = n.anim };
+
+ -- 6. Fem ending in -Vя (V = vowel)
+ oper nDecl6Fem : Str ->CommNoun= \stem ->
+ let n = nRegSoftFem stem in
+ { s = table {
+ SF Pl Gen => stem+"й" ;
+ sf => n.s!sf };
+ g = n.g; anim = n.anim };
+
+ -- 7. stem ending in и
+ oper nDecl7Masc : Str ->CommNoun= \stem ->
+ let n = nDecl6Masc stem in
+ { s = table {
+ SF Sg (Prepos _) => stem+"и" ;
+ sf => n.s!sf };
+ g = n.g; anim = n.anim };
+
+ -- 7. stem ending in и
+ oper nDecl7Neut : Str ->CommNoun= \stem ->
+ let n = nDecl6Neut stem in
+ { s = table {
+ SF Sg (Prepos _) => stem+"и" ;
+ sf => n.s!sf };
+ g = n.g; anim = n.anim };
+
+ -- 7. stem ending in и
+ oper nDecl7Fem : Str ->CommNoun= \stem ->
+ let n = nDecl6Fem stem in
+ { s = table {
+ SF Sg (Dat|Prepos _) => stem+"и" ;
+ sf => n.s!sf };
+ g = n.g; anim = n.anim };
+
+
+ -- 8. Feminine ending in soft consonant
+ oper nDecl8 : Str ->CommNoun= \stem ->
+ let a : Str = case stem of { _+("ч"|"щ"|"ш"|"ж") => "а"; _ => "я" } in
+ { s = table {
+ SF Sg Nom => stem+"ь";
+ SF Sg Gen => stem+"и" ;
+ SF Sg Dat => stem+"и" ;
+ SF Sg Acc => stem+"ь" ;
+ SF Sg Inst => stem+"ью" ;
+ SF Sg (Prepos _) => stem+"и" ;
+ SF Pl Nom => stem+"и" ;
+ SF Pl Gen => stem+"ей" ;
+ SF Pl Dat => stem+a+"м" ;
+ SF Pl Acc => stem+"и" ;
+ SF Pl Inst => stem+a+"ми" ;
+ SF Pl (Prepos _) => stem+a+"х" };
+ g = Fem; anim = Inanimate };
+
+ -- 9. Neut ending in -мя
+ oper nDecl9 : Str ->CommNoun= \stem ->
+ { s = table {
+ SF Sg Nom => stem+"мя";
+ SF Sg Gen => stem+"мени" ;
+ SF Sg Dat => stem+"мени" ;
+ SF Sg Acc => stem+"мя" ;
+ SF Sg Inst => stem+"менем" ;
+ SF Sg (Prepos _) => stem+"мени" ;
+ SF Pl Nom => stem+"мена" ;
+ SF Pl Gen => stem+"мён" ;
+ SF Pl Dat => stem+"менам" ;
+ SF Pl Acc => stem+"мена" ;
+ SF Pl Inst => stem+"менами" ;
+ SF Pl (Prepos _) => stem+"менах" };
+ g = Fem; anim = Inanimate };
+
+ -- 10. Masc in -oнoк
+ oper nDecl10Hard : Str -> CommNoun = \stem ->
+ nAnimate (nSplitSgPl (nRegHardMasc (stem+"онок")) -- FIXME: vowel change in sg
+ (nRegHardNeut (stem+"ат"))) ;
+
+ -- 10. Masc in -ёнoк
+ oper nDecl10Soft : Str -> CommNoun = \stem ->
+ nAnimate (nSplitSgPl (nRegHardMasc (stem+"ёнок")) -- FIXME: vowel change in sg
+ (nRegHardNeut (stem+"ят"))) ;
+
+ oper nSplitSgPl : CommNoun -> CommNoun -> CommNoun = \x, y ->
+ {s = table {
+ SF Sg c => x.s!(SF Sg c) ;
+ SF Pl c => y.s!(SF Pl c)
+ } ;
+ g = x.g ; anim = y.anim
+ } ;
+
+ -- Nouns inflected as adjectives.
+ oper nAdj : Adjective -> Gender ->CommNoun= \a,g ->
+ { s = table {
+ SF Sg c => a.s!AF c Inanimate (ASg g) ;
+ SF Pl c => a.s!AF c Inanimate APl };
+ g = g; anim = Inanimate } ;
+
+-- Makes a noun animate.
+ oper nAnimate : CommNoun -> CommNoun = \n ->
+ { s = table {
+ SF Sg Acc => case n.g of {
+ Masc => n.s!(SF Sg Gen);
+ _ => n.s!(SF Sg Acc)
+ };
+ SF Pl Acc => n.s!(SF Pl Gen);
+ sf => n.s!sf } ;
+ g = n.g ;
+ anim = Animate
+ } ;
+
+oper
+ CommNoun = {s : SubstForm => Str ; g : Gender ; anim : Animacy } ;
+ SubstFormDecl = SS1 SubstForm ;
+
+oper nullEndInAnimateDeclStul: Str -> CommNoun = \brat ->
+ {s = table
+ { SF Sg Nom => brat ;
+ SF Sg Gen => brat+"а" ;
+ SF Sg Dat => brat+"у" ;
+ SF Sg Acc => brat +"а";
+ SF Sg Inst => brat+"ом" ;
+ SF Sg (Prepos _) => brat+"е" ;
+ SF Pl Nom => brat+"ья" ;
+ SF Pl Gen => brat+"ьев" ;
+ SF Pl Dat => brat+"ьям" ;
+ SF Pl Acc => brat +"ьев";
+ SF Pl Inst => brat+"ьями" ;
+ SF Pl (Prepos _) => brat+"ьяах"
+ } ;
+ g = Masc ; anim = Inanimate
+ } ;
+
+oper nullEndAnimateDeclBrat: Str -> CommNoun = \brat ->
+ {s = table
+ { SF Sg Nom => brat ;
+ SF Sg Gen => brat+"а" ;
+ SF Sg Dat => brat+"у" ;
+ SF Sg Acc => brat +"а";
+ SF Sg Inst => brat+"ом" ;
+ SF Sg (Prepos _) => brat+"е" ;
+ SF Pl Nom => brat+"ья" ;
+ SF Pl Gen => brat+"ьев" ;
+ SF Pl Dat => brat+"ьям" ;
+ SF Pl Acc => brat +"ьев";
+ SF Pl Inst => brat+"ьями" ;
+ SF Pl (Prepos _) => brat+"ьяах"
+ } ;
+ g = Masc ; anim = Animate
+ } ;
+
+oper irregPl_StemInAnimateDecl: Str -> CommNoun = \derev ->
+ { s = table
+ { SF Sg Nom => derev+"о" ;
+ SF Sg Gen => derev+"а" ;
+ SF Sg Dat => derev+"у" ;
+ SF Sg Acc => derev +"о";
+ SF Sg Inst => derev+"ом" ;
+ SF Sg (Prepos _) => derev+"е" ;
+ SF Pl Nom => derev+"ья" ;
+ SF Pl Gen => derev+"ьев" ;
+ SF Pl Dat => derev+"ьям" ;
+ SF Pl Acc => derev +"ья" ;
+ SF Pl Inst => derev+"ьями" ;
+ SF Pl (Prepos _) => derev+"ьяах"
+ } ;
+ g = Masc ; anim = Inanimate
+ } ;
+
+oper kg_oEnd_SgDecl: Str -> CommNoun = \mnog ->
+{ s = table {
+ SF _ Nom => mnog+"о" ;
+ SF _ Gen => mnog +"их";
+ SF _ Dat => mnog+"им" ;
+ SF _ Acc => mnog+"о" ;
+ SF _ Inst => mnog+"ими" ;
+ SF _ (Prepos _) => mnog+"их"
+ } ;
+ g = Neut ; anim = Inanimate
+} ;
+
+oper oEnd_PlDecl: Str -> CommNoun = \menshinstv ->
+ { s = table {
+ SF _ Nom => menshinstv+"а" ;
+ SF _ Gen => menshinstv;
+ SF _ Dat => menshinstv+"ам" ;
+ SF _ Acc => menshinstv+"ва" ;
+ SF _ Inst => menshinstv+"ами" ;
+ SF _ (Prepos _) => menshinstv+"вах"
+ } ;
+ g = Neut ; anim = Inanimate
+} ;
+
+oper oEnd_SgDecl: Str -> CommNoun = \bolshinstv ->
+ {s = table {
+ SF _ Nom => bolshinstv+"о" ;
+ SF _ Gen => bolshinstv+"а" ;
+ SF _ Dat => bolshinstv+"у" ;
+ SF _ Acc => bolshinstv+"о" ;
+ SF _ Inst => bolshinstv+"ом" ;
+ SF _ (Prepos _) => bolshinstv+"е"
+ } ;
+ g = Neut ; anim = Inanimate
+} ;
+
+-- Note: Now we consider only the plural form of the pronoun "все" (all)
+-- treated as an adjective (see AllDetPl definition).
+-- The meaning "entire" is not considered, which allows us to form
+-- the pronoun-adjective from the substantive form below:
+
+oper eEnd_Decl: Str -> CommNoun = \vs ->
+{ s = table {
+ SF Sg Nom => vs+"е" ;
+ SF Sg Gen => vs+"ех" ;
+ SF Sg Dat => vs+"ем" ;
+ SF Sg Acc => vs+"ех" ;
+ SF Sg Inst => vs+"еми" ;
+ SF Sg (Prepos _) => vs+"ех" ;
+ SF Pl Nom => vs+"е" ;
+ SF Pl Gen => vs +"ех";
+ SF Pl Dat => vs+"ем" ;
+ SF Pl Acc => vs+ "ех" ;
+ SF Pl Inst => vs+"еми" ;
+ SF Pl (Prepos _) => vs+"ех"
+ } ;
+ g = Neut ; anim = Inanimate
+} ;
+
+
+----2 Adjectives
+--
+---- Type Adjective only has positive degree while AdjDegr type
+---- includes also comparative and superlative forms.
+--
+ kazhdujDet: Adjective = aRegHardStemStress "кажд" ;
+ samuj : Adjective = aRegHardStemStress "сам" ;
+
+-- lubojDet: Adjective = uy_oj_EndDecl "люб" ;
+-- drugojDet: Adjective = uy_oj_EndDecl "друг" ;
+-- glaznoj: Adjective = uy_oj_EndDecl "глазн" ;
+ kotorujDet: Adjective = aRegHardStemStress "котор";
+ nekotorujDet: Adjective = aRegHardStemStress "некотор";
+ takoj: Adjective = aRegHardEndStress "так";
+-- kakojNibudDet: Adjective = i_oj_EndDecl "как" "-нибудь";
+-- kakojDet: Adjective = i_oj_EndDecl "как" [];
+-- nikakojDet: Adjective = i_oj_EndDecl "никак" [];
+ bolshinstvoSgDet: Adjective = extAdjFromSubst (nRegHardNeut "большинств");
+ mnogoSgDet: Adjective = extAdjFromSubst (nRegHardNeut "мног");
+ nemnogoSgDet: Adjective = extAdjFromSubst (nRegHardNeut "немног");
+ skolkoSgDet: Adjective = extAdjFromSubst (nRegHardNeut "скольк");
+
+-- bolshinstvoPlDet: Adjective = extAdjFromSubst (oEnd_PlDecl "большинств");
+
+
+
+ oper aRegHardStemStress : Str -> Adjective = \stem -> aRegHard stem False ;
+
+ oper aRegHardEndStress : Str -> Adjective = \stem -> aRegHard stem True;
+
+ -- 1. regular hard adjective
+ -- 3. stem ending with г, к, х
+ -- 4. stem ending with ш, ж, ч, щ
+ -- 5. stem ending with ц
+ oper aRegHard : Str -> Bool -> Adjective = \stem, endStress ->
+ let i = iAfter stem in
+ let o = case endStress of {
+ True => "о" ;
+ False => oAfter stem } in
+ { s = table {
+ AF Nom _ (ASg Masc) => stem + case endStress of {
+ True => "ой";
+ False => iAfter stem + "й" } ;
+ AF Nom _ (ASg Neut) => stem + o+"е";
+ AF Gen _ (ASg (Masc|Neut)) => stem + o+"го";
+ AF Dat _ (ASg (Masc|Neut)) => stem + o+"му";
+ AF Acc Inanimate (ASg Masc) => stem + i+"й";
+ AF Acc Animate (ASg Masc) => stem + o+"го";
+ AF Acc _ (ASg Neut) => stem + o+"е";
+ AF Inst _ (ASg (Masc|Neut)) => stem + i+"м";
+ AF (Prepos _) _ (ASg (Masc|Neut)) => stem + o+"м";
+
+ AF Nom _ (ASg Fem) => stem + "ая";
+ AF Acc _ (ASg Fem) => stem + "ую";
+ AF _ _ (ASg Fem) => stem + o+"й";
+
+ AF Nom _ APl => stem + i+"е";
+ AF Acc Inanimate APl => stem + i+"е";
+ AF Acc Animate APl => stem + i+"х";
+ AF Gen _ APl => stem + i+"х";
+ AF Inst _ APl => stem + i+"ми";
+ AF Dat _ APl => stem + i+"м";
+ AF (Prepos _) _ APl => stem + i+"х";
+
+ AFShort (ASg Masc) => stem;
+ AFShort (ASg Fem) => stem + "а";
+ AFShort (ASg Neut) => stem + o ;
+ AFShort APl => stem + i;
+
+ AdvF => stem + o
+ } } ;
+
+ oper aRegSoft : Str -> Adjective = \stem ->
+ { s = table {
+ AF Nom _ (ASg Masc) => stem + "ий" ;
+ AF Nom _ (ASg Neut) => stem + "ее";
+ AF Gen _ (ASg (Masc|Neut)) => stem + "его";
+ AF Dat _ (ASg (Masc|Neut)) => stem + "ему";
+ AF Acc Inanimate (ASg Masc) => stem + "ий";
+ AF Acc Animate (ASg Masc) => stem + "его";
+ AF Acc _ (ASg Neut) => stem + "ее";
+ AF Inst _ (ASg (Masc|Neut)) => stem + "им";
+ AF (Prepos _) _ (ASg (Masc|Neut)) => stem + "ем";
+
+ AF Nom _ (ASg Fem) => stem + "яя";
+ AF Acc _ (ASg Fem) => stem + "юю";
+ AF _ _ (ASg Fem) => stem + "ей";
+
+ AF Nom _ APl => stem + "ие";
+ AF Acc Inanimate APl => stem + "ие";
+ AF Acc Animate APl => stem + "их";
+ AF Gen _ APl => stem + "их";
+ AF Inst _ APl => stem + "ими";
+ AF Dat _ APl => stem + "им";
+ AF (Prepos _) _ APl => stem + "их";
+
+ AFShort (ASg Masc) => stem; -- FIXME: add e if stem ends in consonant + n
+ AFShort (ASg Fem) => stem + "я";
+ AFShort (ASg Neut) => stem + "е" ;
+ AFShort APl => stem + "и" ;
+
+ AdvF => stem + "е"
+ } } ;
+
+
+
+
+ vseDetPl: Adjective = extAdjFromSubst (eEnd_Decl "вс") ;
+ extAdjFromSubst: CommNoun -> Adjective = \ vse ->
+ {s = \\af => vse.s ! SF (numAF af) (caseAF af) } ;
+
+
+oper totDet: Adjective = {s = table {
+ AF Nom _ (ASg Masc) => "тот";
+ AF Nom _ (ASg Fem) => "та";
+ AF Nom _ (ASg Neut) => "то";
+ AF Nom _ APl => "те";
+ AF Acc Inanimate (ASg Masc) => "тот";
+ AF Acc Animate (ASg Masc) => "того";
+ AF Acc _ (ASg Fem) => "ту";
+ AF Acc _ (ASg Neut) => "то";
+ AF Acc Inanimate APl => "те";
+ AF Acc Animate APl => "тех";
+ AF Gen _ (ASg Masc) => "того";
+ AF Gen _ (ASg Fem) => "той";
+ AF Gen _ (ASg Neut) => "того";
+ AF Gen _ APl => "тех";
+ AF Inst _ (ASg Masc) => "тем";
+ AF Inst _ (ASg Fem) => "той";
+ AF Inst _ (ASg Neut) => "тем";
+ AF Inst _ APl => "теми";
+ AF Dat _ (ASg Masc) => "тому";
+ AF Dat _ (ASg Fem) => "той";
+ AF Dat _ (ASg Neut) => "тому";
+ AF Dat _ APl => "тем";
+ AF (Prepos _) _ (ASg Masc) => "том";
+ AF (Prepos _) _ (ASg Fem) => "той";
+ AF (Prepos _) _ (ASg Neut) => "том";
+ AF (Prepos _) _ APl => "тех" ;
+ AFShort (ASg Masc) => "тот";
+ AFShort (ASg Fem) => "та";
+ AFShort (ASg Neut) => "то";
+ AFShort APl => "те";
+ AdvF => "то"
+ }
+ } ;
+
+oper odinDet: Adjective = {s = table {
+ AF Nom _ (ASg Masc) => "один";
+ AF Nom _ (ASg Fem) => "одна";
+ AF Nom _ (ASg Neut) => "одно";
+ AF Nom _ APl => "одни";
+ AF Acc Inanimate (ASg Masc) => "один";
+ AF Acc Animate (ASg Masc) => "одного";
+ AF Acc _ (ASg Fem) => "одну";
+ AF Acc _ (ASg Neut) => "одно";
+ AF Acc Inanimate APl => "одни";
+ AF Acc Animate APl => "одних";
+ AF Gen _ (ASg Masc) => "одного";
+ AF Gen _ (ASg Fem) => "одной";
+ AF Gen _ (ASg Neut) => "одного";
+ AF Gen _ APl => "одних";
+ AF Inst _ (ASg Masc) => "одним";
+ AF Inst _ (ASg Fem) => "одной";
+ AF Inst _ (ASg Neut) => "одним";
+ AF Inst _ APl => "одними";
+ AF Dat _ (ASg Masc) => "одному";
+ AF Dat _ (ASg Fem) => "одной";
+ AF Dat _ (ASg Neut) => "одному";
+ AF Dat _ APl => "одним";
+ AF (Prepos _) _ (ASg Masc) => "одном";
+ AF (Prepos _) _ (ASg Fem) => "одной";
+ AF (Prepos _) _ (ASg Neut) => "одном";
+ AF (Prepos _) _ APl => "одних";
+ AFShort (ASg Masc) => "один";
+ AFShort (ASg Fem) => "одна";
+ AFShort (ASg Neut) => "одно";
+ AFShort APl => "одни";
+ AdvF => "одно"
+ }
+ } ;
+
+oper etotDet: Adjective = {s = table {
+ AF Nom _ (ASg Masc) => "этот";
+ AF Nom _ (ASg Fem) => "эта";
+ AF Nom _ (ASg Neut) => "это";
+ AF Nom _ APl => "эти";
+ AF Acc Inanimate (ASg Masc) => "этот";
+ AF Acc Animate (ASg Masc) => "этого";
+ AF Acc _ (ASg Fem) => "эту";
+ AF Acc _ (ASg Neut) => "это";
+ AF Acc Inanimate APl => "эти";
+ AF Acc Animate APl => "этих";
+ AF Gen _ (ASg Masc) => "этого";
+ AF Gen _ (ASg Fem) => "этой";
+ AF Gen _ (ASg Neut) => "этого";
+ AF Gen _ APl => "этих";
+ AF Inst _ (ASg Masc) => "этим";
+ AF Inst _ (ASg Fem) => "этой";
+ AF Inst _ (ASg Neut) => "этим";
+ AF Inst _ APl => "этими";
+ AF Dat _ (ASg Masc) => "этому";
+ AF Dat _ (ASg Fem) => "этой";
+ AF Dat _ (ASg Neut) => "этому";
+ AF Dat _ APl => "этим";
+ AF (Prepos _) _ (ASg Masc) => "этом";
+ AF (Prepos _) _ (ASg Fem) => "этой";
+ AF (Prepos _) _ (ASg Neut) => "этом";
+ AF (Prepos _) _ APl => "этих";
+ AFShort (ASg Masc) => "этот";
+ AFShort (ASg Fem) => "эта";
+ AFShort (ASg Neut) => "это";
+ AFShort APl => "эти";
+ AdvF => "это"
+ }
+ } ;
+
+oper vesDet: Adjective = {s = table {
+ AF Nom _ (ASg Masc) => "весь";
+ AF Nom _ (ASg Fem) => "вся";
+ AF Nom _ (ASg Neut) => "всё";
+ AF Nom _ APl => "все";
+ AF Acc Animate (ASg Masc) => "весь";
+ AF Acc Inanimate (ASg Masc) => "всего";
+ AF Acc _ (ASg Fem) => "всю";
+ AF Acc _ (ASg Neut) => "всё";
+ AF Acc Inanimate APl => "все";
+ AF Acc Animate APl => "всех";
+ AF Gen _ (ASg Masc) => "всего";
+ AF Gen _ (ASg Fem) => "всей";
+ AF Gen _ (ASg Neut) => "всего";
+ AF Gen _ APl => "всех";
+ AF Inst _ (ASg Masc) => "всем";
+ AF Inst _ (ASg Fem) => "всей";
+ AF Inst _ (ASg Neut) => "всем";
+ AF Inst _ APl => "всеми";
+ AF Dat _ (ASg Masc) => "ему";
+ AF Dat _ (ASg Fem) => "ей";
+ AF Dat _ (ASg Neut) => "ему";
+ AF Dat _ APl => "всем";
+ AF (Prepos _) _ (ASg Masc) => "всём";
+ AF (Prepos _) _ (ASg Fem) => "всей";
+ AF (Prepos _) _ (ASg Neut) => "всём";
+ AF (Prepos _) _ APl => "всех" ;
+ AFShort (ASg Masc) => "весь";
+ AFShort (ASg Fem) => "вся";
+ AFShort (ASg Neut) => "всё";
+ AFShort APl => "все";
+ AdvF => "полностью"
+ }
+ } ;
+
+oper uy_j_EndDecl : Str -> Adjective = \s ->{s = table {
+ AF Nom _ (ASg Masc) => s+ "ый";
+ AF Nom _ (ASg Fem) => s + "ая";
+ AF Nom _ (ASg Neut) => s + "ое";
+ AF Nom _ APl => s + "ые";
+ AF Acc Inanimate (ASg Masc) => s + "ый";
+ AF Acc Animate (ASg Masc) => s + "ого";
+ AF Acc _ (ASg Fem) => s + "ую";
+ AF Acc _ (ASg Neut) => s + "ое";
+ AF Acc Inanimate APl => s + "ые";
+ AF Acc Animate APl => s + "ых";
+ AF Gen _ (ASg Masc) => s + "ого";
+ AF Gen _ (ASg Fem) => s + "ой";
+ AF Gen _ (ASg Neut) => s + "ого";
+ AF Gen _ APl => s + "ых";
+ AF Inst _ (ASg Masc) => s + "ым";
+ AF Inst _ (ASg Fem) => s + "ой";
+ AF Inst _ (ASg Neut) => s + "ым";
+ AF Inst _ APl => s + "ыми";
+ AF Dat _ (ASg Masc) => s + "ому";
+ AF Dat _ (ASg Fem) => s + "ой";
+ AF Dat _ (ASg Neut) => s + "ому";
+ AF Dat _ APl => s + "ым";
+ AF (Prepos _) _ (ASg Masc) => s + "ом";
+ AF (Prepos _) _ (ASg Fem) => s + "ой";
+ AF (Prepos _) _ (ASg Neut) => s + "ом";
+ AF (Prepos _) _ APl => s + "ых";
+ AFShort (ASg Masc) => s;
+ AFShort (ASg Fem) => s + "а";
+ AFShort (ASg Neut) => s + "о" ;
+ AFShort APl => s + "ы";
+ AdvF => s +"о"
+ }
+ } ;
+
+{-
+-- Commented out since I don't know what the short forms are
+oper ti_j_EndDecl : Str -> Adjective = \s ->{s = table {
+ AF Nom _ (ASg Masc) => s+"ий";
+ AF Nom _ (ASg Fem) => s+"ья";
+ AF Nom _ (ASg Neut) => s+"ье";
+ AF Nom _ APl => s+"ьи";
+ AF Acc Inanimate (ASg Masc) => s+"ий";
+ AF Acc Animate (ASg Masc) => s+"ьего";
+ AF Acc _ (ASg Fem) => s+"ью";
+ AF Acc _ (ASg Neut) => s+"ье";
+ AF Acc Inanimate APl => s+"ьи";
+ AF Acc Animate APl => s+"ьих";
+ AF Gen _ (ASg Masc) => s+"ьего";
+ AF Gen _ (ASg Fem) => s+"ьей";
+ AF Gen _ (ASg Neut) => s+"ьего";
+ AF Gen _ APl => s+"ьих";
+ AF Inst _ (ASg Masc) => s+"ьим";
+ AF Inst _ (ASg Fem) => s+"ьей";
+ AF Inst _ (ASg Neut) => s+"ьим";
+ AF Inst _ APl => s+"ьими";
+ AF Dat _ (ASg Masc) => s+"ьему";
+ AF Dat _ (ASg Fem) => s+"ьей";
+ AF Dat _ (ASg Neut) => s+"ьему";
+ AF Dat _ APl => s+"ьим";
+ AF (Prepos _) _ (ASg Masc) => s+"ьем";
+ AF (Prepos _) _ (ASg Fem) => s+"ьей";
+ AF (Prepos _) _ (ASg Neut) => s+"ьем";
+ AF (Prepos _) _ APl => s+"ьих";
+ AdvF => s + "ье"
+ }
+ } ;
+-}
+
+
+
+---- 2 Adverbs
+--
+--oper vsegda: Adverb = { s = "всегда" } ;
+--oper chorosho: Adverb = { s = "хорошо" } ;
+--
+---- 2 Verbs
+--
+---- Dummy verbum "have" that corresponds to the phrases like
+---- "I have a headache" in English. The corresponding sentence
+---- in Russian doesn't contain a verb:
+--
+--oper have: Verbum = {s=\\ vf => "-" ; asp = Imperfective} ;
+--
+---- There are two common conjugations
+---- (according to the number and the person of the subject)
+---- patterns in the present tense in the indicative mood.
+
+-- +++ MG_UR: new conjugation class 'Foreign' introduced +++
+param Conjugation = First | FirstE | Second | SecondA | Mixed | Dolzhen | Foreign ;
+
+
+--3 First conjugation (in Present) verbs :
+oper verbIdti : Verbum = verbDecl Imperfective First "ид" "у" "шел" "иди" "идти";
+
+--oper verbGulyat : Verbum = verbDecl Imperfective First "гуля" "ю" "гулял" "гуляй" "гулять";
+--oper verbVkluchat : Verbum = verbDecl Imperfective First "включа" "ю" "включал" "включай" "включать";
+oper verbSuchestvovat : Verbum = verbDecl Imperfective First "существу" "ю" "существовал" "существуй" "существовать";
+--oper verbVukluchat : Verbum = verbDecl Imperfective First "выключа" "ю" "выключал" "выключай" "выключать";
+--oper verbZhdat : Verbum = verbDecl Imperfective First "жд" "у" "ждал" "жди" "ждать" ;
+--oper verbBegat : Verbum = verbDecl Imperfective First "бега" "ю" "бегал" "бегай" "бегать";
+--oper verbPrinimat : Verbum = verbDecl Imperfective First "принима" "ю" "принимал" "принимай" "принимать";
+--oper verbDokazuvat : Verbum = verbDecl Imperfective First "доказыва" "ю" "доказывал" "доказывай" "доказывать";
+--oper verbPredpochitat : Verbum = verbDecl Imperfective First "предпочита" "ю" "предпочитал" "предпочитай" "предпочитать";
+--oper verbOtpravlyat : Verbum = verbDecl Imperfective First "отправля" "ю" "отправлял" "отправляй" "отправлять";
+--oper verbSlomat : Verbum = verbDecl Perfective First "слома" "ю" "сломал" "сломай" "сломать";
+
+
+---- Verbs with vowel "ё": "даёшь" (give), "пьёшь" (drink) :
+--oper verbDavat : Verbum = verbDecl Imperfective FirstE "да" "ю" "давал" "давай" "давать";
+--oper verbPit : Verbum = verbDecl Imperfective FirstE "пь" "ю" "пил" "пей" "пить";
+--
+
+
+oper verbByut : Verbum = verbDecl Perfective First "буд" "у" "был" "будь" "быть";
+
+oper verbMoch : Verbum = verbDeclMoch Imperfective First "мог" "у" "мог" "моги" "мочь" "мож";
+
+----3 Second conjugation (in Present) verbs :
+--
+--oper verbLubit : Verbum = verbDecl Imperfective Second "люб" "лю" "любил" "люби" "любить";
+--oper verbGovorit : Verbum = verbDecl Imperfective Second "говор" "ю" "говорил" "говори" "говорить";
+--
+--oper verbBolet_2 : Verbum = verbDecl Imperfective Second "бол" "ю" "болел" "боли" "болеть";
+--oper verbPoranit : Verbum = verbDecl Perfective Second "поран" "ю" "поранил" "порань" "поранить";
+--
+-- Irregular Mixed:
+oper verbKhotet : Verbum = verbDecl Imperfective Mixed "хоч" "у" "хотел" "хоти" "хотеть";
+
+-- Irregular
+oper verbDolzhen : Verbum = verbDecl Imperfective Dolzhen "долж" "ен" "долж" ["будь должен"] ["быть должным"] ;
+
+
+-- further conjugation class added by Magda Gerritsen and Ulrich Real:
+-- foreign words introduced in Russian
+
+oper verbOrganisuet : Verbum = verbDecl Imperfective Foreign "организу" "ю" "организовал" "организуй" "организовать";
+
+
+oper idetDozhd: Verbum -> Verbum = \idet -> {s = \\vf=>idet.s!vf ++ "дождь"; asp = Imperfective};
+
+-- "PresentVerb" takes care of the present tense conjugation.
+
+param PresentVF = PRF GenNum Person;
+oper PresentVerb : Type = PresentVF => Str ;
+
+oper presentConjDolzhen: Str -> Str -> PresentVerb = \del, sgP1End ->
+ table {
+ PRF APl _ => del + "ны" ;
+ PRF (ASg Masc) _ => del + sgP1End ;
+ PRF (ASg Fem) _ => del + "на" ;
+ PRF (ASg Neut) _ => del + "но"
+ };
+
+-- +++ MG_UR: changed! +++
+oper presentConjMixed: Str -> Str -> PresentVerb = \del, sgP1End ->
+ table {
+ PRF (ASg _) P1 => del+ sgP1End ; -- sgP1End "чу"
+ PRF (ASg _) P2 => del+ "чешь" ;
+ PRF (ASg _) P3 => del+ "чет" ;
+ PRF APl P1 => del+ "тим" ;
+ PRF APl P2 => del+ "тите" ;
+ PRF APl P3 => del+ "тят"
+ };
+
+-- +++ MG_UR: changed! (+ д) +++
+oper presentConj2: Str -> Str -> PresentVerb = \del, sgP1End ->
+table {
+ PRF (ASg _) P1 => del+ sgP1End ; -- sgP1End "жу"
+ PRF (ASg _) P2 => del+ "дишь" ;
+ PRF (ASg _) P3 => del+ "дит" ;
+ PRF APl P1 => del+ "дим" ;
+ PRF APl P2 => del+ "дите" ;
+ PRF APl P3 => del+ "дят"
+ };
+
+oper presentConj2a: Str -> Str -> PresentVerb = \del, sgP1End ->
+table {
+ PRF (ASg _) P1 => del+ sgP1End ; -- sgP1End "жу"
+ PRF (ASg _) P2 => del+ "ишь" ;
+ PRF (ASg _) P3 => del+ "ит" ;
+ PRF APl P1 => del+ "им" ;
+ PRF APl P2 => del+ "ите" ;
+ PRF APl P3 => del+ "ят"
+ };
+
+oper presentConj1E: Str -> Str -> PresentVerb = \del, sgP1End ->
+ table {
+ PRF (ASg _) P1 => del+ sgP1End ;
+ PRF (ASg _) P2 => del+ "ёшь" ;
+ PRF (ASg _) P3 => del+ "ёт" ;
+ PRF APl P1 => del+ "ём" ;
+ PRF APl P2 => del+ "ёте" ;
+ PRF APl P3 => del+ sgP1End + "т"
+ };
+
+oper presentConj1: Str -> Str -> PresentVerb = \del, sgP1End ->
+ table {
+ PRF (ASg _) P1 => del+ sgP1End ;
+ PRF (ASg _) P2 => del+ "ешь" ;
+ PRF (ASg _) P3 => del+ "ет" ;
+ PRF APl P1 => del+ "ем" ;
+ PRF APl P2 => del+ "ете" ;
+ PRF APl P3 => del+ sgP1End + "т"
+ };
+
+oper presentConj1Moch: Str -> Str -> Str -> PresentVerb = \del, sgP1End, altRoot ->
+ table {
+ PRF (ASg _) P1 => del + sgP1End ;
+ PRF (ASg _) P2 => altRoot + "ешь" ;
+ PRF (ASg _) P3 => altRoot + "ет" ;
+ PRF APl P1 => altRoot + "ем" ;
+ PRF APl P2 => altRoot + "ете" ;
+ PRF APl P3 => del+ sgP1End + "т"
+ };
+
+-- "PastVerb" takes care of the past tense conjugation.
+
+param PastVF = PSF GenNum ;
+oper PastVerb : Type = PastVF => Str ;
+oper pastConj: Str -> PastVerb = \del ->
+ table {
+ PSF (ASg Masc) => del ;
+ PSF (ASg Fem) => del +"а" ;
+ PSF (ASg Neut) => del+"о" ;
+ PSF APl => del+ "и"
+ };
+
+oper pastConjDolzhen: Str -> PastVerb = \del ->
+ table {
+ PSF (ASg Masc) => ["был "] + del + "ен" ;
+ PSF (ASg Fem) => ["была "] + del + "на" ;
+ PSF (ASg Neut) => ["было "] + del + "но" ;
+ PSF APl => ["были "] + del + "ны"
+ };
+
+-- further class added by Magda Gerritsen and Ulrich Real
+oper presentConjForeign: Str -> Str -> PresentVerb = \del, sgP1End ->
+ table {
+ PRF (ASg _) P1 => del+ sgP1End ; -- sgP1End "ю"
+ PRF (ASg _) P2 => del+ "ешь" ;
+ PRF (ASg _) P3 => del+ "ет" ;
+ PRF APl P1 => del+ "ем" ;
+ PRF APl P2 => del+ "ете" ;
+ PRF APl P3 => del+ "ют"
+};
+
+-- "verbDecl" sorts out verbs according to the aspect and voice parameters.
+-- It produces the full conjugation table for a verb entry
+
+-- +++ MG_UR: new conjugation class 'Foreign' introduced +++
+oper verbDecl: Aspect -> Conjugation -> Str -> Str -> Str -> Str -> Str -> Verbum =
+ \a, c, del, sgP1End, sgMascPast, imperSgP2, inf ->
+ let conj = case c of {
+ First => <presentConj1,pastConj> ;
+ FirstE => <presentConj1E,pastConj> ;
+ Second => <presentConj2,pastConj> ;
+ SecondA => <presentConj2a,pastConj> ;
+ Mixed => <presentConjMixed,pastConj> ;
+ Dolzhen => <presentConjDolzhen,pastConjDolzhen> ;
+ Foreign => <presentConjForeign,pastConj> } in
+ let patt = case a of {
+ Perfective => mkVerbImperfective;
+ Imperfective => mkVerbImperfective } in
+ patt inf imperSgP2 (conj.p1 del sgP1End) (conj.p2 sgMascPast) ;
+
+-- for verbs like "мочь" ("can") with changing consonants (first conjugation):
+-- "могу - можешь"
+oper verbDeclMoch: Aspect -> Conjugation -> Str -> Str -> Str -> Str ->Str -> Str -> Verbum =
+ \a, c, del, sgP1End, sgMascPast, imperSgP2, inf, altRoot ->
+ let patt = case a of {
+ Perfective => mkVerbImperfective;
+ Imperfective => mkVerbImperfective } in
+ patt inf imperSgP2 (presentConj1Moch del sgP1End altRoot) (pastConj sgMascPast);
+
+oper add_sya : Voice -> Str -> Str = \v,x ->
+ case v of {
+ Act => x ;
+ Pas => case Predef.dp 2 x of {
+ "а" | "е" | "ё" | "и" | "о" | "у" | "ы" | "э" | "ю" | "я" => x + "сь" ;
+ _ => x + "ся"
+ }
+ };
+
+
+-- Generation the imperfective active pattern given
+-- a number of basic conjugation forms.
+
+oper mkVerbImperfective : Str -> Str -> PresentVerb -> PastVerb -> Verbum =
+ \inf, imper, presentFuture, past -> { s = table { VFORM vox vf =>
+ case vf of {
+ VINF => add_sya vox inf ;
+
+ VIMP _ P1 => "давайте" ++ add_sya vox inf ;
+ VIMP Sg P2 => add_sya vox imper ;
+ VIMP Pl P2 => add_sya vox (imper+"те") ;
+ VIMP Sg P3 => "пусть" ++ add_sya vox (presentFuture ! (PRF (ASg Masc) P3)) ;
+ VIMP Pl P3 => "пусть" ++ add_sya vox (presentFuture ! (PRF APl P3)) ;
+
+ VSUB gn => add_sya vox (past ! (PSF gn)) ++ "бы";
+
+ VIND (ASg _) (VPresent p) => add_sya vox (presentFuture ! (PRF (ASg Masc) p));
+ VIND APl (VPresent p) => add_sya vox (presentFuture ! (PRF APl p));
+ VIND (ASg _) (VFuture P1) => "буду" ++ add_sya vox inf ;
+ VIND (ASg _) (VFuture P2) => "будешь" ++ add_sya vox inf ;
+ VIND (ASg _) (VFuture P3) => "будет" ++ add_sya vox inf ;
+ VIND APl (VFuture P1) => "будем" ++ add_sya vox inf ;
+ VIND APl (VFuture P2) => "будете" ++ add_sya vox inf ;
+ VIND APl (VFuture P3) => "будут" ++ add_sya vox inf ;
+ VIND gn VPast => add_sya vox (past ! (PSF gn))
+ } } ;
+ asp = Imperfective
+ } ;
+
+oper mkVerbPerfective: Str -> Str -> PresentVerb -> PastVerb -> Verbum =
+ \inf, imper, presentFuture, past -> { s = table { VFORM vox vf =>
+ case vf of {
+ VINF => add_sya vox inf ;
+ VIMP Sg P1 => "давайте" ++ add_sya vox (presentFuture ! (PRF (ASg Masc) P1));
+ VIMP Pl P1 => "давайте" ++ add_sya vox (presentFuture ! (PRF APl P1));
+ VIMP Sg P2 => add_sya vox imper ;
+ VIMP Pl P2 => add_sya vox (imper+"те") ;
+ VIMP Sg P3 => "пусть" ++ add_sya vox (presentFuture ! (PRF (ASg Masc) P3)) ;
+ VIMP Pl P3 => "пусть" ++ add_sya vox (presentFuture ! (PRF APl P3)) ;
+
+ VSUB gn => add_sya vox (past ! (PSF gn)) ++ "бы" ;
+
+ VIND (ASg _) (VPresent _) => nonExist ;
+ VIND APl (VPresent P1) => nonExist ;
+ VIND APl (VPresent P2) => nonExist ;
+ VIND APl (VPresent P3) => nonExist ;
+ VIND gn (VFuture p) => add_sya vox (presentFuture ! (PRF gn p)) ;
+ VIND gn VPast => add_sya vox (past ! (PSF gn))
+ } } ;
+ asp = Perfective
+ } ;
+
+----2 Proper names are a simple kind of noun phrases.
+--
+oper ProperName : Type = {s : Case => Str ; g : Gender ; anim : Animacy} ;
+--
+-- mkCNProperName : CommNoun -> ProperName = \cn ->
+--{s = \\c => cn.s! (SF Sg c); g=cn.g; anim = cn.anim };
+--
+ mkProperNameMasc : Str -> Animacy -> ProperName = \ivan, anim ->
+ { s = table { Nom => ivan ;
+ Gen => ivan + "а";
+ Dat => ivan + "у";
+ Acc => case anim of
+ { Animate => ivan + "а";
+ Inanimate => ivan
+ };
+ Inst => ivan + "ом";
+ (Prepos _) => ivan + "е" } ;
+ g = Masc; anim = anim };
+
+ mkProperNameFem : Str -> Animacy -> ProperName = \masha, anim ->
+ { s = table { Nom => masha + "а";
+ Gen => masha + "и";
+ Dat => masha + "е";
+ Acc => masha + "у";
+ Inst => masha + "ей";
+ (Prepos _) => masha + "е" };
+ g = Fem ; anim = anim };
+
+};
diff --git a/next-lib/src/russian/NounRus.gf b/next-lib/src/russian/NounRus.gf
new file mode 100644
index 000000000..683f54d07
--- /dev/null
+++ b/next-lib/src/russian/NounRus.gf
@@ -0,0 +1,236 @@
+--# -path=.:../abstract:../common:../../prelude
+
+concrete NounRus of Noun = CatRus ** open ResRus, Prelude, MorphoRus in {
+
+ flags optimize=all_subs ; coding=utf8 ;
+
+ lin
+ DetCN kazhduj okhotnik = {
+ s = \\c => case kazhduj.c of {
+ Nom =>
+ kazhduj.s ! AF (extCase c) okhotnik.anim (gNum okhotnik.g kazhduj.n) ++
+ okhotnik.s ! kazhduj.n ! (extCase c) ;
+ _ =>
+ kazhduj.s ! AF (extCase c) okhotnik.anim (gNum okhotnik.g kazhduj.n) ++
+ okhotnik.s ! kazhduj.n ! kazhduj.c };
+ n = kazhduj.n ;
+ p = P3 ;
+ pron = False;
+ g = case kazhduj.g of { PNoGen => (PGen okhotnik.g); _ => kazhduj.g };
+ anim = okhotnik.anim
+ } ;
+
+ UsePN masha = {
+ s = \\c => masha.s ! (extCase c) ;
+ p = P3; g = PGen masha.g ; anim = masha.anim ;
+ n = Sg; nComp = Sg; pron = False} ;
+
+ UsePron p = p ** {anim = Inanimate};
+
+ PredetNP pred np = {
+ s = \\pf => pred.s! (AF (extCase pf) np.anim (gNum (pgen2gen np.g) np.n))++ np.s ! pf ;
+ n = np.n;
+ p = np.p;
+ g = np.g;
+ anim = np.anim;
+ pron = np.pron
+ } ;
+
+ PPartNP np v2 = {
+ s = \\pf => np.s ! pf ++ v2.s ! VFORM Act VINF ;
+ -- no participles in the Verbum type as they behave as adjectives
+ n = np.n;
+ p = np.p;
+ g = np.g;
+ anim = np.anim;
+ pron = np.pron
+ } ;
+
+ AdvNP np adv = {
+ s = \\pf => np.s ! pf ++ adv.s ;
+ n = np.n;
+ p = np.p;
+ g = np.g;
+ anim = np.anim;
+ pron = np.pron
+ } ;
+
+-- 1.4 additions AR 17/6/2008
+
+ DetNP kazhduj =
+ let
+ g = Neut ; ----
+ anim = Inanimate ;
+ in {
+ s = \\c => kazhduj.s ! AF (extCase c) anim (gNum g kazhduj.n) ;
+ n = kazhduj.n ;
+ p = P3 ;
+ pron = False;
+ g = case kazhduj.g of { PNoGen => (PGen g); _ => kazhduj.g };
+ anim = anim
+ } ;
+
+ DetQuantOrd quant num ord = {
+ s = \\af => quant.s !af ++ num.s! (caseAF af) ! (genAF af) ++ ord.s!af ;
+ n = num.n ;
+ g = quant.g;
+ c = quant.c
+ } ;
+
+ DetQuant quant num = {
+ s = \\af => quant.s !af ++ num.s! (caseAF af) ! (genAF af) ;
+ n = num.n ;
+ g = quant.g;
+ c = quant.c
+ } ;
+
+ DetArtOrd quant num ord = {
+ s = \\af => quant.s !af ++ num.s! (caseAF af) ! (genAF af) ++ ord.s!af ;
+ n = num.n ;
+ g = quant.g;
+ c = quant.c
+ } ;
+
+ DetArtCard quant num = {
+ s = \\af => quant.s !af ++ num.s! (caseAF af) ! (genAF af) ;
+ n = num.n ;
+ g = quant.g;
+ c = quant.c
+ } ;
+
+-- MassDet = {s = \\_=>[] ; c=Nom; g = PNoGen; n = Sg} ;
+
+ MassNP okhotnik = {
+ s = \\c => okhotnik.s ! Sg ! (extCase c) ;
+ n = Sg ;
+ p = P3 ;
+ pron = False;
+ g = PGen okhotnik.g ;
+ anim = okhotnik.anim
+ } ;
+
+ DetArtSg kazhduj okhotnik = {
+ s = \\c => -- art case always Nom (AR 17/6/2008)
+ kazhduj.s ! AF (extCase c) okhotnik.anim (gNum okhotnik.g Sg) ++
+ okhotnik.s ! Sg ! (extCase c) ;
+ n = Sg ;
+ p = P3 ;
+ pron = False;
+ g = case kazhduj.g of { PNoGen => (PGen okhotnik.g); _ => kazhduj.g };
+ anim = okhotnik.anim
+ } ;
+
+ DetArtPl kazhduj okhotnik = {
+ s = \\c => -- art case always Nom (AR 17/6/2008)
+ kazhduj.s ! AF (extCase c) okhotnik.anim (gNum okhotnik.g Pl) ++
+ okhotnik.s ! Pl ! (extCase c) ;
+ n = Pl ;
+ p = P3 ;
+ pron = False;
+ g = case kazhduj.g of { PNoGen => (PGen okhotnik.g); _ => kazhduj.g };
+ anim = okhotnik.anim
+ } ;
+
+ PossPron p = {s = \\af => p.s ! mkPronForm (caseAF af) No (Poss (gNum (genAF af) (numAF af) )); c=Nom; g = PNoGen} ;
+
+ NumCard c = c ;
+ NumSg = {s = \\_,_ => [] ; n = Sg} ;
+ NumPl = {s = \\_,_ => [] ; n = Pl} ;
+
+ OrdNumeral numeral = variants {} ; ---- TODO; needed to compile Constructors
+ OrdDigits numeral = variants {} ; ---- TODO; needed to compile Constructors
+---- OrdDigits TODO
+ -- {s = \\ af => (uy_j_EndDecl (numeral.s ! caseAF af ! genAF af)).s!af} ;
+
+ NumNumeral n = n ;
+ NumDigits n = {s = \\_,_ => n.s ; n = n.n} ;
+
+ AdNum adn num = {s = \\c,n => adn.s ++ num.s!c!n ; n = num.n} ;
+
+ OrdSuperl a = {s = a.s!Posit};
+
+ DefArt = {s = \\_=>[] ; c=Nom; g = PNoGen };
+ IndefArt = { s = \\_=>[] ; c=Nom; g = PNoGen };
+
+ UseN sb =
+ {s = \\n,c => sb.s ! SF n c ;
+ g = sb.g ;
+ anim = sb.anim
+ } ;
+
+-- It is possible to use a function word as a common noun; the semantics is
+-- often existential or indexical.
+ UseN2 x = x ;
+
+-- The application of a function gives, in the first place, a common noun:
+-- "ключ от дома". From this, other rules of the resource grammar
+-- give noun phrases, such as "ключи от дома", "ключи от дома
+-- и от машины", and "ключ от дома и машины" (the
+-- latter two corresponding to distributive and collective functions,
+-- respectively). Semantics will eventually tell when each
+-- of the readings is meaningful.
+
+ ComplN2 mama ivan =
+ {s = \\n, cas => case ivan.pron of
+ { True => ivan.s ! (mkPronForm cas No (Poss (gNum mama.g n))) ++ mama.s ! n ! cas;
+ False => mama.s ! n ! cas ++ mama.s2 ++
+ ivan.s ! (mkPronForm mama.c Yes (Poss (gNum mama.g n)))
+ };
+ g = mama.g ;
+ anim = mama.anim
+ } ;
+
+-- Two-place functions add one argument place.
+-- There application starts by filling the first place.
+
+ ComplN3 poezd paris =
+ {s = \\n,c => poezd.s ! n ! c ++ poezd.s2 ++ paris.s ! (PF poezd.c Yes NonPoss) ;
+ g = poezd.g ; anim = poezd.anim;
+ s2 = poezd.s3; c = poezd.c2
+ } ;
+
+
+-- The two main functions of adjective are in predication ("Иван - молод")
+-- and in modification ("молодой человек"). Predication will be defined
+-- later, in the chapter on verbs.
+
+ AdjCN khoroshij novayaMashina =
+ {s = \\n, c =>
+ khoroshij.s ! AF c novayaMashina.anim (gNum novayaMashina.g n) ++
+ novayaMashina.s ! n ! c ;
+ g = novayaMashina.g ;
+ anim = novayaMashina.anim
+ } ;
+
+-- This is a source of the "man with a telescope" ambiguity, and may produce
+-- strange things, like "машины всегда".
+-- Semantics will have to make finer distinctions among adverbials.
+
+ AdvCN chelovek uTelevizora =
+ {s = \\n,c => chelovek.s ! n ! c ++ uTelevizora.s ;
+ g = chelovek.g ;
+ anim = chelovek.anim
+ } ;
+
+-- Constructions like "the idea that two is even" are formed at the
+-- first place as common nouns, so that one can also have "a suggestion that...".
+
+ SentCN idea x =
+ {s = \\n,c => idea.s ! n ! c ++ x.s ;
+ g = idea.g; anim = idea.anim
+ } ;
+
+ RelCN idea x =
+ {s = \\n,c => idea.s ! n ! c ++ x.s !(gNum idea.g n)!c!idea.anim ;
+ g = idea.g; anim = idea.anim
+ } ;
+
+ ApposCN cn s =
+ {s = \\n,c => cn.s ! n ! c ++ s.s! PF c No NonPoss ;
+ g = cn.g ;
+ anim = cn.anim
+ } ;
+
+
+}
+
diff --git a/next-lib/src/russian/NumeralRus.gf b/next-lib/src/russian/NumeralRus.gf
new file mode 100644
index 000000000..c1900358f
--- /dev/null
+++ b/next-lib/src/russian/NumeralRus.gf
@@ -0,0 +1,143 @@
+--# -path=.:../abstract:../common:../../prelude
+
+concrete NumeralRus of Numeral = CatRus ** open ResRus in {
+
+flags coding=utf8 ;
+
+-- Toiska, 13/8/2000, AR with Arto Mustajoki.
+
+lincat Digit = {s : DForm => Gender => Str ; size : Size} ;
+lincat Sub10 = {s : Place => DForm => Gender => Str ; size : Size} ;
+lincat Sub100 = {s : Place => Gender => Str ; size : Size} ;
+lincat Sub1000 = {s : Place => Gender => Str ; size : Size} ;
+lincat Sub1000000 = {s : Gender => Str} ;
+
+lin num x = {s = table{ _ => x.s } ; n = Pl}; ---- n TODO ; Size? AR 18/12/2007
+
+lin n2 =
+ {s = table {{unit} => table {{Fem} => "две" ; _ => "два"} ;
+ {teen} => gg "двенадцать" ;
+ {ten} => gg "двадцать" ;
+ {hund} => gg "двести"} ;
+ size = sgg} ;
+lin n3 =
+ {s = table {{unit} => gg "три" ;
+ {teen} => gg "тринадцать" ;
+ {ten} => gg "тридцать" ;
+ {hund} => gg "триста"} ;
+ size = sgg} ;
+lin n4 =
+ {s = table {{unit} => gg "четыре" ;
+ {teen} => gg "четырнадцать" ;
+ {ten} => gg "сорок" ;
+ {hund} => gg "четыреста"} ;
+ size = sgg} ;
+lin n5 =
+ {s = table {{unit} => gg "пять" ;
+ {teen} => gg "пятнадцать" ;
+ {ten} => gg "пятьдесят" ;
+ {hund} => gg "пятьсот"} ;
+ size = plg} ;
+lin n6 =
+ {s = table {{unit} => gg "шесть" ;
+ {teen} => gg "шестнадцать" ;
+ {ten} => gg "шестьдесят" ;
+ {hund} => gg "шестьсот"} ;
+ size = plg} ;
+lin n7 =
+ {s = table {{unit} => gg "семь" ;
+ {teen} => gg "семнадцать" ;
+ {ten} => gg "семьдесят" ;
+ {hund} => gg "семьсот"} ;
+ size = plg} ;
+lin n8 =
+ {s = table {{unit} => gg "восемь" ;
+ {teen} => gg "восемнадцать" ;
+ {ten} => gg "восемьдесят" ;
+ {hund} => gg "восемьсот"} ;
+ size = plg} ;
+lin n9 =
+ {s = table {{unit} => gg "девять" ;
+ {teen} => gg "девятнадцать" ;
+ {ten} => gg "девяносто" ;
+ {hund} => gg "девятьсот"} ;
+ size = plg} ;
+
+
+lin pot01 =
+ {s = table {{attr} => table {{hund} => gg "сто" ; _ => gg []} ;
+ _ => table {{hund} => gg "сто" ;
+ _ => table {{Masc} => "один" ; {Fem} => "одна" ; _ => "одно"}}} ;
+ size = nom} ;
+lin pot0 d =
+ {s = table {_ => d.s} ; size = d.size} ;
+lin pot110 =
+ {s = table {_ => gg "десяти"} ; size = plg} ;
+-- {s = table {_ => gg "десять"} ; size = plg} ;
+lin pot111 =
+ {s = table {_ => gg "одиннадцать"} ; size = plg} ; --- 11
+lin pot1to19 d =
+ {s = table {_ => d.s ! teen} ; size = plg} ;
+lin pot0as1 n =
+ {s = table {p => n.s ! p ! unit} ; size = n.size} ;
+lin pot1 d =
+ {s = table {_ => d.s ! ten} ; size = plg} ; ---
+lin pot1plus d e =
+ {s = table {_ =>
+ table {g => d.s ! ten ! g ++ e.s ! indep ! unit ! g}} ; size = e.size} ;
+lin pot1as2 n =
+ {s = n.s ; size = n.size} ;
+lin pot2 d =
+ {s = table {p => d.s ! p ! hund} ; size = plg} ;
+lin pot2plus d e =
+ {s = table {p => table {g => d.s ! p ! hund ! g ++ e.s ! indep ! g}} ; size = e.size} ;
+lin pot2as3 n =
+ {s = n.s ! indep} ;
+lin pot3 n =
+ {s = gg (n.s ! attr ! Fem ++ mille ! n.size)} ;
+lin pot3plus n m =
+ {s = table {g => n.s ! attr ! Fem ++ mille ! n.size ++ m.s ! indep ! g}} ;
+
+--- TODO
+--- raz/odin
+
+-- numerals as sequences of digits
+
+ lincat
+ Dig = TDigit ;
+
+ lin
+ IDig d = {s = d.s ; n = d.n} ;
+
+ IIDig d i = {
+ s = d.s ++ i.s ;
+ n = Pl
+ } ;
+
+ D_0 = mkDig "0" ;
+ D_1 = mk3Dig "1" "1" Sg ; ----
+ D_2 = mkDig "2" ;
+ D_3 = mkDig "3" ;
+ D_4 = mkDig "4" ;
+ D_5 = mkDig "5" ;
+ D_6 = mkDig "6" ;
+ D_7 = mkDig "7" ;
+ D_8 = mkDig "8" ;
+ D_9 = mkDig "9" ;
+
+ oper
+ mk2Dig : Str -> Str -> TDigit = \c,o -> mk3Dig c o Pl ;
+ mkDig : Str -> TDigit = \c -> mk2Dig c (c + "o") ;
+
+ mk3Dig : Str -> Str -> Number -> TDigit = \c,o,n -> {
+ s = c ; ---- gender
+ n = n
+ } ;
+
+ TDigit = {
+ n : Number ;
+ s : Str
+ } ;
+
+}
+
diff --git a/next-lib/src/russian/ParadigmsRus.gf b/next-lib/src/russian/ParadigmsRus.gf
new file mode 100644
index 000000000..b424ef102
--- /dev/null
+++ b/next-lib/src/russian/ParadigmsRus.gf
@@ -0,0 +1,470 @@
+--# -path=.:../abstract:../../prelude:../common
+
+--1 Russian Lexical Paradigms
+--
+-- Janna Khegai 2003--2006
+--
+-- This is an API for the user of the resource grammar
+-- for adding lexical items. It gives functions for forming
+-- expressions of open categories: nouns, adjectives, verbs.
+--
+-- Closed categories (determiners, pronouns, conjunctions) are
+-- accessed through the resource syntax API, $Structural.gf$.
+--
+-- The main difference with $MorphoRus.gf$ is that the types
+-- referred to are compiled resource grammar types. We have moreover
+-- had the design principle of always having existing forms, rather
+-- than stems, as string arguments of the paradigms.
+--
+-- The structure of functions for each word class $C$ is the following:
+-- first we give a handful of patterns that aim to cover all
+-- regular cases. Then we give a worst-case function $mkC$, which serves as an
+-- escape to construct the most irregular words of type $C$.
+--
+-- The following modules are presupposed:
+
+resource ParadigmsRus = open
+ Prelude,
+ MorphoRus,
+ CatRus,
+ NounRus
+ in {
+
+flags coding=utf8 ;
+
+--2 Parameters
+--
+-- To abstract over gender names, we define the following identifiers.
+
+oper
+ Gender : Type ;
+ masculine : Gender ;
+ feminine : Gender ;
+ neuter : Gender ;
+
+-- To abstract over case names, we define the following.
+ Case : Type ;
+
+ nominative : Case ;
+ genitive : Case ;
+ dative : Case ;
+ accusative : Case ;
+ instructive : Case ;
+ prepositional : Case ;
+
+-- In some (written in English) textbooks accusative case
+-- is put on the second place. However, we follow the case order
+-- standard for Russian textbooks.
+
+-- To abstract over number names, we define the following.
+ Number : Type ;
+
+ singular : Number ;
+ plural : Number ;
+
+--2 Nouns
+
+ Animacy: Type ;
+
+ animate: Animacy;
+ inanimate: Animacy;
+
+-- Indeclinabe nouns: "кофе", "пальто", "ВУЗ".
+
+ mkIndeclinableNoun: Str -> Gender -> Animacy -> N ;
+
+ mkN : overload {
+
+-- The regular function captures the variants for some common noun endings.
+
+ mkN : (karta : Str) -> N ;
+ mkN : (tigr : Str) -> Animacy -> N ;
+
+-- Worst case - give six singular forms:
+-- Nominative, Genetive, Dative, Accusative, Instructive and Prepositional;
+-- and the prepositional form after в and на, and
+-- the corresponding six plural forms and the gender and animacy.
+
+ mkN : (nomSg, genSg, datSg, accSg, instSg, preposSg, prepos2Sg, nomPl, genPl, datPl, accPl, instPl, preposPl : Str) -> Gender -> Animacy -> N
+ } ;
+
+ mkN2 : overload {
+
+-- Genitive with no preposition.
+
+ mkN2 : N -> N2 ;
+ mkN2 : N -> Prep -> N2 ;
+ } ;
+
+
+ mkN3 : N -> Prep -> Prep -> N3 ;
+
+-- Proper names.
+
+ mkPN : Str -> Gender -> Animacy -> PN ; -- "Иван", "Маша"
+ nounPN : N -> PN ;
+
+
+--2 Adjectives
+
+-- Non-comparison (only positive degree) one-place adjectives need 28 (4 by 7)
+-- forms in the worst case:
+
+
+-- (Masculine | Feminine | Neutral | Plural) *
+
+-- (Nominative | Genitive | Dative | Accusative Inanimate | Accusative Animate |
+-- Instructive | Prepositional)
+
+
+-- Notice that 4 short forms, which exist for some adjectives are not included
+-- in the current description, otherwise there would be 32 forms for
+-- positive degree.
+
+ mkA : overload {
+
+-- Regular and invariant adjectives with regular comparative.
+
+ mkA : (positive : Str) -> A ;
+
+-- Adjectives with irregular comparative.
+
+ mkA : (positive, comparative : Str) -> A ;
+ } ;
+
+-- Two-place adjectives need a preposition and a case as extra arguments.
+
+ mkA2 : A -> Str -> Case -> A2 ; -- "делим на"
+
+-- Comparison adjectives need a positive adjective
+-- (28 forms without short forms).
+-- Taking only one comparative form (non-syntactic) and
+-- only one superlative form (syntactic) we can produce the
+-- comparison adjective with only one extra argument -
+-- non-syntactic comparative form.
+-- Syntactic forms are based on the positive forms.
+
+
+-- mkADeg : A -> Str -> ADeg ;
+
+-- On top level, there are adjectival phrases. The most common case is
+-- just to use a one-place adjective.
+-- ap : A -> IsPostfixAdj -> AP ;
+
+--2 Adverbs
+
+-- Adverbs are not inflected.
+
+ mkAdv : Str -> Adv ;
+
+--2 Verbs
+--
+-- In our lexicon description ("Verbum") there are 62 forms:
+-- 2 (Voice) by { 1 (infinitive) + [2(number) by 3 (person)](imperative) +
+-- [ [2(Number) by 3(Person)](present) + [2(Number) by 3(Person)](future) +
+-- 4(GenNum)(past) ](indicative)+ 4 (GenNum) (subjunctive) }
+-- Participles (Present and Past) and Gerund forms are not included,
+-- since they fuction more like Adjectives and Adverbs correspondingly
+-- rather than verbs. Aspect is regarded as an inherent parameter of a verb.
+-- Notice, that some forms are never used for some verbs.
+
+Voice: Type;
+Aspect: Type;
+Bool: Type;
+Conjugation: Type ;
+
+first: Conjugation; -- "гуля-Ешь, гуля-Ем"
+firstE: Conjugation; -- Verbs with vowel "ё": "даёшь" (give), "пьёшь" (drink)
+second: Conjugation; -- "вид-Ишь, вид-Им"
+mixed: Conjugation; -- "хоч-Ешь - хот-Им"
+dolzhen: Conjugation; -- irregular
+foreign: Conjugation; -- foreign words which are used in Russian, +++ MG_UR: added +++
+
+
+true: Bool;
+false: Bool;
+
+active: Voice ;
+passive: Voice ;
+imperfective: Aspect;
+perfective: Aspect ;
+
+
+-- The worst case need 6 forms of the present tense in indicative mood
+-- ("я бегу", "ты бежишь", "он бежит", "мы бежим", "вы бежите", "они бегут"),
+-- a past form (singular, masculine: "я бежал"), an imperative form
+-- (singular, second person: "беги"), an infinitive ("бежать").
+-- Inherent aspect should also be specified.
+
+-- mkVerbum : Aspect -> (presentSgP1,presentSgP2,presentSgP3,
+ mkV : Aspect -> (presentSgP1,presentSgP2,presentSgP3,
+ presentPlP1,presentPlP2,presentPlP3,
+ pastSgMasculine,imperative,infinitive: Str) -> V ;
+
+-- Common conjugation patterns are two conjugations:
+-- first - verbs ending with "-ать/-ять" and second - "-ить/-еть".
+-- Instead of 6 present forms of the worst case, we only need
+-- a present stem and one ending (singular, first person):
+-- "я люб-лю", "я жд-у", etc. To determine where the border
+-- between stem and ending lies it is sufficient to compare
+-- first person from with second person form:
+-- "я люб-лю", "ты люб-ишь". Stems shoud be the same.
+-- So the definition for verb "любить" looks like:
+-- regV Imperfective Second "люб" "лю" "любил" "люби" "любить";
+
+ regV :Aspect -> Conjugation -> (stemPresentSgP1,endingPresentSgP1,
+ pastSgP1,imperative,infinitive : Str) -> V ;
+
+
+-- Two-place verbs, and the special case with direct object. Notice that
+-- a particle can be included in a $V$.
+
+ mkV2 : V -> Str -> Case -> V2 ; -- "войти в дом"; "в", accusative
+ mkV3 : V -> Str -> Str -> Case -> Case -> V3 ; -- "сложить письмо в конверт"
+ dirV2 : V -> V2 ; -- "видеть", "любить"
+ tvDirDir : V -> V3 ;
+
+-- The definitions should not bother the user of the API. So they are
+-- hidden from the document.
+--.
+ Gender = MorphoRus.Gender ;
+ Case = MorphoRus.Case ;
+ Number = MorphoRus.Number ;
+ Animacy = MorphoRus.Animacy;
+ Aspect = MorphoRus.Aspect;
+ Voice = MorphoRus.Voice ;
+ --Tense = Tense ;
+ Bool = Prelude.Bool ;
+ Conjugation = MorphoRus.Conjugation;
+first = First ;
+firstE = FirstE ;
+second = Second ;
+secondA = SecondA ;
+mixed = Mixed ;
+dolzhen = Dolzhen;
+foreign = Foreign; -- +++ MG_UR: added +++
+
+ true = True;
+ false = False ;
+ masculine = Masc ;
+ feminine = Fem ;
+ neuter = Neut ;
+ nominative = Nom ;
+ accusative = Acc ;
+ dative = Dat ;
+ genitive = Gen ;
+ instructive = Inst ;
+ prepositional = Prepos PrepOther ; -- FIXME: not correct for v and na
+ singular = Sg ;
+ plural = Pl ;
+ animate = Animate ;
+ inanimate = Inanimate ;
+ active = Act ;
+ passive = Pass ;
+ imperfective = Imperfective ;
+ perfective = Perfective ;
+ -- present = Present ;
+ --past = Past ;
+ -- Degree = Pos | Comp | Super ;
+ -- Person = P1 | P2 | P3 ;
+ -- AfterPrep = Yes | No ;
+ -- Possessive = NonPoss | Poss GenNum ;
+
+-- Noun definitions
+
+ mkN = overload {
+ mkN : (karta : Str) -> N = mk1N ;
+ mkN : (tigr : Str) -> Animacy -> N = \nom, anim -> case anim of { Animate => nAnimate (mk1N nom) ;
+ Inanimate => mk1N nom } ;
+ mkN : (nomSg, genSg, datSg, accSg, instSg, preposSg, prepos2Sg,
+ nomPl, genPl, datPl, accPl, instPl, preposPl : Str) -> Gender -> Animacy -> N = mkWorstN
+ } ;
+
+ mkIndeclinableNoun = \s,g, anim ->
+ {
+ s = table { SF _ _ => s } ;
+ g = g ;
+ anim = anim
+ } ** {lock_N = <>};
+
+ oper mkWorstN : (nomSg, genSg, datSg, accSg, instSg, preposSg, prepos2Sg,
+ nomPl, genPl, datPl, accPl, instPl, preposPl : Str) -> Gender -> Animacy -> N
+ = \nomSg, genSg, datSg, accSg, instSg, preposSg, prepos2Sg,
+ nomPl, genPl, datPl, accPl, instPl, preposPl, g, anim ->
+ {
+ s = table {
+ SF Sg Nom => nomSg ;
+ SF Sg Gen => genSg ;
+ SF Sg Dat => datSg ;
+ SF Sg Acc => accSg ;
+ SF Sg Inst => instSg ;
+ SF Sg (Prepos PrepOther) => preposSg ;
+ SF Sg (Prepos PrepVNa) => prepos2Sg ;
+ SF Pl Nom => nomPl ;
+ SF Pl Gen => genPl ;
+ SF Pl Dat => datPl ;
+ SF Pl Acc => accPl ;
+ SF Pl Inst => instPl ;
+ SF Pl (Prepos _) => preposPl
+ } ;
+ g = g ;
+ anim = anim
+ } ** {lock_N = <>} ;
+
+ oper mk1N : Str -> N = \x ->
+ case x of {
+ stem+"онок" => nDecl10Hard stem ;
+ stem+"ёнок" => nDecl10Soft stem ;
+-- stem+"aнин" => nDecl11 stem ;
+ stem@(_+"и")+"й" => nDecl7Masc stem;
+ stem@(_+"и")+"я" => nDecl7Fem stem;
+ stem@(_+"и")+"е" => nDecl7Neut stem;
+ stem+"ее" => nAdj { s = (mk1A (stem+"ий")).s!Posit } Neut;
+ stem+"ое" => nAdj { s = (mk1A (stem+(iAfter stem)+"й")).s!Posit } Neut;
+ stem+"мя" => nDecl9 stem ;
+ stem@(_+("а"|"е"|"ё"|"о"|"у"|"ы"|"э"|"ю"|"я"))+"й" => nDecl6Masc stem ;
+ stem@(_+("а"|"е"|"ё"|"о"|"у"|"ы"|"э"|"ю"|"я"))+"е" => nDecl6Neut stem ;
+ stem@(_+("а"|"е"|"ё"|"о"|"у"|"ы"|"э"|"ю"|"я"))+"я" => nDecl6Fem stem ;
+ stem@(_+("ч"|"щ"|"ш"|"ж"|"п"|"эн"|"м"|"ф"))+"ь" => nDecl8 stem ;
+ stem@(_+("д"|"т"|"ст"|"с"|"в"|"б"))+"ь" => nDecl8 stem ;
+ stem@(_+"ш"|"ж"|"ч"|"щ"|"ц")+"е" => nRegHardNeut stem;
+ stem+"е" => nRegSoftNeut stem ;
+ stem+"я" => nRegSoftFem stem ;
+ stem+"ь" => nRegSoftMasc stem ;
+ stem+"о" => nRegHardNeut stem ;
+ stem+"а" => nRegHardFem stem ;
+ stem => nRegHardMasc stem
+ } ** {lock_N = <>} ;
+
+
+
+-- An individual-valued function is a common noun together with the
+-- preposition prefixed to its argument ("клZ+ о' дома").
+-- The situation is analogous to two-place adjectives and transitive verbs.
+--
+-- We allow the genitive construction to be used as a variant of
+-- all function applications. It would definitely be too restrictive only
+-- to allow it when the required case is genitive. We don't know if there
+-- are counterexamples to the liberal choice we've made.
+
+ oper mkN2 = overload {
+ mkN2 : N -> N2 = \n -> mkFun n nullPrep ;
+ mkN2 : N -> Prep -> N2 = mkFun;
+ } ;
+
+ mkFun : N -> Prep -> N2 = \f,p -> (UseN f) ** {s2 = p.s ; c = p.c}** {lock_N2 = <>} ;
+
+ nullPrep : Prep = {s = []; c= Gen; lock_Prep=<>} ;
+
+ mkN3 f p r = (UseN f) ** {s2 = p.s ; c=p.c; s3=r.s ; c2=r.c; lock_N3 = <>} ;
+
+
+ mkPN = \ivan, g, anim ->
+ case g of {
+ Masc => mkProperNameMasc ivan anim ;
+ _ => mkProperNameFem ivan anim
+ } ** {lock_PN =<>};
+ nounPN n = {s=\\c => n.s! SF Sg c; anim=n.anim; g=n.g; lock_PN=<>};
+
+-- On the top level, it is maybe $CN$ that is used rather than $N$, and
+-- $NP$ rather than $PN$.
+
+ makeCN : N -> CN ;
+ makeNP : Str -> Gender -> Animacy -> NP ;
+
+
+ makeCN = UseN;
+
+ makeNP = \x,y,z -> UsePN (mkPN x y z) ;
+
+ mkA = overload {
+ mkA : (positive : Str) -> A = mk1A ;
+ mkA : (positive, comparative : Str) -> A = mk2A;
+ } ;
+
+ mk1A : Str -> A = \positive ->
+ let stem = Predef.tk 2 positive in mk2A positive (stem+"ее") ;
+
+ mk2A : Str -> Str -> A = \positive, comparative ->
+ case positive of {
+ stem+"ый" => mkAdjDeg (aRegHardStemStress stem) comparative ;
+ stem+"ой" => mkAdjDeg (aRegHardEndStress stem) comparative ;
+ stem@(_+("г"|"к"|"х"))+"ий" => mkAdjDeg (aRegHardStemStress stem) comparative;
+ stem@(_+("ш"|"ж"|"ч"|"щ"))+"ий" => mkAdjDeg (aRegHardStemStress stem) comparative;
+ stem+"ий" => mkAdjDeg (aRegSoft stem) comparative ;
+ stem => mkAdjDeg (adjInvar stem) comparative
+ } ;
+
+ -- khaki, mini, hindi, netto
+ adjInvar : Str -> Adjective = \stem -> { s = \\_ => stem } ;
+
+ oper mkAdjDeg: Adjective -> Str -> A = \adj, s ->
+ { s = table
+ {
+ Posit => adj.s ;
+ Compar => \\af => s ;
+ Superl => \\af => samuj.s !af ++ adj.s ! af
+ }
+ } ** {lock_A = <>};
+
+
+ mkA2 a p c= a ** {s2 = p ; c = c; lock_A2 = <>};
+-- mkADeg a s = mkAdjDeg a s ** {lock_ADeg = <>}; -- defined in morpho.RusU
+
+-- ap a p = mkAdjPhrase a p ** {lock_AP = <>}; -- defined in syntax module
+
+ mkAdv x = ss x ** {lock_Adv = <>} ;
+
+-- Verb definitions
+
+-- mkVerbum = \asp, sgP1, sgP2, sgP3, plP1, plP2, plP3,
+ mkV = \asp, sgP1, sgP2, sgP3, plP1, plP2, plP3,
+ sgMascPast, imperSgP2, inf -> case asp of {
+ Perfective =>
+ mkVerbPerfective inf imperSgP2
+ (presentConj sgP1 sgP2 sgP3 plP1 plP2 plP3) (pastConj sgMascPast)
+ ** { lock_V=<> };
+ Imperfective =>
+ mkVerbImperfective inf imperSgP2
+ (presentConj sgP1 sgP2 sgP3 plP1 plP2 plP3) (pastConj sgMascPast)
+ ** { lock_V=<> }
+ };
+
+ oper presentConj: (_,_,_,_,_,_: Str) -> PresentVerb =
+ \sgP1, sgP2, sgP3, plP1, plP2, plP3 ->
+ table {
+ PRF (ASg _) P1 => sgP1 ;
+ PRF (ASg _) P2 => sgP2 ;
+ PRF (ASg _) P3 => sgP3 ;
+ PRF APl P1 => plP1 ;
+ PRF APl P2 => plP2 ;
+ PRF APl P3 => plP3
+ };
+
+ regV a b c d e f g = verbDecl a b c d e f g ** {lock_V = <>} ;
+ -- defined in morpho.RusU.gf
+{-
+ mkV a b = extVerb a b ** {lock_V = <>}; -- defined in types.RusU.gf
+
+ mkPresentV = \aller, vox ->
+ { s = table {
+ VFin gn p => aller.s ! VFORM vox (VIND (VPresent (numGNum gn) p)) ;
+ VImper n p => aller.s ! VFORM vox (VIMP n p) ;
+ VInf => aller.s ! VFORM vox VINF ;
+ VSubj gn => aller.s ! VFORM vox (VSUB gn)
+ }; t = Present ; a = aller.asp ; w = vox ; lock_V = <>} ;
+-}
+ mkV2 v p cas = v ** {s2 = p ; c = cas; lock_V2 = <>};
+ dirV2 v = mkV2 v [] Acc;
+
+
+ tvDirDir v = mkV3 v "" "" Acc Dat;
+
+-- *Ditransitive verbs* are verbs with three argument places.
+-- We treat so far only the rule in which the ditransitive
+-- verb takes both complements to form a verb phrase.
+
+ mkV3 v s1 s2 c1 c2 = v ** {s2 = s1; c = c1; s4 = s2; c2=c2; lock_V3 = <>};
+
+} ;
+
diff --git a/next-lib/src/russian/PhraseRus.gf b/next-lib/src/russian/PhraseRus.gf
new file mode 100644
index 000000000..7a13e3c32
--- /dev/null
+++ b/next-lib/src/russian/PhraseRus.gf
@@ -0,0 +1,27 @@
+--# -path=.:../abstract:../common:../../prelude
+
+concrete PhraseRus of Phrase = CatRus ** open Prelude, ResRus in {
+
+ flags coding=utf8 ;
+ lin
+ PhrUtt pconj utt voc = {s = pconj.s ++ utt.s ++ voc.s} ;
+
+ UttS s = s ;
+ UttQS qs = {s = qs.s ! QDir} ;
+ UttImpSg pol imp = {s = pol.s ++ imp.s ! pol.p ! Masc! Sg} ;
+ UttImpPl pol imp = {s = pol.s ++ imp.s ! pol.p ! Masc!Pl} ;
+ UttImpPol pol imp = {s = pol.s ++ imp.s ! pol.p ! Masc! Sg} ; ---- ?? AR
+
+ UttIP ip = {s = ip.s ! PF Nom No NonPoss} ; --- Acc also
+ UttIAdv iadv = iadv ;
+ UttNP np = {s = np.s ! PF Acc No NonPoss} ;
+ UttVP vp = {s = vp.s ! ClInfinit ! ASg Masc! P3} ;
+ UttAdv adv = adv ;
+
+ NoPConj = {s = []} ;
+ PConjConj conj = ss conj.s2 ;
+
+ NoVoc = {s = []} ;
+ VocNP np = {s = "," ++ np.s ! PF Nom No NonPoss} ;
+
+}
diff --git a/next-lib/src/russian/QuestionRus.gf b/next-lib/src/russian/QuestionRus.gf
new file mode 100644
index 000000000..28a9dfccd
--- /dev/null
+++ b/next-lib/src/russian/QuestionRus.gf
@@ -0,0 +1,72 @@
+--# -path=.:../abstract:../common:../../prelude
+
+concrete QuestionRus of Question = CatRus ** open ResRus, Prelude in {
+
+ flags optimize=all_subs ; coding=utf8 ;
+
+ lin
+
+ QuestCl cl = {s = \\b,cf,_ => cl.s ! b ! cf } ;
+
+ QuestVP kto spit =
+ {s = \\b,clf,qf => (predVerbPhrase kto spit).s!b!clf } ;
+
+ QuestSlash Kto yaGovoruO =
+ let { kom = Kto.s ! (mkPronForm yaGovoruO.c No NonPoss) ; o = yaGovoruO.s2 } in
+ {s = \\b,clf,_ => o ++ kom ++ yaGovoruO.s ! b ! clf
+ } ;
+
+ QuestIAdv kak tuPozhivaesh =
+ {s = \\b,clf,q => kak.s ++ tuPozhivaesh.s!b!clf } ;
+
+ QuestIComp kak tuPozhivaesh =
+ {s = \\b,clf,q => let ne = case b of {Neg => ""; Pos => []}
+ in
+ kak.s ++ ne ++tuPozhivaesh.s! PF Nom No NonPoss } ;
+
+
+ PrepIP p ip = {s = p.s ++ ip.s ! PF Nom No NonPoss} ;
+
+ AdvIP ip adv = {
+ s = \\c => ip.s ! c ++ adv.s ;
+ n = ip.n; p=ip.p; g=ip.g; anim=ip.anim; pron=ip.pron
+ } ;
+
+ IdetCN kakoj okhotnik =
+ {s = \\pf => case kakoj.c of {
+ Nom =>
+ kakoj.s ! AF (extCase pf) okhotnik.anim (gNum okhotnik.g kakoj.n) ++
+ okhotnik.s ! kakoj.n ! (extCase pf) ;
+ _ =>
+ kakoj.s ! AF (extCase pf) okhotnik.anim (gNum okhotnik.g kakoj.n) ++
+ okhotnik.s ! kakoj.n ! kakoj.c };
+ n = kakoj.n ;
+ p = P3 ;
+ pron = False;
+ g = kakoj.g ;
+ anim = okhotnik.anim
+ } ;
+
+-- 1.4 additions 17/6/2008 by AR
+
+ IdetIP kakoj = let anim = Inanimate in
+ {s = \\pf => kakoj.s ! AF (extCase pf) anim (pgNum kakoj.g kakoj.n) ;
+ n = kakoj.n ;
+ p = P3 ;
+ pron = False;
+ g = kakoj.g ;
+ anim = anim
+ } ;
+
+ IdetQuant kakoj pyat = -- okhotnik =
+ {s = \\af =>
+ kakoj.s ! pyat.n ! af ++
+ pyat.s ! caseAF af ! genAF af ;
+ n = pyat.n ;
+ g = kakoj.g ;
+ c = kakoj.c
+ } ;
+
+ CompIAdv a = a ;
+ CompIP ip = {s = ip.s ! PF Nom No NonPoss} ;
+}
diff --git a/next-lib/src/russian/RelativeRus.gf b/next-lib/src/russian/RelativeRus.gf
new file mode 100644
index 000000000..d8a60dc47
--- /dev/null
+++ b/next-lib/src/russian/RelativeRus.gf
@@ -0,0 +1,37 @@
+--# -path=.:../abstract:../common:../../prelude
+
+concrete RelativeRus of Relative = CatRus ** open ResRus, MorphoRus in {
+
+ flags optimize=all_subs ; coding=utf8 ;
+
+ lin
+
+ RelCl A = {s = \\b,clf,gn,c, anim =>
+ takoj.s ! AF c anim gn ++ "что" ++ A.s !b!clf};
+
+ RelVP kotoruj gulyaet =
+ { s = \\b,clf,gn, c, anim => let { nu = numGNum gn } in
+ kotoruj.s ! gn ! c ! anim ++ gulyaet.s2 ++ gulyaet.s ! clf ! gn !P3 ++
+ gulyaet.s3 ! genGNum gn ! nu
+ } ;
+
+
+-- Preposition stranding: "that we are looking at". Pied-piping is
+-- deferred to $ExtRus.gf$ ("at which we are looking").
+
+ RelSlash kotoruj yaVizhu =
+ {s = \\b,clf,gn, _ , anim => yaVizhu.s2 ++
+ kotoruj.s ! gn ! yaVizhu.c ! anim
+ ++ yaVizhu.s!b!clf
+ } ;
+
+ FunRP p mama kotoruj =
+ {s = \\gn,c, anim => let {nu = numGNum gn} in
+ mama.s ! PF c No NonPoss ++
+ p.s ++ kotoruj.s ! gn ! p.c ! anim
+ } ;
+
+ IdRP ={ s = \\gn, c, anim =>
+ kotorujDet.s ! (AF c anim gn )} ;
+}
+
diff --git a/next-lib/src/russian/ResRus.gf b/next-lib/src/russian/ResRus.gf
new file mode 100644
index 000000000..d19ea1797
--- /dev/null
+++ b/next-lib/src/russian/ResRus.gf
@@ -0,0 +1,400 @@
+--# -path=.:../abstract:../common:../../prelude
+
+--1 Russian auxiliary operations.
+
+-- This module contains operations that are needed to make the
+-- resource syntax work. To define everything that is needed to
+-- implement $Test$, it moreover contains regular lexical
+-- patterns needed for $Lex$.
+
+resource ResRus = ParamX ** open Prelude in {
+
+flags coding=utf8 ; optimize=all ;
+
+--2 Enumerated parameter types
+--
+-- These types are the ones found in school grammars.
+-- Their parameter values are atomic.
+
+-- Some parameters, such as $Number$, are inherited from $ParamX$.
+param
+ Gender = Masc | Fem | Neut ;
+ Case = Nom | Gen | Dat | Acc | Inst | Prepos PrepKind ;
+ PrepKind = PrepOther | PrepVNa;
+ Animacy = Animate | Inanimate ;
+ Voice = Act | Pass ;
+ Aspect = Imperfective | Perfective ;
+ RusTense = Present | PastRus | Future ;
+-- Degree = Pos | Comp | Super ;
+ AfterPrep = Yes | No ;
+ Possessive = NonPoss | Poss GenNum ;
+-- Anteriority = Simul | Anter ;
+ ClForm = ClIndic RusTense Anteriority | ClCondit | ClInfinit | ClImper;
+ -- "naked infinitive" clauses
+
+-- A number of Russian nouns have common gender. They can
+-- denote both males and females: "умница" (a clever person), "инженер" (an engineer).
+-- We overlook this phenomenon for now.
+
+-- The AfterPrep parameter is introduced in order to describe
+-- the variations of the third person personal pronoun forms
+-- depending on whether they come after a preposition or not.
+
+-- Declination forms depend on Case, Animacy , Gender:
+-- "большие дома" - "больших домов" (big houses - big houses'),
+-- Animacy plays role only in the Accusative case (Masc Sg and Plural forms):
+-- Accusative Animate = Genetive, Accusaive Inanimate = Nominative
+-- "я люблю большие дома-"я люблю больших мужчин"
+-- (I love big houses - I love big men);
+-- and on Number: "большой дом - "большие дома"
+-- (a big house - big houses).
+-- The plural never makes a gender distinction.
+
+ GenNum = ASg Gender | APl ;
+
+ -- Coercions between the compound gen-num type and gender and number:
+oper
+ gNum : Gender -> Number -> GenNum = \g,n ->
+ case n of
+ { Sg => case g of
+ { Fem => ASg Fem ;
+ Masc => ASg Masc ;
+ Neut => ASg Neut } ;
+ Pl => APl
+ } ;
+
+
+-- The Possessive parameter is introduced in order to describe
+-- the possessives of personal pronouns, which are used in the
+-- Genetive constructions like "моя мама" (my mother) instead of
+-- "мама моя" (the mother of mine).
+
+--2 For $Noun$
+-- Nouns decline according to number and case.
+-- For the sake of shorter description these parameters are
+-- combined in the type SubstForm.
+param
+ SubstForm = SF Number Case ;
+
+
+-- Real parameter types (i.e. ones on which words and phrases depend)
+-- are mostly hierarchical. The alternative would be cross-products of
+-- simple parameters, but this would usually overgenerate.
+
+-- However, we use the cross-products in complex cases
+-- (for example, aspect and tense parameter in the verb description)
+-- where the relationship between the parameters are non-trivial
+-- even though we aware that some combinations do not exist
+-- (for example, present perfective does not exist, but removing
+-- this combination would lead to having different descriptions
+-- for perfective and imperfective verbs, which we do not want for the
+-- sake of uniformity).
+
+param PronForm = PF Case AfterPrep Possessive;
+
+oper Pronoun = { s : PronForm => Str ; n : Number ; p : Person ;
+ g: PronGen ; pron: Bool} ;
+
+-- Gender is not morphologically determined for first
+-- and second person pronouns.
+
+param PronGen = PGen Gender | PNoGen ;
+
+-- The following coercion is useful:
+
+oper
+ pgen2gen : PronGen -> Gender = \p -> case p of {
+ PGen g => g ;
+ PNoGen => Masc ---- variants {Masc ; Fem} --- the best we can do for ya, tu
+ } ;
+
+
+oper
+ extCase: PronForm -> Case = \pf -> case pf of { PF c _ _ => c } ;
+
+ mkPronForm: Case -> AfterPrep -> Possessive -> PronForm =
+ \c,n,p -> PF c n p ;
+
+ CommNounPhrase: Type = {s : Number => Case => Str; g : Gender; anim : Animacy} ;
+
+ NounPhrase : Type = { s : PronForm => Str ; n : Number ;
+ p : Person ; g: PronGen ; anim : Animacy ; pron: Bool} ;
+
+ mkNP : Number -> CommNounPhrase -> NounPhrase = \n,chelovek ->
+ {s = \\cas => chelovek.s ! n ! (extCase cas) ;
+ n = n ; g = PGen chelovek.g ; p = P3 ; pron =False ;
+ anim = chelovek.anim
+ } ;
+
+ det2NounPhrase : Adjective -> NounPhrase = \eto ->
+ {s = \\pf => eto.s ! (AF (extCase pf) Inanimate (ASg Neut)); n = Sg ; g = PGen Neut ; pron = False ; p = P3 ; anim = Inanimate } ;
+
+
+
+ pron2NounPhraseNum : Pronoun -> Animacy -> Number -> NounPhrase = \ona, anim, num ->
+ {s = ona.s ; n = num ; g = ona.g ;
+ pron = ona.pron; p = ona.p ; anim = anim } ;
+
+
+-- Agreement of $NP$ is a record. We'll add $Gender$ later.
+-- oper Agr = {n : Number ; p : Person} ;
+
+
+----2 For $Verb$
+
+-- Mood is the main verb classification parameter.
+-- The verb mood can be infinitive, subjunctive, imperative, and indicative.
+
+-- Note: subjunctive mood is analytical, i.e. formed from the past form of the
+-- indicative mood plus the particle "ли". That is why they have the same GenNum
+-- parameter. We choose to keep the "redundant" form in order to indicate
+-- the presence of the subjunctive mood in Russian verbs.
+
+-- Aspect and Voice parameters are present in every mood, so Voice is put
+-- before the mood parameter in verb form description the hierachy.
+-- Moreover Aspect is regarded as an inherent parameter of a verb entry.
+-- The primary reason for that is that one imperfective form can have several
+-- perfective forms: "ломать" - "сломать" - "поломать" (to break).
+-- Besides, the perfective form could be formed from imperfective
+-- by prefixation, but also by taking a completely different stem:
+-- "говорить"-"сказать" (to say). In the later case it is even natural to
+-- regard them as different verb entries.
+-- Another reason is that looking at the Aspect as an inherent verb parameter
+-- seem to be customary in other similar projects:
+-- http://starling.rinet.ru/morph.htm
+
+-- Note: Of course, the whole inflection table has many redundancies
+-- in a sense that many verbs do not have all grammatically possible
+-- forms. For example, passive does not exist for the verb
+-- "любить" (to love), but exists for the verb "ломаться" (to break).
+-- In present tense verbs do not conjugate according to Genus,
+-- so parameter GenNum instead Number is used for the sake of
+-- using for example as adjective in predication.
+
+-- Depending on the tense verbs conjugate according to combinations
+-- of gender, person and number of the verb objects.
+-- Participles (Present and PastRus) and Gerund forms are not included in the
+-- current description. This is the verb type used in the lexicon:
+
+oper Verbum : Type = { s: VerbForm => Str ; asp : Aspect };
+
+param
+
+ VerbForm = VFORM Voice VerbConj ;
+ VerbConj = VIND GenNum VTense | VIMP Number Person | VINF | VSUB GenNum ;
+ VTense = VPresent Person | VPast | VFuture Person ;
+
+oper
+ getVTense : RusTense -> Person -> VTense= \t,p ->
+ case t of { Present => VPresent p ; PastRus => VPast; Future => VFuture p } ;
+
+ getTense : Tense -> RusTense= \t ->
+ case t of { Pres => Present
+ ; Fut => Future --# notpresent
+ ; _ => PastRus --# notpresent
+ } ;
+
+
+ getVoice: VerbForm -> Voice = \vf ->
+ case vf of {
+ VFORM Act _ => Act;
+ VFORM Pass _ => Pass
+ };
+oper sebya : Case => Str =table {
+Nom => "";
+Gen => "себя";
+Dat=> "себе";
+Acc => "себя";
+Inst => "собой";
+Prep =>"себе"};
+
+ Verb : Type = {s : ClForm => GenNum => Person => Str ; asp : Aspect ; w: Voice} ;
+-- Verb phrases are discontinuous: the parts of a verb phrase are
+-- (s) an inflected verb, (s2) verb adverbials (not negation though), and
+-- (s3) complement. This discontinuity is needed in sentence formation
+-- to account for word order variations.
+
+ VerbPhrase : Type = Verb ** {s2: Str; s3 : Gender => Number => Str ;
+ negBefore: Bool} ;
+
+
+-- This is one instance of Gazdar's *slash categories*, corresponding to his
+-- $S/NP$.
+-- We cannot have - nor would we want to have - a productive slash-category former.
+-- Perhaps a handful more will be needed.
+--
+-- Notice that the slash category has the same relation to sentences as
+-- transitive verbs have to verbs: it's like a *sentence taking a complement*.
+
+ SlashNounPhrase = Clause ** Complement ;
+ Clause = {s : Polarity => ClForm => Str} ;
+
+-- This is the traditional $S -> NP VP$ rule.
+
+ predVerbPhrase : NounPhrase -> VerbPhrase -> SlashNounPhrase =
+ \Ya, tebyaNeVizhu -> { s = \\b,clf =>
+ let
+ { ya = Ya.s ! (mkPronForm Nom No NonPoss);
+ khorosho = tebyaNeVizhu.s2;
+ vizhu = tebyaNeVizhu.s ! clf !(gNum (pgen2gen Ya.g) Ya.n)! Ya.p;
+ tebya = tebyaNeVizhu.s3 ! (pgen2gen Ya.g) ! Ya.n
+ }
+ in
+ ya ++ khorosho ++ vizhu ++ tebya;
+ s2= "";
+ c = Nom
+} ;
+
+-- Questions are either direct ("Ты счастлив?")
+-- or indirect ("Потом он спросил счастлив ли ты").
+
+param
+ QuestForm = DirQ | IndirQ ;
+
+---- The order of sentence is needed already in $VP$.
+--
+-- Order = ODir | OQuest ;
+
+oper
+ getActVerbForm : ClForm -> Gender -> Number -> Person -> VerbForm = \clf,g,n, p -> case clf of
+ { ClIndic Future _ => VFORM Act (VIND (gNum g n) (VFuture p));
+ ClIndic PastRus _ => VFORM Act (VIND (gNum g n) VPast);
+ ClIndic Present _ => VFORM Act (VIND (gNum g n) (VPresent p));
+ ClCondit => VFORM Act (VSUB (gNum g n));
+ ClInfinit => VFORM Act VINF ;
+ ClImper => VFORM Act (VIMP n p)
+ };
+
+ getPassVerbForm : ClForm -> Gender -> Number -> Person -> VerbForm = \clf,g,n, p -> case clf of
+ { ClIndic Future _ => VFORM Pass (VIND (gNum g n) (VFuture p));
+ ClIndic PastRus _ => VFORM Pass (VIND (gNum g n) VPast);
+ ClIndic Present _ => VFORM Pass (VIND (gNum g n) (VPresent p));
+ ClCondit => VFORM Pass (VSUB (gNum g n));
+ ClInfinit => VFORM Pass VINF ;
+ ClImper => VFORM Pass (VIMP n p)
+ };
+
+
+--2 For $Adjective$
+
+-- The short form is only inflected in gender and number.
+-- Fixing this would require changing the Degree type.
+param
+ AdjForm = AF Case Animacy GenNum | AFShort GenNum | AdvF;
+
+oper
+ Complement = {s2 : Str ; c : Case} ;
+
+oper Refl ={s: Case => Str};
+oper sam: Refl=
+{s = table{
+ Nom => "сам";
+ Gen => "себя";
+ Dat => "себе";
+ Acc => "себя";
+ Inst => "собой";
+ Prepos _ => "себе"
+ }
+};
+
+ pgNum : PronGen -> Number -> GenNum = \g,n ->
+ case n of
+ { Sg => ASg (pgen2gen g) ; -- assuming pronoun "I" is a male
+ Pl => APl
+ } ;
+ -- _ => variants {ASg Masc ; ASg Fem} } ;
+ -- "variants" version cause "no term variants" error during linearization
+
+
+
+oper numGNum : GenNum -> Number = \gn ->
+ case gn of { APl => Pl ; _ => Sg } ;
+
+oper genGNum : GenNum -> Gender = \gn ->
+ case gn of { ASg Fem => Fem; ASg Masc => Masc; _ => Neut } ;
+
+oper numAF: AdjForm -> Number = \af ->
+ case af of { AdvF => Sg; AFShort gn => numGNum gn; AF _ _ gn => (numGNum gn) } ;
+
+oper genAF: AdjForm -> Gender = \af ->
+ case af of { AdvF => Neut; AFShort gn => genGNum gn; AF _ _ gn => (genGNum gn) } ;
+
+oper caseAF: AdjForm -> Case = \af ->
+ case af of { AdvF => Nom; AFShort _ => Nom; AF c _ _ => c } ;
+
+-- The Degree parameter should also be more complex, since most Russian
+-- adjectives have two comparative forms:
+-- attributive (syntactic (compound), declinable) -
+-- "более высокий" (corresponds to "more high")
+-- and predicative (indeclinable)- "выше" (higher) and more than one
+-- superlative forms: "самый высокий" (corresponds to "the most high") -
+-- "высочайший" (the highest).
+
+-- Even one more parameter independent of the degree can be added,
+-- since Russian adjectives in the positive degree also have two forms:
+-- long (attributive and predicative) - "высокий" (high) and short (predicative) - "высок"
+-- although this parameter will not be exactly orthogonal to the
+-- degree parameter.
+-- Short form has no case declension, so in principle
+-- it can be considered as an additional case.
+
+-- Note: although the predicative usage of the long
+-- form is perfectly grammatical, it can have a slightly different meaning
+-- compared to the short form.
+-- For example: "он - больной" (long, predicative) vs.
+-- "он - болен" (short, predicative).
+
+--3 Adjective phrases
+--
+-- An adjective phrase may contain a complement, e.g. "моложе Риты".
+-- Then it is used as postfix in modification, e.g. "человек, моложе Риты".
+
+ IsPostfixAdj = Bool ;
+
+
+-- Simple adjectives are not postfix:
+
+-- Adjective type includes both non-degree adjective classes:
+-- possesive ("мамин"[mother's], "лисий" [fox'es])
+-- and relative ("русский" [Russian]) adjectives.
+
+ Adjective : Type = {s : AdjForm => Str} ;
+
+-- A special type of adjectives just having positive forms
+-- (for semantic reasons) is useful, e.g. "финский".
+
+ AdjPhrase = Adjective ** {p : IsPostfixAdj} ;
+
+
+ mkAdjPhrase : Adjective -> IsPostfixAdj -> AdjPhrase = \novuj ,p -> novuj ** {p = p} ;
+
+----2 For $Relative$
+--
+-- RAgr = RNoAg | RAg {n : Number ; p : Person} ;
+-- RCase = RPrep | RC Case ;
+--
+--2 For $Numeral$
+
+param DForm = unit | teen | ten | hund ;
+param Place = attr | indep ;
+param Size = nom | sgg | plg ;
+--param Gend = masc | fem | neut ;
+oper mille : Size => Str = table {
+ {nom} => "тысяча" ;
+ {sgg} => "тысячи" ;
+ _ => "тысяч"} ;
+
+oper gg : Str -> Gender => Str = \s -> table {_ => s} ;
+
+-- CardOrd = NCard | NOrd ;
+
+----2 Transformations between parameter types
+--
+
+oper
+
+ numSF: SubstForm -> Number = \sf -> case sf of { SF n _ => n } ;
+
+ caseSF: SubstForm -> Case = \sf -> case sf of { SF _ c => c } ;
+
+}
diff --git a/next-lib/src/russian/SentenceRus.gf b/next-lib/src/russian/SentenceRus.gf
new file mode 100644
index 000000000..b0379d771
--- /dev/null
+++ b/next-lib/src/russian/SentenceRus.gf
@@ -0,0 +1,115 @@
+
+--# -path=.:../abstract:../common:../../prelude
+
+
+concrete SentenceRus of Sentence = CatRus ** open Prelude, ResRus in {
+
+ flags optimize=all_subs ; coding=utf8 ;
+
+ lin
+
+ PredVP Ya tebyaNeVizhu = { 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.g Ya.n)! Ya.p;
+ khorosho = tebyaNeVizhu.s2 ;
+ tebya = tebyaNeVizhu.s3 ! (pgen2gen Ya.g) ! Ya.n
+ }
+ in
+ if_then_else Str tebyaNeVizhu.negBefore
+ (ya ++ ne ++ vizhu ++ tebya ++ khorosho)
+ (ya ++ vizhu ++ ne ++ tebya ++ khorosho)
+ } ;
+
+
+ PredSCVP sc vp = { s = \\b,clf =>
+ let {
+ ne = case b of {Pos=>""; Neg=>"не"};
+ vizhu = vp.s ! clf ! (ASg Neut)! P3;
+ tebya = vp.s3 ! Neut ! Sg
+ }
+ in
+ if_then_else Str vp.negBefore
+ (sc.s ++ ne ++ vizhu ++ 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 ;
+ s2=lubit.s2;
+ c=lubit.c };
+-}
+ AdvSlash slash adv = {
+ s = \\b,clf => slash.s ! b ! clf ++ adv.s ;
+ c = slash.c;
+ s2 = slash.s2;
+ } ;
+
+ SlashPrep cl p = {s=cl.s; s2=p.s; c=p.c} ;
+
+ --- AR 3/11/2007
+ SlashVS ivan vidit tuUlubaeshsya = {
+ s=\\b,clf => ivan.s ! PF Nom No NonPoss ++
+ vidit.s! (getActVerbForm clf (pgen2gen ivan.g) ivan.n ivan.p) ++
+ [", что"] ++ tuUlubaeshsya.s ;
+ s2=tuUlubaeshsya.s2;
+ c=tuUlubaeshsya.c
+ } ;
+
+
+
+ ImpVP inf = {s = \\pol, g,n =>
+ let
+ dont = case pol of {
+ Neg => "не" ;
+ _ => []
+ }
+ in
+ dont ++ inf.s ! ClImper ! (gNum g n )!P2 ++
+ inf.s2++inf.s3!g!n
+ } ;
+
+ EmbedS s = {s = "что" ++ s.s} ;
+ -- In Russian "Whether you go" transformed in "go whether you":
+ EmbedQS qs = {s = qs.s ! QIndir} ;
+ EmbedVP vp = {s = vp.s2 ++ vp.s!ClInfinit!(ASg Masc) !P3 ++ vp.s3!Masc!Sg} ;
+
+ UseCl t p cl = {s = case t.t of {
+ Cond => cl.s! p.p ! ClCondit ; --# notpresent
+ Pres => cl.s! p.p ! ClIndic Present t.a ; ---- AR work-around 13/12/2007
+ _ => cl.s! p.p ! ClIndic (getTense t.t) t.a}};
+
+ UseQCl t p qcl= {s = case t.t of {
+ Cond => qcl.s! p.p ! ClCondit ; --# notpresent
+ Pres => qcl.s! p.p ! ClIndic Present t.a ;
+ _ => qcl.s!p.p! ClIndic (getTense t.t) t.a }};
+
+ UseRCl t p rcl ={s = \\gn,c,anim => case t.t of {
+ Cond => [", "] ++ rcl.s! p.p ! ClCondit ! gn !c !anim ; --# notpresent
+ Pres => [", "] ++ rcl.s! p.p ! ClIndic Present t.a !gn !c !anim;
+ _ => [", "] ++ rcl.s! p.p ! ClIndic (getTense t.t) t.a !gn !c !anim}};
+
+ UseSlash t p cl = {
+ s = case t.t of {
+ Cond => cl.s! p.p ! ClCondit ; --# notpresent
+ Pres => cl.s! p.p ! ClIndic Present t.a ;
+ _ => cl.s! p.p ! ClIndic (getTense t.t) t.a
+ } ;
+ s2 = cl.s2 ;
+ c = cl.c
+ };
+
+
+ AdvS a s = {s = a.s ++ "," ++ s.s} ; ---- AR 19/6/2007
+
+
+}
+
diff --git a/next-lib/src/russian/StructuralRus.gf b/next-lib/src/russian/StructuralRus.gf
new file mode 100644
index 000000000..71b6ca55d
--- /dev/null
+++ b/next-lib/src/russian/StructuralRus.gf
@@ -0,0 +1,128 @@
+--# -path=.:../abstract:../common:../../prelude
+
+concrete StructuralRus of Structural = CatRus **
+ open ResRus, MorphoRus, (P = ParadigmsRus), Prelude, NounRus, in {
+
+ flags optimize=all ; coding=utf8 ;
+
+lin
+-- First mount the numerals.
+-- UseNumeral i = i ;
+
+-- Then an alphabetical list of structural words
+
+ above_Prep = { s = "над" ; c = Inst} ;
+ after_Prep = { s = "после" ; c = Gen };
+-- all8mass_Det = vesDet ** {n = Sg; g = PNoGen; c = Nom} ;
+ all_Predet = vseDetPl ** { g = PNoGen; c = Nom} ;
+ almost_AdA = {s= "почти"} ;
+ almost_AdN = {s= "почти"} ;
+ although_Subj = ss "хотя" ;
+ always_AdV = ss "всегда" ;
+ and_Conj = {s1 = [] ; s2 = "и" ; n = Pl} ;
+ because_Subj = ss ["потому что"] ;
+ before_Prep ={ s = "перед" ; c = Inst};
+ behind_Prep = { s = "за" ; c = Inst };
+ between_Prep = { s = "между" ; c = Inst};
+ both7and_DConj = sd2 "как" [", так и"] ** {n = Pl} ;
+ but_PConj = ss "но" ;
+ by8agent_Prep = { s = ["с помощью"] ; c = Gen};
+ by8means_Prep = { s = ["с помощью"] ; c = Gen};
+ can8know_VV = verbMoch ;
+ can_VV = verbMoch ;
+ during_Prep = { s = ["в течение"] ; c = Gen};
+ either7or_DConj = sd2 "либо" [", либо"] ** {n = Sg} ;
+-- comma is not visible in GUI!
+ every_Det = kazhdujDet ** {n = Sg ; g = PNoGen; c= Nom} ;
+ everybody_NP = mkNP Pl (UseN ((eEnd_Decl "вс")**{lock_N=<>})) ;
+ everything_NP = UsePron (pronVseInanimate ** {lock_Pron=<>}) ;
+ everywhere_Adv = ss "везде" ;
+ few_Det = nemnogoSgDet **{lock_Det= <>; n= Sg; g = PNoGen; c = Nom};
+--- DEPREC first_Ord = (uy_j_EndDecl "перв" ) ** {lock_A = <>}; --AStaruyj
+ from_Prep = { s = "от" ; c = Gen };
+ he_Pron = pronOn ;
+ here_Adv = ss "здесь" ;
+ here7to_Adv = ss "сюда" ;
+ here7from_Adv = ss "отсюда" ;
+ how_IAdv = ss "как" ;
+ how8many_IDet = skolkoSgDet ** {n = Pl; g = (PGen Neut); c= Gen};
+ i_Pron = pronYa ;
+ if_Subj = ss "если" ;
+ in8front_Prep = { s = "перед" ; c = Inst};
+ in_Prep = { s = "в" ; c = Prepos PrepVNa } ;
+ it_Pron = pronOno ;
+ less_CAdv = {s="менее"; p=""} ;
+ many_Det = mnogoSgDet ** {n = Sg; g = (PGen Neut); c= Gen} ;
+ more_CAdv = {s="более"; p=""} ;
+ most_Predet = bolshinstvoSgDet ** {n = Sg; g = (PGen Neut); c= Gen} ;
+ -- inanimate, Sg: "большинство телефонов безмолству-ет"
+-- most8many_Det = bolshinstvoPlDet ** {n = Pl; g = (PGen Neut); c= Gen} ;
+ -- animate, Pl: "большинство учащихся хорошо подготовлен-ы"
+ much_Det = mnogoSgDet ** {n = Sg; g = (PGen Neut); c= Gen} ; -- same as previous
+ must_VV = verbDolzhen ;
+ no_Utt = ss ["Нет"] ;
+ on_Prep = { s = "на" ; c = Prepos PrepVNa };
+--- DEPREC one_Quant = odinDet ** {lock_QuantSg = <>; n= Sg; g = PNoGen; c = Nom };
+--AStaruyj :
+ only_Predet = (uy_j_EndDecl "единственн" ) ** {lock_Predet = <>; n= Sg; g = PNoGen; c = Nom };
+ or_Conj = {s1= [] ; s2 = "или" ; n = Sg} ;
+ otherwise_PConj = ss "иначе" ;
+ part_Prep = { s = "" ; c = Nom}; -- missing in Russian
+ please_Voc = ss "пожалуйста" ;
+ possess_Prep = { s = "" ; c = Gen}; --- ?? AR 19/2/2004
+ quite_Adv = ss "довольно" ;
+ she_Pron = pronOna ;
+ so_AdA = ss "так";
+ somebody_NP = UsePron (pronKtoTo** {lock_Pron = <>});
+ someSg_Det = nekotorujDet ** {n = Sg; g = PNoGen; c= Nom} ;
+ somePl_Det = nekotorujDet ** {n = Pl; g = PNoGen; c= Nom} ;
+ something_NP = UsePron (pronChtoTo** {lock_Pron=<> }) ;
+ somewhere_Adv = ss "где-нибудь" ;
+ that_Quant = totDet ** {n = Sg; g = PNoGen; c= Nom} ;
+ there_Adv = ss "там" ;
+ there7to_Adv = ss "туда" ;
+ there7from_Adv = ss "оттуда" ;
+ therefore_PConj = ss "следовательно" ;
+ they_Pron = pronOni;
+ this_Quant = etotDet ** {n = Sg; g = PNoGen; c= Nom} ;
+ through_Prep = { s = "через" ; c = Acc };
+ to_Prep = { s = "к" ; c = Dat };
+ too_AdA = ss "слишком" ;
+ under_Prep = { s = "под" ; c = Inst };
+ very_AdA = ss "очень" ;
+ want_VV = verbKhotet ;
+ we_Pron = pronMu ;
+ whatPl_IP = pron2NounPhraseNum pronChto Inanimate Pl;
+ whatSg_IP = pron2NounPhraseNum pronChto Inanimate Sg;
+ when_IAdv = ss "когда" ;
+ when_Subj = ss "когда" ;
+ where_IAdv = ss "где" ;
+ which_IQuant = {
+ s = \\_ => kotorujDet.s ;
+ g = PNoGen;
+ c= Nom
+ } ;
+ whoPl_IP = pron2NounPhraseNum pronKto Animate Pl;
+ whoSg_IP = pron2NounPhraseNum pronKto Animate Sg;
+ why_IAdv = ss "почему" ;
+ with_Prep = { s = "с" ; c = Inst};
+ without_Prep = { s = "без" ; c = Gen};
+ youPl_Pron = pronVu;
+ yes_Utt = ss ["Да"] ;
+ youSg_Pron = pronTu;
+ youPol_Pron = pronVu;
+
+--- NoDet = nikakojDet ** {n = Sg; g = PNoGen; c= Nom} ;
+--- AnyDet = lubojDet ** {n = Sg; g = PNoGen; c= Nom} ;
+--- AnyNumDet = mkDeterminerNum (lubojDet ** {n = Pl; g = PNoGen; c= Nom} );
+--- NoNumDet = mkDeterminerNum (nikakojDet ** {n = Pl; g = PNoGen; c= Nom} );
+---NobodyNP = UsePron pronNikto Animate;
+---NothingNP = UsePron pronNichto Inanimate;
+
+-- In case of "neither.. no" expression double negation is not
+-- only possible, but also required in Russian.
+-- There is no means of control for this however in the resource grammar.
+--- NeitherNor = sd2 "ни" [", ни"] ** {n = Sg} ;
+--- NowhereNP = ss "нигде" ;
+--- AgentPrep = { s = "" ; c = Nom}; -- missing in Russian
+}
diff --git a/next-lib/src/russian/VerbRus.gf b/next-lib/src/russian/VerbRus.gf
new file mode 100644
index 000000000..193800034
--- /dev/null
+++ b/next-lib/src/russian/VerbRus.gf
@@ -0,0 +1,289 @@
+
+--# -path=.:../abstract:../common:../../prelude
+
+concrete VerbRus of Verb = CatRus ** open ResRus, Prelude in {
+
+-- 1.4 additions by AR 17/6/2008
+
+ flags optimize=all_subs ; coding=utf8 ;
+ lin
+ CompNP masha =
+ { s=\\clf,gn,p => case clf of
+ {
+ (ClIndic Present _) => masha.s ! (mkPronForm Nom No NonPoss) ;
+ (ClIndic PastRus _) => case gn of
+ { (ASg Fem) =>"была"++masha.s ! (mkPronForm Inst No NonPoss);
+ (ASg Masc) =>"был" ++ masha.s!(mkPronForm Inst No NonPoss);
+ (ASg Neut) =>"было" ++ masha.s!(mkPronForm Inst No NonPoss);
+ APl => "были" ++ masha.s ! (mkPronForm Inst No NonPoss)
+ };
+ (ClIndic Future _) => case gn of
+ { APl => case p of
+ { P3 => "будут"++masha.s ! (mkPronForm Inst No NonPoss);
+ P2 => "будете"++masha.s !(mkPronForm Inst No NonPoss);
+ P1 => "будем"++masha.s ! (mkPronForm Inst No NonPoss)
+ };
+ (ASg _) => case p of
+ { P3=>"будет"++masha.s!(mkPronForm Inst No NonPoss) ;
+ P2 => "будешь"++ masha.s ! (mkPronForm Inst No NonPoss) ;
+ P1=> "буду"++ masha.s ! (mkPronForm Inst No NonPoss)
+ } --case p
+ }; --case gn
+ ClCondit => "" ;
+ ClImper => case (numGNum gn) of
+ {Sg => "будь" ++ masha.s ! (mkPronForm Inst No NonPoss);
+ Pl => "будьте" ++ masha.s ! (mkPronForm Inst No NonPoss)
+ };
+ ClInfin => "быть" ++ masha.s ! (mkPronForm Inst No NonPoss)
+}; -- case clf
+ asp = Imperfective ;
+ w = Act;
+ negBefore = True;
+ s2 = "";
+ s3 = \\g,n => ""
+ } ;
+
+ CompAP zloj ={
+ s= \\clf,gn,p => case clf of {
+-- person is ignored !
+ ClInfinit => "быть" ++ zloj.s ! AF Inst Animate (ASg Masc) ;
+ ClImper => case gn of
+ { (ASg _) => "будь" ++ zloj.s ! AF Inst Animate (ASg Masc);
+ APl => "будьте" ++ zloj.s ! AF Inst Animate APl
+ };
+-- infinitive does not save GenNum,
+-- but indicative does for the sake of adjectival predication !
+ ClIndic Present _ => zloj.s ! AF Nom Animate gn ;
+ ClIndic PastRus _ => case gn of
+ { (ASg Fem) => "была" ++ zloj.s! AF Nom Animate (ASg Fem);
+ (ASg Masc) => "был" ++ zloj.s! AF Nom Animate (ASg Masc);
+ (ASg Neut) => "был" ++ zloj.s! AF Nom Animate (ASg Neut);
+ APl => "были" ++ zloj.s! AF Nom Animate APl
+ };
+ ClIndic Future _ => case gn of
+ { APl => case p of
+ { P3 => "будут" ++ zloj.s! AF Nom Animate APl;
+ P2 => "будете" ++ zloj.s! AF Nom Animate APl;
+ P1 => "будем" ++ zloj.s! AF Nom Animate APl
+ } ;
+ (ASg _) => case p of
+ {P3 => "будет" ++ zloj.s! AF Nom Animate (ASg (genGNum gn));
+ P2 => "будешь"++ zloj.s! AF Nom Animate (ASg (genGNum gn));
+ P1=> "буду" ++ zloj.s! AF Nom Animate (ASg (genGNum gn))
+ }
+ };
+ ClCondit => ""
+ } ;
+
+ asp = Imperfective ;
+ w = Act;
+ negBefore = True;
+ s2 = "";
+ s3 = \\g,n=> ""
+ } ;
+
+
+-- Verb phrases can also be formed from adjectives (" молод"),
+-- common nouns (" человек"), and noun phrases (" самый молодой").
+-- The third rule is overgenerating: " каждый человек" has to be ruled out
+-- on semantic grounds.
+-- Note: we omit a dash "-" because it will cause problems with negation word order:
+-- "Я не - волшебник". Alternatively, we can consider verb-based VP and
+-- all the rest.
+
+ CompAdv zloj =
+ { s= \\clf,gn,p => case clf of {
+ ClImper => case gn of
+ { ASg _ => "будь" ++ zloj.s; -- person is ignored !
+ APl => "будьте" ++ zloj.s
+ };
+ ClInfinit => "быть" ++ zloj.s;
+ ClIndic Present _ => zloj.s ;
+ ClIndic PastRus _ => case gn of
+ { (ASg Fem) => "была" ++ zloj.s;
+ (ASg Masc) => "был" ++ zloj.s;
+ (ASg Neut) => "было" ++ zloj.s;
+ APl => "были" ++ zloj.s
+ };
+ ClIndic Future _ => case gn of
+ { (ASg _) => "будет" ++ zloj.s;
+ APl => "будут" ++ zloj.s
+ };
+ ClCondit => ""
+ } ;
+ asp = Imperfective ;
+ w = Act;
+ s2 = "";
+ negBefore = True;
+ s3 = \\g,n => ""
+ } ;
+
+
+
+ UseComp comp = comp ;
+
+-- CompAP ap = ap ;
+-- CompNP np = {s = \\_ => np.s ! Acc} ;
+-- CompAdv a = {s = \\_ => a.s} ;
+
+
+-- A simple verb can be made into a verb phrase with an empty complement.
+-- There are two versions, depending on if we want to negate the verb.
+-- N.B. negation is *not* a function applicable to a verb phrase, since
+-- double negations with "inte" are not grammatical.
+
+ UseV se =
+ {s=\\clf,gn,p => se.s ! (getActVerbForm clf (genGNum gn) (numGNum gn) p) ;
+ asp = se.asp ;
+ w=Act;
+ s2 = "";
+ negBefore = True;
+ s3 = table{_=> table{_ => ""}}
+ } ;
+
+-- The rule for using transitive verbs is the complementization rule:
+ SlashV2a se =
+ {s = \\clf,gn,p => se.s ! (getActVerbForm clf (genGNum gn) (numGNum gn) p) ;
+ asp = se.asp ;
+ w = Act;
+ s2 = "";
+ s3 = \\g,n => "";
+ negBefore = True ;
+ sc = se.s2 ;
+ c = se.c
+ } ;
+
+ ComplSlash se tu =
+ {s = \\clf,gn,p => se.s ! clf ! gn ! p
+ ++ se.sc ++ tu.s ! (mkPronForm se.c No NonPoss) ;
+ asp = se.asp ;
+ w = se.w;
+ s2 = se.s2;
+ s3 = se.s3;
+ negBefore = se.negBefore
+ } ;
+
+ Slash2V3 dat tu =
+ let
+ tebepivo = dat.s2 ++ tu.s ! PF dat.c No NonPoss ++ dat.s4 ;
+ in
+ {s = \\clf,gn,p => dat.s ! (getActVerbForm clf (genGNum gn) (numGNum gn) p) ++ tebepivo ;
+ asp = dat.asp ;
+ w = Act;
+ negBefore = True;
+ s2 = "";
+ s3 = \\g,n=> "" ;
+ sc = dat.s4 ;
+ c = dat.c2
+ } ;
+
+ Slash3V3 dat pivo =
+ let
+ tebepivo = 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 ;
+ w = Act;
+ negBefore = True;
+ s2 = "";
+ s3 = \\g,n=> "" ;
+ sc = dat.s2 ;
+ c = dat.c
+ } ;
+
+{-
+ ComplV3 dat tu pivo =
+ let
+ 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 ;
+ w = Act;
+ negBefore = True;
+ s2 = "";
+ s3 = \\g,n=> ""
+ } ;
+
+
+ ReflV2 v =
+ { s = \\clf,gn,p => v.s ! (getActVerbForm clf (genGNum gn) (numGNum gn) p) ++ v.s2 ++ sebya!v.c;
+ asp = v.asp ;
+ w = Act;
+ negBefore = True;
+ s2 = "";
+ s3 = \\g,n=> ""
+ } ;
+-}
+
+-- To generate "сказал, что Иван гуляет" / "не сказал, что Иван гуляет":
+ ComplVS 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 => ""
+ } ;
+-- 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 verb parameter type.
+
+ ComplVV 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 => ""
+ } ;
+ ComplVQ dat esliOnPridet =
+ {s = \\clf,gn,p => dat.s ! (getActVerbForm clf (genGNum gn) (numGNum gn) p) ++ esliOnPridet.s ! QDir ;
+ asp = dat.asp ;
+ w = Act;
+ negBefore = True;
+ s2 = "";
+ s3 = \\g,n=> ""
+ } ;
+ ComplVA vuglyadet molodoj =
+ {s = \\clf,gn,p => vuglyadet.s ! (getActVerbForm clf (genGNum gn) (numGNum gn) p) ;
+ asp = vuglyadet.asp ;
+ w = Act;
+ negBefore = True;
+ s2 = "";
+ s3 = \\g,n => molodoj.s!(AF Inst Animate (gNum g n))
+ } ;
+
+ SlashV2A obechat molodoj =
+ {s = \\clf,gn,p =>
+ obechat.s ! (getActVerbForm clf (genGNum gn) (numGNum gn) p) ++
+ molodoj.s ! AF Inst Inanimate (ASg Neut) ;
+ ---- AR 17/6; AF Inst tu.anim (pgNum tu.g tu.n) ;
+ asp = obechat.asp ;
+ w = Act;
+ negBefore = True;
+ s2 = "";
+ s3 = \\g,n =>"" ;
+ sc = obechat.s2 ;
+ c = obechat.c
+ } ;
+
+ AdvVP poet khorosho =
+ {s = \\clf,gn,p => poet.s ! clf!gn!p; s2 = poet.s2 ++ khorosho.s; s3 = poet.s3;
+ asp = poet.asp; w = poet.w; t = poet.t ; negBefore = poet.negBefore } ;
+
+ AdVVP khorosho poet =
+ {s = \\clf,gn,p => poet.s ! clf!gn!p; s2 = khorosho.s ++ poet.s2; s3 = poet.s3;
+ asp = poet.asp; w = poet.w; t = poet.t ; negBefore = poet.negBefore } ;
+
+PassV2 se =
+ {s=\\clf,gn,p => se.s ! (getPassVerbForm clf (genGNum gn) (numGNum gn) p) ;
+ asp=se.asp; w=Pass; s2 = se.s2;
+ negBefore = True;
+ s3 = table{_=> table{_ => ""}}
+};
+
+}
+