mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-09 04:59:31 -06:00
Russian in 1.4 - compiles but is incomplete
This commit is contained in:
46
lib/resource-1.4/russian/AdjectiveRus.gf
Normal file
46
lib/resource-1.4/russian/AdjectiveRus.gf
Normal file
@@ -0,0 +1,46 @@
|
||||
|
||||
--# -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 = a ;
|
||||
|
||||
}
|
||||
|
||||
24
lib/resource-1.4/russian/AdverbRus.gf
Normal file
24
lib/resource-1.4/russian/AdverbRus.gf
Normal file
@@ -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 ++ "чем"} ;
|
||||
|
||||
}
|
||||
|
||||
99
lib/resource-1.4/russian/CatRus.gf
Normal file
99
lib/resource-1.4/russian/CatRus.gf
Normal file
@@ -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} ;
|
||||
|
||||
|
||||
}
|
||||
|
||||
100
lib/resource-1.4/russian/ConjunctionRus.gf
Normal file
100
lib/resource-1.4/russian/ConjunctionRus.gf
Normal file
@@ -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 ;
|
||||
|
||||
|
||||
}
|
||||
|
||||
3
lib/resource-1.4/russian/ExtraRus.gf
Normal file
3
lib/resource-1.4/russian/ExtraRus.gf
Normal file
@@ -0,0 +1,3 @@
|
||||
concrete ExtraRus of ExtraRusAbs = CatRus ** {
|
||||
|
||||
}
|
||||
3
lib/resource-1.4/russian/ExtraRusAbs.gf
Normal file
3
lib/resource-1.4/russian/ExtraRusAbs.gf
Normal file
@@ -0,0 +1,3 @@
|
||||
abstract ExtraRusAbs = {
|
||||
|
||||
}
|
||||
17
lib/resource-1.4/russian/GrammarRus.gf
Normal file
17
lib/resource-1.4/russian/GrammarRus.gf
Normal file
@@ -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 ;} ;
|
||||
58
lib/resource-1.4/russian/IdiomRus.gf
Normal file
58
lib/resource-1.4/russian/IdiomRus.gf
Normal file
@@ -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 ;
|
||||
|
||||
}
|
||||
|
||||
182
lib/resource-1.4/russian/IrregRus.gf
Normal file
182
lib/resource-1.4/russian/IrregRus.gf
Normal file
@@ -0,0 +1,182 @@
|
||||
--# -path=.:../abstract:../common:../../prelude
|
||||
|
||||
--
|
||||
concrete IrregRus of IrregRusAbs = CatRus ** open ParadigmsRus in {
|
||||
--
|
||||
--flags optimize=values ;
|
||||
--
|
||||
-- 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" ;
|
||||
}
|
||||
10
lib/resource-1.4/russian/LangRus.gf
Normal file
10
lib/resource-1.4/russian/LangRus.gf
Normal file
@@ -0,0 +1,10 @@
|
||||
--# -path=.:../abstract:../common:prelude
|
||||
|
||||
concrete LangRus of Lang =
|
||||
GrammarRus,
|
||||
LexiconRus
|
||||
** {
|
||||
|
||||
flags startcat = Phr ; unlexer = text ; lexer = text ;
|
||||
|
||||
} ;
|
||||
399
lib/resource-1.4/russian/LexiconRus.gf
Normal file
399
lib/resource-1.4/russian/LexiconRus.gf
Normal file
@@ -0,0 +1,399 @@
|
||||
--# -path=.:../abstract:../common:../../prelude
|
||||
|
||||
--
|
||||
concrete LexiconRus of Lexicon = CatRus **
|
||||
open ParadigmsRus, Prelude, StructuralRus, MorphoRus in {
|
||||
--, IrregRus
|
||||
flags
|
||||
optimize=values ;
|
||||
coding=utf8 ;
|
||||
lin
|
||||
add_V3 = mkV3 (regV imperfective first "складыва" "ю" "складывал" "складывай" "складывать" ) "" "в" accusative accusative;
|
||||
airplane_N = nTelefon "самолет" ;
|
||||
already_Adv = mkAdv "уже" ;
|
||||
animal_N = nZhivotnoe "животн" ;
|
||||
answer_V2S = dirV2 (regV imperfective first "отвеча" "ю" "отвечал" "отвечай" "отвечать" );
|
||||
apartment_N = nMashina "квартир" ;
|
||||
-- apple_N = nChislo "яблок" ; -- +++ MG_UR: wrong! +++
|
||||
-- art_N = nChislo "искусств" ; -- +++ MG_UR: wrong! +++
|
||||
art_N = nSlovo "искусств" ; -- +++ MG_UR: added +++
|
||||
ashes_N = nPepel "пеп" ;
|
||||
ask_V2Q = dirV2 (regV imperfective first "спрашива" "ю" "спрашивал" "спрашивай" "спрашивать") ;
|
||||
baby_N = nMalush "малыш";
|
||||
back_N = nMashina "спин" ;
|
||||
bad_A = AKakoj_Nibud "плох" "" "хуже";
|
||||
bank_N = nBank "банк" ;
|
||||
bark_N = mkN "лай" "лая" "лаю" "лай" "лаем" "лае" "лае" "лаи" "лаев" "лаям" "лаи" "лаями" "лаях" "лаях" masculine inanimate ;
|
||||
beautiful_A = AStaruyj "красив" "красивее";
|
||||
become_VA = regV perfective second "станов" "лю" "стал" "стань" "стать" ;
|
||||
-- beer_N = nChislo "пив" ; -- +++ MG_UR: wrong! +++
|
||||
beer_N = nSlovo "пив" ; -- +++ MG_UR: added +++
|
||||
beg_V2V = dirV2 (mkV imperfective "прошу" "просишь" "просит" "просим" "просите" "просят" "просил" "проси" "просить" );
|
||||
belly_N = nTelefon "живот" ;
|
||||
big_A = AKakoj_Nibud "больш" "" "больше" ;
|
||||
bike_N = nTelefon "велосипед" ;
|
||||
bird_N = nEdinica "птиц" ;
|
||||
bite_V2 = dirV2 (regV imperfective first "куса" "ю" "кусал" "кусай" "кусать");
|
||||
black_A = AStaruyj "чёрн" "чернее";
|
||||
blood_N = nBol "кров" ;
|
||||
blow_V = regV imperfective first "ду" "ю" "дул" "дуй" "дуть" ;
|
||||
blue_A = AMolodoj "голуб" "голубее";
|
||||
boat_N = nMashina "лодк" ;
|
||||
bone_N = nBol "кост" ;
|
||||
book_N = nNoga "книг" ;
|
||||
boot_N = nBank "сапог" ;
|
||||
boss_N = nStomatolog "начальник" ;
|
||||
boy_N = nStomatolog "мальчик" ;
|
||||
bread_N = nAdres "хлеб" ;
|
||||
break_V2 = dirV2 (regV imperfective first "прерыва" "ю" "прерывал" "прерывай" "прерывать" );
|
||||
breast_N = nBol "грудь" ;
|
||||
breathe_V = regV imperfective second "дыш" "у" "дышал" "дыши" "дышать" ;
|
||||
--- bridge_N = nMost "мост" ;
|
||||
broad_A = AMalenkij "широк" "шире";
|
||||
brother_N2 = mkN2 (nBrat "брат") ;
|
||||
brown_A = AStaruyj "коричнев" "коричневее";
|
||||
burn_V = regV imperfective second "гор" "ю" "горел" "гори" "гореть" ;
|
||||
-- butter_N = nChislo "масл"; -- +++ MG_UR: wrong! +++
|
||||
butter_N = nSlovo "масл"; -- +++ MG_UR: added +++
|
||||
buy_V2 = dirV2 (regV imperfective first "покупа" "ю" "покупал" "покупай" "покупать" );
|
||||
camera_N = nMashina "kamer" ;
|
||||
--- candle_N = nSvecha "свеч" ; -- +++ MG_UR: added +++
|
||||
cap_N = nNoga "чашк" ; -- чаш-ек Pl-Gen
|
||||
car_N = nMashina "машин" ;
|
||||
carpet_N = mkN "ковёр" "ковра" "ковру" "ковёр" "ковром" "ковре" "ковре" "ковры" "ковров" "коврам" "ковры" "коврами" "коврах" "коврах" masculine inanimate ;
|
||||
cat_N = nMashina "кошк" ;
|
||||
ceiling_N = nPotolok "потол" ;
|
||||
chair_N = nStul "стул" ;
|
||||
cheese_N = nTelefon "сыр" ;
|
||||
--- child2_N = nRebenok "реб" ; -- Achtung: Hier 'child' im Sinne von "junge Lebewesen" (dann keine Suppletivformen(?))!
|
||||
child_N = mkN "ребёнок" "ребёнка" "ребёнку" "ребёнка" "ребёнком" "ребёнке" "ребёнке" "дети" "детей" "детям" "детей" "детьми" "детях" "детях" masculine animate ;
|
||||
church_N = mkN "церковь" "церкви" "церкви" "церковь" "церковью" "церкви" "церкви" "церкви" "церквей" "церквям" "церкви" "церквями" "церквях" "церквях" masculine inanimate ;
|
||||
--- citizen_N = nGrazhdanin "господ" ; -- +++ MG_UR: added +++
|
||||
city_N = nAdres "город" ;
|
||||
clean_A = AStaruyj "чист" "чище";
|
||||
clever_A = AStaruyj "умн" "умнее";
|
||||
close_V2= dirV2 (regV imperfective first "закрыва" "ю" "закрывал" "закрывай" "закрывать" );
|
||||
-- cloud_N = nChislo "облак" ; -- +++ MG_UR: wrong! +++
|
||||
cloud_N = nChislo "облак" "облаков" ; -- +++ MG_UR: added +++
|
||||
coat_N = mkIndeclinableNoun "пальто" masculine inanimate ;
|
||||
cold_A = AStaruyj "холодн" "холоднее";
|
||||
come_V = regV imperfective first "прихо" "жу" "приходил" "приходи" "приходить" ;
|
||||
computer_N = nTelefon "компьютер" ;
|
||||
correct_A = AStaruyj "правильн" "правильнее";
|
||||
count_V2 = dirV2 (regV imperfective first "счита" "ю" "считал" "считай" "считать" ) ;
|
||||
country_N = nMashina "стран" ;
|
||||
cousin_N = nTelefon "кузен" ;
|
||||
cow_N = nMashina "коров" ;
|
||||
cut_V2 = dirV2 (regV imperfective first "реж" "у" "резал" "режь" "резать" ) ;
|
||||
--- daughter_N = nDoch "доч" ; -- +++ MG_UR: added +++
|
||||
-- day_N = mkN "день" "дня" "дню" "день" "днём" "дне" "дне" "дни" "дней" "дням" "дни" "днями" "днях" "днях" masculine inanimate ;
|
||||
day_N = nDen "д" ; -- +++ MG_UR: class better than mkN +++
|
||||
--- desk_N = nStol "стол" ;
|
||||
--- dictionary_N = nSlovar "словар" ;
|
||||
die_V = regV imperfective first "умира" "ю" "умирал" "умирай" "умирать" ;
|
||||
dig_V = regV imperfective first "копа" "ю" "копал" "копай" "копать" ;
|
||||
dirty_A = AStaruyj "грязн" "грязнее" ;
|
||||
distance_N3 = mkN3 (nProizvedenie "расстояни") from_Prep to_Prep ;
|
||||
do_V2 = dirV2 (regV imperfective first "дела" "ю" "делал" "делай" "делать" );
|
||||
doctor_N = nAdres "доктор" ;
|
||||
dog_N = nNoga "собак" ;
|
||||
door_N = nBol "двер" ;
|
||||
drink_V2 = dirV2 (regV imperfective firstE "пь" "ю" "пил" "пей" "пить" );
|
||||
dry_A = AMolodoj "сух" "суше";
|
||||
dull_A = AStaruyj "скучн" "скучнее";
|
||||
dust_N = nBol "пыл" ;
|
||||
-- ear_N = nChislo "ухо" ; -- +++ MG_UR: wrong! +++
|
||||
earth_N = nTetya "земл" ;
|
||||
easy_A2V = mkA2 (AMalenkij "лёгк" "легче") "для" genitive ;
|
||||
eat_V2 = dirV2 (regV imperfective first "куша" "ю" "кушал" "кушай" "кушать" );
|
||||
-- egg_N = nChislo "яйц" ; -- +++ MG_UR: wrong! +++
|
||||
egg_N = nChislo "яйц" "яиц" ; -- +++ MG_UR: added +++
|
||||
empty_A = AMolodoj "пуст" "пустее";
|
||||
enemy_N = nStomatolog "враг" ;
|
||||
eye_N = nAdres "глаз" ;
|
||||
factory_N = nNoga "фабрик" ;
|
||||
fall_V = regV imperfective first "пада" "ю" "падал" "падай" "падать" ;
|
||||
far_Adv = mkAdv "далеко";
|
||||
fat_N = nBank "жир" ;
|
||||
father_N2 = mkN2 (mkN "отец" "отца" "отцу" "отца" "отцом" "отце" "отце" "отцы" "отцов" "отцам" "отцов" "отцами" "отцах" "отцах" masculine animate);
|
||||
fear_V2 =dirV2 (regV imperfective first "бо" "ю" "боял" "бой" "боять" );
|
||||
fear_VS = regV imperfective second "бо" "ю" "боял" "бой" "боять" ;
|
||||
feather_N = mkN "перо" "пера" "перу" "пера" "пером" "пере" "пере" "перья" "перьев" "перьям" "перьев" "перьями" "перьях" "перьях" neuter inanimate ;
|
||||
--- fellow_N = nTovarish "товарищ" ; -- +++ MG_UR: added +++
|
||||
fight_V2 = dirV2 (regV imperfective firstE "дер" "у" "драл" "дери" "драть" ) ;
|
||||
find_V2 = dirV2 (mkV imperfective "нахожу" "находишь" "находит" "находим" "находите" "находят" "находил" "находи" "находить" );
|
||||
fingernail_N = mkN "ноготь" "ногтя" "ногтю" "ногтя" "ногтем" "ногте" "ногте" "ногти" "ногтей" "ногтям" "ногтей" "ногтями" "ногтях" "ногтях" masculine inanimate ;
|
||||
fire_N = mkN "огонь" "огня" "огню" "огня" "огнём" "огне" "огне" "огни" "огней" "огням" "огней" "огнями" "огнях" "огнях" masculine inanimate ;
|
||||
fish_N = nMashina "рыб" ;
|
||||
--- flag_N = nVremja "зна" ;
|
||||
float_V = regV imperfective firstE "плыв" "у" "плыл" "плыви" "плыть" ;
|
||||
floor_N = nTelefon "пол" ;
|
||||
flow_V = regV imperfective firstE "тек" "у" "тёк" "теки" "течь" ;
|
||||
flower_N = mkN "отец" "отца" "отцу" "отца" "отцом" "отце" "отце" "отцы" "отцов" "отцам" "отцов" "отцами" "отцах" "отцах" masculine animate ;
|
||||
fly_V = regV imperfective second "лета" "ю" "летал" "летай" "летать" ;
|
||||
fog_N = nTelefon "туман" ;
|
||||
foot_N = nTetya "ступн" ;
|
||||
forest_N = nLes "лес" ;
|
||||
forget_V2= dirV2 (regV imperfective first "забыва" "ю" "забывал" "забывай" "забывать" );
|
||||
freeze_V = regV imperfective first "замерза" "ю" "замерзал" "замерзай" "замерзать" ;
|
||||
fridge_N = nBank "холодильник" ;
|
||||
-- friend_N = mkN "друг" "друга" "другу" "друга" "другом" "друге" "друге" "друзья" "друзей" "друзьям" "друзей" "дузьями" "друзьях" "друзьях" masculine animate ;
|
||||
friend_N = nDrug "дру" ; -- +++ MG_UR: class better than mkN +++
|
||||
fruit_N = nTelefon "фрукт" ;
|
||||
full_A = AStaruyj "полн" "полнее";
|
||||
fun_AV = AStaruyj "весёл" "веселее";
|
||||
garden_N = nTelefon "сад" ;
|
||||
girl_N = nNoga "девочк" ;
|
||||
give_V3 = tvDirDir (regV imperfective firstE "да" "ю" "давал" "давай" "давать" ) ;
|
||||
glove_N = nNoga "перчатк" ;
|
||||
go_V= regV imperfective second "хо" "жу" "ходил" "ходи" "ходить" ;
|
||||
-- gold_N = nChislo "золот" ; -- +++ MG_UR: wrong! +++
|
||||
gold_N = nSlovo "золот" ; -- +++ MG_UR: added +++
|
||||
good_A = AKhoroshij "хорош" "лучше" ;
|
||||
grammar_N = nNoga "грамматик";
|
||||
grass_N = nMashina "трав" ;
|
||||
green_A = AStaruyj "зелен" "зеленее" ;
|
||||
guts_N = nBol "внутренност" ;
|
||||
hair_N = nTelefon "волос" ;
|
||||
hand_N = nNoga "рук" ;
|
||||
harbour_N = nTelefon "залив" ;
|
||||
hat_N = nMashina "шляп" ;
|
||||
hate_V2= dirV2 (regV imperfective second "ненави" "жу" "ненавидел" "ненавидь" "ненавидеть" );
|
||||
have_V2= dirV2 (regV imperfective first "име" "ю" "имел" "имей" "иметь" );
|
||||
head_N = nMashina "голов" ;
|
||||
hear_V2= dirV2 (regV imperfective first "слуша" "ю" "слушал" "слушай" "слушать" );
|
||||
heart_N = mkN "сердце" "сердца" "сердцу" "сердца" "сердцем" "сердце" "сердце" "сердца" "сердец" "сердцам" "сердец" "сердцами" "сердцах" "сердцах" neuter inanimate ;
|
||||
--- heaven_N = nNebo "неб" ; -- +++ MG_UR: added +++
|
||||
heavy_A = AStaruyj "тяжел" "тяжелее";
|
||||
hill_N = nTelefon "холм" ;
|
||||
hit_V2 = dirV2 (regV imperfective first "ударя" "ю" "ударял" "ударяй" "ударять" );
|
||||
hold_V2 = dirV2 (regV imperfective second "держ" "у" "держал" "держи" "держать" );
|
||||
hope_VS= regV imperfective first "наде" "ю" "надеял" "надей" "надеять" ;
|
||||
horn_N = nAdres "рог" ;
|
||||
-- horse_N = nBol "лошад" ; -- +++ MG_UR: wrong! +++
|
||||
horse_N = nLoshad "лошад" ; -- +++ MG_UR: added +++
|
||||
hot_A = AKhoroshij "горяч" "горячее" ;
|
||||
house_N = nAdres "дом" ;
|
||||
hunt_V2 = dirV2 (regV imperfective second "охоч" "у" "охотил" "охоть" "охотить" ) ;
|
||||
husband_N = mkN "муж" "мужа" "мужу" "мужа" "мужем" "муже" "муже" "мужья" "мужей" "мужьям" "мужей" "мужьями" "мужьях" "мужьях" masculine animate ;
|
||||
ice_N = mkN "лёд" "льда" "льду" "льда" "льдом" "льде" "льде" "льды" "льдов" "льдам" "льдов" "льдами" "льдах" "льдах" masculine inanimate ;
|
||||
important_A = AStaruyj "важн" "важнее" ;
|
||||
-- industry_N = nChislo "производств" ; -- +++ MG_UR: wrong! +++
|
||||
industry_N = nSlovo "производств" ; -- +++ MG_UR: added +++
|
||||
-- iron_N = nChislo "желез" ; -- +++ MG_UR: wrong! +++
|
||||
iron_N = nSlovo "желез" ; -- +++ MG_UR: added +++
|
||||
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 = nChislo "озер" ; -- +++ MG_UR: wrong! +++
|
||||
lake_N = nChislo "озер" "озёр"; -- +++ MG_UR: added +++
|
||||
lamp_N = nMashina "ламп" ;
|
||||
language_N = nBank "язык" ;
|
||||
laugh_V = regV imperfective firstE "сме" "ю" "смеял" "смей" "смеять" ;
|
||||
leaf_N = nStul "лист" ;
|
||||
learn_V2= dirV2 (regV imperfective second "уч" "у" "учил" "учи" "учить" );
|
||||
leather_N = nEdinica "кож" ;
|
||||
leave_V2= dirV2 (regV imperfective second "ухож" "у" "уходил" "уходи" "уходить" );
|
||||
left_Ord = (uy_j_EndDecl "лев" ) ** {lock_A = <>};
|
||||
leg_N = nNoga "ног" ;
|
||||
lie_V = regV imperfective firstE "лг" "у" "лгал" "лги" "лгать" ;
|
||||
like_V2= dirV2 (regV imperfective second "нрав" "лю" "нравил" "нравь" "нравить" );
|
||||
listen_V2= dirV2 (regV imperfective first "слуша" "ю" "слушал" "слушай" "слушать" );
|
||||
live_V= regV imperfective firstE "жив" "у" "жил" "живи" "жить" ;
|
||||
liver_N = nBol "печен" ;
|
||||
long_A = AStaruyj "длинн" "длиннее" ;
|
||||
lose_V2 = dirV2 (regV imperfective first "теря" "ю" "терял" "теряй" "терять" );
|
||||
louse_N = mkN "вошь" "вши" "вши" "вошь" "вошью" "вше" "вше" "вши" "вшей" "вшам" "вшей" "вшами" "вшах" "вшах" feminine animate ;
|
||||
love_N = nBol "любов" ;
|
||||
love_V2= dirV2 (regV imperfective second "люб" "лю" "любил" "люби" "любить" );
|
||||
man_N = nStomatolog "человек" ;
|
||||
married_A2 = mkA2 (adjInvar "замужем") "за" instructive ;
|
||||
-- meat_N = nChislo "мяс" ; -- +++ MG_UR: wrong! +++
|
||||
-- milk_N = nChislo "молок" ; -- +++ MG_UR: wrong! +++
|
||||
--- mister_N = nGospodin "господ" ; -- +++ MG_UR: added +++
|
||||
--- mom_N = nMat "мат" ; -- +++ MG_UR: added +++
|
||||
--- month_N = nMesjac "месяц" ; -- +++ MG_UR: added +++
|
||||
moon_N = nMashina "лун" ;
|
||||
mother_N2 = mkN2 ( nMashina "мам") ;
|
||||
mountain_N = nMashina "гор" ;
|
||||
mouth_N = mkN "рот" "рта" "рту" "рот" "ртом" "рте" "рте" "рты" "ртов" "ртам" "рты" "ртами" "ртах" "ртах" masculine inanimate ;
|
||||
--- museum_N = nMusej "музе" ; -- +++ MG_UR: added +++
|
||||
music_N = nNoga "музык" ;
|
||||
-- name_N = mkN "имя" "имени" "имени" "имя" "именем" "имени" "имени" "имена" "имён" "именам" "имена" "именами" "именах" "именах" neuter inanimate ;
|
||||
name_N = nVremja "и" ; -- +++ MG_UR: class better than mkN +++
|
||||
narrow_A = AStaruyj "узк" "уже" ;
|
||||
near_A = AMalenkij "близк" "ближе";
|
||||
neck_N = nTetya "ше" ;
|
||||
new_A = AStaruyj "нов" "новее" ;
|
||||
newspaper_N = nMashina "газет" ;
|
||||
-- night_N = nBol "ноч" ; -- +++ MG_UR: wrong! +++
|
||||
night_N = nNoch "ноч" ; -- +++ MG_UR: added +++
|
||||
nose_N = nTelefon "нос" ;
|
||||
now_Adv = mkAdv "сейчас" ;
|
||||
number_N = nChislo "числ" "чисел" ;
|
||||
--- ocean_N = nMorje "мор" ; -- +++ MG_UR: added +++
|
||||
oil_N = nBol "нефть" ;
|
||||
old_A = AStaruyj "стар" "старше" ;
|
||||
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 = nNoga "бумаг" ;
|
||||
paris_PN = mkPN "Париж" Masc Inanimate ;
|
||||
peace_N = nTelefon "мир" ;
|
||||
pen_N = nNoga "ручк" ;
|
||||
person_N = nBol "личность" ;
|
||||
planet_N = nMashina "планет" ;
|
||||
plastic_N = nMashina "пластмасс" ;
|
||||
play_V = regV imperfective first "игра" "ю" "играл" "играй" "играть" ;
|
||||
play_V2 = mkV2 (regV imperfective first "игра" "ю" "играл" "играй" "играть" ) "c" instructive;
|
||||
policeman_N = nTelefon "милиционер" ;
|
||||
priest_N = nStomatolog "священник" ;
|
||||
probable_AS = AStaruyj "возможн" "возможнее";
|
||||
pull_V2 = dirV2 (regV imperfective first "тян" "у" "тянул" "тяни" "тянуть" ) ;
|
||||
push_V2 = dirV2 (regV imperfective first "толка" "ю" "толкал" "толкай" "толкать" );
|
||||
put_V2 = dirV2 (regV imperfective firstE "клад" "у" "клал" "клади" "класть" );
|
||||
queen_N = nMashina "королев" ;
|
||||
radio_N = mkIndeclinableNoun "радио" neuter inanimate;
|
||||
rain_N = nNol "дожд" ;
|
||||
rain_V0 = idetDozhd verbIdti; -- No such verb in Russian!
|
||||
read_V2 = dirV2 (regV imperfective first "чита" "ю" "читал" "читай" "читать" );
|
||||
red_A = AStaruyj "красн" "краснее" ;
|
||||
religion_N = nMalyariya "религи" ;
|
||||
restaurant_N = nTelefon "ресторан" ;
|
||||
right_Ord = (uy_j_EndDecl "прав") ** {lock_A = <>} ;
|
||||
river_N = nNoga "рек" ;
|
||||
road_N = nNoga "дорог" ;
|
||||
rock_N = nUroven "кам" ;
|
||||
roof_N = nEdinica "крыш" ;
|
||||
root_N = nUroven "кор" ;
|
||||
rope_N = nNoga "веревк" ;
|
||||
rotten_A = AMolodoj "гнил" "гнилее";
|
||||
round_A = AStaruyj "кругл" "круглее";
|
||||
rub_V2 = dirV2 (regV imperfective firstE "тр" "у" "тёр" "три" "тереть" );
|
||||
rubber_N = nMashina "резин" ;
|
||||
-- rule_N = nChislo "правил" ; -- +++ MG_UR: wrong! +++
|
||||
rule_N = nSlovo "правил" ; -- +++ MG_UR: added +++
|
||||
run_V = regV imperfective first "бега" "ю" "бегал" "бегай" "бегать" ;
|
||||
salt_N = nBol "сол" ;
|
||||
sand_N = mkN "песок" "песка" "песку" "песок" "песком" "песке" "песке" "пески" "песков" "пескам" "песков" "песками" "песках" "песках" masculine inanimate ;
|
||||
say_VS = regV imperfective second "говор" "ю" "говорил" "говори" "говорить" ;
|
||||
school_N = nMashina "школ" ;
|
||||
science_N = nNoga "наук" ;
|
||||
scratch_V2 = dirV2 (regV imperfective first "чеш" "у" "чесал" "чеши" "чесать" ) ;
|
||||
sea_N = nProizvedenie "мор" ;
|
||||
-- see_V2 = dirV2 (regV imperfective second "виж" "у" "видел" "видь" "видеть" );
|
||||
see_V2 = dirV2 (regV imperfective second "ви" "жу" "видел" "видь" "видеть" ); -- changed !!
|
||||
-- seed_N = mkN "семя" "семени" "семении" "семя" "семенем" "семени" "семени" "семена" "семян" "семенам" "семена" "семенами" "семенах" "семенах" neuter inanimate ;
|
||||
seed_N = nVremja "се" ; -- +++ MG_UR: class better than 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 = AStaruyj "остр" "острее";
|
||||
sheep_N = nMashina "овц" ;
|
||||
ship_N = nNol "корабл" ;
|
||||
shirt_N = nNoga "рубашк" ;
|
||||
shoe_N = mkN "туфля" "туфли" "туфле" "туфлю" "туфлей" "туфле" "туфле" "туфли" "туфель" "туфлям" "туфли" "туфлями" "туфлях" "туфлях" masculine inanimate ;
|
||||
shop_N = nTelefon "магазин" ;
|
||||
short_A = AMalenkij "коротк" "короче" ;
|
||||
-- silver_N = nChislo "серебр" ; -- +++ MG_UR: wrong! +++
|
||||
silver_N = nSlovo "серебр" ; -- +++ MG_UR: added +++
|
||||
sing_V = regV imperfective firstE "по" "ю" "пел" "пой" "петь" ;
|
||||
sister_N = nMashina "сестр" ;
|
||||
sit_V = mkV imperfective "сижу" "сидишь" "сидит" "сидим" "сидите" "сидят" "сидел" "сиди" "сидеть" ;
|
||||
skin_N = nEdinica "кож" ;
|
||||
sky_N = mkN "небо" "неба" "небу" "небо" "небом" "небе" "небе" "небеса" "небес" "небесам" "небес" "небесами" "небесах" "небесах" neuter inanimate ;
|
||||
sleep_V = regV imperfective second "сп" "лю" "спал" "спи" "спать" ;
|
||||
small_A = AMalenkij "маленьк" "меньше" ;
|
||||
smell_V = regV imperfective first "пахн" "у" "пахнул" "пахни" "пахнуть" ;
|
||||
smoke_N = nTelefon "дым" ;
|
||||
smooth_A = AMalenkij "гладк" "глаже";
|
||||
snake_N = nTetya "зме" ;
|
||||
snake_N = nTetya"зме" ;
|
||||
snow_N = nAdres "снег" ;
|
||||
sock_N = nPotolok "нос" ;
|
||||
--- son_N = nSyn "сын" ; -- +++ MG_UR: added +++
|
||||
song_N = nTetya "песн" ;
|
||||
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 = nMashina "звезд" ;
|
||||
steel_N = nBol "стал" ;
|
||||
stick_N = nNoga "палк" ;
|
||||
stone_N = nNol "камен" ;
|
||||
stop_V = regV imperfective first "останавлива" "ю" "останавливал" "останавливай" "останавливать";
|
||||
stove_N = nBol "печ" ;
|
||||
straight_A = AMolodoj "прям" "прямее";
|
||||
student_N = nTelefon "студент" ;
|
||||
stupid_A = AMolodoj "тупой" "тупее" ;
|
||||
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 = nTelefon "стол" ;
|
||||
tail_N = nTelefon "хвост" ;
|
||||
talk_V3 = mkV3 (regV imperfective second "говор" "ю" "говорил" "говори" "говорить" ) "с" "о" instructive prepositional;
|
||||
teach_V2 = dirV2 (regV imperfective second "уч" "у" "учил" "учи" "учить" );
|
||||
-- teacher_N = nNol "учител" ; -- +++ MG_UR: wrong! +++
|
||||
teacher_N = nUchitel "учител" ; -- +++ MG_UR: added +++
|
||||
television_N = nProizvedenie "телевидени" ;
|
||||
thick_A = AStaruyj "толст" "толще" ;
|
||||
thin_A = AMalenkij "тонк" "тоньше" ;
|
||||
think_V = regV imperfective first "дума" "ю" "думал" "думай" "думать" ;
|
||||
throw_V2 = dirV2 (regV imperfective first "броса" "ю" "бросал" "бросай" "бросать" ) ;
|
||||
tie_V2 = dirV2 (regV imperfective first "вяж" "у" "вязал" "вяжи" "вязать") ;
|
||||
--- time_N = nVremja "вре" ; -- +++ MG_UR: added +++
|
||||
tongue_N = nBank "язык" ;
|
||||
tooth_N = nTelefon "зуб" ;
|
||||
train_N = nAdres "поезд" ;
|
||||
travel_V = regV imperfective first "путешеству" "ю" "путешествовал" "путешествуй" "путешествовать" ;
|
||||
tree_N = nDerevo "дерев" ; -- +++ MG_UR: added +++
|
||||
turn_V = regV imperfective first "поворачива" "ю" "поворачивал" "поворачивай" "поворачивать" ;
|
||||
ugly_A = AStaruyj "некрасив" "некрасивее" ;
|
||||
understand_V2 = dirV2 (regV imperfective first "понима" "ю" "понимал" "понимай" "понимать" );
|
||||
university_N = nTelefon "университет" ;
|
||||
village_N = nMalyariya "деревн" ;
|
||||
--- vocationalschool_N = nUchilishe "училищ" ; -- +++ MG_UR: added +++
|
||||
vomit_V = regV imperfective firstE "рв" "у" "рвал" "рви" "рвать" ;
|
||||
wait_V2 = dirV2 (regV imperfective firstE "жд" "у" "ждал" "жди" "ждать" );
|
||||
walk_V = regV imperfective first "гуля" "ю" "гулял" "гуляй" "гулять" ;
|
||||
--- want_V2 = dirV2 (regV imperfective mixed "хо" "чу" "хотел" "хоти" "хотеть" );
|
||||
war_N = nMashina "войн" ;
|
||||
warm_A = AStaruyj "тёпл" "теплее" ;
|
||||
wash_V2 = dirV2 (regV imperfective first "мо" "ю" "мыл" "мой" "мыть" ) ;
|
||||
watch_V2 = dirV2 (regV imperfective second "смотр" "ю" "смотрел" "смотри" "смотреть" );
|
||||
water_N = nMashina "вод" ;
|
||||
--- way_N = nPut "пут" ; -- +++ MG_UR: added +++
|
||||
wet_A = AStaruyj "мокр" "мокрее";
|
||||
white_A = AStaruyj "бел" "белее" ;
|
||||
wide_A = AMalenkij "широк" "шире";
|
||||
wife_N = nMashina "жен" ;
|
||||
win_V2 = dirV2 (regV imperfective first "выигрыва" "ю" "выигрывал" "выигрывай" "выигрывать" );
|
||||
wind_N = mkN "ветер" "ветра" "ветру" "ветер" "ветром" "ветра" "ветра" "ветров" "ветра" "ветрам" "ветров" "ветрами" "ветрах" "ветрах" masculine inanimate ;
|
||||
-- window_N = nChislo "окн" ; -- +++ MG_UR: wrong! +++
|
||||
window_N = nChislo "окн" "окон" ; -- +++ MG_UR: added +++
|
||||
-- wine_N = nChislo "вин" ; -- +++ MG_UR: wrong! +++
|
||||
wine_N = nSlovo "вин" ; -- +++ MG_UR: added +++
|
||||
-- wing_N = mkN "крыло" "крыла" "крылу" "крыло" "крылом" "крыле" "крыле" "крылья" "крыльев" "крыльям" "крылья" "крыльями" "крыльях" "крыльях" neuter inanimate ;
|
||||
wing_N = nDerevo "крыл" ; -- +++ MG_UR: class better than mkN +++
|
||||
wipe_V2 = dirV2 (regV imperfective first "вытира" "ю" "вытирал" "вытирай" "вытирать" );
|
||||
woman_N = nZhenchina "женщин" ;
|
||||
wonder_VQ = regV imperfective first "интересу" "ю" "интересовал" "интересуй" "интересовать";
|
||||
-- wood_N = nChislo "дерев" ; -- +++ MG_UR: wrong! +++
|
||||
wood_N = nDerevo "дерев" ; -- +++ MG_UR: added +++
|
||||
--- word_N = nSlovo "слов" ; -- +++ MG_UR: added +++
|
||||
worm_N = nNol "черв" ;
|
||||
write_V2 = dirV2 (regV imperfective first "пиш" "у" "писал" "пиши" "писать" );
|
||||
year_N = nAdres "год" ;
|
||||
yellow_A = AStaruyj "жёлт" "желтее" ;
|
||||
young_A = AMolodoj "молод" "моложе";
|
||||
}
|
||||
2666
lib/resource-1.4/russian/MorphoRus.gf
Normal file
2666
lib/resource-1.4/russian/MorphoRus.gf
Normal file
File diff suppressed because it is too large
Load Diff
176
lib/resource-1.4/russian/NounRus.gf
Normal file
176
lib/resource-1.4/russian/NounRus.gf
Normal file
@@ -0,0 +1,176 @@
|
||||
--# -path=.:../abstract:../common:../../prelude
|
||||
|
||||
concrete NounRus of Noun = CatRus ** open ResRus, Prelude, MorphoRus in {
|
||||
|
||||
flags optimize=all_subs ;
|
||||
|
||||
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
|
||||
} ;
|
||||
|
||||
{-
|
||||
DetSg quant ord = {
|
||||
s = \\af => quant.s!af ++ ord.s!af ;
|
||||
n = Sg ;
|
||||
g = quant.g;
|
||||
c = quant.c
|
||||
} ;
|
||||
|
||||
DetPl quant num ord = {
|
||||
s = \\af => quant.s !af ++ num.s! (caseAF af) ! (genAF af) ++ ord.s!af ;
|
||||
n = num.n; ---- ?? AR 18/12/2007
|
||||
g = quant.g;
|
||||
c = quant.c
|
||||
} ;
|
||||
-}
|
||||
|
||||
PossPron p = {s = \\af => p.s ! mkPronForm (caseAF af) No (Poss (gNum (genAF af) (numAF af) )); c=Nom; g = PNoGen} ;
|
||||
|
||||
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 };
|
||||
-- MassDet = {s = \\_=>[] ; c=Nom; g = PNoGen; n = Sg} ;
|
||||
|
||||
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
|
||||
} ;
|
||||
|
||||
|
||||
}
|
||||
|
||||
143
lib/resource-1.4/russian/NumeralRus.gf
Normal file
143
lib/resource-1.4/russian/NumeralRus.gf
Normal file
@@ -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
|
||||
} ;
|
||||
|
||||
}
|
||||
|
||||
1041
lib/resource-1.4/russian/ParadigmsRus.gf
Normal file
1041
lib/resource-1.4/russian/ParadigmsRus.gf
Normal file
File diff suppressed because it is too large
Load Diff
26
lib/resource-1.4/russian/PhraseRus.gf
Normal file
26
lib/resource-1.4/russian/PhraseRus.gf
Normal file
@@ -0,0 +1,26 @@
|
||||
--# -path=.:../abstract:../common:../../prelude
|
||||
|
||||
concrete PhraseRus of Phrase = CatRus ** open Prelude, ResRus in {
|
||||
|
||||
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} ;
|
||||
|
||||
}
|
||||
72
lib/resource-1.4/russian/QuestionRus.gf
Normal file
72
lib/resource-1.4/russian/QuestionRus.gf
Normal file
@@ -0,0 +1,72 @@
|
||||
--# -path=.:../abstract:../common:../../prelude
|
||||
|
||||
concrete QuestionRus of Question = CatRus ** open ResRus, Prelude in {
|
||||
|
||||
flags optimize=all_subs ;
|
||||
|
||||
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
|
||||
} ;
|
||||
|
||||
{-
|
||||
IDetCN kakoj pyat umeluj okhotnik =
|
||||
{s = \\pf => case kakoj.c of {
|
||||
Nom =>
|
||||
kakoj.s ! AF (extCase pf) okhotnik.anim (gNum okhotnik.g kakoj.n) ++
|
||||
pyat.s! (extCase pf) ! okhotnik.g ++
|
||||
umeluj.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) ++
|
||||
pyat.s! (extCase pf) ! okhotnik.g ++
|
||||
umeluj.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
|
||||
} ;
|
||||
-}
|
||||
|
||||
CompIAdv a = a ;
|
||||
}
|
||||
37
lib/resource-1.4/russian/RelativeRus.gf
Normal file
37
lib/resource-1.4/russian/RelativeRus.gf
Normal file
@@ -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 )} ;
|
||||
}
|
||||
|
||||
425
lib/resource-1.4/russian/ResRus.gf
Normal file
425
lib/resource-1.4/russian/ResRus.gf
Normal file
@@ -0,0 +1,425 @@
|
||||
--# -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 | Prepos2 ; -- +++ MG_UR: new case Prepos2 introduced! +++
|
||||
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 Nom _ _ => Nom ;
|
||||
PF Gen _ _ => Gen ;
|
||||
PF Dat _ _ => Dat ;
|
||||
PF Inst _ _ => Inst ;
|
||||
PF Acc _ _ => Acc ;
|
||||
PF Prepos _ _ => Prepos ;
|
||||
PF Prepos2 _ _ => Prepos2 -- +++ MG_UR: added +++
|
||||
} ;
|
||||
|
||||
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 => "себе";
|
||||
Prepos2 => "себе" -- +++ MG_UR: added +++
|
||||
}
|
||||
};
|
||||
|
||||
pgNum : PronGen -> Number -> GenNum = \g,n ->
|
||||
case n of
|
||||
{ Sg => case g of
|
||||
{ PGen Fem => ASg Fem ;
|
||||
PGen Masc => ASg Masc ;
|
||||
PGen Neut => ASg Neut ;
|
||||
_ => ASg Masc } ; -- 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 Sg _ => Sg ;
|
||||
_ => Pl
|
||||
} ;
|
||||
|
||||
caseSF: SubstForm -> Case = \sf -> case sf of
|
||||
{
|
||||
SF _ Nom => Nom ;
|
||||
SF _ Gen => Gen ;
|
||||
SF _ Dat => Dat ;
|
||||
SF _ Inst => Inst ;
|
||||
SF _ Acc => Acc ;
|
||||
SF _ Prepos => Prepos ;
|
||||
SF _ Prepos2 => Prepos2 -- +++ MG_UR: added +++
|
||||
} ;
|
||||
|
||||
}
|
||||
6
lib/resource-1.4/russian/Russian.gf
Normal file
6
lib/resource-1.4/russian/Russian.gf
Normal file
@@ -0,0 +1,6 @@
|
||||
--# -path=.:../abstract:../common:prelude
|
||||
|
||||
concrete Russian of RussianAbs =
|
||||
LangRus,
|
||||
ExtraRus
|
||||
** {} ;
|
||||
6
lib/resource-1.4/russian/RussianAbs.gf
Normal file
6
lib/resource-1.4/russian/RussianAbs.gf
Normal file
@@ -0,0 +1,6 @@
|
||||
--# -path=.:../abstract:../common:prelude
|
||||
|
||||
abstract RussianAbs =
|
||||
Lang,
|
||||
ExtraRusAbs
|
||||
** {} ;
|
||||
115
lib/resource-1.4/russian/SentenceRus.gf
Normal file
115
lib/resource-1.4/russian/SentenceRus.gf
Normal file
@@ -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 a p cl = {s = case t.t of {
|
||||
Cond => cl.s! p.p ! ClCondit ; --# notpresent
|
||||
Pres => cl.s! p.p ! ClIndic Present a.a ; ---- AR work-around 13/12/2007
|
||||
_ => cl.s! p.p ! ClIndic (getTense t.t) a.a}};
|
||||
|
||||
UseQCl t a p qcl= {s = case t.t of {
|
||||
Cond => qcl.s! p.p ! ClCondit ; --# notpresent
|
||||
Pres => qcl.s! p.p ! ClIndic Present a.a ;
|
||||
_ => qcl.s!p.p! ClIndic (getTense t.t) a.a }};
|
||||
|
||||
UseRCl t a 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 a.a !gn !c !anim;
|
||||
_ => [", "] ++ rcl.s! p.p ! ClIndic (getTense t.t) a.a !gn !c !anim}};
|
||||
|
||||
UseSlash t a p cl = {
|
||||
s = case t.t of {
|
||||
Cond => cl.s! p.p ! ClCondit ; --# notpresent
|
||||
Pres => cl.s! p.p ! ClIndic Present a.a ;
|
||||
_ => cl.s! p.p ! ClIndic (getTense t.t) a.a
|
||||
} ;
|
||||
s2 = cl.s2 ;
|
||||
c = cl.c
|
||||
};
|
||||
|
||||
|
||||
AdvS a s = {s = a.s ++ "," ++ s.s} ; ---- AR 19/6/2007
|
||||
|
||||
|
||||
}
|
||||
|
||||
130
lib/resource-1.4/russian/StructuralRus.gf
Normal file
130
lib/resource-1.4/russian/StructuralRus.gf
Normal file
@@ -0,0 +1,130 @@
|
||||
--# -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 = (ij_EndK_G_KH_Decl "немног") **{lock_Det= <>; n= Sg; g = PNoGen; c = Nom}; -- AMalenkij
|
||||
--- 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 };
|
||||
in_Prep = { s = "в" ; c = Prepos2 } ; -- +++ MG_UR: new case Prepos2 introduced! +++
|
||||
it_Pron = pronOno ;
|
||||
less_CAdv = ss "менее" ;
|
||||
many_Det = mnogoSgDet ** {n = Sg; g = (PGen Neut); c= Gen} ;
|
||||
more_CAdv = ss "более" ;
|
||||
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 };
|
||||
on_Prep = { s = "на" ; c = Prepos2 }; -- +++ MG_UR: new case Prepos2 introduced! +++
|
||||
--- 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
|
||||
}
|
||||
257
lib/resource-1.4/russian/VerbRus.gf
Normal file
257
lib/resource-1.4/russian/VerbRus.gf
Normal file
@@ -0,0 +1,257 @@
|
||||
|
||||
--# -path=.:../abstract:../common:../../prelude
|
||||
|
||||
concrete VerbRus of Verb = CatRus ** open ResRus, Prelude in {
|
||||
|
||||
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
|
||||
} ;
|
||||
|
||||
{-
|
||||
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 tu molodoj =
|
||||
{s = \\clf,gn,p => obechat.s2++
|
||||
obechat.s ! (getActVerbForm clf (genGNum gn) (numGNum gn) p) ++
|
||||
tu.s ! PF obechat.c No NonPoss ++
|
||||
molodoj.s!AF Inst tu.anim (pgNum tu.g tu.n) ;
|
||||
asp = obechat.asp ;
|
||||
w = Act;
|
||||
negBefore = True;
|
||||
s2 = "";
|
||||
s3 = \\g,n =>""
|
||||
} ;
|
||||
-}
|
||||
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{_ => ""}}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user