mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-28 01:18:57 -06:00
REPLACED old Russian RG completely
This commit is contained in:
@@ -1,75 +1,49 @@
|
||||
concrete AdjectiveRus of Adjective = CatRus ** open ResRus, Prelude, Coordination in {
|
||||
lin
|
||||
-- : A -> AP ; -- warm - тёплый
|
||||
PositA a = adjFormsAdjective a ** {isPost = False} ;
|
||||
-- : A2 -> AP ; -- married
|
||||
UseA2 a = adjFormsAdjective a ** {isPost = False} ;
|
||||
-- : A -> AP ; -- warmer - теплее
|
||||
UseComparA a = adjFormsAdjective (immutableAdjForms a.comp)
|
||||
** {isPost = False; preferShort = PrefShort} ; -- TODO: non-qual
|
||||
-- : AP -> Adv -> AP ; -- warm by nature
|
||||
AdvAP ap adv = ap ** {s = \\gn,a,c => adv.s ++ ap.s ! gn ! a ! c ; isPost = False} ;
|
||||
|
||||
--# -path=.:../abstract:../common:../../prelude
|
||||
-- : AdA -> AP -> AP ;
|
||||
AdAP ada ap = ap ** {s=\\gn,a,c => ada.s ++ ap.s ! gn ! a ! c } ;
|
||||
-- : CAdv -> AP -> NP -> AP ; -- as cool as John
|
||||
CAdvAP cadv ap np = ap ** {
|
||||
s = \\gn,a,c => cadv.s ++ ap.s ! gn ! a ! c ++ comma ++ cadv.p ++ np.s ! Nom -- TODO: embedInCommas ?
|
||||
} ;
|
||||
|
||||
-- : AP -> SC -> AP ; -- good that she is here
|
||||
SentAP ap sc = ap ** {s = \\gn,a,c => ap.s ! gn ! a ! c ++ [", "] ++ sc.s ; isPost = True} ;
|
||||
|
||||
concrete AdjectiveRus of Adjective = CatRus ** open ResRus, Prelude in {
|
||||
flags coding=utf8 ;
|
||||
|
||||
lin
|
||||
|
||||
PositA a = { s = a.s!Posit ; p = a.p ; preferShort = a.preferShort};
|
||||
-- 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 ;
|
||||
-- : A -> NP -> AP ; -- warmer than I - теплее меня
|
||||
ComparA a np = {
|
||||
s = \\gn,anim,cas => a.comp ++ (applyPrep {s="" ; c=Gen ; hasPrep=True} np) ;
|
||||
short = \\ag=>a.comp ++ (applyPrep {s="" ; c=Gen ; hasPrep=True} np) ;
|
||||
isPost = False ;
|
||||
preferShort = PrefShort
|
||||
} ;
|
||||
|
||||
---- AR 17/12/2008
|
||||
UseComparA bolshoj =
|
||||
{s = \\af => bolshoj.s ! Compar ! af ;
|
||||
p = True ;
|
||||
preferShort = PrefShort
|
||||
-- : Ord -> AP ; -- warmest
|
||||
AdjOrd ord = adjFormsAdjective ord ** {isPost = False; preferShort = PrefFull} ;
|
||||
|
||||
-- : A2 -> NP -> AP ; -- married to him - замужем за ним (NB: gender change requires different word!)
|
||||
ComplA2 a2 np = let af=adjFormsAdjective a2 in {
|
||||
s = \\gn,anim,cas => af.s ! gn ! anim ! (a2.c.c) ++ a2.c.s ++ np.s ! (a2.c.c) ;
|
||||
short = \\a=>af.short ! a ++ a2.c.s ++ np.s ! (a2.c.c) ;
|
||||
isPost = False ;
|
||||
preferShort = a2.preferShort
|
||||
} ;
|
||||
|
||||
---- AR 17/12/2008
|
||||
CAdvAP ad ap np = let adp = ad.s in { ---- should be ad.p
|
||||
s = \\af => ad.s ++ ap.s ! af ++ adp ++ np.s ! (mkPronForm Gen Yes NonPoss) ;
|
||||
p = True ; ----?
|
||||
preferShort = ap.preferShort
|
||||
} ;
|
||||
|
||||
---- AR 17/12/2008
|
||||
AdjOrd a = {
|
||||
s = a.s ;
|
||||
p = True ; ---- ?
|
||||
preferShort = PrefFull
|
||||
} ;
|
||||
|
||||
-- $SuperlA$ belongs to determiner syntax in $Noun$.
|
||||
|
||||
ComplA2 vlublen tu =
|
||||
{s = \\af => vlublen.s !Posit! af ++ vlublen.c2.s ++
|
||||
tu.s ! (mkPronForm vlublen.c2.c No NonPoss) ;
|
||||
p = True ;
|
||||
preferShort = vlublen.preferShort
|
||||
} ;
|
||||
|
||||
ReflA2 vlublen =
|
||||
{s = \\af => vlublen.s !Posit! af ++ vlublen.c2.s ++ sam.s ! vlublen.c2.c;
|
||||
p = True ;
|
||||
preferShort = vlublen.preferShort
|
||||
} ;
|
||||
|
||||
SentAP vlublen sent=
|
||||
{s = \\af => vlublen.s ! af ++ [", "] ++ sent.s;
|
||||
p = True ;
|
||||
preferShort = vlublen.preferShort
|
||||
} ;
|
||||
|
||||
|
||||
AdAP ada ap = {
|
||||
s = \\af => ada.s ++ ap.s ! af ;
|
||||
p = True ;
|
||||
preferShort = ap.preferShort
|
||||
} ;
|
||||
|
||||
UseA2 a = {
|
||||
s = \\af => a.s ! Posit ! af ;
|
||||
p = True ;
|
||||
preferShort = a.preferShort
|
||||
-- : A2 -> AP ; -- married to itself - замужем за собой
|
||||
ReflA2 a2 = let af=adjFormsAdjective a2 in {
|
||||
s = \\gn,anim,cas => af.s ! gn ! anim ! cas ++ a2.c.s ++ sam.s ! (a2.c.c) ;
|
||||
short = \\a=>af.short ! a ++ a2.c.s ++ sam.s ! (a2.c.c) ;
|
||||
isPost = False ;
|
||||
preferShort = a2.preferShort
|
||||
} ;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,24 +1,33 @@
|
||||
--# -path=.:../abstract:../common:../../prelude
|
||||
|
||||
concrete AdverbRus of Adverb = CatRus ** open ResRus, Prelude in {
|
||||
concrete AdverbRus of Adverb = CatRus ** open ResRus, Prelude, Coordination in {
|
||||
flags coding=utf8 ;
|
||||
|
||||
lin
|
||||
PositAdvAdj a = {s = a.s !Posit! AdvF} ;
|
||||
lin
|
||||
-- : A -> Adv ; -- warmly - тепло
|
||||
PositAdvAdj a = {s = a.sn} ; -- only qual
|
||||
|
||||
-- : A -> AdA ; -- extremely - исключительно
|
||||
PositAdAAdj a = {s = a.sn} ; -- only qual
|
||||
|
||||
-- : CAdv -> A -> NP -> Adv ; -- more warmly than John - более тепло чем Иван
|
||||
ComparAdvAdj cadv a np = {
|
||||
s = cadv.s ++ a.s !Posit! AdvF ++ "чем" ++ np.s ! PF Nom No NonPoss
|
||||
s = cadv.s ++ a.sn ++ comma ++ cadv.p ++ np.s ! Nom
|
||||
} ;
|
||||
-- : CAdv -> A -> S -> Adv ; -- more warmly than he runs - более тепло чем он бежал
|
||||
ComparAdvAdjS cadv a s = {
|
||||
s = cadv.s ++ a.s !Posit! AdvF ++ "чем" ++ s.s
|
||||
s = cadv.s ++ a.sn ++ cadv.p ++ s.s ! Ind
|
||||
} ;
|
||||
|
||||
PrepNP na stol = ss (na.s ++ stol.s ! PF na.c Yes NonPoss) ;
|
||||
-- : Prep -> NP -> Adv ; -- in the house - в доме
|
||||
PrepNP prep np = ss (applyPrep prep np) ;
|
||||
|
||||
-- : AdA -> Adv -> Adv ; -- very quickly - очень быстро
|
||||
AdAdv = cc2 ;
|
||||
|
||||
SubjS = cc2 ;
|
||||
|
||||
AdnCAdv cadv = {s = cadv.s ++ "чем"} ;
|
||||
-- : Subj -> S -> Adv ; -- when she sleeps - когда она спит
|
||||
SubjS subj s = {s=subj.s ++ s.s ! Ind} ;
|
||||
|
||||
-- : CAdv -> AdN ; -- less (than five) - менее (пяти)
|
||||
AdnCAdv cadv = {s = cadv.s ++ cadv.p} ;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
--# -path=.:../abstract:../common:../prelude:../api
|
||||
--# -path=.:../abstract:../common:../api
|
||||
|
||||
concrete AllRus of AllRusAbs =
|
||||
LangRus,
|
||||
ExtraRus
|
||||
** {flags coding=utf8 ;} ;
|
||||
concrete AllRus of AllRusAbs = LangRus, ExtraRus ** open ExtendRus in {flags coding=utf8;}
|
||||
@@ -1,6 +1,3 @@
|
||||
--# -path=.:../abstract:../common:prelude
|
||||
|
||||
abstract AllRusAbs =
|
||||
Lang,
|
||||
ExtraRusAbs
|
||||
** {} ;
|
||||
abstract AllRusAbs = Lang, ExtraRusAbs ** {};
|
||||
|
||||
@@ -1,100 +1,120 @@
|
||||
--# -path=.:../abstract:../common:../../prelude
|
||||
|
||||
concrete CatRus of Cat = CommonX ** open ResRus, Prelude in {
|
||||
flags coding=utf8 ; optimize=all ;
|
||||
lincat
|
||||
N, PN = ResRus.NounForms ;
|
||||
N2 = ResRus.Noun2Forms ;
|
||||
N3 = ResRus.Noun3Forms ;
|
||||
|
||||
flags optimize=all_subs ; coding=utf8 ;
|
||||
A, Ord = ResRus.AdjForms ;
|
||||
A2 = ResRus.AdjForms ** {c : ComplementCase} ;
|
||||
|
||||
lincat
|
||||
Pron = ResRus.PronounForms ;
|
||||
|
||||
-- Tensed/Untensed
|
||||
V, VS, VQ, VA = ResRus.VerbForms ;
|
||||
V2, V2S, V2Q, V2A = ResRus.VerbForms ** {c : ComplementCase} ;
|
||||
V3 = ResRus.VerbForms ** {c : ComplementCase ; c2 : ComplementCase} ;
|
||||
VV = {v : ResRus.VerbForms ; modal : AgrTable} ;
|
||||
V2V, V2S, V2Q = ResRus.VerbForms ** {c : ComplementCase} ;
|
||||
|
||||
CN = ResRus.Noun ;
|
||||
|
||||
NP = ResRus.NounPhrase ;
|
||||
VP = {
|
||||
adv : AgrTable ; -- modals are in position of adverbials ones numgen gets fixed
|
||||
verb : ResRus.VerbForms ;
|
||||
dep : Str ; -- dependent infinites and such
|
||||
compl : AgrTable
|
||||
} ;
|
||||
VPSlash = {
|
||||
adv : AgrTable ; -- modals are in position of adverbials ones numgen gets fixed
|
||||
verb : ResRus.VerbForms ;
|
||||
dep : Str ; -- dependent infinites and such
|
||||
compl : AgrTable ;
|
||||
c : ComplementCase
|
||||
} ; ----
|
||||
|
||||
AP = ResRus.Adjective ** {isPost : Bool} ;
|
||||
|
||||
S = {s : Mood => Str} ;
|
||||
SSlash = {s : Mood => Str; c: ComplementCase} ;
|
||||
Cl = {
|
||||
subj,compl,adv : Str ;
|
||||
verb : VerbForms ;
|
||||
dep : Str ; -- dependent infinites and such
|
||||
a : Agr
|
||||
} ;
|
||||
ClSlash = {
|
||||
subj,compl,adv : Str ;
|
||||
verb : VerbForms ;
|
||||
dep : Str ; -- dependent infinites and such
|
||||
a : Agr ;
|
||||
c : ComplementCase
|
||||
} ;
|
||||
Imp = {s: Polarity => GenNum => Str} ;
|
||||
Comp = {s : AgrTable ; adv : Str ; cop : CopulaType } ;
|
||||
|
||||
Det, DAP = {
|
||||
s : DetTable ;
|
||||
g : Gender ;
|
||||
c : Case ;
|
||||
size : NumSize
|
||||
} ;
|
||||
Predet = ResRus.Adjective ** {size : NumSize} ;
|
||||
Quant, IQuant = ResRus.Adjective ** {g: Gender; c: Case} ;
|
||||
Num, Numeral, Card = NumDet ;
|
||||
Digits = {s : Str ; size: NumSize} ;
|
||||
|
||||
S = {s : Str} ;
|
||||
QS = {s : QForm => Str} ;
|
||||
RS = {s : GenNum => Case => Animacy => Str} ;
|
||||
SSlash = {s : Str; s2: Str ; c: Case} ;
|
||||
QCl = {
|
||||
subj,compl,adv : Str ;
|
||||
verb : VerbForms ;
|
||||
dep : Str ; -- dependent infinites and such
|
||||
a : Agr
|
||||
} ;
|
||||
|
||||
-- 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 ; preferShort : ShortFormPreference} ;
|
||||
|
||||
-- Noun
|
||||
|
||||
CN = {nounpart : NForm => Str; relcl : 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 : Case => Animacy => Gender => Str; n: Number; g: PronGen; c: Case; size: Size} ;
|
||||
Predet, Quant = {s : AdjForm => Str; g: PronGen; c: Case; size: Size} ;
|
||||
|
||||
-- Numeral
|
||||
|
||||
Num = {s : Gender => Animacy => Case => Str ; n : Number ; size: Size} ;
|
||||
Numeral, Card = {s : Gender => Animacy => Case => Str ; n : Number ; size: Size} ;
|
||||
Digits = {s : Str ; n : Number ; size: Size} ; ----
|
||||
|
||||
-- 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.
|
||||
IP, RP = ResRus.IPronounForms ;
|
||||
IComp = {s : AgrTable ; adv : Str ; cop : CopulaType } ;
|
||||
IDet = {
|
||||
s : DetTable ;
|
||||
g : Gender ;
|
||||
size : NumSize ;
|
||||
c : Case
|
||||
} ;
|
||||
RS = {s : AdjTable} ;
|
||||
RCl = {
|
||||
subj : AdjTable ;
|
||||
compl,adv : AgrTable ;
|
||||
verb : VerbForms ;
|
||||
dep : Str ; -- dependent infinites and such
|
||||
a : Agr
|
||||
} ;
|
||||
|
||||
Prep = ResRus.ComplementCase ;
|
||||
Conj = {s1,s2 : Str ; n : Number} ;
|
||||
Subj = {s : Str} ;
|
||||
Prep = Complement ;
|
||||
|
||||
-- Open lexical classes, e.g. Lexicon
|
||||
|
||||
V, VS, VV, VQ, VA = Verbum ; -- = {s : VerbForm => Str ; asp : Aspect } ;
|
||||
V2, V2A = Verbum ** {c2 : Complement} ;
|
||||
V2V, V2S, V2Q = Verbum ** {c2 : Complement} ; --- AR
|
||||
V3 = Verbum ** {c2,c3 : Complement} ;
|
||||
-- VV = {s : VVForm => Str ; isAux : Bool} ;
|
||||
|
||||
Ord = {s : AdjForm => Str} ;
|
||||
A = {s : Degree => AdjForm => Str ; p : IsPostfixAdj ; preferShort : ShortFormPreference} ;
|
||||
A2 = A ** {c2 : Complement} ;
|
||||
|
||||
-- Substantives moreover have an inherent gender.
|
||||
N = {s : NForm => Str; g : Gender; anim : Animacy} ;
|
||||
N2 = {s : NForm => Str; g : Gender; anim : Animacy} ** {c2 : Complement} ;
|
||||
N3 = {s : NForm => Str; g : Gender; anim : Animacy} ** {c2,c3 : Complement} ;
|
||||
PN = {s : Case => Str ; g : Gender ; anim : Animacy} ;
|
||||
|
||||
|
||||
linref
|
||||
N = \s -> s.snom ;
|
||||
PN = \s -> s.snom ;
|
||||
N2 = \s -> s.snom ++ s.c2.s ; -- TODO
|
||||
N3 = \s -> s.snom ++ s.c2.s ++ s.c3.s ; -- TODO
|
||||
A = \s -> case s.preferShort of {PrefShort => s.sm ; _ => s.msnom} ;
|
||||
A2 = \s -> case s.preferShort of {PrefShort => s.sm ; _ => s.msnom} ++ s.c.s ; -- ?
|
||||
V = \s -> verbInf s ;
|
||||
V2 = \s -> (verbInf s) ++ s.c.s ;
|
||||
V2V = \s -> (verbInf s) ++ s.c.s ;
|
||||
V2A = \s -> (verbInf s) ++ s.c.s ;
|
||||
V3 = \s -> (verbInf s) ++ s.c.s ++ s.c2.s ;
|
||||
Ord = \s -> s.nsnom ;
|
||||
S = \s -> s.s ! Ind ;
|
||||
SSlash = \s -> s.s ! Ind ++ s.c.s ; --?
|
||||
VP = \s -> s.adv ! Ag (GSg Neut) P3 ++ (verbInf s.verb) ++ s.dep ++ s.compl ! Ag (GSg Neut) P3 ; -- Are these useful?
|
||||
Comp = \s -> copula.inf ++ s.s ! Ag (GSg Neut) P3 ++ s.adv ;
|
||||
IComp = \s -> s.s ! Ag (GSg Neut) P3 ++ s.adv ++ copula.inf;
|
||||
VPSlash = \s -> s.adv ! Ag (GSg Neut) P3 ++ (verbInf s.verb) ++ s.dep ++ s.compl ! Ag (GSg Neut) P3 ++ s.c.s ; -- Are these useful?
|
||||
Cl = \s -> s.subj ++ s.adv ++ (verbInf s.verb) ++ s.dep ++ s.compl ;
|
||||
ClSlash = \s -> s.subj ++ s.adv ++ (verbInf s.verb) ++ s.dep ++ s.compl ;
|
||||
QCl = \s -> s.subj ++ s.adv ++ (verbInf s.verb) ++ s.dep ++ s.compl ;
|
||||
RCl = \s -> s.subj ! GSg Neut ! Inanimate ! Nom ++ s.adv ! Ag (GSg Neut) P3 ++ (verbInf s.verb) ++ s.dep ++ s.compl ! Ag (GSg Neut) P3 ;
|
||||
IP = \s -> s.nom ;
|
||||
RP = \s -> s.nom ;
|
||||
}
|
||||
|
||||
|
||||
@@ -5,116 +5,198 @@ concrete ConjunctionRus of Conjunction =
|
||||
|
||||
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 or xs =
|
||||
{s = \\af => case af of {
|
||||
AF c a gn => or.s1++ xs.s1 ! AF c a gn ++ or.s2 ++ xs.s2 ! AF c a gn ;
|
||||
AFShort gn => case xs.preferShort of {
|
||||
PrefShort => or.s1++ xs.s1 ! AFShort gn ++ or.s2 ++ xs.s2 ! AFShort gn ;
|
||||
_ => or.s1++ xs.s1 ! AF Nom Inanimate gn ++ or.s2 ++ xs.s2 ! AF Nom Inanimate gn} ;
|
||||
AdvF => or.s1++ xs.s1 ! AdvF ++ or.s2 ++ xs.s2 ! AdvF
|
||||
lincat
|
||||
[Adv] = {s1,s2 : Str} ;
|
||||
[IAdv] = {s1,s2 : Str} ;
|
||||
[AdV] = {s1,s2 : Str} ;
|
||||
[AP] = {s1,s2 : AdjTable ;
|
||||
short1,short2 : AgrTable ;
|
||||
isPost : Bool;
|
||||
preferShort : ShortFormPreference
|
||||
} ;
|
||||
p = xs.p ;
|
||||
[DAP] = {s1,s2 : DetTable ;
|
||||
g : Gender ;
|
||||
c : Case ;
|
||||
size : NumSize
|
||||
} ;
|
||||
[NP] = {s1,s2 : Case => Str ;
|
||||
-- prep1,prep2 : Case => Str ;
|
||||
pron : Bool ;
|
||||
a : Agr
|
||||
} ;
|
||||
[CN] = {s1,s2 : Number => Case => Str ;
|
||||
g : Gender ;
|
||||
anim : Animacy
|
||||
} ;
|
||||
[S] = {s1,s2 : Mood => Str} ;
|
||||
[RS] = {s1,s2 : AdjTable} ;
|
||||
|
||||
lin
|
||||
-- : Adv -> Adv -> ListAdv ; -- here, there
|
||||
BaseAdv = twoSS ;
|
||||
|
||||
-- : Adv -> ListAdv -> ListAdv ; -- here, there, everywhere
|
||||
ConsAdv = consrSS comma ;
|
||||
|
||||
-- : AdV -> AdV -> ListAdV ; -- always, sometimes
|
||||
BaseAdV = twoSS ;
|
||||
-- : AdV -> ListAdV -> ListAdV ; -- always, sometimes, never
|
||||
ConsAdV = consrSS comma ;
|
||||
|
||||
-- : IAdv -> IAdv -> ListIAdv ; -- where, when
|
||||
BaseIAdv = twoSS ;
|
||||
-- : IAdv -> ListIAdv -> ListIAdv ; -- where, when, why
|
||||
ConsIAdv = consrSS comma ;
|
||||
|
||||
-- : AP -> AP -> ListAP ; -- red, white
|
||||
BaseAP x y = twoTable3 GenNum Animacy Case x y ** {
|
||||
short1 = x.short ;
|
||||
short2 = y.short ;
|
||||
isPost = orB x.isPost y.isPost;
|
||||
preferShort = selectAPForm x.preferShort y.preferShort
|
||||
} ;
|
||||
|
||||
-- ConsAP : AP -> ListAP -> ListAP ; -- red, white, blue
|
||||
ConsAP x xs = consrTable3 GenNum Animacy Case comma x xs ** {
|
||||
short1 = \\ag=> x.short ! ag ++ comma ++ xs.short1 ! ag ;
|
||||
short2 = xs.short2 ;
|
||||
isPost = orB x.isPost xs.isPost ;
|
||||
preferShort = selectAPForm x.preferShort xs.preferShort
|
||||
} ;
|
||||
|
||||
-- : DAP -> DAP -> ListDAP ; --
|
||||
BaseDAP x y = twoTable3 Gender Animacy Case x y ** {
|
||||
g = conjGender x.g y.g ;
|
||||
c = y.c ;
|
||||
size = conjSize x.size y.size ; -- different genders -> plural?
|
||||
} ;
|
||||
|
||||
-- : DAP -> ListDAP -> ListDAP ; --
|
||||
ConsDAP x xs = consrTable3 Gender Animacy Case comma x xs ** {
|
||||
g = xs.g ; --?
|
||||
c = xs.c ; -- ?
|
||||
size = xs.size -- different genders -> plural?
|
||||
} ;
|
||||
|
||||
-- ConjDet : Conj -> ListDAP -> Det ; -- his or her
|
||||
ConjDet conj xs = {
|
||||
s=\\g,anim,cas => conj.s1 ++ xs.s1 ! g ! anim ! cas ++ conj.s2 ++ xs.s2 ! g ! anim ! cas ;
|
||||
g=xs.g ;
|
||||
c=xs.c ;
|
||||
size=xs.size
|
||||
} ;
|
||||
|
||||
-- : S -> S -> ListS ; -- John walks, Mary runs
|
||||
BaseS = twoTable Mood ;
|
||||
|
||||
-- : S -> ListS -> ListS ; -- John walks, Mary runs, Bill swims
|
||||
ConsS = consrTable Mood comma ;
|
||||
|
||||
-- : RS -> RS -> ListRS ; -- who walks, whom I know
|
||||
BaseRS x y = twoTable3 GenNum Animacy Case x y ** {c = y.c} ;
|
||||
|
||||
-- : RS -> ListRS -> ListRS ; -- who walks, whom I know, who is here
|
||||
ConsRS xs x = consrTable3 GenNum Animacy Case comma xs x ** {c = xs.c} ;
|
||||
|
||||
-- : Conj -> ListAdv -> Adv ; -- here or there
|
||||
ConjAdv = conjunctDistrSS ;
|
||||
-- : Conj -> ListIAdv -> IAdv ; -- where or why
|
||||
ConjIAdv = conjunctDistrSS ;
|
||||
-- : Conj -> ListAdV -> AdV ; -- always or sometimes
|
||||
ConjAdV = conjunctDistrSS ;
|
||||
|
||||
-- : Conj -> ListAP -> AP ; -- cold and warm
|
||||
ConjAP conj xs = conjunctDistrTable3 GenNum Animacy Case conj xs ** {
|
||||
short = \\ag => conj.s1 ++ xs.short1 ! ag ++ conj.s2 ++ xs.short2 ! ag ;
|
||||
isPost = xs.isPost;
|
||||
preferShort = xs.preferShort
|
||||
} ;
|
||||
|
||||
---- AR 17/12/2008
|
||||
ConjRS c xs = conjunctDistrTable3 GenNum Case Animacy c xs ** {p = xs.p} ;
|
||||
ConjS conj ss = conjunctDistrTable Mood conj ss ;
|
||||
|
||||
-- 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 ; preferShort = selectAPForm x.preferShort xs.preferShort} ;
|
||||
|
||||
BaseAP x y = twoTable AdjForm x y ** {p = andB x.p y.p ; preferShort = selectAPForm x.preferShort y.preferShort} ;
|
||||
|
||||
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 } ;
|
||||
|
||||
---- AR 17/12/2008
|
||||
BaseRS x y = twoTable3 GenNum Case Animacy x y ** {c = y.c} ;
|
||||
ConsRS xs x = consrTable3 GenNum Case Animacy comma xs x ** {c = xs.c} ;
|
||||
|
||||
oper
|
||||
selectAPForm : ShortFormPreference -> ShortFormPreference -> ShortFormPreference = \sfp1,sfp2 ->
|
||||
case <sfp1,sfp2> of
|
||||
{<PrefShort, PrefShort> => PrefShort ;
|
||||
_ => PrefFull
|
||||
-- : Conj -> ListRS -> RS ; -- who walks and whose mother runs
|
||||
ConjRS conj ss = conjunctDistrTable3 GenNum Animacy Case conj ss ** {
|
||||
c = ss.c
|
||||
} ;
|
||||
|
||||
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 ; preferShort : ShortFormPreference} ;
|
||||
-- : CN -> CN -> ListCN ; -- man, woman
|
||||
BaseCN x y = {
|
||||
s1 = x.s ;
|
||||
s2 = y.s ;
|
||||
g = y.g ;
|
||||
anim = conjAnim x.anim y.anim
|
||||
} ;
|
||||
|
||||
---- AR 17/12/2008
|
||||
[RS] = {s1,s2 : GenNum => Case => Animacy => Str} ;
|
||||
-- : CN -> ListCN -> ListCN ; -- man, woman, child
|
||||
ConsCN x xs = consrTable2 Number Case comma x xs ** {
|
||||
g = conjGender x.g xs.g ;
|
||||
anim = conjAnim x.anim xs.anim
|
||||
} ;
|
||||
|
||||
oper
|
||||
-- : Conj -> ListCN -> CN ; -- man and woman
|
||||
ConjCN conj xs = {
|
||||
s = \\n,cas => conj.s1 ++ xs.s1 ! n ! cas ++ conj.s2 ++ xs.s2 ! n ! cas ;
|
||||
g = xs.g ;
|
||||
anim = xs.anim
|
||||
} ;
|
||||
|
||||
-- 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
|
||||
-- } ;
|
||||
-- : NP -> NP -> ListNP ; -- John, Mary
|
||||
BaseNP x y = {
|
||||
s1 = x.s ;
|
||||
s2 = y.s ;
|
||||
-- prep1 = x.prep ;
|
||||
-- prep2 = y.prep ;
|
||||
pron = y.pron ; --???
|
||||
a = y.a
|
||||
} ;
|
||||
|
||||
-- For persons, we let the latter argument win ("либо ты, либо я пойду"
|
||||
-- but "либо я, либо ты пойдешь"). This is not quite clear.
|
||||
-- : NP -> ListNP -> ListNP ; -- John, Mary, Bill
|
||||
ConsNP x xs = {
|
||||
s1 = \\c => x.s ! c ++ comma ++ xs.s1 ! c ;
|
||||
s2 = xs.s2 ;
|
||||
--prep1 = \\c => x.prep ! c ++ comma ++ xs.prep1 ! c ;
|
||||
--prep2 = xs.prep2 ;
|
||||
a = conjAgr x.a xs.a ;
|
||||
pron = xs.pron ;
|
||||
anim = conjAnim x.anim xs.anim
|
||||
} ;
|
||||
|
||||
-- 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.
|
||||
-- : Conj -> ListNP -> NP ; -- she or we
|
||||
ConjNP conj xs = {
|
||||
s = \\c => conj.s1 ++ xs.s1 ! c ++ conj.s2 ++ xs.s2 ! c ;
|
||||
--prep = \\c => conj.s1 ++ xs.prep1 ! c ++ conj.s2 ++ xs.prep2 ! c ;
|
||||
a = xs.a ; -- TODO: dep. on conj as well?
|
||||
pron = xs.pron ;
|
||||
anim = xs.anim
|
||||
} ;
|
||||
|
||||
oper
|
||||
conjGender : Gender -> Gender -> Gender = \_,m -> m ;
|
||||
conjPGender : PronGen -> PronGen -> PronGen = \_,m -> m ;
|
||||
|
||||
conjAnim : Animacy -> Animacy -> Animacy = \_,m -> m ;
|
||||
|
||||
|
||||
conjAnim : Animacy -> Animacy -> Animacy = \m,n -> case <m,n> of {
|
||||
<Inanimate,Inanimate> => Inanimate ;
|
||||
_ => Animate
|
||||
} ;
|
||||
conjNumber : Number -> Number -> Number = \m,n -> case <m,n> of {
|
||||
<Sg,Sg> => Sg ;
|
||||
_ => Pl
|
||||
} ;
|
||||
conjSize : NumSize -> NumSize -> NumSize = \m,n -> n ; -- TODO: check latest win?
|
||||
conjGenNum : GenNum -> GenNum -> GenNum = \m,n -> case <m,n> of {
|
||||
<GSg Fem,GSg Fem> => FSg ;
|
||||
<GSg Masc,GSg Masc> => MSg ;
|
||||
<GSg Neut,GSg Neut> => NSg ;
|
||||
<GSg _,GSg _> => GPl; -- TODO: Is this true for animate only or in general?
|
||||
_ => GPl
|
||||
} ;
|
||||
conjAgr : Agr -> Agr -> Agr
|
||||
= \a1,a2 ->
|
||||
let a1rec = case a1 of {Ag gn p => {gn=gn; p=p} } in
|
||||
let a2rec = case a2 of {Ag gn p => {gn=gn; p=p} } in
|
||||
Ag (conjGenNum a1rec.gn a2rec.gn) (conjPerson a1rec.p a2rec.p);
|
||||
selectAPForm : ShortFormPreference -> ShortFormPreference -> ShortFormPreference
|
||||
= \sfp1,sfp2 ->
|
||||
case <sfp1,sfp2> of {
|
||||
<PrefShort, PrefShort> => PrefShort ;
|
||||
_ => PrefFull
|
||||
} ;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,12 +1,216 @@
|
||||
concrete ConstructionRus of Construction = CatRus **
|
||||
open SyntaxRus, ParadigmsRus, ResRus in {
|
||||
open Predef, SyntaxRus, SymbolicRus, ParadigmsRus, ResRus, Prelude,
|
||||
QuestionRus, SentenceRus, AdverbRus, AdjectiveRus, VerbRus, IdiomRus, (E=ExtendRus), (EX=ExtraRus) in {
|
||||
|
||||
lin
|
||||
hungry_VP = mkVP (mkA "голодный") ;
|
||||
thirsty_VP = mkVP want_VV (mkVP (regV imperfective firstE "пь" "ю" "пил" "пей" "пить")) ;
|
||||
tired_VP = mkVP (mkA "уставший" Rel) ;
|
||||
scared_VP = mkVP (mkV imperfective "боюсь" "боишься" "боится" "боимся" "бойтесь" "боятся" "боялся" "бойся" "бояться") ;
|
||||
ill_VP = mkVP (mkA "больной") ;
|
||||
ready_VP = mkVP (mkA "готовый") ;
|
||||
hungry_VP = mkVP (mkA "голодный" "" "1*a/c'" PrefShort) ;
|
||||
thirsty_VP = mkVP want_VV (mkVP (mkV imperfective "пить" "пью" "пьёт")) ;
|
||||
tired_VP = mkVP (mkA "усталый" "" "1*a/c'" PrefFull) ;
|
||||
scared_VP = mkVP (mkV imperfective "бояться" "боюсь" "боится") ; -- intran
|
||||
ill_VP = mkVP ( mkA "больной" "" "1*b" PrefShort) ;
|
||||
ready_VP = mkVP (mkA "готовый" "" "1a" PrefShort) ;
|
||||
|
||||
-- : NP -> QCl ; -- what is x's name / wie heisst x (Ger)
|
||||
what_name_QCl np = E.PredIAdvVP how_IAdv (ComplSlash (SlashV2a (mkV2 (mkV imperfective "звать" "зову" "зовёт") Gen)) np) ;
|
||||
|
||||
-- languages
|
||||
|
||||
lincat
|
||||
Language = N ;
|
||||
Timeunit = N ;
|
||||
Hour = Symb ;
|
||||
Weekday = N ;
|
||||
Monthday = NP ;
|
||||
Month = N ;
|
||||
Year = NP ;
|
||||
|
||||
oper
|
||||
mkLanguage = overload {
|
||||
mkLanguage : Str -> N = \s -> mkN (mkA s) masculine animate ;
|
||||
mkLanguage : Str -> Str -> N = \s,zi -> mkN s masculine inanimate zi;
|
||||
} ;
|
||||
mkHour : Str -> Symb = \s -> lin Symb {s=s} ;
|
||||
|
||||
lin
|
||||
-- : Card -> Timeunit -> Adv ; -- (for) three hours
|
||||
timeunitAdv card time = mkAdv ((mkNP <lin Card card : Card> time).s ! Nom) ;
|
||||
|
||||
-- : Card -> Card -> Timeunit -> Adv ; -- (cats live) ten to twenty years
|
||||
timeunitRange l u time = {
|
||||
-- TODO: Fancier logic. Also reqrite with applyPrep
|
||||
s = from_Prep.s ++ (mkAdv ((mkNP <lin Card l : Card> <lin N (ellNoun time) : N>).s ! from_Prep.c)).s
|
||||
++ EX.on_to_Prep.s ++ (mkAdv ((mkNP <lin Card u : Card> time).s ! EX.on_to_Prep.c)).s
|
||||
} ;
|
||||
|
||||
oneHour = mkHour "1" ;
|
||||
twoHour = mkHour "2" ;
|
||||
threeHour = mkHour "3" ;
|
||||
fourHour = mkHour "4" ;
|
||||
fiveHour = mkHour "5" ;
|
||||
sixHour = mkHour "6" ;
|
||||
sevenHour = mkHour "7" ;
|
||||
eightHour = mkHour "8" ;
|
||||
nineHour = mkHour "9" ;
|
||||
tenHour = mkHour "10" ;
|
||||
elevenHour = mkHour "11" ;
|
||||
twelveHour = mkHour "12" ;
|
||||
thirteenHour = mkHour "13" ;
|
||||
fourteenHour = mkHour "14" ;
|
||||
fifteenHour = mkHour "15" ;
|
||||
sixteenHour = mkHour "16" ;
|
||||
seventeenHour = mkHour "17" ;
|
||||
eighteenHour = mkHour "18" ;
|
||||
nineteenHour = mkHour "19" ;
|
||||
twentyHour = mkHour "20" ;
|
||||
twentyOneHour = mkHour "21" ;
|
||||
twentyTwoHour = mkHour "22" ;
|
||||
twentyThreeHour = mkHour "23" ;
|
||||
twentyFourHour = mkHour "24" ;
|
||||
|
||||
-- : Hour -> Adv ; -- at three a.m./p.m.
|
||||
timeHour h = mkAdv (in_Prep.s ++ h.s) ;
|
||||
|
||||
-- : Hour -> Card -> Adv ; -- at six forty a.m./p.m.
|
||||
timeHourMinute h card = mkAdv ((timeHour h).s ++ BIND ++ ":" ++ BIND ++ card.s ! Neut ! Inanimate ! Nom) ; -- TODO: ?
|
||||
|
||||
-- TODO: Fix the following (genders)
|
||||
-- : Weekday -> Adv ; -- on Monday
|
||||
weekdayPunctualAdv w = mkAdv (in_Prep.s ++ w.sacc) ; -- on Sunday
|
||||
-- : Weekday -> Adv ; -- on Mondays
|
||||
weekdayHabitualAdv w = mkAdv (EX.along_Prep.s ++ (w.pdat)) ; -- on Sundays
|
||||
-- : Weekday -> Adv ; -- last Monday
|
||||
weekdayLastAdv w = mkAdv (EX.to2_Prep.s ++ (PositA (mkA "прошлый")).s ! GSg Fem ! Inanimate ! Acc ++ w.sacc) ;
|
||||
-- : Weekday -> Adv ; -- next Monday
|
||||
weekdayNextAdv w = mkAdv (EX.to2_Prep.s ++ (PositA (mkA "следующий")).s ! GSg Fem ! Inanimate ! Acc ++ w.sacc) ;
|
||||
|
||||
-- : Month -> Adv ; -- in June
|
||||
monthAdv month = mkAdv ("в" ++ month.sloc) ;
|
||||
-- : Year -> Adv ; -- in 1976
|
||||
yearAdv year = mkAdv ("в" ++ year.s ! Loc) ;
|
||||
|
||||
-- : Monthday -> Month -> Adv ; -- on 17 May
|
||||
dayMonthAdv monthday month = mkAdv (monthday.s ! Gen ++ month.sgen) ;
|
||||
-- : Month -> Year -> Adv ; -- in May 2013
|
||||
monthYearAdv month year = mkAdv ("в" ++ month.sloc ++ year.s ! Gen ++ "года") ;
|
||||
-- : Monthday -> Month -> Year -> Adv ; -- on 17 May 2013
|
||||
dayMonthYearAdv monthday month year = mkAdv (monthday.s ! Gen ++ month.sgen ++ year.s ! Gen ++ "года") ;
|
||||
|
||||
-- : Int -> Year ; -- (year) 1963
|
||||
intYear = symb ;
|
||||
-- : Int -> Monthday ; -- 31th (March)
|
||||
intMonthday = symb ;
|
||||
|
||||
-- : Weekday -> N ; -- (this) Monday
|
||||
weekdayN wd = wd ;
|
||||
-- : Month -> N ; -- (this) November
|
||||
monthN month = month ;
|
||||
|
||||
-- : Weekday -> PN ; -- Monday (is free)
|
||||
weekdayPN wd = wd ;
|
||||
-- : Month -> PN ; -- March (is cold)
|
||||
monthPN month = month ;
|
||||
|
||||
-- : Card -> CN -> A -> AP ; -- x inches long
|
||||
n_units_AP card cn a =
|
||||
let ap=adjFormsAdjective a in
|
||||
let as_n_units=(how_IAdv.s
|
||||
++ card.s ! Neut ! Inanimate ! Nom
|
||||
++ cn.s ! numSizeNum card.size ! (numSizeCase card.size)) in {
|
||||
s=\\gn,anim,cas=> ap.s!gn!anim!cas ++ as_n_units ;
|
||||
short=\\a=> ap.short ! a ++ as_n_units ;
|
||||
preferShort=PrefFull ;
|
||||
isPost=True
|
||||
} ;
|
||||
-- This does not work in Russian naturally
|
||||
-- : Card -> CN -> NP -> NP ; -- x ounces of this flour
|
||||
n_units_of_NP card cn np = {
|
||||
s = \\cas => card.s ! Neut ! Inanimate ! cas
|
||||
++ cn.s ! numSizeNum card.size ! (numSizeCase card.size)
|
||||
++ np.s ! Gen ;
|
||||
pron=False ;
|
||||
a = Ag (gennum cn.g (numSizeNumber card.size)) P3
|
||||
} ;
|
||||
-- : Card -> CN -> CN -> CN ; -- x gallon bottle
|
||||
n_unit_CN card cn_unit cn = cn ** {
|
||||
s=\\n,cas=> cn.s ! n ! cas
|
||||
++ "на"
|
||||
++ card.s ! Neut ! Inanimate ! Nom
|
||||
++ cn_unit.s ! (numSizeNum card.size) ! (numSizeCase card.size)
|
||||
} ;
|
||||
|
||||
----------------------------------------------
|
||||
---- lexicon of special names
|
||||
|
||||
lin
|
||||
second_Timeunit = mkN "секунда" ;
|
||||
minute_Timeunit = mkN "минута" ;
|
||||
hour_Timeunit = mkN "час" Masc Inanimate "1c" ;
|
||||
day_Timeunit = mkN "день" masculine inanimate "2*b" ;
|
||||
week_Timeunit = mkN "неделя" Fem Inanimate "2a" ;
|
||||
month_Timeunit = mkN "месяц" Masc Inanimate "5a" ;
|
||||
year_Timeunit = lin N ((mkNplus (mkN "год")) ** {sloc="году"; pgen="лет"}) ;
|
||||
|
||||
monday_Weekday = mkN "понедельник" masculine inanimate ;
|
||||
tuesday_Weekday = mkN "вторник" masculine inanimate ;
|
||||
wednesday_Weekday = mkN "среда" feminine inanimate ;
|
||||
thursday_Weekday = mkN "четверг" masculine inanimate ;
|
||||
friday_Weekday = mkN "пятница" feminine inanimate ;
|
||||
saturday_Weekday = mkN "суббота" feminine inanimate ;
|
||||
sunday_Weekday = mkN "воскресенье" neuter inanimate ;
|
||||
|
||||
january_Month = mkN "январь" masculine inanimate;
|
||||
february_Month = mkN "февраль" masculine inanimate;
|
||||
march_Month = mkN "март" ;
|
||||
april_Month = mkN "апрель" masculine inanimate "2a";
|
||||
may_Month = mkN "май" ;
|
||||
june_Month = mkN "июнь" masculine inanimate ;
|
||||
july_Month = mkN "июль" masculine inanimate ;
|
||||
august_Month = mkN "август" ;
|
||||
september_Month = mkN "сентябрь" masculine inanimate ;
|
||||
october_Month = mkN "октябрь" masculine inanimate ;
|
||||
november_Month = mkN "ноябрь" masculine inanimate ;
|
||||
december_Month = mkN "декабрь" masculine inanimate ;
|
||||
|
||||
-- : Language -> Adv ; -- in English, auf englisch, englanniksi, etc
|
||||
lin
|
||||
InLanguage l = PrepNP on_Prep (mkNP l) ;
|
||||
languageCN l = mkCN l ;
|
||||
languageNP l = mkNP l ;
|
||||
|
||||
lin afrikaans_Language = mkLanguage "африкаанс" "1a" ;
|
||||
lin amharic_Language = mkLanguage "амхарский" ;
|
||||
lin arabic_Language = mkLanguage "арабский" ;
|
||||
lin bulgarian_Language = mkLanguage "болгарский" ;
|
||||
lin catalan_Language = mkLanguage "каталанский" ;
|
||||
lin chinese_Language = mkLanguage "китайский" ;
|
||||
lin danish_Language = mkLanguage "датский" ;
|
||||
lin dutch_Language = mkLanguage "голландский" ;
|
||||
lin english_Language = mkLanguage "английский" ;
|
||||
lin estonian_Language = mkLanguage "эстонский" ;
|
||||
lin finnish_Language = mkLanguage "финский" ;
|
||||
lin french_Language = mkLanguage "французский" ;
|
||||
lin german_Language = mkLanguage "немецкий" ;
|
||||
lin greek_Language = mkLanguage "греческий" ;
|
||||
lin hebrew_Language = mkLanguage "еврейский" ;
|
||||
lin hindi_Language = mkLanguage "хинди" "0" ;
|
||||
lin japanese_Language = mkLanguage "японский" ;
|
||||
lin italian_Language = mkLanguage "итальянский" ;
|
||||
lin latin_Language = mkLanguage "латинский" ;
|
||||
lin latvian_Language = mkLanguage "латвийский" ;
|
||||
lin maltese_Language = mkLanguage "мальтийский" ;
|
||||
lin nepali_Language = mkLanguage "непальский" ;
|
||||
lin norwegian_Language = mkLanguage "норвежский" ;
|
||||
lin persian_Language = mkLanguage "персидский" ;
|
||||
lin polish_Language = mkLanguage "польский" ;
|
||||
lin punjabi_Language = mkLanguage "панджаби" "0" ;
|
||||
lin romanian_Language = mkLanguage "румынский" ;
|
||||
lin russian_Language = mkLanguage "русский" ;
|
||||
lin sindhi_Language = mkLanguage "синдхи" "0" ;
|
||||
lin spanish_Language = mkLanguage "испанский" ;
|
||||
lin swahili_Language = mkLanguage "суахили" "0";
|
||||
lin swedish_Language = mkLanguage "шведский" ;
|
||||
lin thai_Language = mkLanguage "тайский" ;
|
||||
lin turkish_Language = mkLanguage "турецкий" ;
|
||||
lin urdu_Language = mkLanguage "урду" "0" ;
|
||||
|
||||
}
|
||||
|
||||
136784
src/russian/DictRus.gf
136784
src/russian/DictRus.gf
File diff suppressed because it is too large
Load Diff
136740
src/russian/DictRusAbs.gf
136740
src/russian/DictRusAbs.gf
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,4 @@
|
||||
concrete DocumentationRus of Documentation = CatRus ** open
|
||||
ResRus,
|
||||
HTML in {
|
||||
concrete DocumentationRus of Documentation = CatRus ** open ResRus, HTML in {
|
||||
flags coding=utf8 ;
|
||||
|
||||
lincat
|
||||
@@ -10,11 +8,10 @@ lincat
|
||||
Tag = {s : Str} ;
|
||||
|
||||
lin
|
||||
InflectionN,
|
||||
InflectionN2,
|
||||
InflectionN3 = \n -> {
|
||||
InflectionN = \n -> {
|
||||
t = "сущ" ;
|
||||
s1= heading1 ("Существительное"++
|
||||
s1= heading1 (
|
||||
"Существительное" ++
|
||||
case n.g of {
|
||||
Masc => "(м.р.)" ;
|
||||
Fem => "(ж.р.)" ;
|
||||
@@ -25,359 +22,28 @@ lin
|
||||
Animate => "Одушевлённое" ;
|
||||
Inanimate => "Неодушевлённое"
|
||||
}
|
||||
|
||||
) ;
|
||||
s2= frameTable (
|
||||
tr (th "Падеж" ++ th "ед. ч." ++ th "мн. ч.") ++
|
||||
tr (th "Им." ++ td (n.s ! (NF Sg Nom) nom) ++ td (n.s ! (NF Pl Nom nom))) ++
|
||||
tr (th "Р." ++ td (n.s ! (NF Sg Gen) nom) ++ td (n.s ! (NF Pl Gen nom))) ++
|
||||
tr (th "Д." ++ td (n.s ! (NF Sg Dat) nom) ++ td (n.s ! (NF Pl Dat nom))) ++
|
||||
tr (th "В." ++ td (n.s ! (NF Sg Acc) nom) ++ td (n.s ! (NF Pl Acc nom))) ++
|
||||
tr (th "Тв." ++ td (n.s ! (NF Sg Inst) nom) ++ td (n.s ! (NF Pl Inst nom))) ++
|
||||
tr (th "Пр." ++ td (n.s ! (NF Sg (Prepos PrepOther) nom)) ++ td (n.s ! (NF Pl (Prepos PrepOther) nom)))
|
||||
tr (th "Им." ++ td (n.snom) ++ td (n.pnom)) ++
|
||||
tr (th "Р." ++ td (n.sgen) ++ td (n.pgen)) ++
|
||||
tr (th "Д." ++ td (n.sdat) ++ td (n.pdat)) ++
|
||||
tr (th "В." ++ td (n.sacc) ++ td (n.pacc)) ++
|
||||
tr (th "Тв." ++ td (n.sins) ++ td (n.pins)) ++
|
||||
tr (th "Пр." ++ td (n.sprep) ++ td (n.pprep)) ++
|
||||
tr (th "Мест.(П2)" ++ td (n.sloc) ++ td "") ++
|
||||
tr (th "Разд.(Р2)" ++ td (n.sptv) ++ td "") ++
|
||||
tr (th "Зват." ++ td (n.svoc) ++ td "")
|
||||
) ;
|
||||
s3= ""
|
||||
} ;
|
||||
|
||||
|
||||
InflectionA,
|
||||
InflectionA2 = \a -> {
|
||||
t = "прил" ;
|
||||
s1= heading1 ("Прилагательное"
|
||||
|
||||
) ;
|
||||
s2= frameTable (
|
||||
intagAttr "tr" "style=\"border-top-color:white;border-left-color:white;border-right-color:white\"" (intagAttr "th" "colspan=\"6\"" "Положительная степень сравнения") ++
|
||||
|
||||
tr (
|
||||
intagAttr "th" "rowspan=\"2\" colspan=\"2\"" "Падеж" ++
|
||||
intagAttr "th" "colspan=\"3\"" "ед. ч." ++
|
||||
intagAttr "th" "rowspan=\"2\"" "мн. ч." ) ++
|
||||
tr(th "муж. р." ++ th "ср. р." ++ th "жен. р.") ++
|
||||
|
||||
tr (intagAttr "th" "colspan=\"2\"" "Им." ++ td (a.s ! Posit ! (AF Nom Animate (GSg Masc)))
|
||||
++ td (a.s ! Posit ! (AF Nom Animate (GSg Neut)))
|
||||
++ td (a.s ! Posit ! (AF Nom Animate (GSg Fem)))
|
||||
++ td (a.s ! Posit ! (AF Nom Animate GPl))) ++
|
||||
tr (intagAttr "th" "colspan=\"2\"" "Р." ++ td (a.s ! Posit ! (AF Gen Animate (GSg Masc)))
|
||||
++ td (a.s ! Posit ! (AF Gen Animate (GSg Neut)))
|
||||
++ td (a.s ! Posit ! (AF Gen Animate (GSg Fem)))
|
||||
++ td (a.s ! Posit ! (AF Gen Animate GPl))) ++
|
||||
tr (intagAttr "th" "colspan=\"2\"" "Д." ++ td (a.s ! Posit ! (AF Dat Animate (GSg Masc)))
|
||||
++ td (a.s ! Posit ! (AF Dat Animate (GSg Neut)))
|
||||
++ td (a.s ! Posit ! (AF Dat Animate (GSg Fem)))
|
||||
++ td (a.s ! Posit ! (AF Dat Animate GPl))) ++
|
||||
|
||||
tr (intagAttr "th" "rowspan=\"2\"" "В."
|
||||
++ th "одуш."
|
||||
++ td (a.s ! Posit ! (AF Acc Animate (GSg Masc)))
|
||||
++ intagAttr "td" "rowspan=\"2\"" (a.s ! Posit ! (AF Acc Animate (GSg Neut)))
|
||||
++ intagAttr "td" "rowspan=\"2\"" (a.s ! Posit ! (AF Acc Animate (GSg Fem)))
|
||||
++ td (a.s ! Posit ! (AF Acc Animate GPl))) ++
|
||||
tr ( th "неодуш."
|
||||
|
||||
++ td (a.s ! Posit ! (AF Acc Inanimate (GSg Masc)))
|
||||
++ td (a.s ! Posit ! (AF Acc Inanimate GPl))) ++
|
||||
|
||||
|
||||
tr (intagAttr "th" "colspan=\"2\"" "Тв." ++ td (a.s ! Posit ! (AF Inst Animate (GSg Masc)))
|
||||
++ td (a.s ! Posit ! (AF Inst Animate (GSg Neut)))
|
||||
++ td (a.s ! Posit ! (AF Inst Animate (GSg Fem)))
|
||||
++ td (a.s ! Posit ! (AF Inst Animate GPl))) ++
|
||||
tr (intagAttr "th" "colspan=\"2\"" "Пр." ++ td (a.s ! Posit ! (AF (Prepos PrepOther) Animate (GSg Masc)))
|
||||
++ td (a.s ! Posit ! (AF (Prepos PrepOther) Animate (GSg Neut)))
|
||||
++ td (a.s ! Posit ! (AF (Prepos PrepOther) Animate (GSg Fem)))
|
||||
++ td (a.s ! Posit ! (AF Inst Animate GPl))) ++
|
||||
|
||||
intagAttr "tr" "style=\"border-left-color:white;border-right-color:white\"" (intagAttr "th" "colspan=\"6\"" "Сравнительная степень сравнения") ++
|
||||
|
||||
tr (intagAttr "td" "colspan=\"6\" align=\"center\" style=\"border-top-color:black\"" (a.s ! Compar ! (AF Nom Animate (GSg Masc)))) ++
|
||||
|
||||
-- tr (intagAttr "th" "colspan=\"2\"" "Им."
|
||||
-- ++ td (a.s ! Compar ! (AF Nom Animate (GSg Masc)))
|
||||
-- ++ td (a.s ! Compar ! (AF Nom Animate (GSg Neut)))
|
||||
-- ++ td (a.s ! Compar ! (AF Nom Animate (GSg Fem)))
|
||||
-- ++ td (a.s ! Compar ! (AF Nom Animate GPl))) ++
|
||||
-- tr (intagAttr "th" "colspan=\"2\"" "Р."
|
||||
-- ++ td (a.s ! Compar ! (AF Gen Animate (GSg Masc)))
|
||||
-- ++ td (a.s ! Compar ! (AF Gen Animate (GSg Neut)))
|
||||
-- ++ td (a.s ! Compar ! (AF Gen Animate (GSg Fem)))
|
||||
-- ++ td (a.s ! Compar ! (AF Gen Animate GPl))) ++
|
||||
-- tr (intagAttr "th" "colspan=\"2\"" "Д."
|
||||
-- ++ td (a.s ! Compar ! (AF Dat Animate (GSg Masc)))
|
||||
-- ++ td (a.s ! Compar ! (AF Dat Animate (GSg Neut)))
|
||||
-- ++ td (a.s ! Compar ! (AF Dat Animate (GSg Fem)))
|
||||
-- ++ td (a.s ! Compar ! (AF Dat Animate GPl))) ++
|
||||
-- tr (intagAttr "th" "colspan=\"2\"" "В."
|
||||
-- ++ td (a.s ! Compar ! (AF Acc Animate (GSg Masc)))
|
||||
-- ++ td (a.s ! Compar ! (AF Acc Animate (GSg Neut)))
|
||||
-- ++ td (a.s ! Compar ! (AF Acc Animate (GSg Fem)))
|
||||
-- ++ td (a.s ! Compar ! (AF Acc Animate GPl))) ++
|
||||
-- tr (intagAttr "th" "colspan=\"2\"" "Тв."
|
||||
-- ++ td (a.s ! Compar ! (AF Inst Animate (GSg Masc)))
|
||||
-- ++ td (a.s ! Compar ! (AF Inst Animate (GSg Neut)))
|
||||
-- ++ td (a.s ! Compar ! (AF Inst Animate (GSg Fem)))
|
||||
-- ++ td (a.s ! Compar ! (AF Inst Animate GPl))) ++
|
||||
-- tr (intagAttr "th" "colspan=\"2\"" "Пр."
|
||||
-- ++ td (a.s ! Compar ! (AF (Prepos PrepOther) Animate (GSg Masc)))
|
||||
-- ++ td (a.s ! Compar ! (AF (Prepos PrepOther) Animate (GSg Neut)))
|
||||
-- ++ td (a.s ! Compar ! (AF (Prepos PrepOther) Animate (GSg Fem)))
|
||||
-- ++ td (a.s ! Compar ! (AF (Prepos PrepOther) Animate GPl))) ++
|
||||
intagAttr "tr" "style=\"border-left-color:white;border-right-color:white\"" (intagAttr "th" "colspan=\"6\"" "Превосходная степень сравнения") ++
|
||||
|
||||
tr (intagAttr "th" "colspan=\"2\"" "Им."
|
||||
++ td (a.s ! Superl ! (AF Nom Animate (GSg Masc)))
|
||||
++ td (a.s ! Superl ! (AF Nom Animate (GSg Neut)))
|
||||
++ td (a.s ! Superl ! (AF Nom Animate (GSg Fem)))
|
||||
++ td (a.s ! Superl ! (AF Nom Animate GPl))) ++
|
||||
tr (intagAttr "th" "colspan=\"2\"" "Р."
|
||||
++ td (a.s ! Superl ! (AF Gen Animate (GSg Masc)))
|
||||
++ td (a.s ! Superl ! (AF Gen Animate (GSg Neut)))
|
||||
++ td (a.s ! Superl ! (AF Gen Animate (GSg Fem)))
|
||||
++ td (a.s ! Superl ! (AF Gen Animate GPl))) ++
|
||||
tr (intagAttr "th" "colspan=\"2\"" "Д."
|
||||
++ td (a.s ! Superl ! (AF Dat Animate (GSg Masc)))
|
||||
++ td (a.s ! Superl ! (AF Dat Animate (GSg Neut)))
|
||||
++ td (a.s ! Superl ! (AF Dat Animate (GSg Fem)))
|
||||
++ td (a.s ! Superl ! (AF Dat Animate GPl))) ++
|
||||
tr (intagAttr "th" "rowspan=\"2\"" "В."
|
||||
++ th "одуш."
|
||||
++ td (a.s ! Superl ! (AF Acc Animate (GSg Masc)))
|
||||
++ intagAttr "td" "rowspan=\"2\"" (a.s ! Posit ! (AF Acc Animate (GSg Neut)))
|
||||
++ intagAttr "td" "rowspan=\"2\"" (a.s ! Posit ! (AF Acc Animate (GSg Fem)))
|
||||
++ td (a.s ! Superl ! (AF Acc Animate GPl))) ++
|
||||
tr ( th "неодуш."
|
||||
|
||||
++ td (a.s ! Superl ! (AF Acc Inanimate (GSg Masc)))
|
||||
++ td (a.s ! Superl ! (AF Acc Inanimate GPl))) ++
|
||||
|
||||
|
||||
tr (intagAttr "th" "colspan=\"2\"" "Тв." ++ td (a.s ! Superl ! (AF Inst Animate (GSg Masc)))
|
||||
++ td (a.s ! Superl ! (AF Inst Animate (GSg Neut)))
|
||||
++ td (a.s ! Superl ! (AF Inst Animate (GSg Fem)))
|
||||
++ td (a.s ! Superl ! (AF Inst Animate GPl))) ++
|
||||
tr (intagAttr "th" "colspan=\"2\"" "Пр." ++ td (a.s ! Superl ! (AF (Prepos PrepOther) Animate (GSg Masc)))
|
||||
++ td (a.s ! Superl ! (AF (Prepos PrepOther) Animate (GSg Neut)))
|
||||
++ td (a.s ! Superl ! (AF (Prepos PrepOther) Animate (GSg Fem)))
|
||||
++ td (a.s ! Superl ! (AF (Prepos PrepOther) Animate GPl))) ++
|
||||
|
||||
intagAttr "tr" "style=\"border-left-color:white;border-right-color:white\"" (intagAttr "th" "colspan=\"6\"" "Краткая форма") ++
|
||||
tr (intagAttr "th" "colspan=\"2\"" "" ++ td (a.s ! Posit ! (AFShort (GSg Masc)))
|
||||
++ td (a.s ! Posit ! (AFShort (GSg Neut)))
|
||||
++ td (a.s ! Posit ! (AFShort (GSg Fem)))
|
||||
++ td (a.s ! Posit ! (AFShort GPl)))
|
||||
);
|
||||
s3= ""
|
||||
} ;
|
||||
|
||||
|
||||
InflectionV = \v -> {
|
||||
t = "гл" ;
|
||||
s1 = heading1 ("Глагол" ++
|
||||
case v.asp of {
|
||||
Imperfective => "совершенный" ;
|
||||
Perfective => "несовершенный"
|
||||
}) ;
|
||||
s2 = frameTable (
|
||||
tr(
|
||||
|
||||
intagAttr "th" "rowspan=\"2\"" "Лицо" ++
|
||||
intagAttr "th" "colspan=\"3\"" "ед. ч." ++
|
||||
intagAttr "th" "rowspan=\"2\"" "мн. ч." ) ++
|
||||
tr(th "муж. р." ++ th "ср. р." ++ th "жен. р.") ++
|
||||
(intagAttr "tr" "style=\"border-bottom-color:white;border-top-color:white;border-left-color:white;border-right-color:white\""
|
||||
|
||||
(intagAttr "th" "style=\"text-align:center;padding-top:20px;\"colspan=5" "Действительный залог")) ++
|
||||
|
||||
(intagAttr "tr" "style=\"border-left-color:white;border-right-color:white\""
|
||||
(intagAttr "th" "colspan=\"5\"" "Настоящее время")) ++
|
||||
tr(th "I" ++
|
||||
td (v.s ! VFORM Act (VIND (GSg Masc) (VPresent P1))) ++
|
||||
td (v.s ! VFORM Act (VIND (GSg Neut) (VPresent P1))) ++
|
||||
td (v.s ! VFORM Act (VIND (GSg Fem) (VPresent P1))) ++
|
||||
td (v.s ! VFORM Act (VIND GPl (VPresent P1)))) ++
|
||||
tr(th "II" ++
|
||||
td (v.s ! VFORM Act (VIND (GSg Masc) (VPresent P2))) ++
|
||||
td (v.s ! VFORM Act (VIND (GSg Neut) (VPresent P2))) ++
|
||||
td (v.s ! VFORM Act (VIND (GSg Fem) (VPresent P2))) ++
|
||||
td (v.s ! VFORM Act (VIND GPl (VPresent P2)))) ++
|
||||
tr(th "III" ++
|
||||
td (v.s ! VFORM Act (VIND (GSg Masc) (VPresent P3))) ++
|
||||
td (v.s ! VFORM Act (VIND (GSg Neut) (VPresent P3))) ++
|
||||
td (v.s ! VFORM Act (VIND (GSg Fem) (VPresent P3))) ++
|
||||
td (v.s ! VFORM Act (VIND GPl (VPresent P3)))) ++
|
||||
(intagAttr "tr" "style=\"border-left-color:white;border-right-color:white\""
|
||||
(intagAttr "th" "colspan=\"5\"" "Прошедшее время")) ++
|
||||
tr(th "" ++
|
||||
td (v.s ! VFORM Act (VIND (GSg Masc) VPast)) ++
|
||||
td (v.s ! VFORM Act (VIND (GSg Neut) VPast)) ++
|
||||
td (v.s ! VFORM Act (VIND (GSg Fem) VPast)) ++
|
||||
td (v.s ! VFORM Act (VIND GPl VPast))) ++
|
||||
(intagAttr "tr" "style=\"border-left-color:white;border-right-color:white\""
|
||||
(intagAttr "th" "colspan=\"5\"" "Будущее время")) ++
|
||||
tr(
|
||||
th "I" ++
|
||||
td (v.s ! VFORM Act (VIND (GSg Masc) (VFuture P1))) ++
|
||||
td (v.s ! VFORM Act (VIND (GSg Neut) (VFuture P1))) ++
|
||||
td (v.s ! VFORM Act (VIND (GSg Fem) (VFuture P1))) ++
|
||||
td (v.s ! VFORM Act (VIND GPl (VFuture P1)))) ++
|
||||
tr(th "II" ++
|
||||
td (v.s ! VFORM Act (VIND (GSg Masc) (VFuture P2))) ++
|
||||
td (v.s ! VFORM Act (VIND (GSg Neut) (VFuture P2))) ++
|
||||
td (v.s ! VFORM Act (VIND (GSg Fem) (VFuture P2))) ++
|
||||
td (v.s ! VFORM Act (VIND GPl (VFuture P2)))) ++
|
||||
tr(th "III" ++
|
||||
td (v.s ! VFORM Act (VIND (GSg Masc) (VFuture P3))) ++
|
||||
td (v.s ! VFORM Act (VIND (GSg Neut) (VFuture P3))) ++
|
||||
td (v.s ! VFORM Act (VIND (GSg Fem) (VFuture P3))) ++
|
||||
td (v.s ! VFORM Act (VIND GPl (VFuture P3)))) );
|
||||
s3 = "" ;
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
InflectionV2,
|
||||
InflectionVV,
|
||||
InflectionVS,
|
||||
InflectionVQ,
|
||||
InflectionVA,
|
||||
InflectionV3,
|
||||
InflectionV2V,
|
||||
InflectionV2S,
|
||||
InflectionV2Q,
|
||||
InflectionV2A = \v -> {
|
||||
t = "гл" ;
|
||||
s1 = heading1 ("Глагол" ++
|
||||
case v.asp of {
|
||||
Imperfective => "совершенный" ;
|
||||
Perfective => "несовершенный"
|
||||
}) ;
|
||||
s2 = frameTable (
|
||||
tr(
|
||||
|
||||
intagAttr "th" "rowspan=\"2\"" "Лицо" ++
|
||||
intagAttr "th" "colspan=\"3\"" "ед. ч." ++
|
||||
intagAttr "th" "rowspan=\"2\"" "мн. ч." ) ++
|
||||
tr(th "муж. р." ++ th "ср. р." ++ th "жен. р.") ++
|
||||
|
||||
(intagAttr "tr" "style=\"border-bottom-color:white;border-top-color:white;border-left-color:white;border-right-color:white\""
|
||||
|
||||
(intagAttr "th" "style=\"text-align:center;padding-top:20px;\"colspan=5" "Действительный залог")) ++
|
||||
|
||||
(intagAttr "tr" "style=\"border-left-color:white;border-right-color:white\""
|
||||
(intagAttr "th" "colspan=\"5\"" "Настоящее время")) ++
|
||||
tr(th "I" ++
|
||||
td (v.s ! VFORM Act (VIND (GSg Masc) (VPresent P1))) ++
|
||||
td (v.s ! VFORM Act (VIND (GSg Neut) (VPresent P1))) ++
|
||||
td (v.s ! VFORM Act (VIND (GSg Fem) (VPresent P1))) ++
|
||||
td (v.s ! VFORM Act (VIND GPl (VPresent P1)))) ++
|
||||
tr(th "II" ++
|
||||
td (v.s ! VFORM Act (VIND (GSg Masc) (VPresent P2))) ++
|
||||
td (v.s ! VFORM Act (VIND (GSg Neut) (VPresent P2))) ++
|
||||
td (v.s ! VFORM Act (VIND (GSg Fem) (VPresent P2))) ++
|
||||
td (v.s ! VFORM Act (VIND GPl (VPresent P2)))) ++
|
||||
tr(th "III" ++
|
||||
td (v.s ! VFORM Act (VIND (GSg Masc) (VPresent P3))) ++
|
||||
td (v.s ! VFORM Act (VIND (GSg Neut) (VPresent P3))) ++
|
||||
td (v.s ! VFORM Act (VIND (GSg Fem) (VPresent P3))) ++
|
||||
td (v.s ! VFORM Act (VIND GPl (VPresent P3)))) ++
|
||||
(intagAttr "tr" "style=\"border-left-color:white;border-right-color:white\""
|
||||
(intagAttr "th" "colspan=\"5\"" "Прошедшее время")) ++
|
||||
tr(th "" ++
|
||||
td (v.s ! VFORM Act (VIND (GSg Masc) VPast)) ++
|
||||
td (v.s ! VFORM Act (VIND (GSg Neut) VPast)) ++
|
||||
td (v.s ! VFORM Act (VIND (GSg Fem) VPast)) ++
|
||||
td (v.s ! VFORM Act (VIND GPl VPast))) ++
|
||||
(intagAttr "tr" "style=\"border-left-color:white;border-right-color:white\""
|
||||
(intagAttr "th" "colspan=\"5\"" "Будущее время")) ++
|
||||
tr(
|
||||
th "I" ++
|
||||
td (v.s ! VFORM Act (VIND (GSg Masc) (VFuture P1))) ++
|
||||
td (v.s ! VFORM Act (VIND (GSg Neut) (VFuture P1))) ++
|
||||
td (v.s ! VFORM Act (VIND (GSg Fem) (VFuture P1))) ++
|
||||
td (v.s ! VFORM Act (VIND GPl (VFuture P1)))) ++
|
||||
tr(th "II" ++
|
||||
td (v.s ! VFORM Act (VIND (GSg Masc) (VFuture P2))) ++
|
||||
td (v.s ! VFORM Act (VIND (GSg Neut) (VFuture P2))) ++
|
||||
td (v.s ! VFORM Act (VIND (GSg Fem) (VFuture P2))) ++
|
||||
td (v.s ! VFORM Act (VIND GPl (VFuture P2)))) ++
|
||||
tr(th "III" ++
|
||||
td (v.s ! VFORM Act (VIND (GSg Masc) (VFuture P3))) ++
|
||||
td (v.s ! VFORM Act (VIND (GSg Neut) (VFuture P3))) ++
|
||||
td (v.s ! VFORM Act (VIND (GSg Fem) (VFuture P3))) ++
|
||||
td (v.s ! VFORM Act (VIND GPl (VFuture P3)))) ++
|
||||
(intagAttr "tr" "style=\"border-bottom-color:white;border-top-color:white;border-left-color:white;border-right-color:white\""
|
||||
|
||||
(intagAttr "th" "style=\"text-align:center;padding-top:20px;\"colspan=5" "Страдательный залог")) ++
|
||||
(intagAttr "tr" "style=\"border-left-color:white;border-right-color:white\""
|
||||
(intagAttr "th" "colspan=\"5\"" "Настоящее время")) ++
|
||||
|
||||
tr(th "I" ++
|
||||
td (v.s ! VFORM Pass (VIND (GSg Masc) (VPresent P1))) ++
|
||||
td (v.s ! VFORM Pass (VIND (GSg Neut) (VPresent P1))) ++
|
||||
td (v.s ! VFORM Pass (VIND (GSg Fem) (VPresent P1))) ++
|
||||
td (v.s ! VFORM Pass (VIND GPl (VPresent P1)))) ++
|
||||
tr(th "II" ++
|
||||
td (v.s ! VFORM Pass (VIND (GSg Masc) (VPresent P2))) ++
|
||||
td (v.s ! VFORM Pass (VIND (GSg Neut) (VPresent P2))) ++
|
||||
td (v.s ! VFORM Pass (VIND (GSg Fem) (VPresent P2))) ++
|
||||
td (v.s ! VFORM Pass (VIND GPl (VPresent P2)))) ++
|
||||
tr(th "III" ++
|
||||
td (v.s ! VFORM Pass (VIND (GSg Masc) (VPresent P3))) ++
|
||||
td (v.s ! VFORM Pass (VIND (GSg Neut) (VPresent P3))) ++
|
||||
td (v.s ! VFORM Pass (VIND (GSg Fem) (VPresent P3))) ++
|
||||
td (v.s ! VFORM Pass (VIND GPl (VPresent P3)))) ++
|
||||
(intagAttr "tr" "style=\"border-left-color:white;border-right-color:white\""
|
||||
(intagAttr "th" "colspan=\"5\"" "Прошедшее время")) ++
|
||||
tr(th "" ++
|
||||
td (v.s ! VFORM Pass (VIND (GSg Masc) VPast)) ++
|
||||
td (v.s ! VFORM Pass (VIND (GSg Neut) VPast)) ++
|
||||
td (v.s ! VFORM Pass (VIND (GSg Fem) VPast)) ++
|
||||
td (v.s ! VFORM Pass (VIND GPl VPast))) ++
|
||||
(intagAttr "tr" "style=\"border-left-color:white;border-right-color:white\""
|
||||
(intagAttr "th" "colspan=\"5\"" "Будущее время")) ++
|
||||
tr(th "Первое" ++
|
||||
td (v.s ! VFORM Pass (VIND (GSg Masc) (VFuture P1))) ++
|
||||
td (v.s ! VFORM Pass (VIND (GSg Neut) (VFuture P1))) ++
|
||||
td (v.s ! VFORM Pass (VIND (GSg Fem) (VFuture P1))) ++
|
||||
td (v.s ! VFORM Pass (VIND GPl (VFuture P1)))) ++
|
||||
tr(th "Второе" ++
|
||||
td (v.s ! VFORM Pass (VIND (GSg Masc) (VFuture P2))) ++
|
||||
td (v.s ! VFORM Pass (VIND (GSg Neut) (VFuture P2))) ++
|
||||
td (v.s ! VFORM Pass (VIND (GSg Fem) (VFuture P2))) ++
|
||||
td (v.s ! VFORM Pass (VIND GPl (VFuture P2)))) ++
|
||||
tr(th "Третье" ++
|
||||
td (v.s ! VFORM Pass (VIND (GSg Masc) (VFuture P3))) ++
|
||||
td (v.s ! VFORM Pass (VIND (GSg Neut) (VFuture P3))) ++
|
||||
td (v.s ! VFORM Pass (VIND (GSg Fem) (VFuture P3))) ++
|
||||
td (v.s ! VFORM Pass (VIND GPl (VFuture P3))))
|
||||
|
||||
) ;
|
||||
s3 = "" ;
|
||||
|
||||
} ;
|
||||
|
||||
InflectionAdv = \adv -> {
|
||||
t = "нар" ;
|
||||
s1= heading1 ("Наречие") ;
|
||||
s2= paragraph (adv.s) ;
|
||||
s3= ""
|
||||
} ;
|
||||
|
||||
InflectionPrep = \prep -> {
|
||||
t = "пр" ;
|
||||
s1= heading1 ("Предлог") ;
|
||||
s2= paragraph (prep.s) ;
|
||||
s3= ""
|
||||
} ;
|
||||
|
||||
|
||||
lin
|
||||
MkDocument d i e = {s = i.s1 ++ d.s ++ i.s2 ++ i.s3 ++ e.s} ;
|
||||
MkTag i = {s = i.t} ;
|
||||
|
||||
NoDefinition t = {s=t.s};
|
||||
MkDefinition t d = {s="<p><b>Определение:</b>"++t.s++d.s++"</p>"};
|
||||
MkDefinitionEx t d e = {s="<p><b>Определение:</b>"++t.s++d.s++"</p><p><b>Пример:</b>"++e.s++"</p>"};
|
||||
|
||||
MkDefinition t d = {s="<p><b>Определение:</b>" ++ t.s ++ d.s ++ "</p>"};
|
||||
MkDefinitionEx t d e = {s="<p><b>Определение:</b>" ++ t.s ++ d.s ++ "</p><p><b>Пример:</b>" ++ e.s ++ "</p>"};
|
||||
}
|
||||
|
||||
43
src/russian/ExtendRus.gf
Normal file
43
src/russian/ExtendRus.gf
Normal file
@@ -0,0 +1,43 @@
|
||||
--# -path=../common:../abstract
|
||||
|
||||
concrete ExtendRus of Extend =
|
||||
CatRus ** ExtendFunctor - [
|
||||
iFem_Pron,
|
||||
theyFem_Pron, weFem_Pron, youFem_Pron, youPlFem_Pron, youPolFem_Pron, youPolPlFem_Pron, youPolPl_Pron,
|
||||
VPS, ListVPS, VPI, ListVPI, VPS2, ListVPS2, VPI2, ListVPI2, RNP, RNPList,
|
||||
UseComp, RelNP, UseComp_estar, SubjRelNP, PredAPVP, ImpersCl, UseComp, CompAP, EmbedVP, ExistNP, UseQCl,
|
||||
QuestCl, ExistNP, UseQCl, ExistIP, AdvVP, AdvVP, AdvVP, UseComp, CompAP, ExistS, ExistNPQS, ExistIPQS,
|
||||
ComplDirectVS, ComplDirectVQ, AdvIsNPAP, AdAdV, AdjAsCN, AdjAsNP,
|
||||
-- ApposNP,
|
||||
AdvIsNP,
|
||||
BaseVPS, ConsVPS, BaseVPI, ConsVPI, BaseVPS2, ConsVPS2, BaseVPI2, ConsVPI2,
|
||||
MkVPS, ConjVPS, PredVPS, MkVPI, ConjVPI, ComplVPIVV,
|
||||
MkVPS2, ConjVPS2, ComplVPS2, MkVPI2, ConjVPI2, ComplVPI2,
|
||||
Base_nr_RNP, Base_rn_RNP, Base_rr_RNP, ByVP, CompBareCN,
|
||||
CompIQuant, CompQS, CompS, CompVP, ComplBareVS, ComplGenVV, ComplSlashPartLast, ComplVPSVV, CompoundAP,
|
||||
CompoundN, ConjRNP, ConjVPS, ConsVPS, Cons_nr_RNP, Cons_rr_RNP, DetNPMasc, DetNPFem, EmbedPresPart, EmptyRelSlash,
|
||||
ExistsNP, ExistCN, ExistMassCN, ExistPluralCN, ProDrop,
|
||||
FocusAP, FocusAdV, FocusAdv, FocusObj, GenIP, GenModIP, GenModNP, GenNP, GenRP,
|
||||
GerundAdv, GerundCN, GerundNP, IAdvAdv, ICompAP, InOrderToVP, MkVPS, NominalizeVPSlashNP,
|
||||
PassAgentVPSlash, PassVPSlash, ProgrVPSlash, PastPartAP, PastPartAgentAP, PositAdVAdj, PredVPS, PredVPSVV, PredetRNP, PrepCN,
|
||||
EmbedSSlash, PresPartAP, PurposeVP, ReflPoss, ReflPron, ReflRNP, SlashBareV2S, SlashV2V, StrandQuestSlash, StrandRelSlash,
|
||||
-- PredIAdvVP,
|
||||
UncontractedNeg, UttAccIP, UttAccNP, UttAdV, UttDatIP, UttDatNP, UttVPShort, WithoutVP, BaseVPS2, ConsVPS2, ConjVPS2, ComplVPS2, MkVPS2
|
||||
]
|
||||
with (Grammar=GrammarRus)
|
||||
** open Prelude, ResRus, ParadigmsRus, Overload, (E=Extend) in {
|
||||
|
||||
lincat
|
||||
RNP = {s : Agr => Str} ;
|
||||
RNPList = {s1,s2 : Agr => Str} ;
|
||||
|
||||
lin
|
||||
-- : NP -> NP -> NP ; -- Mr Macron, the president of France,
|
||||
ApposNP np np2 = {
|
||||
s=\\cas=> np.s ! cas ++ embedInCommas (np2.s ! cas) ;
|
||||
a=np.a
|
||||
} ;
|
||||
|
||||
-- : IAdv -> VP -> QCl ; -- how to walk?
|
||||
PredIAdvVP iadv vp = QuestIAdv iadv (GenericCl vp) ; -- DEFAULT how does one walk
|
||||
} ;
|
||||
@@ -1,74 +0,0 @@
|
||||
--# -path=.:abstract:common
|
||||
concrete ExtraLexRus of ExtraLexRusAbs = CatRus **
|
||||
open ParadigmsRus in {
|
||||
flags
|
||||
coding=utf8 ;
|
||||
lin
|
||||
--- bridge_N = mkN "мост" ;
|
||||
--- candle_N = nSvecha "свеч" ; -- +++ MG_UR: added +++
|
||||
--- citizen_N = nGrazhdanin "господ" ; -- +++ MG_UR: added +++
|
||||
daughter_N =
|
||||
{s = table {
|
||||
NF Sg Nom => "дочь" ;
|
||||
NF Sg Gen => "дочери" ;
|
||||
NF Sg Dat => "дочери" ;
|
||||
NF Sg Acc => "дочь" ;
|
||||
NF Sg Inst => "дочерью" ;
|
||||
NF Sg (Prepos _) => "дочери" ;
|
||||
NF Pl Nom => "дочери" ;
|
||||
NF Pl Gen => "дочерей" ;
|
||||
NF Pl Dat => "дочерям" ;
|
||||
NF Pl Acc => "дочерей" ;
|
||||
NF Pl Inst => "дочерьми" ;
|
||||
NF Pl (Prepos _) => "дочерях"
|
||||
} ;
|
||||
g = Fem ; anim = Animate
|
||||
} ;
|
||||
|
||||
--- desk_N = nStol "стол" ;
|
||||
--- dictionary_N = nSlovar "словар" ;
|
||||
--- fellow_N = nTovarish "товарищ" ; -- +++ MG_UR: added +++
|
||||
--- flag_N = nVremja "зна" ;
|
||||
--- heaven_N = nNebo "неб" ; -- +++ MG_UR: added +++
|
||||
--- museum_N = nMusej "музе" ; -- +++ MG_UR: added +++
|
||||
-- name_N = mkN "имя" "имени" "имени" "имя" "именем" "имени" "имени" "имена" "имён" "именам" "имена" "именами" "именах" neuter inanimate ;
|
||||
--- ocean_N = nMorje "мор" ; -- +++ MG_UR: added +++
|
||||
son_N =
|
||||
{s = table
|
||||
{ NF Sg Nom => syn ;
|
||||
NF Sg Gen => syn+"а" ;
|
||||
NF Sg Dat => syn+"у" ;
|
||||
NF Sg Acc => syn +"а";
|
||||
NF Sg Inst => syn+"ом" ;
|
||||
NF Sg (Prepos _) => syn+"е" ;
|
||||
NF Pl Nom => syn+"ья" ;
|
||||
NF Pl Gen => syn+"ьев" ;
|
||||
NF Pl Dat => syn+"ьям" ;
|
||||
NF Pl Acc => syn +"ьев";
|
||||
NF Pl Inst => syn+"ьями" ;
|
||||
NF Pl (Prepos _) => syn+"ьяах"
|
||||
} ;
|
||||
g = Masc ; anim = Animate
|
||||
} ;
|
||||
--- time_N = nVremja "вре" ; -- +++ MG_UR: added +++
|
||||
--- vocationalschool_N = nUchilishe "училищ" ; -- +++ MG_UR: added +++
|
||||
way_N =
|
||||
{s = table
|
||||
{ NF Sg Nom => put+"ь" ;
|
||||
NF Sg Gen => put+"и" ;
|
||||
NF Sg Dat => put+"и" ;
|
||||
NF Sg Acc => put+"ь" ;
|
||||
NF Sg Inst => put+"ём" ;
|
||||
NF Sg (Prepos _) => put+"и" ;
|
||||
NF Pl Nom => put+"и" ;
|
||||
NF Pl Gen => put+"ей" ;
|
||||
NF Pl Dat => put+"ям" ;
|
||||
NF Pl Acc => put+"и" ;
|
||||
NF Pl Inst => put+"ями" ;
|
||||
NF Pl (Prepos _) => put+"ях"
|
||||
} ;
|
||||
g = Masc ; anim = Inanimate
|
||||
} ;
|
||||
|
||||
--- word_N = nSlovo "слов" ; -- +++ MG_UR: added +++
|
||||
}
|
||||
@@ -1,16 +1,14 @@
|
||||
-- Seems like this is deprecated - need to use ExtendRus instead
|
||||
|
||||
concrete ExtraRus of ExtraRusAbs = CatRus **
|
||||
open ResRus, MorphoRus, (P = ParadigmsRus), Prelude, NounRus in {
|
||||
flags optimize=all ; coding=utf8 ;
|
||||
|
||||
lin
|
||||
have_V3 = P.mkV3 (P.mkV P.imperfective "" "" "" "" "" "" "был" "будь" "есть") "" "у" Nom Gen;
|
||||
|
||||
have2_V3 = P.mkV3 (P.mkV P.imperfective "есть" "есть" "есть" "есть" "есть" "есть" "был" "будь" "есть") "" "у" Nom Gen;
|
||||
|
||||
have_not_V3 = P.mkV3 (P.mkV P.imperfective "нет" "нет" "нет" "нет" "нет" "нет" "не было" "не будь" "нет") "" "у" Gen Gen;
|
||||
|
||||
be_V3 = P.mkV3 (P.mkV P.imperfective "" "" "" "" "" "" "был" "будь" "") "" "" Nom Dat;
|
||||
|
||||
to2_Prep = { s = "в" ; c = Acc };
|
||||
|
||||
obj_no_Prep = {s="" ; c=Acc ; hasPrep=False} ;
|
||||
to2_Prep = {s="в" ; c=Acc ; hasPrep=True};
|
||||
on_to_Prep = {s="до"; c=Gen; hasPrep=True} ;
|
||||
along_Prep = {s="по"; c=Loc; hasPrep=True} ;
|
||||
from2_Prep = from2 ;
|
||||
about_Prep = {s="о" ; c=Pre; hasPrep=True} ;
|
||||
}
|
||||
@@ -1,12 +1,10 @@
|
||||
abstract ExtraRusAbs = Cat ** {
|
||||
|
||||
fun
|
||||
|
||||
have_V3 : V3 ;
|
||||
have2_V3 : V3 ;
|
||||
have_not_V3 : V3;
|
||||
|
||||
be_V3 : V3 ;
|
||||
|
||||
obj_no_Prep : Prep ;
|
||||
about_Prep : Prep ;
|
||||
to2_Prep : Prep ;
|
||||
on_to_Prep : Prep ;
|
||||
along_Prep : Prep ;
|
||||
from2_Prep : Prep ;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
--# -path=.:../abstract:../common:../../prelude
|
||||
--# -path=.:../abstract:../common:prelude
|
||||
|
||||
concrete GrammarRus of Grammar =
|
||||
NounRus,
|
||||
@@ -11,8 +11,8 @@ concrete GrammarRus of Grammar =
|
||||
RelativeRus,
|
||||
ConjunctionRus,
|
||||
PhraseRus,
|
||||
TextX,
|
||||
TextRus,
|
||||
StructuralRus,
|
||||
IdiomRus,
|
||||
TenseX
|
||||
TenseRus
|
||||
** { flags startcat = Phr ; unlexer = text ; lexer = text ; coding=utf8 ;} ;
|
||||
@@ -1,58 +1,68 @@
|
||||
--# -path=.:../abstract:../common:../../prelude
|
||||
|
||||
concrete IdiomRus of Idiom = CatRus ** open Prelude, ResRus, MorphoRus in {
|
||||
concrete IdiomRus of Idiom = CatRus ** open Prelude, TenseRus, ResRus, Coordination, MorphoRus in {
|
||||
flags optimize=all_subs ; coding=utf8 ;
|
||||
|
||||
flags optimize=all_subs ; coding=utf8 ;
|
||||
lin
|
||||
-- : VP -> Cl ; -- it is hot
|
||||
ImpersCl vp = let a = Ag (GSg Neut) P3 in {subj="" ; compl=vp.compl ! a ; verb=vp.verb ; dep=vp.dep ; adv=vp.adv ! a ; a=a } ;
|
||||
|
||||
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
|
||||
}
|
||||
} ;
|
||||
-- : VP -> Cl ; -- one sleeps
|
||||
GenericCl vp = let a = Ag (GSg Masc) P2 in {subj="" ; compl=vp.compl ! a ; verb=vp.verb ; dep=vp.dep ; adv=vp.adv ! a; a=a } ;
|
||||
|
||||
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)
|
||||
}
|
||||
-- : NP -> RS -> Cl ; -- it is I who did it
|
||||
CleftNP np rs = {
|
||||
subj=np.s ! Nom ;
|
||||
adv="это" ;
|
||||
verb=nullVerb ; -- ???
|
||||
dep=[] ;
|
||||
compl=embedInCommas (rs.s ! agrGenNum np.a ! Animate ! Nom) ; -- TODO: here or in subj???
|
||||
a=np.a
|
||||
} ;
|
||||
-- : Adv -> S -> Cl ; -- it is here she slept
|
||||
CleftAdv adv s = {
|
||||
subj="это" ++ adv.s ++ comma ++ s.s ! Ind ; -- TODO: Check what is expressed by this? Why comma?
|
||||
adv=[] ;
|
||||
verb=nullVerb ; -- ???
|
||||
dep=[] ;
|
||||
compl=[] ;
|
||||
a=Ag (GSg Neut) P3
|
||||
} ;
|
||||
|
||||
CleftAdv adv sen = {s= \\ b, clf => let ne= case b of {Pos =>[]; Neg =>"не"}
|
||||
in
|
||||
"это" ++ ne ++ adv.s ++ [", "]++ sen.s };
|
||||
|
||||
CleftNP np rs = {s= \\ b, clf =>
|
||||
let
|
||||
ne= case b of {Pos =>[]; Neg =>"не"};
|
||||
gn = case np.n of {Pl => GPl; _=> GSg (pgen2gen np.g)}
|
||||
in
|
||||
"это" ++ ne ++ np.s ! (PF Nom No NonPoss) ++
|
||||
rs.s ! gn !Nom!Animate };
|
||||
|
||||
ImpPl1 vp = {s= "давайте" ++ vp.s! (ClIndic Future Simul)! GPl ! P1};
|
||||
|
||||
ImpersCl vp = {s= \\ b, clf => let ne= case b of {Pos =>[]; Neg =>"не"}
|
||||
in
|
||||
ne ++ vp.s! clf! (GSg Neut) ! P3 };
|
||||
|
||||
-- No direct correspondance in Russian. Usually expressed by infinitive:
|
||||
-- "Если очень захотеть, можно в космос улететь"
|
||||
-- (If one really wants one can fly into the space).
|
||||
-- Note that the modal verb "can" is trasferred into adverb
|
||||
-- "можно" (it is possible) in Russian
|
||||
-- The closest subject is "ты" (you), which is omitted in the final sentence:
|
||||
-- "Если очень захочешь, можешь в космос улететь"
|
||||
|
||||
GenericCl vp = {s= \\ b, clf => let ne= case b of {Pos =>[]; Neg =>"не"}
|
||||
in
|
||||
"ты" ++ ne ++ vp.s! clf! (GSg Masc) ! P2 };
|
||||
-- : NP -> Cl ; -- there is a house
|
||||
ExistNP np = {subj=np.s ! Nom ; compl="" ; verb=to_exist ; dep=[] ; adv=[] ; a=np.a} ; -- TODO: Different order!
|
||||
|
||||
-- : IP -> QCl ; -- which houses are there
|
||||
ExistIP ip = {
|
||||
subj=ip.nom ; -- gen?
|
||||
adv=[] ;
|
||||
verb=to_exist;
|
||||
dep=[] ;
|
||||
compl=[];
|
||||
a=ip.a
|
||||
} ;
|
||||
-- TODO: ExistNPAdv : NP -> Adv -> Cl ; -- there is a house in Paris
|
||||
-- TODO: ExistIPAdv : IP -> Adv -> QCl ; -- which houses are there in Paris
|
||||
-- : VP -> VP ; -- be sleeping
|
||||
ProgrVP vp = vp ;
|
||||
-- : VP -> Utt ; -- let's go
|
||||
ImpPl1 vp =
|
||||
let a = Ag GPl P1 in
|
||||
let pol = PPos in
|
||||
let parts = verbAgr vp.verb Infinitive Pres a pol.p in
|
||||
let p1 = "давайте" in {
|
||||
s = p1 ++ pol.s ++ vp.adv ! a ++ parts.p2 ++ vp.dep ++ vp.compl ! a
|
||||
} ;
|
||||
-- : NP -> VP -> Utt ; -- let John walk
|
||||
ImpP3 np vp =
|
||||
let a = Ag (GSg Neut) P3 in
|
||||
let pol = PPos in
|
||||
let parts = verbAgr vp.verb Ind Pres a pol.p in
|
||||
let p1 = "пусть" in {
|
||||
s = p1 ++ pol.s ++ vp.adv ! a ++ np.s ! Nom ++ parts.p2 ++ vp.dep ++ vp.compl ! a
|
||||
} ;
|
||||
|
||||
-- TODO: SelfAdvVP : VP -> VP ; -- is at home himself
|
||||
-- TODO: SelfAdVVP : VP -> VP ; -- is himself at home
|
||||
-- TODO: SelfNP : NP -> NP ; -- the president himself (is at home)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,182 +0,0 @@
|
||||
--# -path=.:../abstract:../common:../../prelude
|
||||
|
||||
--
|
||||
concrete IrregRus of IrregRusAbs = CatRus ** open ParadigmsRus in {
|
||||
--
|
||||
flags optimize=values ; coding=utf8 ;
|
||||
--
|
||||
-- lin
|
||||
-- awake_V = irregV "awake" "awoke" "awoken" ;
|
||||
-- bear_V = irregV "bear" "bore" "born" ;
|
||||
-- beat_V = irregV "beat" "beat" "beat" ;
|
||||
-- become_V = irregV "become" "became" "become" ;
|
||||
-- begin_V = irregV "begin" "began" "begun" ;
|
||||
-- bend_V = irregV "bend" "bent" "bent" ;
|
||||
-- beset_V = irregV "beset" "beset" "beset" ;
|
||||
-- bet_V = irregDuplV "bet" "bet" "bet" ;
|
||||
-- bid_V = irregDuplV "bid" (variants {"bid" ; "bade"}) (variants {"bid" ; "bidden"}) ;
|
||||
-- bind_V = irregV "bind" "bound" "bound" ;
|
||||
-- bite_V = irregV "bite" "bit" "bitten" ;
|
||||
-- bleed_V = irregV "bleed" "bled" "bled" ;
|
||||
-- blow_V = irregV "blow" "blew" "blown" ;
|
||||
-- break_V = irregV "break" "broke" "broken" ;
|
||||
-- breed_V = irregV "breed" "bred" "bred" ;
|
||||
-- bring_V = irregV "bring" "brought" "brought" ;
|
||||
-- broadcast_V = irregV "broadcast" "broadcast" "broadcast" ;
|
||||
-- build_V = irregV "build" "built" "built" ;
|
||||
-- burn_V = irregV "burn" (variants {"burned" ; "burnt"}) (variants {"burned" ; "burnt"}) ;
|
||||
-- burst_V = irregV "burst" "burst" "burst" ;
|
||||
-- buy_V = irregV "buy" "bought" "bought" ;
|
||||
-- cast_V = irregV "cast" "cast" "cast" ;
|
||||
-- catch_V = irregV "catch" "caught" "caught" ;
|
||||
-- choose_V = irregV "choose" "chose" "chosen" ;
|
||||
-- cling_V = irregV "cling" "clung" "clung" ;
|
||||
-- come_V = irregV "come" "came" "come" ;
|
||||
-- cost_V = irregV "cost" "cost" "cost" ;
|
||||
-- creep_V = irregV "creep" "crept" "crept" ;
|
||||
-- cut_V = irregDuplV "cut" "cut" "cut" ;
|
||||
-- deal_V = irregV "deal" "dealt" "dealt" ;
|
||||
-- dig_V = irregDuplV "dig" "dug" "dug" ;
|
||||
-- dive_V = irregV "dive" (variants {"dived" ; "dove"}) "dived" ;
|
||||
-- do_V = mkV "do" "does" "did" "done" "doing" ;
|
||||
-- draw_V = irregV "draw" "drew" "drawn" ;
|
||||
-- dream_V = irregV "dream" (variants {"dreamed" ; "dreamt"}) (variants {"dreamed" ; "dreamt"}) ;
|
||||
-- drive_V = irregV "drive" "drove" "driven" ;
|
||||
-- drink_V = irregV "drink" "drank" "drunk" ;
|
||||
-- eat_V = irregV "eat" "ate" "eaten" ;
|
||||
-- fall_V = irregV "fall" "fell" "fallen" ;
|
||||
-- feed_V = irregV "feed" "fed" "fed" ;
|
||||
-- feel_V = irregV "feel" "felt" "felt" ;
|
||||
-- fight_V = irregV "fight" "fought" "fought" ;
|
||||
-- find_V = irregV "find" "found" "found" ;
|
||||
-- fit_V = irregDuplV "fit" "fit" "fit" ;
|
||||
-- flee_V = irregV "flee" "fled" "fled" ;
|
||||
-- fling_V = irregV "fling" "flung" "flung" ;
|
||||
-- fly_V = irregV "fly" "flew" "flown" ;
|
||||
-- forbid_V = irregDuplV "forbid" "forbade" "forbidden" ;
|
||||
-- forget_V = irregDuplV "forget" "forgot" "forgotten" ;
|
||||
-- forgive_V = irregV "forgive" "forgave" "forgiven" ;
|
||||
-- forsake_V = irregV "forsake" "forsook" "forsaken" ;
|
||||
-- freeze_V = irregV "freeze" "froze" "frozen" ;
|
||||
-- get_V = irregDuplV "get" "got" "gotten" ;
|
||||
-- give_V = irregV "give" "gave" "given" ;
|
||||
-- go_V = irregV "go" "went" "gone" ;
|
||||
-- grind_V = irregV "grind" "ground" "ground" ;
|
||||
-- grow_V = irregV "grow" "grew" "grown" ;
|
||||
-- hang_V = irregV "hang" "hung" "hung" ;
|
||||
-- have_V = mkV "have" "has" "had" "had" "having" ;
|
||||
-- hear_V = irregV "hear" "heard" "heard" ;
|
||||
-- hide_V = irregV "hide" "hid" "hidden" ;
|
||||
-- hit_V = irregDuplV "hit" "hit" "hit" ;
|
||||
-- hold_V = irregV "hold" "held" "held" ;
|
||||
-- hurt_V = irregV "hurt" "hurt" "hurt" ;
|
||||
-- keep_V = irregV "keep" "kept" "kept" ;
|
||||
-- kneel_V = irregV "kneel" "knelt" "knelt" ;
|
||||
-- knit_V = irregDuplV "knit" "knit" "knit" ;
|
||||
-- know_V = irregV "know" "knew" "know" ;
|
||||
-- lay_V = irregV "lay" "laid" "laid" ;
|
||||
-- lead_V = irregV "lead" "led" "led" ;
|
||||
-- leap_V = irregV "leap" (variants {"leaped" ; "lept"}) (variants {"leaped" ; "lept"}) ;
|
||||
-- learn_V = irregV "learn" (variants {"learned" ; "learnt"}) (variants {"learned" ; "learnt"}) ;
|
||||
-- leave_V = irregV "leave" "left" "left" ;
|
||||
-- lend_V = irregV "lend" "lent" "lent" ;
|
||||
-- let_V = irregDuplV "let" "let" "let" ;
|
||||
-- lie_V = irregV "lie" "lay" "lain" ;
|
||||
-- light_V = irregV "light" (variants {"lighted" ; "lit"}) "lighted" ;
|
||||
-- lose_V = irregV "lose" "lost" "lost" ;
|
||||
-- make_V = irregV "make" "made" "made" ;
|
||||
-- mean_V = irregV "mean" "meant" "meant" ;
|
||||
-- meet_V = irregV "meet" "met" "met" ;
|
||||
-- misspell_V = irregV "misspell" (variants {"misspelled" ; "misspelt"}) (variants {"misspelled" ; "misspelt"}) ;
|
||||
-- mistake_V = irregV "mistake" "mistook" "mistaken" ;
|
||||
-- mow_V = irregV "mow" "mowed" (variants {"mowed" ; "mown"}) ;
|
||||
-- overcome_V = irregV "overcome" "overcame" "overcome" ;
|
||||
-- overdo_V = mkV "overdo" "overdoes" "overdid" "overdone" "overdoing" ;
|
||||
-- overtake_V = irregV "overtake" "overtook" "overtaken" ;
|
||||
-- overthrow_V = irregV "overthrow" "overthrew" "overthrown" ;
|
||||
-- pay_V = irregV "pay" "paid" "paid" ;
|
||||
-- plead_V = irregV "plead" "pled" "pled" ;
|
||||
-- prove_V = irregV "prove" "proved" (variants {"proved" ; "proven"}) ;
|
||||
-- put_V = irregDuplV "put" "put" "put" ;
|
||||
-- quit_V = irregDuplV "quit" "quit" "quit" ;
|
||||
-- read_V = irregV "read" "read" "read" ;
|
||||
-- rid_V = irregDuplV "rid" "rid" "rid" ;
|
||||
-- ride_V = irregV "ride" "rode" "ridden" ;
|
||||
-- ring_V = irregV "ring" "rang" "rung" ;
|
||||
-- rise_V = irregV "rise" "rose" "risen" ;
|
||||
-- run_V = irregDuplV "run" "ran" "run" ;
|
||||
-- saw_V = irregV "saw" "sawed" (variants {"sawed" ; "sawn"}) ;
|
||||
-- say_V = irregV "say" "said" "said" ;
|
||||
-- see_V = irregV "see" "saw" "seen" ;
|
||||
-- seek_V = irregV "seek" "sought" "sought" ;
|
||||
-- sell_V = irregV "sell" "sold" "sold" ;
|
||||
-- send_V = irregV "send" "sent" "sent" ;
|
||||
-- set_V = irregDuplV "set" "set" "set" ;
|
||||
-- sew_V = irregV "sew" "sewed" (variants {"sewed" ; "sewn"}) ;
|
||||
-- shake_V = irregV "shake" "shook" "shaken" ;
|
||||
-- shave_V = irregV "shave" "shaved" (variants {"shaved" ; "shaven"}) ;
|
||||
-- shear_V = irregV "shear" "shore" "shorn" ;
|
||||
-- shed_V = irregDuplV "shed" "shed" "shed" ;
|
||||
-- shine_V = irregV "shine" "shone" "shone" ;
|
||||
-- shoe_V = irregV "shoe" "shoed" (variants {"shoed" ; "shod"}) ;
|
||||
-- shoot_V = irregV "shoot" "shot" "shot" ;
|
||||
-- show_V = irregV "show" "showed" (variants {"showed" ; "shown"}) ;
|
||||
-- shrink_V = irregV "shrink" "shrank" "shrunk" ;
|
||||
-- shut_V = irregDuplV "shut" "shut" "shut" ;
|
||||
-- sing_V = irregV "sing" "sang" "sung" ;
|
||||
-- sink_V = irregV "sink" "sank" "sunk" ;
|
||||
-- sit_V = irregDuplV "sit" "sat" "sat" ;
|
||||
-- sleep_V = irregV "sleep" "slept" "slept" ;
|
||||
-- slay_V = irregV "slay" "slew" "slain" ;
|
||||
-- slide_V = irregV "slide" "slid" "slid" ;
|
||||
-- sling_V = irregV "sling" "slung" "slung" ;
|
||||
-- slit_V = irregDuplV "slit" "slit" "slit" ;
|
||||
-- smite_V = irregV "smite" "smote" "smitten" ;
|
||||
-- sow_V = irregV "sow" "sowed" (variants {"sowed" ; "sown"}) ;
|
||||
-- speak_V = irregV "speak" "spoke" "spoken" ;
|
||||
-- speed_V = irregV "speed" "sped" "sped" ;
|
||||
-- spend_V = irregV "spend" "spent" "spent" ;
|
||||
-- spill_V = irregV "spill" (variants {"spilled" ; "spilt"}) (variants {"spilled" ; "spilt"}) ;
|
||||
-- spin_V = irregDuplV "spin" "spun" "spun" ;
|
||||
-- spit_V = irregDuplV "spit" (variants {"spit" ; "spat"}) "spit" ;
|
||||
-- split_V = irregDuplV "split" "split" "split" ;
|
||||
-- spread_V = irregV "spread" "spread" "spread" ;
|
||||
-- spring_V = irregV "spring" (variants {"sprang" ; "sprung"}) "sprung" ;
|
||||
-- stand_V = irregV "stand" "stood" "stood" ;
|
||||
-- steal_V = irregV "steal" "stole" "stolen" ;
|
||||
-- stick_V = irregV "stick" "stuck" "stuck" ;
|
||||
-- sting_V = irregV "sting" "stung" "stung" ;
|
||||
-- stink_V = irregV "stink" "stank" "stunk" ;
|
||||
-- stride_V = irregV "stride" "strod" "stridden" ;
|
||||
-- strike_V = irregV "strike" "struck" "struck" ;
|
||||
-- string_V = irregV "string" "strung" "strung" ;
|
||||
-- strive_V = irregV "strive" "strove" "striven" ;
|
||||
-- swear_V = irregV "swear" "swore" "sworn" ;
|
||||
-- sweep_V = irregV "sweep" "swept" "swept" ;
|
||||
-- swell_V = irregV "swell" "swelled" (variants {"swelled" ; "swollen"}) ;
|
||||
-- swim_V = irregDuplV "swim" "swam" "swum" ;
|
||||
-- swing_V = irregV "swing" "swung" "swung" ;
|
||||
-- take_V = irregV "take" "took" "taken" ;
|
||||
-- teach_V = irregV "teach" "taught" "taught" ;
|
||||
-- tear_V = irregV "tear" "tore" "torn" ;
|
||||
-- tell_V = irregV "tell" "told" "told" ;
|
||||
-- think_V = irregV "think" "thought" "thought" ;
|
||||
-- thrive_V = irregV "thrive" (variants {"thrived" ; "throve"}) "thrived" ;
|
||||
-- throw_V = irregV "throw" "threw" "thrown" ;
|
||||
-- thrust_V = irregV "thrust" "thrust" "thrust" ;
|
||||
-- tread_V = irregV "tread" "trod" "trodden" ;
|
||||
-- understand_V = irregV "understand" "understood" "understood" ;
|
||||
-- uphold_V = irregV "uphold" "upheld" "upheld" ;
|
||||
-- upset_V = irregDuplV "upset" "upset" "upset" ;
|
||||
-- wake_V = irregV "wake" "woke" "woken" ;
|
||||
-- wear_V = irregV "wear" "wore" "worn" ;
|
||||
-- weave_V = irregV "weave" (variants {"weaved" ; "wove"}) (variants {"weaved" ; "woven"}) ;
|
||||
-- wed_V = irregDuplV "wed" "wed" "wed" ;
|
||||
-- weep_V = irregV "weep" "wept" "wept" ;
|
||||
-- wind_V = irregV "wind" "wound" "wound" ;
|
||||
-- win_V = irregDuplV "win" "won" "won" ;
|
||||
-- withhold_V = irregV "withhold" "withheld" "withheld" ;
|
||||
-- withstand_V = irregV "withstand" "withstood" "withstood" ;
|
||||
-- wring_V = irregV "wring" "wrung" "wrung" ;
|
||||
-- write_V = irregV "write" "wrote" "written" ;
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
--# -path=.:../abstract:../common:../prelude
|
||||
--# -path=.:../abstract:../common:../api:../prelude
|
||||
|
||||
concrete LangRus of Lang =
|
||||
GrammarRus,
|
||||
|
||||
@@ -1,360 +1,354 @@
|
||||
--# -path=.:abstract:common
|
||||
concrete LexiconRus of Lexicon = CatRus **
|
||||
open ParadigmsRus, Prelude, StructuralRus, MorphoRus, (E = ExtraRus) in {
|
||||
flags
|
||||
optimize=values ;
|
||||
coding=utf8 ;
|
||||
open ParadigmsRus, StructuralRus, Prelude, ExtraRus, ResRus in {
|
||||
flags optimize=values ; coding=utf8 ;
|
||||
lin
|
||||
add_V3 = mkV3 (regV imperfective first "складыва" "ю" "складывал" "складывай" "складывать" ) "" "в" accusative accusative;
|
||||
sing_V = mkV imperfective transitive "петь" "пою" "поёт" "12b";
|
||||
add_V3 = mkV3 (mkV imperfective "складывать" "складываю") obj_no_Prep to2_Prep ;
|
||||
airplane_N = mkN "самолёт" ;
|
||||
alas_Interj = mkInterj "увы" ;
|
||||
already_Adv = mkAdv "уже" ;
|
||||
animal_N = mkN "животное" animate;
|
||||
answer_V2S = dirV2 (regV imperfective first "отвеча" "ю" "отвечал" "отвечай" "отвечать" );
|
||||
animal_N = mkN (mkA "животный") masculine animate ;
|
||||
answer_V2S = dirV2 (mkV imperfective "отвечать" "отвечаю" "отвечает");
|
||||
apartment_N = mkN "квартира" ;
|
||||
apple_N = mkN "яблоко" inanimate ;
|
||||
apple_N = mkN "яблоко" neuter inanimate "3a(1)" ;
|
||||
art_N = mkN "искусство" ;
|
||||
ashes_N = mkN "пепел" ;
|
||||
ask_V2Q = dirV2 (regV imperfective first "спрашива" "ю" "спрашивал" "спрашивай" "спрашивать") ;
|
||||
baby_N = mkN "малыш" animate;
|
||||
ashes_N = mkN "пепел" masculine inanimate "1*a" ;
|
||||
ask_V2Q = dirV2 (mkV perfective "спросить" "спрошу" "спросит") ;
|
||||
baby_N = mkN "малыш" masculine animate "4b" ;
|
||||
back_N = mkN "спина" ;
|
||||
bad_A = mkA "плохой" "хуже";
|
||||
bad_A = mkA "плохой" "хуже" "3b/c'";
|
||||
bank_N = mkN "банк" ;
|
||||
bark_N = mkN "кора";
|
||||
beautiful_A = mkA "красивый";
|
||||
become_VA = regV perfective secondA "станов" "лю" "стал" "стань" "стать" ;
|
||||
beer_N = mkIndeclinableNoun "пиво" neuter inanimate ;
|
||||
beg_V2V = dirV2 (mkV imperfective "прошу" "просишь" "просит" "просим" "просите" "просят" "просил" "проси" "просить" );
|
||||
beautiful_A = mkA "красивый" ;
|
||||
become_VA = mkV imperfective intransitive "становиться" "становлюсь" "становится";
|
||||
beer_N = mkN "пиво" neuter inanimate ;
|
||||
beg_V2V = dirV2 (mkV imperfective transitive "просить" "прошу" "просит" "4c");
|
||||
belly_N = mkN "живот" ;
|
||||
big_A = mkA "большой" "больше" ;
|
||||
big_A = (mkAltShort (mkA "большой" "больше") (mkA "великий")) ;
|
||||
bike_N = mkN "велосипед" ;
|
||||
bird_N = mkN "птица" animate;
|
||||
bite_V2 = dirV2 (regV imperfective first "куса" "ю" "кусал" "кусай" "кусать");
|
||||
black_A = mkA "чёрный";
|
||||
bird_N = mkN "птица" feminine animate ;
|
||||
bite_V2 = mkV2 (mkV imperfective "кусать" "кусаю");
|
||||
black_A = (mkAltShort (mkA "чёрный") (mkA "черный")) ; -- workaround TODO: Any way to remove yo from stem?
|
||||
blood_N = mkN "кровь" ;
|
||||
blow_V = regV imperfective first "ду" "ю" "дул" "дуй" "дуть" ;
|
||||
blow_V = mkV imperfective "дуть" "дую" "дует";
|
||||
blue_A = mkA "голубой" ;
|
||||
boat_N = mkN "лодка" ;
|
||||
bone_N = mkN "кость" ;
|
||||
book_N = mkN "книга" ;
|
||||
boot_N = mkN "сапог" ;
|
||||
boss_N = mkN "начальник" animate;
|
||||
boy_N = mkN "мальчик" animate;
|
||||
boss_N = mkN "начальник" masculine animate ;
|
||||
boy_N = mkN "мальчик" masculine animate ;
|
||||
bread_N = mkN "хлеб" ;
|
||||
break_V2 = dirV2 (regV imperfective first "прерыва" "ю" "прерывал" "прерывай" "прерывать" );
|
||||
break_V2 = mkV2 (mkV imperfective "прерывать" "прерываю");
|
||||
breast_N = mkN "грудь" ;
|
||||
breathe_V = regV imperfective second "дыш" "у" "дышал" "дыши" "дышать" ;
|
||||
broad_A = mkA "широкий" "шире";
|
||||
brother_N2 = mkN2 (mkN "брат" animate) ; -- FIXME: special case
|
||||
breathe_V = mkV imperfective "дышать" "дышу" "дышит"; --
|
||||
broad_A = mkA "широкий" "шире" ;
|
||||
brother_N2 = (mkN2plus (mkN2 "брат" masculine animate "1a" nullPrep)) ** {pnom="братья";pgen="братьев";pdat="братьям";pacc="братьев";pins="братьями";pprep="братьях"} ;
|
||||
brown_A = mkA "коричневый";
|
||||
burn_V = regV imperfective second "гор" "ю" "горел" "гори" "гореть" ;
|
||||
burn_V = mkV imperfective intransitive "гореть" "горю" "горит";
|
||||
butter_N = mkN "масло";
|
||||
buy_V2 = dirV2 (regV imperfective first "покупа" "ю" "покупал" "покупай" "покупать" );
|
||||
buy_V2 = mkV2 (mkV imperfective "покупать" "покупаю");
|
||||
camera_N = mkN "фотоаппарат" ;
|
||||
cap_N = mkN "чашка" ; -- vowel change
|
||||
cap_N = mkN "чашка" ;
|
||||
car_N = mkN "машина" ;
|
||||
carpet_N = mkN "ковёр"; -- vowel change
|
||||
cat_N = mkN "кошка" animate ; -- vowel change
|
||||
ceiling_N = mkN "потолок" ; -- vowel change
|
||||
chair_N = mkN "стул" ; -- irregular
|
||||
carpet_N = mkN "ковёр" masculine inanimate "1b" ;
|
||||
cat_N = mkN "кошка" feminine animate "1*a" ;
|
||||
ceiling_N = mkN "потолок" masculine inanimate "3*b";
|
||||
chair_N = (mkNplus (mkN "стул" masculine inanimate "1a")) ** {pnom="стулья";pgen="стульев";pdat="стульям";pacc="стулья";pins="стульями";pprep="стульях"} ;
|
||||
cheese_N = mkN "сыр" ;
|
||||
child_N = mkNAltPl "ребёнок" "деть" masculine animate;
|
||||
-- child_N = mkN "ребёнок" "ребёнка" "ребёнку" "ребёнка" "ребёнком" "ребёнке" "ребёнке" "дети" "детей" "детям" "детей" "детьми" "детях" masculine animate ;
|
||||
church_N = mkN "церковь" "церкви" "церкви" "церковь" "церковью" "церкви" "церкви" "церкви" "церквей" "церквям" "церкви" "церквями" "церквях" masculine inanimate ;
|
||||
child_N = (mkNAltPl (mkN "ребёнок" masculine animate "3*a") (mkN "деть")) ** {pins="детьми"};
|
||||
church_N = mkN "церковь" feminine animate "8*e" ;
|
||||
city_N = mkN "город" ;
|
||||
clean_A = mkA "чистый" "чище";
|
||||
clever_A = mkA "умный";
|
||||
close_V2= dirV2 (regV imperfective first "закрыва" "ю" "закрывал" "закрывай" "закрывать" );
|
||||
cloud_N = mkN "облако" ; -- irregular
|
||||
coat_N = mkIndeclinableNoun "пальто" masculine inanimate ;
|
||||
clever_A = mkA "умный" "" "1*a/b";
|
||||
close_V2 = mkV2 (mkV imperfective "закрывать" "закрываю");
|
||||
cloud_N = mkN "облако" neuter inanimate "3c(2)" ;
|
||||
coat_N = mkN "пальто" masculine inanimate "0";
|
||||
cold_A = mkA "холодный";
|
||||
come_V = regV imperfective first "прихо" "жу" "приходил" "приходи" "приходить" ;
|
||||
come_V = mkV imperfective intransitive "приходить" "прихожу" "приходит";
|
||||
computer_N = mkN "компьютер" ;
|
||||
correct_A = mkA "правильный" ;
|
||||
count_V2 = dirV2 (regV imperfective first "счита" "ю" "считал" "считай" "считать" ) ;
|
||||
correct_A = mkA "правильный" "" "1*a";
|
||||
count_V2 = mkV2 (mkV imperfective "считать" "считаю");
|
||||
country_N = mkN "страна" ;
|
||||
cousin_N = mkN "кузен" ; -- FIXME: is this really correct? can't find it in the dictionary
|
||||
cow_N = mkN "корова" animate ;
|
||||
cut_V2 = dirV2 (regV imperfective first "реж" "у" "резал" "режь" "резать" ) ;
|
||||
day_N = mkN "день" "дня" "дню" "день" "днём" "дне" "дне" "дни" "дней" "дням" "дни" "днями" "днях" masculine inanimate ;
|
||||
die_V = regV imperfective first "умира" "ю" "умирал" "умирай" "умирать" ;
|
||||
dig_V = regV imperfective first "копа" "ю" "копал" "копай" "копать" ;
|
||||
cousin_N = mkN "кузен" masculine animate ; -- also: mkN "кузина" feminine animate ;
|
||||
cow_N = mkN "корова" feminine animate ;
|
||||
cut_V2 = mkV2 (mkV imperfective "резать" "режу" "режет");
|
||||
day_N = mkN "день" masculine inanimate "2*b" ;
|
||||
die_V = mkV imperfective intransitive "умирать" "умираю" "умирает";
|
||||
dig_V = mkV imperfective "копать" "копаю" ;
|
||||
dirty_A = mkA "грязный" ;
|
||||
distance_N3 = mkN3 (mkN "расстояние") from_Prep to_Prep ;
|
||||
do_V2 = dirV2 (regV imperfective first "дела" "ю" "делал" "делай" "делать" );
|
||||
doctor_N = mkN "доктор" animate ;
|
||||
dog_N = mkN "собака" animate;
|
||||
distance_N3 = mkN3 (mkN "расстояние") from_Prep on_to_Prep ;
|
||||
do_V2 = mkV2 (mkV imperfective "делать" "делаю");
|
||||
doctor_N = mkN "доктор" masculine animate ;
|
||||
dog_N = mkN "собака" feminine animate ;
|
||||
door_N = mkN "дверь" ;
|
||||
drink_V2 = dirV2 (regV imperfective firstE "пь" "ю" "пил" "пей" "пить" );
|
||||
dry_A = mkA "сухой" "суше";
|
||||
drink_V2 = mkV2 (mkV imperfective "пить" "пиью" "пьёт");
|
||||
dry_A = mkA "сухой" "" "3b/c'";
|
||||
dull_A = mkA "скучный" ;
|
||||
dust_N = mkN "пыль" ;
|
||||
ear_N = mkN "ухо" ;
|
||||
earth_N = mkN "земля" ;
|
||||
easy_A2V = mkA2 (mkA "лёгкий" "легче") "для" genitive ;
|
||||
eat_V2 = dirV2 (regV imperfective first "куша" "ю" "кушал" "кушай" "кушать" );
|
||||
egg_N = mkN "яйцо" ;
|
||||
earth_N = mkN "земля" feminine inanimate "2*d" ;
|
||||
easy_A2V = mkA2 (mkA "лёгкий" "легче" "3*a/b") for_Prep ;
|
||||
eat_V2 = mkV2 (mkV imperfective "кушать" "кушаю");
|
||||
egg_N = (mkNplus (mkN "яйцо" neuter inanimate "5*d")) ** {pgen="яиц"} ;
|
||||
empty_A = mkA "пустой" ;
|
||||
enemy_N = mkN "враг" animate ;
|
||||
eye_N = mkN "глаз" ; -- FIXME: Pl -a
|
||||
enemy_N = mkN "враг" masculine animate ;
|
||||
eye_N = mkN "глаз" masculine inanimate "1c(1)(2)" ;
|
||||
factory_N = mkN "фабрика" ;
|
||||
fall_V = regV imperfective first "пада" "ю" "падал" "падай" "падать" ;
|
||||
fall_V = mkV imperfective intransitive "падать" "падаю" "падает";
|
||||
far_Adv = mkAdv "далеко";
|
||||
fat_N = mkN "жир" ;
|
||||
father_N2 = mkN2 (mkN "отец" "отца" "отцу" "отца" "отцом" "отце" "отце" "отцы" "отцов" "отцам" "отцов" "отцами" "отцах" masculine animate);
|
||||
fear_V2 =dirV2 (regV imperfective first "бо" "ю" "боял" "бой" "боять" );
|
||||
fear_VS = regV imperfective second "бо" "ю" "боял" "бой" "боять" ;
|
||||
feather_N = mkN "перо" "пера" "перу" "пера" "пером" "пере" "пере" "перья" "перьев" "перьям" "перьев" "перьями" "перьях" neuter inanimate ;
|
||||
fight_V2 = dirV2 (regV imperfective firstE "дер" "у" "драл" "дери" "драть" ) ;
|
||||
find_V2 = dirV2 (mkV imperfective "нахожу" "находишь" "находит" "находим" "находите" "находят" "находил" "находи" "находить" );
|
||||
fingernail_N = mkN "ноготь" "ногтя" "ногтю" "ногтя" "ногтем" "ногте" "ногте" "ногти" "ногтей" "ногтям" "ногтей" "ногтями" "ногтях" masculine inanimate ;
|
||||
fire_N = mkN "огонь" "огня" "огню" "огня" "огнём" "огне" "огне" "огни" "огней" "огням" "огней" "огнями" "огнях" masculine inanimate ;
|
||||
fish_N = mkN "рыба" animate;
|
||||
float_V = regV imperfective firstE "плыв" "у" "плыл" "плыви" "плыть" ;
|
||||
father_N2 = mkN2 (mkN "отец" masculine inanimate "5*b");
|
||||
fear_V2 = mkV2 (mkV imperfective intransitive "бояться" "боюсь" "боится") Gen ;
|
||||
fear_VS = mkV imperfective "бояться" "боюсь" "боится"; --intran
|
||||
feather_N = (mkNplus (mkN "перо" neuter inanimate "1d")) ** {pnom="перья";pgen="перьев";pdat="перьям";pacc="перья";pins="перьями";pprep="перьях"};
|
||||
fight_V2 = mkV2 (mkV imperfective intransitive "бороться" "борюсь" "борется") with_Prep ;
|
||||
find_V2 = mkV2 (mkV imperfective "находить" "нахожу" "находит");
|
||||
fingernail_N = mkN "ноготь" masculine inanimate "2*e" ;
|
||||
fire_N = mkN "огонь" masculine inanimate "2*b" ;
|
||||
fish_N = mkN "рыба" feminine animate ;
|
||||
float_V = mkV imperfective intransitive "плавать" "плаваю";
|
||||
floor_N = mkN "пол" ;
|
||||
flow_V = regV imperfective firstE "тек" "у" "тёк" "теки" "течь" ;
|
||||
flow_V = mkV imperfective intransitive "течь" "теку" "течёт";
|
||||
flower_N = mkN "цветок";
|
||||
fly_V = regV imperfective first "лета" "ю" "летал" "летай" "летать" ;
|
||||
fly_V = mkV imperfective intransitive "летать" "летаю" ;
|
||||
fog_N = mkN "туман" ;
|
||||
foot_N = mkN "ступня" ;
|
||||
forest_N = mkN "лес" ; -- prepos -u
|
||||
forget_V2= dirV2 (regV imperfective first "забыва" "ю" "забывал" "забывай" "забывать" );
|
||||
freeze_V = regV imperfective first "замерза" "ю" "замерзал" "замерзай" "замерзать" ;
|
||||
foot_N = mkN "ступня" feminine inanimate "2*b" ;
|
||||
forest_N = (mkNplus (mkN "лес" masculine inanimate "1c(1)")) ** {sloc="лесу"} ;
|
||||
forget_V2 = mkV2 (mkV imperfective "забывать" "забываю");
|
||||
freeze_V = mkV imperfective intransitive "замерзать" "замерзаю";
|
||||
fridge_N = mkN "холодильник" ;
|
||||
friend_N = mkN "друг" "друга" "другу" "друга" "другом" "друге" "друге" "друзья" "друзей" "друзьям" "друзей" "дузьями" "друзьях" masculine animate ;
|
||||
friend_N = (mkNplus (mkN "друг" masculine inanimate "3c")) ** {pnom="друзья";pgen="друзей";pdat="друзьям";pacc="друзей";pins="друзьями";pprep="друзьях"};
|
||||
fruit_N = mkN "фрукт" ;
|
||||
full_A = mkA "полный";
|
||||
fun_AV = mkA "весёлый";
|
||||
full_A = (mkAplus (mkA "полный" "" "1*a/c'")) ** {sm="полон"} ;
|
||||
fun_AV = (mkAltShort (mkA "весёлый" "" "1a/c'") (mkA "веселый")) ;
|
||||
garden_N = mkN "сад" ;
|
||||
girl_N = mkN "девочка" animate; -- vowel change
|
||||
give_V3 = tvDirDir (regV imperfective firstE "да" "ю" "давал" "давай" "давать" ) ;
|
||||
glove_N = mkN "перчатка" ; -- vowel change
|
||||
go_V = mkV imperfective "хожу" "ходишь" "ходит" "ходим" "ходите" "ходят" "ходил" "ходи" "ходить" ;
|
||||
girl_N = mkN "девочка" feminine animate "3*a";
|
||||
give_V3 = tvDirDir (mkV imperfective "давать" "даю" "даёт") ;
|
||||
glove_N = mkN "перчатка" feminine inanimate "3*a";
|
||||
go_V = mkV imperfective intransitive "ходить" "хожу" "ходит";
|
||||
gold_N = mkN "золото" ;
|
||||
good_A = mkA "хороший" "лучше" ;
|
||||
grammar_N = mkN "грамматика";
|
||||
grass_N = mkN "трава";
|
||||
green_A = mkA "зелёный" ;
|
||||
green_A = (mkAltShort (mkA "зелёный" "зеленее") (mkA "зеленый")) ; -- workaround TODO: Any way to remove yo from stem?
|
||||
guts_N = mkN "внутренность" ;
|
||||
hair_N = mkN "волос" ; -- FIXME: always plural?
|
||||
hand_N = mkN "рука" ;
|
||||
harbour_N = mkN "порт" ; -- prepos -u
|
||||
hair_N = mkN "волос" masculine inanimate "1e(2)" ;
|
||||
hand_N = mkN "рука" feminine inanimate "3f'" ;
|
||||
harbour_N = (mkNplus (mkN "порт")) ** {sloc="порту"} ;
|
||||
hat_N = mkN "шляпа" ;
|
||||
hate_V2= dirV2 (mkV imperfective "ненавижу" "ненавидишь" "ненавидит" "ненавидим" "ненавидите" "ненавидят" "ненавидел" "ненавидь" "ненавидеть" );
|
||||
head_N = mkN "голова" ;
|
||||
hear_V2= dirV2 (regV imperfective first "слуша" "ю" "слушал" "слушай" "слушать" );
|
||||
heart_N = mkN "сердце" "сердца" "сердцу" "сердца" "сердцем" "сердце" "сердце" "сердца" "сердец" "сердцам" "сердец" "сердцами" "сердцах" neuter inanimate ;
|
||||
heavy_A = mkA "тяжёлый" ;
|
||||
hate_V2 = mkV2 (mkV imperfective "ненавидеть" "ненавижу" "ненавидит");
|
||||
head_N = mkN "голова" feminine inanimate "1f'";
|
||||
hear_V2 = mkV2 (mkV imperfective "слушать" "слушаю");
|
||||
heart_N = mkN "сердце" neuter inanimate "5*c" ;
|
||||
heavy_A = (mkAltShort (mkA "тяжёлый" "тяжелее") (mkA "тяжелый")) ** {sm="тяжёл"} ; -- TODO: same
|
||||
hill_N = mkN "холм" ;
|
||||
hit_V2 = dirV2 (regV imperfective first "ударя" "ю" "ударял" "ударяй" "ударять" );
|
||||
hold_V2 = dirV2 (regV imperfective second "держ" "у" "держал" "держи" "держать" );
|
||||
hope_VS= regV imperfective first "наде" "ю" "надеял" "надей" "надеять" ;
|
||||
horn_N = mkN "рог" ;
|
||||
horse_N = mkN "лошадь" animate; -- irregular
|
||||
hot_A = mkA "горячий" ;
|
||||
house_N = mkN "дом" ;
|
||||
hunt_V2 = dirV2 (regV imperfective second "охоч" "у" "охотил" "охоть" "охотить" ) ;
|
||||
husband_N = mkN "муж" "мужа" "мужу" "мужа" "мужем" "муже" "муже" "мужья" "мужей" "мужьям" "мужей" "мужьями" "мужьях" masculine animate ;
|
||||
ice_N = mkN "лёд" "льда" "льду" "льда" "льдом" "льде" "льде" "льды" "льдов" "льдам" "льдов" "льдами" "льдах" masculine inanimate ;
|
||||
hit_V2 = mkV2 (mkV imperfective "ударять" "ударяю" "ударяет");
|
||||
hold_V2 = mkV2 (mkV imperfective "держать" "держу" "держит");
|
||||
hope_VS= mkV imperfective "надеяться" "надеюсь" ;
|
||||
horn_N = mkN "рог" masculine inanimate "3c(1)" ;
|
||||
horse_N = mkN "лошадь" feminine animate "8e" ;
|
||||
hot_A = mkA "горячий" "" "4a/b";
|
||||
house_N = mkN "дом" masculine inanimate "1c(1)" ;
|
||||
hunt_V2 = mkV2 (mkV imperfective intransitive "охотиться" "охочусь" "охотится") {s="на" ; c=Acc ; hasPrep=True};
|
||||
husband_N = (mkNplus (mkN "муж" masculine animate "4c")) ** {pnom="мужья";pgen="мужей";pdat="мужьям";pacc="мужей";pins="мужьями";pprep="мужьях"};
|
||||
ice_N = (mkNplus (mkN "лёд" masculine animate "1b")) ** {sloc="льду";sptv="льду"} ;
|
||||
important_A = mkA "важный" ;
|
||||
industry_N = mkN "промышленность" ;
|
||||
iron_N = mkN "железо" ;
|
||||
john_PN = mkPN "Иван" Masc Sg Animate ;
|
||||
jump_V = regV imperfective first "прыга" "ю" "прыгал" "прыгай" "прыгать" ;
|
||||
kill_V2 = dirV2 (regV imperfective first "убива" "ю" "убивал" "убивай" "убивать" ) ;
|
||||
king_N = mkN "король" "короля" "королю" "короля" "королем" "короле" "короле" "короли" "королей" "королям" "королей" "королями" "королях" masculine animate ;
|
||||
knee_N = mkN "колено" "колена" "колену" "колена" "коленом" "колене" "колене" "колени" "колен" "коленам" "колен" "коленями" "коленях" neuter inanimate ;
|
||||
know_V2= dirV2 (regV imperfective first "зна" "ю" "знал" "знай" "знать" );
|
||||
know_VS= mkVQ (regV imperfective first "зна" "ю" "знал" "знай" "знать" );
|
||||
know_VQ= mkVQ (regV imperfective first "зна" "ю" "знал" "знай" "знать" );
|
||||
lake_N = mkN "озеро" ; -- gen pl "озёр"
|
||||
john_PN = mkPN "Иван" masculine animate ;
|
||||
jump_V = mkV imperfective intransitive "прыгать" "прыгаю" "прыгает";
|
||||
kill_V2 = mkV2 (mkV imperfective "убивать" "убиваю");
|
||||
king_N = mkN "король" masculine animate "2b";
|
||||
knee_N = (mkNplus (mkN "колено" neuter inanimate "1a")) ** {pnom="колени";pgen="коленей";pdat="коленям";pacc="колени";pins="коленями";pprep="коленях"} ;
|
||||
know_V2 = mkV2 (mkV imperfective "знать" "знаю");
|
||||
know_VQ = mkV imperfective "знать" "знаю";
|
||||
know_VS= mkV imperfective "знать" "знаю" ;
|
||||
lake_N = (mkNplus (mkN "озеро" neuter inanimate "1a")) ** {pnom="озёра";pgen="озёр";pdat="озёрам";pacc="озёра";pins="озёрами";pprep="озёрах"} ;
|
||||
lamp_N = mkN "лампа" ;
|
||||
language_N = mkN "язык" ;
|
||||
laugh_V = regV imperfective firstE "сме" "ю" "смеял" "смей" "смеять" ;
|
||||
leaf_N = mkN "лист" ; -- irregular pl
|
||||
learn_V2= dirV2 (regV imperfective second "уч" "у" "учил" "учи" "учить" );
|
||||
laugh_V = mkV imperfective "смеяться" "смеюсь" "смеётся";
|
||||
leaf_N = (mkNplus (mkN "лист" masculine inanimate "1d")) ** {pnom="листья";pgen="листьев";pdat="листьям";pacc="листья";pins="листьями";pprep="листьях"} ;
|
||||
learn_V2 = mkV2 (mkV imperfective transitive "учить" "учу" "учит" "4c");
|
||||
leather_N = mkN "кожа" ;
|
||||
leave_V2= dirV2 (mkV imperfective "ухожу" "уходишь" "уходит" "уходим" "уходите" "уходят" "уходил" "уходи" "уходить" );
|
||||
left_Ord = (uy_j_EndDecl "лев" ) ** {lock_A = <>};
|
||||
leave_V2 = mkV2 (mkV imperfective intransitive "уходить" "ухожу" "уходит") ;
|
||||
left_Ord = mkOrd "левый";
|
||||
leg_N = mkN "нога" ;
|
||||
lie_V = regV imperfective firstE "лг" "у" "лгал" "лги" "лгать" ;
|
||||
like_V2= dirV2 (regV imperfective second "нрав" "лю" "нравил" "нравь" "нравить" );
|
||||
listen_V2= dirV2 (regV imperfective first "слуша" "ю" "слушал" "слушай" "слушать" );
|
||||
live_V= regV imperfective firstE "жив" "у" "жил" "живи" "жить" ;
|
||||
lie_V = mkV imperfective intransitive "лгать" "лгу" "лжёт";
|
||||
like_V2 = mkV2 (mkV imperfective intransitive "нравиться" "нравлюсь" "нравится") Dat ;
|
||||
listen_V2 = mkV2 (mkV imperfective "слушать" "слушаю");
|
||||
live_V = mkV imperfective intransitive "жить" "живу" "живёт";
|
||||
liver_N = mkN "печень" ;
|
||||
long_A = mkA "длинный" ;
|
||||
lose_V2 = dirV2 (regV imperfective first "теря" "ю" "терял" "теряй" "терять" );
|
||||
louse_N = mkN "вошь" "вши" "вши" "вошь" "вошью" "вше" "вше" "вши" "вшей" "вшам" "вшей" "вшами" "вшах" feminine animate ;
|
||||
love_N = mkN "любовь" ; -- vowel change
|
||||
love_V2= dirV2 (regV imperfective second "люб" "лю" "любил" "люби" "любить" );
|
||||
man_N = mkNAltPl "человек" "людь" masculine animate ; -- null gen pl
|
||||
married_A2 = mkA2 (mkA "замужем") "за" instructive ;
|
||||
meat_N = mkN "мясо" ;
|
||||
milk_N = mkN "молоко" ;
|
||||
long_A = mkA "длинный" "" "1*a/c'";
|
||||
lose_V2 = mkV2 (mkV imperfective "терять" "теряю" "теряет");
|
||||
louse_N = (mkNplus (mkN "вошь" feminine animate "8*b'")) ** {pdat="вшам";pins="вшами";pprep="вшах"} ;
|
||||
love_N = mkN "любовь" feminine inanimate "8*b'" ;
|
||||
love_V2 = mkV2 (mkV imperfective transitive "любить" "люблю" "любит" "4c");
|
||||
man_N = (mkNAltPl (mkN "человек" masculine animate "3a") (mkN "людь" masculine animate)) ** {pins="людьми"};
|
||||
married_A2 = mkA2 (mkA "замужем" "" "0") behind_Prep ; -- for Fem only
|
||||
meat_N = mkN "мясо" neuter inanimate "1c" ;
|
||||
milk_N = mkN "молоко" neuter inanimate "3d(1)" ;
|
||||
moon_N = mkN "луна" ;
|
||||
mother_N2 = mkN2 (mkN "мать" "матери" "матери" "мать" "матерью" "матери" "матери" "матери" "матерей" "матерям" "матерей" "матерями" "матерях" feminine animate) ;
|
||||
mother_N2 = (mkN2plus (mkN2 "матерь" feminine animate "8e" nullPrep)) ** {snom="мать";sacc="мать";svoc="мать";} ;
|
||||
mountain_N = mkN "гора" ;
|
||||
mouth_N = mkN "рот" "рта" "рту" "рот" "ртом" "рте" "рте" "рты" "ртов" "ртам" "рты" "ртами" "ртах" masculine inanimate ;
|
||||
mouth_N = (mkNplus (mkN "рот" masculine inanimate "1*b")) ** {sloc="рту"} ;
|
||||
music_N = mkN "музыка" ;
|
||||
name_N = mkN "имя" ;
|
||||
narrow_A = mkA "узкий" "уже" ;
|
||||
name_N = mkN "имя" neuter inanimate "8°c";
|
||||
narrow_A = mkA "узкий" "уже" "3*a/c'";
|
||||
near_A = mkA "близкий" "ближе";
|
||||
neck_N = mkN "шея" ;
|
||||
neck_N = mkN "шея" feminine inanimate "6a";
|
||||
new_A = mkA "новый" ;
|
||||
newspaper_N = mkN "газета" ;
|
||||
night_N = mkN "ночь" ;
|
||||
night_N = (mkNplus (mkN "ночь" feminine inanimate "8e")) ** {sloc="ночь"};
|
||||
nose_N = mkN "нос" ;
|
||||
now_Adv = mkAdv "сейчас" ;
|
||||
number_N = mkN "число" ; -- gen pl "чисел"
|
||||
number_N = mkN "число" neuter inanimate "1*d" ;
|
||||
oil_N = mkN "нефть" ;
|
||||
old_A = mkA "старый" "старше" ;
|
||||
open_V2= dirV2 (regV imperfective first "открыва" "ю" "открывал" "открывай" "открывать" );
|
||||
--- organise_V2 = dirV2 (regV imperfective first "организу" "ю" "организовал" "организуй" "организовать" );
|
||||
paint_V2A = dirV2 (regV imperfective first "рису" "ю" "рисовал" "рисуй" "рисовать" ) ;
|
||||
--- palace_N = nDvorec "двор" ; -- +++ MG_UR: added +++
|
||||
old_A = mkA "старый" "старше" "1a/c''"; -- Grammatically correct variant "старее" is being used less
|
||||
open_V2 = mkV2 (mkV imperfective "открывать" "открываю");
|
||||
paint_V2A = dirV2 (mkV imperfective "рисовать" "рисую") ;
|
||||
paper_N = mkN "бумага" ;
|
||||
paris_PN = mkPN "Париж" Masc Sg Inanimate ;
|
||||
paris_PN = mkPN "Париж" masculine inanimate ;
|
||||
peace_N = mkN "мир" ;
|
||||
pen_N = mkN "ручка" ;
|
||||
person_N = mkN "лицo" animate ; -- irregular
|
||||
person_N = mkN "лицо" neuter animate "5d" ;
|
||||
planet_N = mkN "планета" ;
|
||||
plastic_N = mkN "пластмасса" ;
|
||||
play_V = regV imperfective first "игра" "ю" "играл" "играй" "играть" ;
|
||||
play_V2 = mkV2 (regV imperfective first "игра" "ю" "играл" "играй" "играть" ) "c" instructive;
|
||||
policeman_N = mkN "милиционер" animate ;
|
||||
priest_N = mkN "священник" animate;
|
||||
play_V = mkV imperfective "играть" "играю";
|
||||
play_V2 = mkV2 (mkV imperfective "играть" "играю") with_Prep;
|
||||
policeman_N = mkN "милиционер" ;
|
||||
priest_N = mkN "священник" masculine animate ;
|
||||
probable_AS = mkA "возможный" ;
|
||||
pull_V2 = dirV2 (regV imperfective first "тян" "у" "тянул" "тяни" "тянуть" ) ;
|
||||
push_V2 = dirV2 (regV imperfective first "толка" "ю" "толкал" "толкай" "толкать" );
|
||||
put_V2 = dirV2 (regV imperfective firstE "клад" "у" "клал" "клади" "класть" );
|
||||
queen_N = mkN "королева" animate ;
|
||||
pull_V2 = mkV2 (mkV imperfective "тянуть" "тяну" "тянет");
|
||||
push_V2 = mkV2 (mkV imperfective "толкать" "толкаю");
|
||||
put_V2 = mkV2 (mkV imperfective "класть" "кладу" "кладёт");
|
||||
queen_N = mkN "королева" feminine animate ;
|
||||
question_N = mkN "вопрос" ;
|
||||
radio_N = mkIndeclinableNoun "радио" neuter inanimate;
|
||||
radio_N = mkN "радио" neuter inanimate "0" ;
|
||||
rain_N = mkN "дождь" ;
|
||||
rain_V0 = idetDozhd verbIdti; -- No such verb in Russian!
|
||||
read_V2 = dirV2 (regV imperfective first "чита" "ю" "читал" "читай" "читать" );
|
||||
-- ready_A = ;
|
||||
rain_V0 = mkV imperfective "дождить" "дождю" "дождит" ; -- * TODO: check
|
||||
read_V2 = mkV2 (mkV imperfective "читать" "читаю");
|
||||
ready_A = mkA "готовый" ;
|
||||
reason_N = mkN "причина";
|
||||
red_A = mkA "красный" ;
|
||||
religion_N = mkN "религия" ;
|
||||
restaurant_N = mkN "ресторан" ;
|
||||
right_Ord = (uy_j_EndDecl "прав") ** {lock_A = <>} ;
|
||||
river_N = mkN "рекa" ;
|
||||
road_N = mkN "дорогa" ;
|
||||
rock_N = mkN "камень" ;
|
||||
roof_N = mkN "крыша" ;
|
||||
root_N = mkN "корень" ;
|
||||
right_Ord = mkOrd "правый";
|
||||
river_N = mkN "рекa" feminine inanimate "3d'" ;
|
||||
road_N = mkN "дорогa" feminine inanimate "3a" ;
|
||||
rock_N = mkN "камень" masculine inanimate "2*e" ;
|
||||
roof_N = mkN "крыша" feminine inanimate "4a" ;
|
||||
root_N = mkN "корень" masculine inanimate "2*e" ;
|
||||
rope_N = mkN "верёвка" ;
|
||||
rotten_A = mkA "гнилой";
|
||||
round_A = mkA "круглый";
|
||||
rub_V2 = dirV2 (regV imperfective firstE "тр" "у" "тёр" "три" "тереть" );
|
||||
rotten_A = mkA "гнилой" "" "1b/c";
|
||||
round_A = mkA "круглый" "" "1a/c'";
|
||||
rub_V2 = mkV2 (mkV imperfective "тереть" "тру" "трёт");
|
||||
rubber_N = mkN "резина" ;
|
||||
rule_N = mkN "правило" ;
|
||||
run_V = regV imperfective first "бега" "ю" "бегал" "бегай" "бегать" ;
|
||||
run_V = mkV imperfective intransitive "бегать" "бегу";
|
||||
salt_N = mkN "соль" ;
|
||||
sand_N = mkN "песок" "песка" "песку" "песок" "песком" "песке" "песке" "пески" "песков" "пескам" "песков" "песками" "песках" masculine inanimate ;
|
||||
say_VS = regV imperfective second "говор" "ю" "говорил" "говори" "говорить" ;
|
||||
sand_N = (mkNplus (mkN "песок" masculine inanimate "3*b")) ** {sptv="песку"} ;
|
||||
say_VS = mkV imperfective "говорить" "говорю" "говорит" ;
|
||||
school_N = mkN "школа" ;
|
||||
science_N = mkN "наука" ;
|
||||
scratch_V2 = dirV2 (regV imperfective first "чеш" "у" "чесал" "чеши" "чесать" ) ;
|
||||
sea_N = mkN "море" ;
|
||||
see_V2 = dirV2 (mkV imperfective "вижу" "видишь" "видит" "видим" "видите" "видят" "видел" "видь" "видеть");
|
||||
seed_N = mkN "семя";
|
||||
seek_V2 = dirV2 (regV imperfective first "ищ" "у" "искал" "ищи" "искать" );
|
||||
sell_V3 = tvDirDir (regV imperfective firstE "прода" "ю" "продавал" "продавай" "продавать" );
|
||||
send_V3 = tvDirDir (regV imperfective first "посыла" "ю" "посылал" "посылай" "посылать" );
|
||||
sew_V = regV imperfective firstE "шь" "ю" "шил" "шей" "шить" ;
|
||||
scratch_V2 = mkV2 (mkV imperfective "чесать" "чешу" "чешет");
|
||||
sea_N = mkN "море" neuter inanimate "2c" ;
|
||||
see_V2 = mkV2 (mkV imperfective "видеть" "вижу" "видит");
|
||||
seed_N = mkN "семя" neuter inanimate "8°c" ;
|
||||
seek_V2 = mkV2 (mkV imperfective "искать" "ищу" "ищет");
|
||||
sell_V3 = tvDirDir (mkV imperfective "продавать" "продаю" "продаёт");
|
||||
send_V3 = tvDirDir (mkV imperfective "посылать" "посылаю");
|
||||
sew_V = mkV imperfective "шить" "шью" "шьёт";
|
||||
sharp_A = mkA "острый";
|
||||
sheep_N = mkN "овца" animate ;
|
||||
ship_N = mkN "корабль" ;
|
||||
sheep_N = mkN "овца" feminine animate "5*d" ;
|
||||
ship_N = mkN "корабль" masculine inanimate "2b";
|
||||
shirt_N = mkN "рубашка" ;
|
||||
shoe_N = mkN "туфля" "туфли" "туфле" "туфлю" "туфлей" "туфле" "туфле" "туфли" "туфель" "туфлям" "туфли" "туфлями" "туфлях" masculine inanimate ;
|
||||
shoe_N = mkN "туфля" feminine inanimate "2*a" ;
|
||||
shop_N = mkN "магазин" ;
|
||||
short_A = mkA "короткий" "короче" ;
|
||||
short_A = mkA "короткий" "короче" "3*a/c'";
|
||||
silver_N = mkN "серебро" ;
|
||||
sing_V = regV imperfective firstE "по" "ю" "пел" "пой" "петь" ;
|
||||
sister_N = mkN "сестра" animate ;
|
||||
sit_V = mkV imperfective "сижу" "сидишь" "сидит" "сидим" "сидите" "сидят" "сидел" "сиди" "сидеть" ;
|
||||
sister_N = mkN "сестра" feminine animate ;
|
||||
sit_V = mkV imperfective intransitive "сидеть" "сижу" "сидит";
|
||||
skin_N = mkN "кожа" ;
|
||||
sky_N = mkN "небо" "неба" "небу" "небо" "небом" "небе" "небе" "небеса" "небес" "небесам" "небес" "небесами" "небесах" neuter inanimate ;
|
||||
sleep_V = regV imperfective second "сп" "лю" "спал" "спи" "спать" ;
|
||||
small_A = mkA "маленький" "меньше" ;
|
||||
smell_V = regV imperfective first "пахн" "у" "пахнул" "пахни" "пахнуть" ;
|
||||
sky_N = (mkNAltPl (mkN "небо" neuter inanimate "1c") (mkN "небесо" neuter inanimate "1b"));
|
||||
sleep_V = mkV imperfective intransitive "спать" "сплю" "спит";
|
||||
small_A = (mkAltShort (mkA "маленький" "меньше") (mkA "малый")) ;
|
||||
smell_V = mkV imperfective "пахнуть" "пахну" "пахнет"; --
|
||||
smoke_N = mkN "дым" ;
|
||||
smooth_A = mkA "гладкий" "глаже";
|
||||
snake_N = mkN "змея" animate ;
|
||||
snow_N = mkN "снег" ;
|
||||
sock_N = mkN "носок" ;
|
||||
song_N = mkN "песня" ;
|
||||
speak_V2 = mkV2 (regV imperfective secondA "говор" "ю" "говорил" "говори" "говорить")
|
||||
"на" prepositional ;
|
||||
spit_V = regV imperfective firstE "плю" "ю" "плевал" "плюй" "плевать" ;
|
||||
split_V2 = dirV2 (regV imperfective first "разбива" "ю" "разбивал" "разбей" "разбивать" ) ;
|
||||
squeeze_V2 = dirV2 (regV imperfective first "сжима" "ю" "сжимал" "сжимай" "сжимать" ) ;
|
||||
stab_V2 = dirV2 (regV imperfective first "кол" "ю" "колол" "коли" "колоть" ) ;
|
||||
stand_V = regV imperfective second "сто" "ю" "стоял" "стой" "стоять" ;
|
||||
smooth_A = mkA "гладкий" "глаже" "3*a/c";
|
||||
snake_N = mkN "змея" feminine animate "6d";
|
||||
snow_N = (mkNplus (mkN "снег" masculine inanimate "3c①")) ** {sloc="снегу"; sptv="снегу"} ;
|
||||
sock_N = mkN "носок" masculine inanimate "3*b";
|
||||
song_N = mkN "песня" feminine inanimate "2*a";
|
||||
speak_V2 = mkV2 (mkV imperfective "говорить" "говорю" "говорит") on_Prep;
|
||||
spit_V = mkV imperfective "плевать" "плюю" "плюёт";
|
||||
split_V2 = mkV2 (mkV imperfective "разбивать" "разбиваю");
|
||||
squeeze_V2 = mkV2 (mkV imperfective "сжимать" "сжимаю");
|
||||
stab_V2 = mkV2 (mkV imperfective "колоть" "колю" "колет");
|
||||
stand_V = mkV imperfective intransitive "стоять" "стою" "стоит";
|
||||
star_N = mkN "звезда" ;
|
||||
steel_N = mkN "сталь" ;
|
||||
stick_N = mkN "палка" ;
|
||||
stone_N = mkN "камень" ;
|
||||
stop_V = regV imperfective first "останавлива" "ю" "останавливал" "останавливай" "останавливать";
|
||||
stove_N = mkN "печь" ;
|
||||
straight_A = mkA "прямой" ;
|
||||
student_N = mkN "студент" animate ;
|
||||
stupid_A = mkA "тупой" "тупее" ;
|
||||
suck_V2 = dirV2 (regV imperfective firstE "сос" "у" "сосал" "соси" "сосать") ;
|
||||
sun_N = mkN "солнце" "солнца" "солнцу" "солнце" "солнцем" "солнце" "солнце" "солнца" "солнц" "солнцам" "солнца" "солнцами" "солнцах" neuter inanimate ;
|
||||
swell_V = regV imperfective first "опуха" "ю" "опухал" "опухай" "опухать" ;
|
||||
swim_V = regV imperfective first "плава" "ю" "плавал" "плавай" "плавать" ;
|
||||
switch8off_V2 = dirV2 (regV imperfective first "выключа" "ю" "выключал" "выключай" "выключать") ;
|
||||
switch8on_V2 = dirV2 (regV imperfective first "включа" "ю" "включал" "включай" "включать") ;
|
||||
stone_N = mkN "камень" masculine inanimate "2*e";
|
||||
stop_V = mkV imperfective "останавливать" "останавливаю" ;
|
||||
stove_N = (mkNplus (mkN "печь" feminine inanimate "8e")) ** {sloc="печь"} ;
|
||||
straight_A = mkA "прямой" "" "1b/c'";
|
||||
student_N = mkN "студент" masculine animate ;
|
||||
stupid_A = mkA "тупой" ;
|
||||
suck_V2 = mkV2 (mkV imperfective "сосать" "сосу" "сосёт");
|
||||
sun_N = mkN "солнце" neuter inanimate "5a";
|
||||
swell_V = mkV imperfective intransitive "опухать" "опухаю" "опухает";
|
||||
swim_V = mkV imperfective intransitive "плыть" "плыву" "плывёт";
|
||||
switch8off_V2 = mkV2 (mkV imperfective "выключать" "выключаю" "выключает");
|
||||
switch8on_V2 = mkV2 (mkV imperfective "включать" "включаю" "включает");
|
||||
table_N = mkN "стол" ;
|
||||
tail_N = mkN "хвост" ;
|
||||
talk_V3 = mkV3 (regV imperfective second "говор" "ю" "говорил" "говори" "говорить" ) "с" "о" instructive prepositional;
|
||||
teach_V2 = dirV2 (regV imperfective second "уч" "у" "учил" "учи" "учить" );
|
||||
teacher_N = mkN "учитель" animate ;
|
||||
talk_V3 = mkV3 (mkV imperfective "говорить" "говорю" "говорит") with_Prep about_Prep ;
|
||||
teach_V2 = mkV2 (mkV imperfective "учить" "учу" "учит");
|
||||
teacher_N = mkN "учитель" masculine animate "2c(1)";
|
||||
television_N = mkN "телевидение" ; -- FIXME: televizor?
|
||||
thick_A = mkA "толстый" "толще" ;
|
||||
thin_A = mkA "тонкий" "тоньше" ;
|
||||
think_V = regV imperfective first "дума" "ю" "думал" "думай" "думать" ;
|
||||
throw_V2 = dirV2 (regV imperfective first "броса" "ю" "бросал" "бросай" "бросать" ) ;
|
||||
tie_V2 = dirV2 (regV imperfective first "вяж" "у" "вязал" "вяжи" "вязать") ;
|
||||
thick_A = mkA "толстый" "толще" "1a/c'";
|
||||
thin_A = mkA "тонкий" "тоньше" "3*a/c'";
|
||||
think_V = mkV imperfective intransitive "думать" "думаю";
|
||||
throw_V2 = mkV2 (mkV imperfective "бросать" "бросаю");
|
||||
tie_V2 = mkV2 (mkV imperfective "вязать" "вяжу" "вяжет");
|
||||
today_Adv = mkAdv "сегодня" ;
|
||||
tongue_N = mkN "язык" ;
|
||||
tooth_N = mkN "зуб" ;
|
||||
train_N = mkN "поезд" ;
|
||||
travel_V = regV imperfective first "путешеству" "ю" "путешествовал" "путешествуй" "путешествовать" ;
|
||||
tree_N = mkN "дерево" ; -- irregular
|
||||
turn_V = regV imperfective first "поворачива" "ю" "поворачивал" "поворачивай" "поворачивать" ;
|
||||
travel_V = mkV imperfective intransitive "путешествовать" "путешествовую" "путешествовует";
|
||||
tree_N = (mkNplus (mkN "дерево" neuter inanimate "1a")) ** {pnom="деревья";pgen="деревьев";pdat="деревьям";pacc="деревья";pins="деревьями";pprep="деревьях"} ;
|
||||
turn_V = mkV imperfective "поворачивать" "поворачиваю" "поворачивает";
|
||||
ugly_A = mkA "некрасивый" ;
|
||||
-- uncertain_A = ;
|
||||
understand_V2 = dirV2 (regV imperfective first "понима" "ю" "понимал" "понимай" "понимать" );
|
||||
uncertain_A = mkA "неопределённый" ;
|
||||
understand_V2 = mkV2 (mkV imperfective "понимать" "понимаю" "понимает");
|
||||
university_N = mkN "университет" ;
|
||||
village_N = mkN "деревня" ;
|
||||
vomit_V = regV imperfective firstE "рв" "у" "рвал" "рви" "рвать" ;
|
||||
wait_V2 = dirV2 (regV imperfective firstE "жд" "у" "ждал" "жди" "ждать" );
|
||||
walk_V = regV imperfective first "гуля" "ю" "гулял" "гуляй" "гулять" ;
|
||||
--- want_V2 = dirV2 (regV imperfective mixed "хо" "чу" "хотел" "хоти" "хотеть" );
|
||||
village_N = (mkNplus (mkN "деревня" feminine inanimate "2*e")) ** {pgen="деревень"} ;
|
||||
vomit_V = mkV imperfective "блевать" "блюю" "блюёт"; -- better alternatives require more specific use
|
||||
wait_V2 = mkV2 (mkV imperfective "ждать" "жду" "ждёт");
|
||||
walk_V = mkV imperfective "гулять" "гуляю" "гуляет";
|
||||
war_N = mkN "война" ;
|
||||
warm_A = mkA "тёплый" ;
|
||||
wash_V2 = dirV2 (regV imperfective first "мо" "ю" "мыл" "мой" "мыть" ) ;
|
||||
watch_V2 = dirV2 (regV imperfective second "смотр" "ю" "смотрел" "смотри" "смотреть" );
|
||||
water_N = mkN "вода" ;
|
||||
wet_A = mkA "мокрый" ;
|
||||
white_A = mkA "белый" ;
|
||||
wide_A = mkA "широкий" "шире";
|
||||
wife_N = mkN "жена" animate ;
|
||||
win_V2 = dirV2 (regV imperfective first "выигрыва" "ю" "выигрывал" "выигрывай" "выигрывать" );
|
||||
wind_N = mkN "ветер" "ветра" "ветру" "ветер" "ветром" "ветра" "ветра" "ветров" "ветра" "ветрам" "ветров" "ветрами" "ветрах" masculine inanimate ;
|
||||
window_N = mkN "окно" ; -- "окон"
|
||||
wine_N = mkN "вино" ;
|
||||
wing_N = mkN "крыло" ; -- pl крылья крыльев etc
|
||||
wipe_V2 = dirV2 (regV imperfective first "вытира" "ю" "вытирал" "вытирай" "вытирать" );
|
||||
woman_N = mkN "женщина" ;
|
||||
wonder_VQ = regV imperfective first "интересу" "ю" "интересовал" "интересуй" "интересовать";
|
||||
wood_N = mkN "дерево" ;
|
||||
worm_N = mkN "черв" ;
|
||||
write_V2 = dirV2 (regV imperfective first "пиш" "у" "писал" "пиши" "писать" );
|
||||
year_N = mkNAltPl "год" "лето" masculine inanimate ;
|
||||
yellow_A = mkA "жёлтый" ;
|
||||
young_A = mkA "молодой" "моложе" ;
|
||||
warm_A = (mkAltShort (mkA "тёплый" "теплее" "1*a/b") (mkA "теплый" "" "1*a/b")) ** {sm="тёплый"} ; -- workaround TODO: Any way to remove yo from stem?
|
||||
wash_V2 = mkV2 (mkV imperfective "мыть" "мою" "моет");
|
||||
watch_V2 = mkV2 (mkV imperfective "смотреть" "смотрю" "смотрит");
|
||||
water_N = mkN "вода" feminine inanimate "1d'";
|
||||
wet_A = mkA "мокрый" "" "1a/c'";
|
||||
white_A = mkA "белый" "" "1a/c''";
|
||||
wide_A = mkA "широкий" "шире" "3a/c''";
|
||||
wife_N = mkN "жена" feminine animate ;
|
||||
win_V2 = mkV2 (mkV imperfective "выигрывать" "выигрываю" "выигрывает");
|
||||
wind_N = mkN "ветер" masculine inanimate "1*e" ;
|
||||
window_N = mkN "окно" neuter inanimate "1*d";
|
||||
wine_N = mkN "вино" neuter inanimate "1*d" ;
|
||||
wing_N = (mkNplus (mkN "крыло" neuter inanimate "1d")) ** {pnom="крылья";pgen="крыльев";pdat="крыльям";pacc="крылья";pins="крыльями";pprep="крыльях"};
|
||||
wipe_V2 = mkV2 (mkV imperfective "вытирать" "вытираю");
|
||||
woman_N = mkN "женщина" feminine animate ;
|
||||
wonder_VQ = mkV imperfective "интересовать" "интересую" "интересует";
|
||||
wood_N = mkN "древесина" feminine inanimate "1a" ;
|
||||
worm_N = mkN "червь" masculine animate ;
|
||||
write_V2 = mkV2 (mkV imperfective "писать" "пишу" "пишет");
|
||||
year_N = (mkNplus (mkN "год")) ** {sloc="году"; pgen="лет"};
|
||||
yellow_A = (mkAplus (mkA "жёлтый" "желтее" "1a/c''") ** {sf="желта"}) ; -- TODO: variants
|
||||
young_A = mkA "молодой" "моложе" "1b/c";
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,304 +1,191 @@
|
||||
--# -path=.:../abstract:../common:../../prelude
|
||||
concrete NounRus of Noun = CatRus ** open ResRus, ParamRus, Coordination, Prelude in {
|
||||
flags coding=utf8 ; optimize=all ;
|
||||
|
||||
concrete NounRus of Noun = CatRus ** open ResRus, Prelude, MorphoRus in {
|
||||
lin
|
||||
|
||||
flags optimize=all_subs ; coding=utf8 ;
|
||||
---------------
|
||||
-- Noun phrases
|
||||
|
||||
lin
|
||||
|
||||
DetCN kazhduj okhotnik = {
|
||||
s = \\c => case kazhduj.size of {
|
||||
nom =>
|
||||
kazhduj.s ! extCase c ! okhotnik.anim ! okhotnik.g ++
|
||||
okhotnik.nounpart ! NF Sg (extCase c) nom ++ okhotnik.relcl ! kazhduj.n ! (extCase c) ;
|
||||
nompl =>
|
||||
kazhduj.s ! extCase c ! okhotnik.anim ! okhotnik.g ++
|
||||
okhotnik.nounpart ! NF kazhduj.n (extCase c) nompl ++ okhotnik.relcl ! kazhduj.n ! (extCase c) ;
|
||||
sgg =>
|
||||
case c of {
|
||||
PF Nom _ _ =>
|
||||
kazhduj.s ! Nom ! okhotnik.anim ! okhotnik.g ++
|
||||
okhotnik.nounpart ! NF Sg Gen sgg ++ okhotnik.relcl ! kazhduj.n ! (extCase c) ;
|
||||
_ =>
|
||||
kazhduj.s ! extCase c ! okhotnik.anim ! okhotnik.g ++
|
||||
okhotnik.nounpart ! NF Pl (extCase c) sgg ++ okhotnik.relcl ! kazhduj.n ! (extCase c)} ;
|
||||
plg =>
|
||||
case c of {
|
||||
PF Nom _ _ =>
|
||||
kazhduj.s ! Nom ! okhotnik.anim ! okhotnik.g ++
|
||||
okhotnik.nounpart ! NF Pl Gen plg ++ okhotnik.relcl ! kazhduj.n ! (extCase c) ;
|
||||
_ =>
|
||||
kazhduj.s ! extCase c ! okhotnik.anim ! okhotnik.g ++
|
||||
okhotnik.nounpart ! NF Pl (extCase c) plg ++ okhotnik.relcl ! kazhduj.n ! (extCase c)}
|
||||
};
|
||||
n = kazhduj.n ;
|
||||
p = P3 ;
|
||||
pron = False;
|
||||
g = case kazhduj.g of { PNoGen => (PGen okhotnik.g); _ => kazhduj.g };
|
||||
anim = okhotnik.anim
|
||||
-- : Det -> CN -> NP ; -- the man
|
||||
DetCN det cn =
|
||||
let n = numSizeNumber det.size in {
|
||||
-- TODO: fix some cases in README
|
||||
s=\\cas => det.s ! cn.g ! cn.anim ! cas ++ sizeNumCase cn.s det.size ;
|
||||
pron=False ;
|
||||
a=Ag (gennum det.g n) P3
|
||||
} ;
|
||||
|
||||
UsePN masha = {
|
||||
s = \\c => masha.s ! (extCase c) ;
|
||||
p = P3; g = PGen masha.g ; anim = masha.anim ;
|
||||
n = Sg; nComp = Sg; pron = False} ;
|
||||
-- : PN -> NP ; -- John
|
||||
UsePN pn = {
|
||||
s=\\cas => (nounFormsNoun pn).s ! Sg ! cas ;
|
||||
pron=False;
|
||||
a=Ag (gennum pn.g Sg) P3
|
||||
} ; -- Does NP need animacy?
|
||||
|
||||
UsePron p = p ** {anim = Inanimate};
|
||||
-- : Pron -> NP ;
|
||||
UsePron pron = lin NP (pronFormsPronoun pron) ;
|
||||
|
||||
PredetNP pred np = {
|
||||
s = \\pf => pred.s! (AF (extCase pf) np.anim (gennum (pgen2gen np.g) np.n))++ np.s ! pf ;
|
||||
n = np.n;
|
||||
p = np.p;
|
||||
g = np.g;
|
||||
anim = np.anim;
|
||||
pron = np.pron
|
||||
-- : Predet -> NP -> NP ; -- only the man
|
||||
PredetNP predet np = np ** {s=\\cas => predet.s ! (agrGenNum np.a) ! Inanimate ! cas ++ np.s ! numSizeCase predet.size} ;
|
||||
|
||||
-- : NP -> V2 -> NP ; -- the man seen
|
||||
PPartNP np v2 = np ** {
|
||||
s = \\cas => np.s ! cas ++ (shortPastPassPart v2 (agrGenNum np.a))
|
||||
} ;
|
||||
|
||||
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
|
||||
-- : NP -> Adv -> NP ; -- Paris today
|
||||
AdvNP np adv = np ** {s=\\cas=>np.s ! cas ++ adv.s} ;
|
||||
|
||||
-- : NP -> Adv -> NP ; -- boys, such as ..
|
||||
ExtAdvNP np adv = np ** {s=\\cas=>np.s ! cas ++ embedInCommas adv.s} ;
|
||||
-- : NP -> RS -> NP ; -- Paris, which is here
|
||||
RelNP np rs = np ** {s=\\cas=>np.s ! cas ++ embedInCommas (rs.s ! agrGenNum np.a ! Inanimate !cas)} ;
|
||||
|
||||
-- : Det -> NP ; -- these five
|
||||
DetNP det = {
|
||||
s=\\c => det.s ! det.g ! Inanimate ! c ;
|
||||
pron=False ;
|
||||
a=Ag (gennum det.g (numSizeNumber det.size)) P3
|
||||
} ;
|
||||
|
||||
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
|
||||
-- : CN -> NP ; -- (beer)
|
||||
MassNP cn = {
|
||||
s = \\c => cn.s ! Sg ! c ; -- can it be plural-only? eg квасцы
|
||||
pron=False ;
|
||||
a = Ag (gennum cn.g Sg) P3
|
||||
} ;
|
||||
|
||||
-- 1.4 additions AR 17/6/2008
|
||||
|
||||
DetNP kazhduj =
|
||||
let
|
||||
g = Neut ; ----
|
||||
anim = Inanimate ;
|
||||
in {
|
||||
s = \\c => kazhduj.s ! extCase c ! anim ! g ;
|
||||
n = kazhduj.n ;
|
||||
p = P3 ;
|
||||
pron = False;
|
||||
g = case kazhduj.g of { PNoGen => (PGen g); _ => kazhduj.g };
|
||||
anim = anim
|
||||
-- : N2 -> NP -> CN ; -- mother of the king - мать короля
|
||||
ComplN2 n2 np = {
|
||||
s=\\n,cas=> (nounFormsNoun n2).s ! n ! cas ++ n2.c2.s ++ np.s ! n2.c2.c ;
|
||||
g=n2.g ;
|
||||
anim=n2.anim
|
||||
} ;
|
||||
-- : N3 -> NP -> N2 ; -- distance from this city (to Paris)
|
||||
ComplN3 n3 np = let n3_noun = nounFormsNoun n3 in nounToNounForm {
|
||||
s=\\n,g=>n3_noun.s ! n ! g ++ n3.c2.s ++ np.s ! n3.c2.c ;
|
||||
g=n3.g ;
|
||||
anim=n3.anim
|
||||
} ** {c2=n3.c3} ;
|
||||
|
||||
{-
|
||||
DetArtOrd quant num ord = {
|
||||
s = \\af => quant.s !af ++ num.s! (caseAF af) ! (genAF af) ++ ord.s!af ;
|
||||
n = num.n ;
|
||||
g = quant.g;
|
||||
c = quant.c
|
||||
} ;
|
||||
|
||||
DetArtCard quant num = {
|
||||
s = \\af => quant.s !af ++ num.s! (caseAF af) ! (genAF af) ;
|
||||
n = num.n ;
|
||||
g = quant.g;
|
||||
c = quant.c
|
||||
} ;
|
||||
-}
|
||||
-- MassDet = {s = \\_=>[] ; c = Nom; g = PNoGen; n = Sg} ;
|
||||
|
||||
MassNP okhotnik = {
|
||||
s = \\c => okhotnik.nounpart ! NF Sg (extCase c) nom ++ okhotnik.relcl ! Sg ! extCase c ;
|
||||
n = Sg ;
|
||||
p = P3 ;
|
||||
pron = False;
|
||||
g = PGen okhotnik.g ;
|
||||
anim = okhotnik.anim
|
||||
} ;
|
||||
{-
|
||||
DetArtSg kazhduj okhotnik = {
|
||||
s = \\c => -- art case always Nom (AR 17/6/2008)
|
||||
kazhduj.s ! AF (extCase c) okhotnik.anim (gennum okhotnik.g Sg) ++
|
||||
okhotnik.s ! Sg ! (extCase c) ;
|
||||
n = Sg ;
|
||||
p = P3 ;
|
||||
pron = False;
|
||||
g = case kazhduj.g of { PNoGen => (PGen okhotnik.g); _ => kazhduj.g};
|
||||
anim = okhotnik.anim
|
||||
} ;
|
||||
|
||||
DetArtPl kazhduj okhotnik = {
|
||||
s = \\c => -- art case always Nom (AR 17/6/2008)
|
||||
kazhduj.s ! AF (extCase c) okhotnik.anim (gennum okhotnik.g Pl) ++
|
||||
okhotnik.s ! Pl ! (extCase c) ;
|
||||
n = Pl ;
|
||||
p = P3 ;
|
||||
pron = False;
|
||||
g = case kazhduj.g of { PNoGen => (PGen okhotnik.g); _ => kazhduj.g };
|
||||
anim = okhotnik.anim
|
||||
} ;
|
||||
-}
|
||||
PossPron p = {s = \\af => p.s ! mkPronForm (caseAF af) No (Poss (gennum (genAF af) (numAF af) )); c=Nom; g = PNoGen; size = nom} ;
|
||||
|
||||
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} ;
|
||||
|
||||
--------------
|
||||
-- Determiners
|
||||
-- : Numeral -> Card ; -- fifty-one
|
||||
NumNumeral n = n ;
|
||||
NumDigits n = {s = \\_,_,_ => n.s ; n = n.n ; size = n.size } ;
|
||||
|
||||
AdNum adn num = {s = \\c,a,n => adn.s ++ num.s!c!a!n ; n = num.n ; size = num.size} ;
|
||||
|
||||
OrdSuperl a = {s = a.s ! Posit} ;
|
||||
|
||||
DefArt = {s = \\_=>[] ; c=Nom; g = PNoGen; size = nom };
|
||||
IndefArt = { s = \\_=>[] ; c=Nom; g = PNoGen; size = nom };
|
||||
|
||||
UseN noun = {
|
||||
nounpart = \\nf => noun.s ! nf ;
|
||||
relcl = \\n,c => "" ;
|
||||
g = noun.g ;
|
||||
anim = noun.anim
|
||||
} ;
|
||||
|
||||
UseN2 noun = {
|
||||
nounpart = noun.s ;
|
||||
relcl = \\n,c => "" ;
|
||||
g = noun.g ;
|
||||
anim = noun.anim
|
||||
} ;
|
||||
|
||||
-- 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 f x = {
|
||||
nounpart = \\nf => case x.pron of {
|
||||
True => x.s ! (case nf of {NF n c size => mkPronForm c No (Poss (gennum f.g n))}) ++ f.s ! nf ;
|
||||
False => f.s ! nf ++ f.c2.s ++
|
||||
x.s ! (case nf of {NF n c size => mkPronForm f.c2.c Yes (Poss (gennum f.g n))})
|
||||
} ;
|
||||
relcl = \\n,c => "" ;
|
||||
g = f.g ;
|
||||
anim = f.anim
|
||||
} ;
|
||||
|
||||
-- Two-place functions add one argument place.
|
||||
-- There application starts by filling the first place.
|
||||
|
||||
ComplN3 f x = {
|
||||
s = \\nf => f.s ! nf ++ f.c2.s ++ x.s ! (PF f.c2.c Yes NonPoss) ;
|
||||
g = f.g ;
|
||||
anim = f.anim ;
|
||||
c2 = f.c3 ;
|
||||
} ;
|
||||
|
||||
---- AR 17/12/2008
|
||||
Use2N3 f = {
|
||||
s = f.s ;
|
||||
g = f.g ;
|
||||
anim = f.anim ;
|
||||
c2 = f.c2
|
||||
} ;
|
||||
|
||||
---- AR 17/12/2008
|
||||
Use3N3 f = {
|
||||
s = f.s ;
|
||||
g = f.g ;
|
||||
anim = f.anim ;
|
||||
c2 = f.c3
|
||||
} ;
|
||||
|
||||
|
||||
-- The two main functions of adjective are in predication ("Иван - молод")
|
||||
-- and in modification ("молодой человек"). Predication will be defined
|
||||
-- later, in the chapter on verbs.
|
||||
|
||||
AdjCN ap cn = {
|
||||
nounpart = \\nf => case ap.p of {
|
||||
False => ap.s ! case nf of {NF Sg Gen sgg => AF Nom cn.anim GPl ;
|
||||
NF n c size => AF c cn.anim (gennum cn.g n)} ++ cn.nounpart ! nf ;
|
||||
True => cn.nounpart ! nf ++ ap.s ! case nf of {NF Sg Gen sgg => AF Nom cn.anim GPl ;
|
||||
NF n c size => AF c cn.anim (gennum cn.g n)}
|
||||
} ;
|
||||
relcl = cn.relcl ;
|
||||
g = cn.g ;
|
||||
anim = cn.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 cn adv = {
|
||||
nounpart = \\nf => cn.nounpart ! nf ++ adv.s ;
|
||||
relcl = cn.relcl ;
|
||||
g = cn.g ;
|
||||
anim = cn.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 = {
|
||||
nounpart = \\nf => idea.nounpart ! nf ;
|
||||
relcl = \\n,c => idea.relcl ! n ! c ++ x.s ;
|
||||
g = idea.g ;
|
||||
anim = idea.anim
|
||||
} ;
|
||||
|
||||
RelCN idea x = {
|
||||
nounpart = \\nf => idea.nounpart ! nf;
|
||||
relcl = \\n,c => idea.relcl ! n ! c ++ x.s ! (gennum idea.g n)! c ! idea.anim ;
|
||||
g = idea.g ;
|
||||
anim = idea.anim
|
||||
} ;
|
||||
|
||||
---- AR 17/12/2008
|
||||
ApposCN cn s = {
|
||||
nounpart = \\nf => cn.nounpart ! nf ++ s.s ! (case nf of {NF n c size => PF c No NonPoss}) ;
|
||||
relcl = cn.relcl ;
|
||||
g = cn.g ;
|
||||
anim = cn.anim
|
||||
} ;
|
||||
|
||||
RelNP np rel = {
|
||||
s = \\c => np.s ! c ++ rel.s ! (gennum (pgen2gen np.g) np.n) ! extCase c ! np.anim ;
|
||||
n = np.n ;
|
||||
p = np.p ;
|
||||
pron = np.pron ;
|
||||
g = np.g ;
|
||||
anim = np.anim ;
|
||||
nComp = np.nComp
|
||||
} ;
|
||||
|
||||
---- Liza Zimina 04/2018
|
||||
-- changed to make Ord agree in number with Num
|
||||
|
||||
DetQuantOrd quant num ord = {
|
||||
s = \\c,a,gen => quant.s ! AF c a (gennum gen num.n) ++ num.s ! gen ! a ! c ++ case num.n of {
|
||||
Sg => ord.s ! AF c a (GSg gen) ;
|
||||
Pl => ord.s ! AF c a GPl
|
||||
} ;
|
||||
n = num.n ;
|
||||
g = quant.g;
|
||||
c = quant.c;
|
||||
size = quant.size
|
||||
} ;
|
||||
|
||||
DetQuant quant num = {
|
||||
s = \\c,a,gen => quant.s ! AF c a (gennum gen num.n) ++ num.s ! gen ! a ! c ;
|
||||
n = num.n ;
|
||||
g = quant.g;
|
||||
c = quant.c;
|
||||
size = num.size
|
||||
} ;
|
||||
|
||||
-- : Card -> Num
|
||||
NumCard c = c ;
|
||||
NumSg = {s = \\_,_,_ => [] ; n = Sg ; size = nom} ;
|
||||
NumPl = {s = \\_,_,_ => [] ; n = Pl ; size = nompl} ;
|
||||
}
|
||||
-- : Digits -> Card ; -- 51
|
||||
NumDigits n = {s = \\_,_,_ => n.s ; size = n.size } ;
|
||||
|
||||
-- : Quant -> Num -> Det ; -- these five
|
||||
DetQuant quant num = {
|
||||
s=\\g,a,c => num.s ! g ! a ! c ++ quant.s ! (gennum g (numSizeNumber num.size)) ! a ! c ;
|
||||
g=quant.g ;
|
||||
c=quant.c ;
|
||||
size=num.size
|
||||
} ;
|
||||
|
||||
-- : Quant -> Num -> Ord -> Det ; -- these five best
|
||||
DetQuantOrd quant num ord = {
|
||||
s=\\g,a,c => num.s ! g ! a ! c
|
||||
++ quant.s ! (gennum g (numSizeNumber num.size)) ! a ! c
|
||||
--GenNum => Animacy => Case => Str
|
||||
++ (adjFormsAdjective ord).s ! gennum quant.g (numSizeNum num.size) ! Inanimate ! numSizeCase num.size ;
|
||||
g=quant.g ;
|
||||
c=quant.c ;
|
||||
size=num.size
|
||||
} ;
|
||||
|
||||
-- : Num -- mark as singular
|
||||
NumSg = {s = \\_,_,_ => [] ; size = Num1 } ;
|
||||
-- : Num -- mark as plural
|
||||
NumPl = {s = \\_,_,_ => [] ; size = NumAll } ;
|
||||
|
||||
-- Digits -> Ord ; -- 51st
|
||||
OrdDigits d = immutableAdjForms d.s ; -- TODO: better implementation
|
||||
|
||||
-- TODO: : Numeral -> Ord ; -- fifty-first
|
||||
OrdNumeral numeral = variants {} ;
|
||||
|
||||
-- : A -> Ord ;
|
||||
OrdSuperl a = long_superlative a ;
|
||||
|
||||
-- : Pron -> Quant ; -- my (house)
|
||||
PossPron pron = {s=mkPronTable pron.poss ; short=\\a=>[] ; g=Neut; c=Nom; preferShort=PrefFull} ;
|
||||
|
||||
-- : AdN -> Card -> Card
|
||||
AdNum adn card = card ** {
|
||||
s=\\g,a,c => adn.s ++ card.s ! g ! a ! c
|
||||
} ;
|
||||
|
||||
---------------
|
||||
-- Common nouns
|
||||
|
||||
-- : AP -> CN -> CN ; -- big house - большой дом
|
||||
AdjCN ap cn = cn ** {s = \\n,c => preOrPost (notB ap.isPost) (ap.s ! (gennum cn.g n) ! cn.anim ! c) (cn.s ! n ! c)} ;
|
||||
|
||||
-- : N -> CN
|
||||
UseN n = nounFormsNoun n ;
|
||||
|
||||
-- : N2 -> CN ;
|
||||
UseN2 n = nounFormsNoun n ;
|
||||
|
||||
-- : N3 -> N2 ; -- distance (from this city)
|
||||
Use2N3 n3 = lin N2 n3 ** { compl1 = n3.compl2 } ;
|
||||
|
||||
-- : N3 -> N2 ; -- distance (to Paris)
|
||||
Use3N3 n3 = lin N2 n3 ;
|
||||
|
||||
-- : CN -> RS -> CN ; -- house that John bought
|
||||
RelCN cn rs = cn ** {s = \\n,c => cn.s ! n ! c ++ embedInCommas (rs.s ! gennum cn.g n ! cn.anim ! c)} ;
|
||||
|
||||
-- : CN -> SC -> CN ; -- question where she sleeps
|
||||
SentCN cn sc = cn ** {s = \\n,c => cn.s ! n ! c ++ sc.s}; -- SC type will change???
|
||||
|
||||
-- : CN -> Adv -> CN ; -- house on the hill
|
||||
AdvCN cn adv = cn ** {s = \\n,c => cn.s ! n ! c ++ adv.s};
|
||||
|
||||
-------------
|
||||
-- Apposition
|
||||
-- : CN -> NP -> CN ; -- city Paris (, numbers x and y)
|
||||
ApposCN cn np = cn ** {s=\\n,cas => cn.s ! n ! cas ++ np.s ! cas} ;
|
||||
|
||||
--------------------------------------
|
||||
-- Possessive and partitive constructs
|
||||
|
||||
-- : CN -> NP -> CN ; -- house of Paris, house of mine
|
||||
PossNP cn np = cn ** {
|
||||
s=\\n,cas => np.s ! Gen ++ cn.s ! n ! cas ; -- TODO: possessive pronouns P1, P2
|
||||
} ;
|
||||
|
||||
-- : CN -> NP -> CN ; -- glass of wine - стакан чаю (чая)
|
||||
PartNP cn np = cn ** {
|
||||
s=\\n,cas => cn.s ! n ! cas ++ np.s ! Ptv ; -- also Gen
|
||||
} ;
|
||||
|
||||
-- : Det -> NP -> NP ; -- three of them, some of the boys
|
||||
CountNP det np = {
|
||||
s=\\cas => det.s ! Neut ! Inanimate ! cas ++ selectCase np.s from2 ;
|
||||
pron=False ;
|
||||
a=np.a
|
||||
} ;
|
||||
|
||||
---------------------------------------------------
|
||||
-- Conjoinable determiners and ones with adjectives
|
||||
|
||||
-- DAP -> AP -> DAP ; -- the large (one)
|
||||
AdjDAP dap ap = dap ** {
|
||||
s=\\g,anim,cas => ap.s ! GSg g ! anim ! cas ++ dap.s ! g ! anim ! cas
|
||||
} ;
|
||||
|
||||
-- DetDAP : Det -> DAP ; -- this (or that)
|
||||
DetDAP det = det ;
|
||||
|
||||
---------------------------------------------------
|
||||
-- Backwards compatibility
|
||||
-- : Quant ; -- the (house), the (houses)
|
||||
DefArt = {s = \\gn,anim,cas=>[] ; short=\\a=>[] ; c=Nom; g = Neut; size = Num1 ; preferShort=PrefFull};
|
||||
-- : Quant ; -- a (house), (houses)
|
||||
IndefArt = {s = \\gn,anim,cas=>[] ; short=\\a=>[] ; c=Nom; g = Neut; size = Num1 ; preferShort=PrefFull};
|
||||
|
||||
}
|
||||
|
||||
@@ -7,11 +7,11 @@ flags coding=utf8 ;
|
||||
-- Toiska, 13/8/2000, AR with Arto Mustajoki.
|
||||
-- Nikita Frolov, 2011
|
||||
|
||||
lincat Digit = {s : DForm => Gender => Animacy => Case => Str ; size : Size} ;
|
||||
lincat Sub10 = {s : Place => DForm => Gender => Animacy => Case => Str ; size : Size} ;
|
||||
lincat Sub100 = {s : Place => Gender => Animacy => Case => Str ; size : Size} ;
|
||||
lincat Sub1000 = {s : Place => Gender => Animacy => Case => Str ; size : Size} ;
|
||||
lincat Sub1000000 = {s : Gender => Animacy => Case => Str ; size : Size} ;
|
||||
lincat Digit = {s : DForm => Gender => Animacy => Case => Str ; size : NumSize} ;
|
||||
lincat Sub10 = {s : Place => DForm => Gender => Animacy => Case => Str ; size : NumSize} ;
|
||||
lincat Sub100 = {s : Place => Gender => Animacy => Case => Str ; size : NumSize} ;
|
||||
lincat Sub1000 = {s : Place => Gender => Animacy => Case => Str ; size : NumSize} ;
|
||||
lincat Sub1000000 = {s : Gender => Animacy => Case => Str ; size : NumSize} ;
|
||||
|
||||
lin num x = {s = \\ g,a,c => x.s ! g ! a ! c; n = Pl ; size = x.size};
|
||||
|
||||
@@ -20,209 +20,209 @@ lin n3 =
|
||||
teen => nadsat "три" ;
|
||||
ten => n2030 "три" ;
|
||||
hund => sta tri} ;
|
||||
size = sgg} ;
|
||||
size = Num2_4} ;
|
||||
lin n4 =
|
||||
{s = table {unit => chetyre ;
|
||||
teen => nadsat "четыр" ;
|
||||
ten => \\ g, a, c =>
|
||||
case <c, g> of {
|
||||
<(Nom|Acc), _ > => "сорок";
|
||||
<(Gen|Dat|Inst|Prepos _), _ > => "сорока" } ;
|
||||
<(Nom|VocRus|Acc), _ > => "сорок";
|
||||
<(Gen|Ptv|Dat|Ins|Pre|Loc), _ > => "сорока" } ;
|
||||
hund => sta chetyre } ;
|
||||
size = sgg} ;
|
||||
size = Num2_4} ;
|
||||
lin n5 =
|
||||
{s = table {unit => n59 "пят" ;
|
||||
teen => nadsat "пят" ;
|
||||
ten => n5070 "пят" ;
|
||||
hund => sot (n59 "пят")} ;
|
||||
size = plg} ;
|
||||
size = Num5} ;
|
||||
lin n6 =
|
||||
{s = table {unit => n59 "шест" ;
|
||||
teen => nadsat "шест" ;
|
||||
ten => n5070 "шест" ;
|
||||
hund => sot (n59 "шест")} ;
|
||||
size = plg} ;
|
||||
size = Num5} ;
|
||||
lin n7 =
|
||||
{s = table {unit => n59 "сем" ;
|
||||
teen => nadsat "сем" ;
|
||||
ten => n5070 "сем" ;
|
||||
hund => sot (n59 "сем") } ;
|
||||
size = plg} ;
|
||||
size = Num5} ;
|
||||
lin n8 =
|
||||
{s = table {unit => vosem ;
|
||||
teen => nadsat "восем" ;
|
||||
ten => \\ g, a, c =>
|
||||
case <c, g> of {
|
||||
<(Nom|Acc), _ > => "восемьдесят";
|
||||
<(Gen|Dat|Prepos _), _ > => "восьмидесяти" ;
|
||||
<Inst, _ > => "восемьюдесятью"
|
||||
<(Nom|VocRus|Acc), _ > => "восемьдесят";
|
||||
<(Gen|Ptv|Dat|Pre|Loc), _ > => "восьмидесяти" ;
|
||||
<Ins, _ > => "восемьюдесятью"
|
||||
};
|
||||
hund => sot vosem
|
||||
} ;
|
||||
size = plg} ;
|
||||
size = Num5} ;
|
||||
lin n9 =
|
||||
{s = table {unit => n59 "девят" ;
|
||||
teen => nadsat "девят" ;
|
||||
ten => \\ g, a, c =>
|
||||
case <c, g> of {
|
||||
<(Nom|Acc), _ > => "девяносто";
|
||||
<(Gen|Dat|Inst|Prepos _), _ > => "девяноста"
|
||||
<(Nom|VocRus|Acc), _ > => "девяносто";
|
||||
<(Gen|Ptv|Dat|Ins|Pre|Loc), _ > => "девяноста"
|
||||
};
|
||||
hund => sot (n59 "девят") } ;
|
||||
size = plg} ;
|
||||
size = Num5} ;
|
||||
|
||||
oper n59 : Str -> (Gender => Animacy => Case => Str) = \ n -> \\ g, a, c =>
|
||||
case <c, g> of {
|
||||
<(Nom|Acc), _ > => n + "ь";
|
||||
<(Gen|Dat|Prepos _), _ > => n + "и";
|
||||
<Inst, _ > => n + "ью"
|
||||
<(Nom|VocRus|Acc), _ > => n + "ь";
|
||||
<(Gen|Ptv|Dat|Pre|Loc), _ > => n + "и";
|
||||
<Ins, _ > => n + "ью"
|
||||
};
|
||||
|
||||
oper n2030 : Str -> (Gender => Animacy => Case => Str) = \ n -> \\ g, a, c =>
|
||||
case <c, g> of {
|
||||
<(Nom|Acc), _ > => n + "дцать";
|
||||
<(Gen|Dat|Prepos _), _ > => n + "дцати" ;
|
||||
<Inst, _ > => n + "дцатью"
|
||||
<(Nom|VocRus|Acc), _ > => n + "дцать";
|
||||
<(Gen|Ptv|Dat|Pre|Loc), _ > => n + "дцати" ;
|
||||
<Ins, _ > => n + "дцатью"
|
||||
};
|
||||
|
||||
oper n5070 : Str -> (Gender => Animacy => Case => Str) = \ n -> \\ g, a, c =>
|
||||
case <c, g> of {
|
||||
<(Nom|Acc), _ > => n + "ьдесят";
|
||||
<(Gen|Dat|Prepos _), _ > => n + "идесяти" ;
|
||||
<Inst, _ > => n + "ьюдесятью"
|
||||
<(Nom|VocRus|Acc), _ > => n + "ьдесят";
|
||||
<(Gen|Ptv|Dat|Pre|Loc), _ > => n + "идесяти" ;
|
||||
<Ins, _ > => n + "ьюдесятью"
|
||||
};
|
||||
|
||||
oper tri : Gender => Animacy => Case => Str = \\ g, a, c =>
|
||||
case <c, g> of {
|
||||
<(Nom|Acc), _ > => "три";
|
||||
<(Gen|Prepos _), _ > => "трех";
|
||||
<(Nom|VocRus|Acc), _ > => "три";
|
||||
<(Gen|Ptv|Pre|Loc), _ > => "трех";
|
||||
<Dat, _ > => "трем";
|
||||
<Inst, _ > => "тремя"
|
||||
<Ins, _ > => "тремя"
|
||||
};
|
||||
|
||||
oper chetyre : Gender => Animacy => Case => Str = \\ g, a, c =>
|
||||
case <c, g> of {
|
||||
<(Nom|Acc), _ > => "четыре";
|
||||
<(Gen|Prepos _), _ > => "четырех";
|
||||
<(Nom|VocRus|Acc), _ > => "четыре";
|
||||
<(Gen|Ptv|Pre|Loc), _ > => "четырех";
|
||||
<Dat, _ > => "четырем";
|
||||
<Inst, _ > => "четырьмя"
|
||||
<Ins, _ > => "четырьмя"
|
||||
};
|
||||
|
||||
oper vosem : Gender => Animacy => Case => Str = \\ g, a, c =>
|
||||
case <c, g> of {
|
||||
<(Nom|Acc), _ > => "восемь";
|
||||
<(Gen|Dat|Prepos _), _ > => "восьми";
|
||||
<Inst, _ > => "восемью"
|
||||
<(Nom|VocRus|Acc), _ > => "восемь";
|
||||
<(Gen|Ptv|Dat|Pre|Loc), _ > => "восьми";
|
||||
<Ins, _ > => "восемью"
|
||||
};
|
||||
|
||||
-- a little tribute to Burgess
|
||||
oper nadsat : Str -> (Gender => Animacy => Case => Str) = \ n -> \\ g, a, c =>
|
||||
case <c, g> of {
|
||||
<(Nom|Acc), _ > => n + "надцать";
|
||||
<(Gen|Dat|Prepos _), _ > => n + "надцати";
|
||||
<Inst, _ > => n + "надцатью"
|
||||
<(Nom|VocRus|Acc), _ > => n + "надцать";
|
||||
<(Gen|Ptv|Dat|Pre|Loc), _ > => n + "надцати";
|
||||
<Ins, _ > => n + "надцатью"
|
||||
};
|
||||
|
||||
oper sta : (Gender => Animacy => Case => Str) -> (Gender => Animacy => Case => Str) = \ n -> \\ g, a, c =>
|
||||
case <c, g> of {
|
||||
<(Nom|Acc), _ > => n ! Fem ! Animate ! c + "ста";
|
||||
<Gen, _ > => n ! Fem ! Animate ! c + "сот";
|
||||
<(Nom|VocRus|Acc), _ > => n ! Fem ! Animate ! c + "ста";
|
||||
<Gen|Ptv, _ > => n ! Fem ! Animate ! c + "сот";
|
||||
<Dat, _ > => n ! Fem ! Animate ! c + "стам";
|
||||
<Inst, _ > => n ! Fem ! Animate ! c + "юстами";
|
||||
<Prepos _, _ > => n ! Fem ! Animate ! c + "стах"
|
||||
<Ins, _ > => n ! Fem ! Animate ! c + "юстами";
|
||||
<Pre|Loc, _ > => n ! Fem ! Animate ! c + "стах"
|
||||
};
|
||||
|
||||
oper sot : (Gender => Animacy => Case => Str) -> (Gender => Animacy => Case => Str) = \ n -> \\ g, a, c =>
|
||||
case <c, g> of {
|
||||
<(Nom|Acc), _ > => n ! Fem ! Animate ! c + "сот";
|
||||
<Gen, _ > => n ! Fem ! Animate ! c + "сот";
|
||||
<(Nom|VocRus|Acc), _ > => n ! Fem ! Animate ! c + "сот";
|
||||
<Gen|Ptv, _ > => n ! Fem ! Animate ! c + "сот";
|
||||
<Dat, _ > => n ! Fem ! Animate ! c + "стам";
|
||||
<Inst, _ > => n ! Fem ! Animate ! c + "юстами";
|
||||
<Prepos _, _ > => n ! Fem ! Animate ! c + "ста"
|
||||
<Ins, _ > => n ! Fem ! Animate ! c + "юстами";
|
||||
<Pre|Loc, _ > => n ! Fem ! Animate ! c + "ста"
|
||||
};
|
||||
|
||||
lin pot01 =
|
||||
{s = table {attr => table {hund => \\ g, a, c =>
|
||||
case <g, a, c> of {
|
||||
<_, _, (Nom|Acc) > => "сто";
|
||||
<_, _, (Gen|Dat|Prepos _) > => "ста";
|
||||
<_, _, Inst > => "сотней"
|
||||
<_, _, (Nom|VocRus|Acc) > => "сто";
|
||||
<_, _, (Gen|Ptv|Dat|Pre|Loc) > => "ста";
|
||||
<_, _, Ins > => "сотней"
|
||||
};
|
||||
_ => \\ g, a, c => []} ;
|
||||
_ => table {hund => \\ g, a, c =>
|
||||
case <g, a, c> of {
|
||||
<_, _, (Nom|Acc) > => "сто";
|
||||
<_, _, (Gen|Dat|Prepos _) > => "ста";
|
||||
<_, _, (Nom|VocRus|Acc) > => "сто";
|
||||
<_, _, (Gen|Ptv|Dat|Pre|Loc) > => "ста";
|
||||
-- TODO: case agreement with nouns
|
||||
<_, _, Inst > => "сотней"
|
||||
<_, _, Ins > => "сотней"
|
||||
};
|
||||
_ => \\ g, a, c =>
|
||||
case <g, a, c> of {
|
||||
<Masc, Animate, Acc> => "одного";
|
||||
<Masc, Inanimate, Acc> => "один";
|
||||
<Masc, _, Nom > => "один";
|
||||
<Masc, _, Gen > => "одного";
|
||||
<Masc, _, Nom|VocRus > => "один";
|
||||
<Masc, _, Gen|Ptv > => "одного";
|
||||
<Masc, _, Dat > => "одному";
|
||||
<Masc, _, Inst > => "одним";
|
||||
<Masc, _, Prepos _ > => "одном";
|
||||
<Fem, _, Nom > => "одна";
|
||||
<Fem, _, (Gen|Dat|Inst|Prepos _) > => "одной";
|
||||
<Masc, _, Ins > => "одним";
|
||||
<Masc, _, Pre|Loc > => "одном";
|
||||
<Fem, _, Nom|VocRus > => "одна";
|
||||
<Fem, _, (Gen|Ptv|Dat|Ins|Pre|Loc) > => "одной";
|
||||
<Fem, _, Acc> => "одну";
|
||||
<Neut, _, (Nom|Acc) > => "одно";
|
||||
<Neut, _, Gen > => "одного";
|
||||
<Neut, _, (Nom|VocRus|Acc) > => "одно";
|
||||
<Neut, _, Gen|Ptv > => "одного";
|
||||
<Neut, _, Dat > => "одному";
|
||||
<Neut, _, Inst > => "одним";
|
||||
<Neut, _, Prepos _ > => "одном"}}} ;
|
||||
size = nom} ;
|
||||
<Neut, _, Ins > => "одним";
|
||||
<Neut, _, Pre|Loc > => "одном"}}} ;
|
||||
size = Num1} ;
|
||||
|
||||
lin n2 =
|
||||
{s = table {unit => \\ g, a, c =>
|
||||
case <c, g, a> of {
|
||||
<(Nom|Acc), Fem, _ > => "две";
|
||||
<(Nom|Acc), (Masc|Neut), Inanimate > => "два";
|
||||
<Nom, (Masc|Neut), Animate > => "два";
|
||||
<(Nom|VocRus|Acc), Fem, _ > => "две";
|
||||
<(Nom|VocRus|Acc), (Masc|Neut), Inanimate > => "два";
|
||||
<Nom|VocRus, (Masc|Neut), Animate > => "два";
|
||||
<Acc , _, Animate > => "двух";
|
||||
<(Gen|Prepos _), _, _ > => "двух";
|
||||
<(Gen|Ptv|Pre|Loc), _, _ > => "двух";
|
||||
<Dat, _, _ > => "двум";
|
||||
<Inst, _, _ > => "двумя"
|
||||
<Ins, _, _ > => "двумя"
|
||||
};
|
||||
teen => nadsat "две" ;
|
||||
ten => n2030 "два" ;
|
||||
hund => \\ g, a, c =>
|
||||
case <c, g> of {
|
||||
<(Nom|Acc), _ > => "двести";
|
||||
<Gen, _ > => "двухсот";
|
||||
<(Nom|VocRus|Acc), _ > => "двести";
|
||||
<Gen|Ptv, _ > => "двухсот";
|
||||
<Dat, _ > => "двумстам";
|
||||
<Inst, _ > => "двумястами";
|
||||
<Prepos _, _ > => "двухстах"} } ;
|
||||
size = sgg} ;
|
||||
<Ins, _ > => "двумястами";
|
||||
<Pre|Loc, _ > => "двухстах"} } ;
|
||||
size = Num2_4} ;
|
||||
|
||||
lin pot0 d =
|
||||
{s = table {_ => d.s} ; size = d.size} ;
|
||||
lin pot110 =
|
||||
{s = \\ p => n59 "десят" ; size = plg} ;
|
||||
{s = \\ p => n59 "десят" ; size = Num5} ;
|
||||
lin pot111 =
|
||||
{s = \\ p => nadsat "один" ; size = plg} ; --- 11
|
||||
{s = \\ p => nadsat "один" ; size = Num5} ; --- 11
|
||||
lin pot1to19 d =
|
||||
{s = table {_ => d.s ! teen} ; size = plg} ;
|
||||
{s = table {_ => d.s ! teen} ; size = Num5} ;
|
||||
lin pot0as1 n =
|
||||
{s = table {p => n.s ! p ! unit} ; size = n.size} ;
|
||||
lin pot1 d =
|
||||
{s = table {_ => d.s ! ten} ; size = plg} ; ---
|
||||
{s = table {_ => d.s ! ten} ; size = Num5} ; ---
|
||||
lin pot1plus d e =
|
||||
{s = table {_ => \\ g, a, c => d.s ! ten ! g ! a ! c ++ e.s ! indep ! unit ! g ! a ! c} ; size = e.size} ;
|
||||
lin pot1as2 n =
|
||||
{s = n.s ; size = n.size} ;
|
||||
lin pot2 d =
|
||||
{s = table {p => d.s ! p ! hund} ; size = plg} ;
|
||||
{s = table {p => d.s ! p ! hund} ; size = Num5} ;
|
||||
lin pot2plus d e =
|
||||
{s = \\ p, g, a, c => d.s ! p ! hund ! g ! a ! c ++ e.s ! indep ! g ! a ! c ; size = e.size} ;
|
||||
lin pot2as3 n =
|
||||
{s = n.s ! indep ; size = n.size} ;
|
||||
lin pot3 n =
|
||||
{s = \\ g, a, c => n.s ! attr ! Fem ! a ! c ++ mille ! n.size ; size = plg} ;
|
||||
{s = \\ g, a, c => n.s ! attr ! Fem ! a ! c ++ mille ! n.size ; size = Num5} ;
|
||||
lin pot3plus n m =
|
||||
{s = \\ g, a, c => n.s ! attr ! Fem ! a ! c ++ mille ! n.size ++ m.s ! indep ! g ! a ! c ; size = plg} ;
|
||||
{s = \\ g, a, c => n.s ! attr ! Fem ! a ! c ++ mille ! n.size ++ m.s ! indep ! g ! a ! c ; size = Num5} ;
|
||||
|
||||
--- TODO
|
||||
--- raz/odin
|
||||
@@ -241,22 +241,22 @@ lin pot3plus n m =
|
||||
size = i.size
|
||||
} ;
|
||||
|
||||
D_0 = mk2Dig "0" plg ;
|
||||
D_1 = mk4Dig "1" "1" Sg nom ; ----
|
||||
D_2 = mk2Dig "2" sgg ;
|
||||
D_3 = mk2Dig "3" sgg ;
|
||||
D_4 = mk2Dig "4" sgg ;
|
||||
D_5 = mk2Dig "5" plg ;
|
||||
D_6 = mk2Dig "6" plg ;
|
||||
D_7 = mk2Dig "7" plg ;
|
||||
D_8 = mk2Dig "8" plg ;
|
||||
D_9 = mk2Dig "9" plg ;
|
||||
D_0 = mk2Dig "0" Num5 ;
|
||||
D_1 = mk4Dig "1" "1" Sg Num1 ; ----
|
||||
D_2 = mk2Dig "2" Num2_4 ;
|
||||
D_3 = mk2Dig "3" Num2_4 ;
|
||||
D_4 = mk2Dig "4" Num2_4 ;
|
||||
D_5 = mk2Dig "5" Num5 ;
|
||||
D_6 = mk2Dig "6" Num5 ;
|
||||
D_7 = mk2Dig "7" Num5 ;
|
||||
D_8 = mk2Dig "8" Num5 ;
|
||||
D_9 = mk2Dig "9" Num5 ;
|
||||
|
||||
oper
|
||||
mk3Dig : Str -> Str -> Size -> TDigit = \c,o,size -> mk4Dig c o Pl size ;
|
||||
mk2Dig : Str -> Size -> TDigit = \c,size -> mk3Dig c (c + "o") size ;
|
||||
mk3Dig : Str -> Str -> NumSize -> TDigit = \c,o,size -> mk4Dig c o Pl size ;
|
||||
mk2Dig : Str -> NumSize -> TDigit = \c,size -> mk3Dig c (c + "o") size ;
|
||||
|
||||
mk4Dig : Str -> Str -> Number -> Size -> TDigit = \c,o,n,size -> {
|
||||
mk4Dig : Str -> Str -> Number -> NumSize -> TDigit = \c,o,n,size -> {
|
||||
s = c ; ---- gender
|
||||
n = n ;
|
||||
size = size
|
||||
@@ -265,7 +265,7 @@ lin pot3plus n m =
|
||||
TDigit = {
|
||||
n : Number ;
|
||||
s : Str ;
|
||||
size : Size
|
||||
size : NumSize
|
||||
} ;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,608 +1,200 @@
|
||||
--# -path=.:../abstract:../../prelude:../common
|
||||
resource ParadigmsRus = open CatRus, ResRus, (R=ResRus), ParamRus, (Z=ZaliznyakAlgo), Prelude in {
|
||||
|
||||
--1 Russian Lexical Paradigms
|
||||
--
|
||||
-- Janna Khegai 2003--2006
|
||||
--
|
||||
-- This is an API for the user of the resource grammar
|
||||
-- for adding lexical items. It gives functions for forming
|
||||
-- expressions of open categories: nouns, adjectives, verbs.
|
||||
--
|
||||
-- Closed categories (determiners, pronouns, conjunctions) are
|
||||
-- accessed through the resource syntax API, $Structural.gf$.
|
||||
--
|
||||
-- The main difference with $MorphoRus.gf$ is that the types
|
||||
-- referred to are compiled resource grammar types. We have moreover
|
||||
-- had the design principle of always having existing forms, rather
|
||||
-- than stems, as string arguments of the paradigms.
|
||||
--
|
||||
-- The structure of functions for each word class $C$ is the following:
|
||||
-- first we give a handful of patterns that aim to cover all
|
||||
-- regular cases. Then we give a worst-case function $mkC$, which serves as an
|
||||
-- escape to construct the most irregular words of type $C$.
|
||||
--
|
||||
-- The following modules are presupposed:
|
||||
|
||||
resource ParadigmsRus = open
|
||||
Prelude,
|
||||
MorphoRus,
|
||||
CatRus,
|
||||
NounRus
|
||||
in {
|
||||
|
||||
flags coding=utf8 ;
|
||||
|
||||
--2 Parameters
|
||||
--
|
||||
-- To abstract over gender names, we define the following identifiers.
|
||||
----------------
|
||||
-- Parameters
|
||||
|
||||
oper
|
||||
Gender : Type ; -- Parameter for mkN*
|
||||
masculine : Gender ;
|
||||
feminine : Gender ;
|
||||
neuter : Gender ;
|
||||
singular : Number
|
||||
= Sg ;
|
||||
plural : Number
|
||||
= Pl ;
|
||||
|
||||
-- To abstract over case names, we define the following.
|
||||
Case : Type ; -- Parameter for mkPrep, mkA2, mkV2, mkV3
|
||||
masculine : Gender
|
||||
= Masc ;
|
||||
feminine : Gender
|
||||
= Fem ;
|
||||
neuter : Gender
|
||||
= Neut ;
|
||||
|
||||
nominative : Case ;
|
||||
genitive : Case ;
|
||||
dative : Case ;
|
||||
accusative : Case ;
|
||||
instructive : Case ;
|
||||
prepositional : Case ;
|
||||
short : ShortFormPreference
|
||||
= PrefShort ;
|
||||
full : ShortFormPreference
|
||||
= PrefFull ;
|
||||
|
||||
-- In some (written in English) textbooks accusative case
|
||||
-- is put on the second place. However, we follow the case order
|
||||
-- standard for Russian textbooks.
|
||||
animate : Animacy
|
||||
= Animate ;
|
||||
inanimate : Animacy
|
||||
= Inanimate ;
|
||||
|
||||
-- To abstract over number names, we define the following.
|
||||
Number : Type ; -- Parameter for mkPN
|
||||
nominative : Case
|
||||
= Nom ;
|
||||
genitive : Case
|
||||
= Gen ;
|
||||
dative : Case
|
||||
= Dat ;
|
||||
accusative : Case
|
||||
= Acc ;
|
||||
instrumental : Case
|
||||
= Ins ;
|
||||
prepositional : Case
|
||||
= Pre ;
|
||||
|
||||
singular : Number ;
|
||||
plural : Number ;
|
||||
-- "Minor" cases:
|
||||
|
||||
--2 Nouns
|
||||
locative : Case
|
||||
= Loc ;
|
||||
partitive : Case
|
||||
= Ptv ;
|
||||
vocative : Case
|
||||
= VocRus ;
|
||||
|
||||
Animacy : Type ; -- Parameter for mkN, mkPN
|
||||
positive : Degree
|
||||
= Posit ;
|
||||
comparative : Degree
|
||||
= Compar ;
|
||||
superlative : Degree
|
||||
= Superl ;
|
||||
|
||||
animate : Animacy;
|
||||
inanimate : Animacy;
|
||||
perfective : Aspect
|
||||
= Perfective ;
|
||||
imperfective : Aspect
|
||||
= Imperfective ;
|
||||
|
||||
-- Indeclinabe nouns: "кофе", "пальто", "ВУЗ".
|
||||
transitive : Transitivity
|
||||
= Transitive ;
|
||||
intransitive : Transitivity
|
||||
= Intransitive ;
|
||||
|
||||
mkIndeclinableNoun: Str -> Gender -> Animacy -> N ;
|
||||
------------------------------
|
||||
-- Nouns
|
||||
|
||||
mkNAltPl: Str -> Str -> Gender -> Animacy -> N ;
|
||||
|
||||
mkN : overload {
|
||||
|
||||
-- The regular function captures the variants for some common noun endings.
|
||||
|
||||
mkN : (karta : Str) -> N ;
|
||||
mkN : (tigr : Str) -> Animacy -> N ;
|
||||
|
||||
-- Worst case - give six singular forms:
|
||||
-- Nominative, Genetive, Dative, Accusative, Instructive and Prepositional;
|
||||
-- and the prepositional form after в and на, and
|
||||
-- the corresponding six plural forms and the gender and animacy.
|
||||
|
||||
mkN : (nomSg, genSg, datSg, accSg, instSg, preposSg, prepos2Sg, nomPl, genPl, datPl, accPl, instPl, preposPl : Str) -> Gender -> Animacy -> N -- Worst case - give six singular forms: Nominative, Genetive, Dative, Accusative, Instructive and Prepositional; and the prepositional form after в and на, and the corresponding six plural forms and the gender and animacy.
|
||||
mkN = overload {
|
||||
mkN : (nom : Str) -> N
|
||||
= \nom -> lin N (guessNounForms nom) ;
|
||||
mkN : Str -> Gender -> Animacy -> N
|
||||
= \nom, g, a -> lin N (guessLessNounForms nom g a) ;
|
||||
mkN : Str -> Gender -> Animacy -> Z.ZNIndex -> N
|
||||
= \word, g, a, z -> lin N (noMinorCases (Z.makeNoun word g a z)) ;
|
||||
mkN : Str -> Gender -> Animacy -> Str -> N
|
||||
= \word, g, a, zi -> lin N (noMinorCases (Z.makeNoun word g a (Z.parseIndex zi))) ;
|
||||
mkN : A -> Gender -> Animacy -> N
|
||||
= \a, g, anim -> lin N (makeNFFromAF a g anim) ;
|
||||
} ;
|
||||
|
||||
mkN2 : overload {
|
||||
|
||||
-- Genitive with no preposition.
|
||||
|
||||
mkN2 : N -> N2 ;
|
||||
mkN2 : N -> Prep -> N2 ;
|
||||
mkN2 = overload {
|
||||
mkN2 : N -> N2
|
||||
= \n -> lin N2 (mkFun n nullPrep) ;
|
||||
mkN2 : N -> Prep -> N2
|
||||
= \n, p -> lin N2 (mkFun n p) ;
|
||||
mkN2 : Str -> Gender -> Animacy -> Str -> Prep -> N2
|
||||
= \word, g, a, zi, p -> lin N2 (mkFun (noMinorCases (Z.makeNoun word g a (Z.parseIndex zi))) p) ;
|
||||
} ;
|
||||
|
||||
nullPrep : Prep = lin Prep {s=[]; c=Gen; hasPrep=False} ;
|
||||
|
||||
mkN3 : N -> Prep -> Prep -> N3 ;
|
||||
mkN3 = overload {
|
||||
mkN3 : N -> Prep -> Prep -> N3
|
||||
= \n, p2, p3 -> lin N3 (mkFun2 n p2 p3) ;
|
||||
mkN3 : Str -> Gender -> Animacy -> Str -> Prep -> Prep -> N3
|
||||
= \word, g, a, zi, p2, p3 -> lin N3 (mkFun2 (noMinorCases (Z.makeNoun word g a (Z.parseIndex zi))) p2 p3) ;
|
||||
} ;
|
||||
|
||||
-- Proper names.
|
||||
mkPN = overload {
|
||||
mkPN : N -> PN
|
||||
= \n -> lin PN n ;
|
||||
mkPN : (nom : Str) -> PN
|
||||
= \nom -> lin PN (guessNounForms nom) ;
|
||||
mkPN : Str -> Gender -> Animacy -> PN
|
||||
= \nom, g, a -> lin PN (guessLessNounForms nom g a) ;
|
||||
mkPN : Str -> Gender -> Animacy -> Z.ZNIndex -> PN
|
||||
= \word, g, a, z -> lin PN (noMinorCases (Z.makeNoun word g a z)) ;
|
||||
mkPN : Str -> Gender -> Animacy -> Str -> PN
|
||||
= \word, g, a, zi -> lin PN (noMinorCases (Z.makeNoun word g a (Z.parseIndex zi))) ;
|
||||
} ;
|
||||
|
||||
mkPN : Str -> Gender -> Number -> Animacy -> PN ; -- "Иван", "Маша"
|
||||
nounPN : N -> PN ;
|
||||
|
||||
|
||||
--2 Adjectives
|
||||
|
||||
-- Non-comparison (only positive degree) one-place adjectives need 28 (4 by 7)
|
||||
-- forms in the worst case:
|
||||
|
||||
|
||||
-- (Masculine | Feminine | Neutral | Plural) *
|
||||
|
||||
-- (Nominative | Genitive | Dative | Accusative Inanimate | Accusative Animate |
|
||||
-- Instructive | Prepositional)
|
||||
|
||||
|
||||
-- Notice that 4 short forms, which exist for some adjectives are not included
|
||||
-- in the current description, otherwise there would be 32 forms for
|
||||
-- positive degree.
|
||||
|
||||
mkA : overload {
|
||||
|
||||
-- Regular and invariant adjectives with regular comparative.
|
||||
|
||||
mkA : (positive : Str) -> A ;
|
||||
|
||||
-- Adjectives with irregular comparative.
|
||||
|
||||
mkA : (positive, comparative : Str) -> A ;
|
||||
---------------------
|
||||
-- Adjectives
|
||||
|
||||
mkA = overload {
|
||||
mkA : Str -> A
|
||||
= \nom -> lin A (guessAdjectiveForms nom) ;
|
||||
mkA : Str -> Str -> A
|
||||
= \nom, comp -> lin A ((guessAdjectiveForms nom) ** {comp=comp}) ;
|
||||
mkA : Str -> Str -> Str -> A
|
||||
= \nom, comp, zi -> lin A (makeAdjectiveForms nom comp zi PrefFull) ;
|
||||
mkA : Str -> Str -> Str -> ShortFormPreference -> A
|
||||
= \nom, comp, zi, spf -> lin A (makeAdjectiveForms nom comp zi spf) ;
|
||||
} ;
|
||||
|
||||
-- Two-place adjectives need a preposition and a case as extra arguments.
|
||||
|
||||
mkA2 : A -> Str -> Case -> A2 ; -- "делим на"
|
||||
-- TODO: ? mkA2 : A -> Str -> Case -> A2 ; -- "делим на"
|
||||
mkA2 : A -> Prep -> A2
|
||||
= \a,p -> lin A2 (a ** {c = p}) ;
|
||||
|
||||
-- Comparison adjectives need a positive adjective
|
||||
-- (28 forms without short forms).
|
||||
-- Taking only one comparative form (non-syntactic) and
|
||||
-- only one superlative form (syntactic) we can produce the
|
||||
-- comparison adjective with only one extra argument -
|
||||
-- non-syntactic comparative form.
|
||||
-- Syntactic forms are based on the positive forms.
|
||||
mkOrd = overload { -- ord from adj. TODO: This shadows mkOrd from constructors...
|
||||
mkOrd : (nom : Str) -> Ord
|
||||
= \nom -> lin Ord (guessAdjectiveForms nom) ;
|
||||
} ;
|
||||
|
||||
-------------------------
|
||||
-- Verbs
|
||||
|
||||
-- mkADeg : A -> Str -> ADeg ;
|
||||
mkV = overload {
|
||||
mkV : Str -> Str -> V
|
||||
= \inf,sg1 -> lin V (guessVerbForms Perfective Transitive inf sg1 (Z.sg1StemFromVerb sg1 + "ет")) ;
|
||||
mkV : Str -> Str -> Str -> V
|
||||
= \inf,sg1,sg3 -> lin V (guessVerbForms Perfective Transitive inf sg1 sg3) ;
|
||||
mkV : Aspect -> Str -> Str -> V
|
||||
= \asp,inf,sg1 -> lin V (guessVerbForms asp Transitive inf sg1 (Z.sg1StemFromVerb sg1 + "ет")) ;
|
||||
mkV : Aspect -> Str -> Str -> Str -> V
|
||||
= \asp,inf,sg1,sg3 -> lin V (guessVerbForms asp Transitive inf sg1 sg3) ;
|
||||
mkV : Aspect -> Transitivity -> Str -> Str -> V
|
||||
= \asp,tran,inf,sg1 -> lin V (guessVerbForms asp tran inf sg1 (Z.sg1StemFromVerb sg1 + "ет")) ;
|
||||
mkV : Aspect -> Transitivity -> Str -> Str -> Str -> V
|
||||
= \asp,tran,inf,sg1,sg3 -> lin V (guessVerbForms asp tran inf sg1 sg3) ;
|
||||
mkV : Aspect -> Transitivity -> Str -> Str -> Str -> Str -> V
|
||||
= \asp,tran,inf,sg1,sg3,zv -> lin V (Z.makeVerb inf sg1 sg3 (Z.parseVerbIndex zv) asp tran (Z.infStemFromVerb inf).p2 ) ;
|
||||
} ;
|
||||
|
||||
-- On top level, there are adjectival phrases. The most common case is
|
||||
-- just to use a one-place adjective.
|
||||
-- ap : A -> IsPostfixAdj -> AP ;
|
||||
mkV2 = overload {
|
||||
mkV2 : V -> V2
|
||||
= \vf -> lin V2 (vf ** {c={s=[] ; c=Acc ; hasPrep=False}}) ;
|
||||
mkV2 : V -> Case -> V2
|
||||
= \vf, c -> lin V2 (vf ** {c={s=[] ; c=c ; hasPrep=False}}) ;
|
||||
mkV2 : V -> Prep -> V2
|
||||
= \vf, prep -> lin V2 (vf ** {c=prep}) ;
|
||||
} ;
|
||||
|
||||
--2 Adverbs
|
||||
mkV3 = overload {
|
||||
mkV3 : V -> Case -> Case -> V3 -- "сложить письмо в конверт"
|
||||
= \vf, cas1, cas2 -> lin V3 (vf ** {c={s=[] ; c=cas1 ; hasPrep=False} ; c2={s=[] ; c=cas2 ; hasPrep=False}} ) ;
|
||||
mkV3 : V -> Prep -> Prep -> V3 -- "сложить письмо в конверт"
|
||||
= \vf, prep1, prep2 -> lin V3 (vf ** {c=prep1 ; c2=prep2} ) ;
|
||||
} ;
|
||||
|
||||
-- Adverbs are not inflected.
|
||||
|
||||
mkAdv : Str -> Adv ;
|
||||
|
||||
--2 Prepositions
|
||||
mkPrep : Str -> Case -> Prep ; -- as in German
|
||||
|
||||
--2 Verbs
|
||||
--
|
||||
-- In our lexicon description ("Verbum") there are 62 forms:
|
||||
-- 2 (Voice) by { 1 (infinitive) + [2(number) by 3 (person)](imperative) +
|
||||
-- [ [2(Number) by 3(Person)](present) + [2(Number) by 3(Person)](future) +
|
||||
-- 4(GenNum)(past) ](indicative)+ 4 (GenNum) (subjunctive) }
|
||||
-- Participles (Present and Past) and Gerund forms are not included,
|
||||
-- since they fuction more like Adjectives and Adverbs correspondingly
|
||||
-- rather than verbs. Aspect is regarded as an inherent parameter of a verb.
|
||||
-- Notice, that some forms are never used for some verbs.
|
||||
|
||||
Voice : Type ; -- Parameter to mkV*
|
||||
active : Voice ;
|
||||
passive : Voice ;
|
||||
|
||||
Aspect : Type ; -- Parameter to mkV*
|
||||
imperfective : Aspect ;
|
||||
perfective : Aspect ;
|
||||
|
||||
Conjugation : Type ; -- Parameter to mkV*
|
||||
first : Conjugation ; -- "гуля-Ешь, гуля-Ем"
|
||||
firstE : Conjugation ; -- Verbs with vowel "ё": "даёшь" (give), "пьёшь" (drink)
|
||||
second : Conjugation ; -- "вид-Ишь, вид-Им"
|
||||
mixed : Conjugation ; -- "хоч-Ешь - хот-Им"
|
||||
dolzhen : Conjugation ; -- irregular
|
||||
foreign: Conjugation; -- deprecated, not needed
|
||||
|
||||
Bool: Type;
|
||||
true: Bool;
|
||||
false: Bool;
|
||||
|
||||
-- Common conjugation patterns are two conjugations:
|
||||
-- first - verbs ending with "-ать/-ять" and second - "-ить/-еть".
|
||||
-- Instead of 6 present forms of the worst case, we only need
|
||||
-- a present stem and one ending (singular, first person):
|
||||
-- "я люб-лю", "я жд-у", etc. To determine where the border
|
||||
-- between stem and ending lies it is sufficient to compare
|
||||
-- first person from with second person form:
|
||||
-- "я люб-лю", "ты люб-ишь". Stems shoud be the same.
|
||||
-- So the definition for verb "любить" looks like:
|
||||
-- regV Imperfective Second "люб" "лю" "любил" "люби" "любить";
|
||||
|
||||
regV : Aspect -> Conjugation -> (stemPresSg1,endPresSg1,pastSg1,imp,inf : Str) -> V ; -- Example for verb "любить": `regV Imperfective Second "люб" "лю" "любил" "люби" "любить"`
|
||||
|
||||
-- The worst case need 6 forms of the present tense in indicative mood
|
||||
-- ("я бегу", "ты бежишь", "он бежит", "мы бежим", "вы бежите", "они бегут"),
|
||||
-- a past form (singular, masculine: "я бежал"), an imperative form
|
||||
-- (singular, second person: "беги"), an infinitive ("бежать").
|
||||
-- Inherent aspect should also be specified.
|
||||
|
||||
-- mkVerbum : Aspect -> (presentSgP1,presentSgP2,presentSgP3,
|
||||
mkV : Aspect -> (presSg1,presSg2,presSg3,presPl1,presPl2,presPl3,pastSgMasc,imp,inf: Str) -> V ; -- The worst case need 6 forms of the present tense in indicative mood ("я бегу", "ты бежишь", "он бежит", "мы бежим", "вы бежите", "они бегут"), a past form (singular, masculine: "я бежал"), an imperative form (singular, second person: "беги"), an infinitive ("бежать"). Inherent aspect should also be specified.
|
||||
|
||||
|
||||
|
||||
|
||||
-- Two-place verbs, and the special case with direct object. Notice that
|
||||
-- a particle can be included in a $V$.
|
||||
|
||||
mkV2 : V -> Str -> Case -> V2 ; -- "войти в дом"; "в", accusative
|
||||
mkV3 : V -> Str -> Str -> Case -> Case -> V3 ; -- "сложить письмо в конверт"
|
||||
mkVS : V -> VS ;
|
||||
mkVQ : V -> VQ ;
|
||||
mkV2V : V -> Str -> Case -> V2V ;
|
||||
mkV2S : V -> Str -> Case -> V2S ;
|
||||
mkV2Q : V -> Str -> Case -> V2Q ;
|
||||
mkV2A : V -> Str -> Case -> V2A ;
|
||||
|
||||
dirV2 : V -> V2 ; -- "видеть", "любить"
|
||||
dirV2 : V -> V2 ;
|
||||
dirV2 v = mkV2 v Acc ;
|
||||
tvDirDir : V -> V3 ;
|
||||
tvDirDir v = mkV3 v Acc Dat ;
|
||||
|
||||
-- The definitions should not bother the user of the API. So they are
|
||||
-- hidden from the document.
|
||||
--.
|
||||
Gender = MorphoRus.Gender ;
|
||||
Case = MorphoRus.Case ;
|
||||
Number = MorphoRus.Number ;
|
||||
Animacy = MorphoRus.Animacy;
|
||||
Aspect = MorphoRus.Aspect;
|
||||
Voice = MorphoRus.Voice ;
|
||||
--Tense = Tense ;
|
||||
Bool = Prelude.Bool ;
|
||||
Conjugation = MorphoRus.Conjugation;
|
||||
first = First ;
|
||||
firstE = FirstE ;
|
||||
second = Second ;
|
||||
secondA = SecondA ;
|
||||
mixed = Mixed ;
|
||||
dolzhen = Dolzhen;
|
||||
foreign = Foreign; -- deprecated. Not needed
|
||||
------------------------
|
||||
-- Adverbs, prepositions, conjunctions, ...
|
||||
|
||||
true = True;
|
||||
false = False ;
|
||||
masculine = Masc ;
|
||||
feminine = Fem ;
|
||||
neuter = Neut ;
|
||||
nominative = Nom ;
|
||||
accusative = Acc ;
|
||||
dative = Dat ;
|
||||
genitive = Gen ;
|
||||
instructive = Inst ;
|
||||
prepositional = Prepos PrepOther ; -- FIXME: not correct for v and na
|
||||
singular = Sg ;
|
||||
plural = Pl ;
|
||||
animate = Animate ;
|
||||
inanimate = Inanimate ;
|
||||
active = Act ;
|
||||
passive = Pass ;
|
||||
imperfective = Imperfective ;
|
||||
perfective = Perfective ;
|
||||
-- present = Present ;
|
||||
--past = Past ;
|
||||
Degree = Posit | Compar | Superl ;
|
||||
mkAdv : Str -> Adv
|
||||
= \s -> lin Adv (makeAdverb s) ;
|
||||
|
||||
-- Person = P1 | P2 | P3 ;
|
||||
-- AfterPrep = Yes | No ;
|
||||
-- Possessive = NonPoss | Poss GenNum ;
|
||||
mkIAdv : Str -> IAdv
|
||||
= \s -> lin IAdv (makeAdverb s) ;
|
||||
|
||||
-- Noun definitions
|
||||
|
||||
mkN = overload {
|
||||
mkN : (karta : Str) -> N = mk1N ;
|
||||
mkN : (tigr : Str) -> Animacy -> N = \nom, anim -> case anim of { Animate => lin N (nAnimate (mk1N nom)) ;
|
||||
Inanimate => mk1N nom } ;
|
||||
mkN : (nomSg, genSg, datSg, accSg, instSg, preposSg, prepos2Sg,
|
||||
nomPl, genPl, datPl, accPl, instPl, preposPl : Str) -> Gender -> Animacy -> N = mkWorstN
|
||||
mkConj = overload {
|
||||
mkConj : Str -> Number -> Conj
|
||||
= \s, n -> lin Conj {s1 = [] ; s2 = s ; n = n} ;
|
||||
mkConj : Str -> Str -> Number -> Conj
|
||||
= \s1, s2, n -> lin Conj {s1 = s1 ; s2 = s2 ; n = n} ;
|
||||
} ;
|
||||
|
||||
mkIndeclinableNoun = \s,g, anim ->
|
||||
{
|
||||
s = table { NF _ _ _ => s } ;
|
||||
g = g ;
|
||||
anim = anim
|
||||
} ** {lock_N = <>};
|
||||
mkInterj : Str -> Interj
|
||||
= \s -> lin Interj {s = s} ;
|
||||
|
||||
mkNAltPl = \s, alt, g, anim ->
|
||||
let {singular = mkN s ; plural = mkN alt} in {
|
||||
s = table { NF Sg c size => singular.s ! NF Sg c size;
|
||||
NF Pl c nom => singular.s ! NF Sg c nom;
|
||||
NF Pl c nompl => plural.s ! NF Sg c nompl;
|
||||
NF Pl c sgg => plural.s ! NF Sg c sgg;
|
||||
NF Pl c plg => plural.s ! NF Pl c plg } ;
|
||||
g = g ;
|
||||
anim = anim
|
||||
} ** {lock_N = <>};
|
||||
|
||||
oper mkWorstN : (nomSg, genSg, datSg, accSg, instSg, preposSg, prepos2Sg,
|
||||
nomPl, genPl, datPl, accPl, instPl, preposPl : Str) -> Gender -> Animacy -> N
|
||||
= \nomSg, genSg, datSg, accSg, instSg, preposSg, prepos2Sg,
|
||||
nomPl, genPl, datPl, accPl, instPl, preposPl, g, anim ->
|
||||
{
|
||||
s = table {
|
||||
NF Sg Nom _ => nomSg ;
|
||||
NF Sg Gen _ => genSg ;
|
||||
NF Sg Dat _ => datSg ;
|
||||
NF Sg Acc _ => accSg ;
|
||||
NF Sg Inst _ => instSg ;
|
||||
NF Sg (Prepos PrepOther) _ => preposSg ;
|
||||
NF Sg (Prepos PrepVNa) _ => prepos2Sg ;
|
||||
NF Pl Nom _ => nomPl ;
|
||||
NF Pl Gen _ => genPl ;
|
||||
NF Pl Dat _ => datPl ;
|
||||
NF Pl Acc _ => accPl ;
|
||||
NF Pl Inst _ => instPl ;
|
||||
NF Pl (Prepos _) _ => preposPl
|
||||
} ;
|
||||
g = g ;
|
||||
anim = anim
|
||||
} ** {lock_N = <>} ;
|
||||
|
||||
oper mk1N : Str -> N = \x ->
|
||||
case x of {
|
||||
stem+"онок" => nDecl10Hard stem ;
|
||||
stem+"ёнок" => nDecl10Soft stem ;
|
||||
-- stem+"aнин" => nDecl11 stem ;
|
||||
stem@(_+"и")+"й" => nDecl7Masc stem;
|
||||
stem@(_+"и")+"я" => nDecl7Fem stem;
|
||||
stem@(_+"и")+"е" => nDecl7Neut stem;
|
||||
stem+"ее" => nAdj { s = (mk1A (stem+"ий")).s!Posit } Neut;
|
||||
stem+"ое" => nAdj { s = (mk1A (stem+(iAfter stem)+"й")).s!Posit } Neut;
|
||||
stem+"мя" => nDecl9 stem ;
|
||||
stem@(_+("а"|"е"|"ё"|"о"|"у"|"ы"|"э"|"ю"|"я"))+"й" => nDecl6Masc stem ;
|
||||
stem@(_+("а"|"е"|"ё"|"о"|"у"|"ы"|"э"|"ю"|"я"))+"е" => nDecl6Neut stem ;
|
||||
stem@(_+("а"|"е"|"ё"|"о"|"у"|"ы"|"э"|"ю"|"я"))+"я" => nDecl6Fem stem ;
|
||||
stem@(_+("ч"|"щ"|"ш"|"ж"|"п"|"эн"|"м"|"ф"))+"ь" => nDecl8 stem ;
|
||||
stem@(_+("д"|"т"|"ст"|"с"|"в"|"б"))+"ь" => nDecl8 stem ;
|
||||
stem@(_+"ш"|"ж"|"ч"|"щ"|"ц")+"е" => nRegHardNeut stem;
|
||||
stem+"е" => nRegSoftNeut stem ;
|
||||
stem+"я" => nRegSoftFem stem ;
|
||||
stem+"ь" => nRegSoftMasc stem ;
|
||||
stem+"о" => nRegHardNeut stem ;
|
||||
stem+"а" => nRegHardFem stem ;
|
||||
stem => nRegHardMasc stem
|
||||
} ** {lock_N = <>} ;
|
||||
|
||||
|
||||
|
||||
-- An individual-valued function is a common noun together with the
|
||||
-- preposition prefixed to its argument ("клZ+ о' дома").
|
||||
-- The situation is analogous to two-place adjectives and transitive verbs.
|
||||
--
|
||||
-- We allow the genitive construction to be used as a variant of
|
||||
-- all function applications. It would definitely be too restrictive only
|
||||
-- to allow it when the required case is genitive. We don't know if there
|
||||
-- are counterexamples to the liberal choice we've made.
|
||||
|
||||
oper mkN2 = overload {
|
||||
mkN2 : N -> N2 = \n -> mkFun n nullPrep ;
|
||||
mkN2 : N -> Prep -> N2 = mkFun;
|
||||
} ;
|
||||
|
||||
mkFun : N -> Prep -> N2 = \f,p -> f ** {c2 = p ; lock_N2 = <>} ;
|
||||
|
||||
nullPrep : Prep = {s = []; c= Gen; lock_Prep=<>} ;
|
||||
|
||||
mkN3 f p2 p3 = f ** {c2 = p2; c3 = p3; lock_N3 = <>} ;
|
||||
|
||||
|
||||
-- mkPN = \ivan, g, n, anim ->
|
||||
-- case n of {
|
||||
-- Sg => case g of {
|
||||
-- Masc => mkProperNameMasc ivan anim ;
|
||||
-- Fem => mkProperNameFem ivan anim ;
|
||||
-- _ => mkProperNameMasc ivan anim
|
||||
-- } ;
|
||||
-- Pl => mkProperNamePl ivan anim
|
||||
-- } ** {lock_PN =<>};
|
||||
|
||||
mkPN ivan g n anim = nounPN (mk1N ivan);
|
||||
|
||||
nounPN n = {s=\\c => n.s! NF Sg c nom; anim=n.anim; g=n.g; lock_PN=<>};
|
||||
|
||||
-- On the top level, it is maybe $CN$ that is used rather than $N$, and
|
||||
-- $NP$ rather than $PN$.
|
||||
|
||||
makeCN : N -> CN ;
|
||||
makeNP : Str -> Gender -> Animacy -> NP ;
|
||||
|
||||
|
||||
makeCN = UseN;
|
||||
|
||||
makeNP = \x,y,z -> UsePN (mkPN x y singular z) ;
|
||||
|
||||
mkA = overload {
|
||||
mkA : (positive : Str) -> A = mk1A ;
|
||||
mkA : (positive : Str) -> AdjType -> A = mk1Ab ;
|
||||
mkA : (positive, shortMasc, shortFem, shortNeut, shortPl : Str) -> A = mk3A ; -- to make correct short forms (Liza Zimina 04/2018)
|
||||
mkA : (positive, comparative : Str) -> A = mk2A ;
|
||||
mkA : (positive : Str) -> ShortFormPreference -> A = mk4A ; -- adjectives preferring full forms in conjunction
|
||||
-- (e.g. "он классический и элегантный" vs "он классический и элегантен") Liza Zimina 04/2018
|
||||
mkA : (positive : Str) -> Bool -> A = mk5A ; -- postfix adjectives (e.g. "цвета кости") Liza Zimina 04/2018
|
||||
} ;
|
||||
|
||||
mk1A : Str -> A = \positive ->
|
||||
let stem = Predef.tk 2 positive in mk2A positive (stem+"ее") ;
|
||||
|
||||
mk2A : Str -> Str -> A = \positive, comparative ->
|
||||
case positive of {
|
||||
stem+"ый" => mkAdjDeg (aRegHard StemStress Qual stem) comparative ;
|
||||
stem+"ой" => mkAdjDeg (aRegHard EndStress Qual stem) comparative ;
|
||||
stem@(_+("г"|"к"|"х"))+"ий" => mkAdjDeg (aRegHard StemStress Qual stem) comparative;
|
||||
stem@(_+("ш"|"ж"|"ч"|"щ"))+"ий" => mkAdjDeg (aRegHard StemStress Qual stem) comparative;
|
||||
stem+"ий" => mkAdjDeg (aRegSoft Qual stem) comparative ;
|
||||
stem => mkAdjDeg (adjInvar stem) comparative
|
||||
} ;
|
||||
|
||||
mk1Ab : Str -> AdjType -> A = \positive, at ->
|
||||
let { stem = Predef.tk 2 positive;
|
||||
comparative = stem + "ее"
|
||||
} in case positive of {
|
||||
stem+"ый" => mkAdjDeg (aRegHard StemStress at stem) comparative ;
|
||||
stem+"ой" => mkAdjDeg (aRegHard EndStress at stem) comparative ;
|
||||
stem@(_+("г"|"к"|"х"))+"ий" => mkAdjDeg (aRegHard StemStress at stem) comparative;
|
||||
stem@(_+("ш"|"ж"|"ч"|"щ"))+"ий" => mkAdjDeg (aRegHard StemStress at stem) comparative;
|
||||
stem+"ий" => mkAdjDeg (aRegSoft at stem) comparative ;
|
||||
stem => mkAdjDeg (adjInvar stem) comparative
|
||||
} ;
|
||||
|
||||
|
||||
-- khaki, mini, hindi, netto
|
||||
adjInvar : Str -> Adjective = \stem -> { s = \\_ => stem } ;
|
||||
|
||||
oper mkAdjDeg: Adjective -> Str -> A = \adj, s ->
|
||||
{s = table
|
||||
{
|
||||
Posit => adj.s ;
|
||||
Compar => \\af => s ;
|
||||
Superl => \\af => samuj.s !af ++ adj.s ! af
|
||||
} ;
|
||||
p = False ;
|
||||
preferShort = PrefShort
|
||||
} ** {lock_A = <>};
|
||||
|
||||
oper mkAdjDegFull: Adjective -> Str -> ShortFormPreference -> A = \adj, s,sfp ->
|
||||
{s = table
|
||||
{
|
||||
Posit => adj.s ;
|
||||
Compar => \\af => s ;
|
||||
Superl => \\af => samuj.s !af ++ adj.s ! af
|
||||
} ;
|
||||
p = False ;
|
||||
preferShort = sfp
|
||||
} ** {lock_A = <>};
|
||||
|
||||
|
||||
oper mkParticiple : Voice -> VTense -> V -> A = \voice, tense, v ->
|
||||
let vstem = verbStem v in
|
||||
let actpres = verbHasEnding v in
|
||||
let actpast = stemHasEnding vstem in
|
||||
let passpast = case hasConj v of {
|
||||
(First|FirstE) => "ем" ;
|
||||
(Second|SecondA) => "им" ;
|
||||
_ => "ем"
|
||||
} in
|
||||
case <voice, tense> of {
|
||||
<Act, VPresent _> => mkA (vstem + actpres + "ий") ;
|
||||
<Act, VPast> => mkA (vstem + actpast + "ий") ;
|
||||
<Pass, VPresent _> => mkA (vstem + "нный") ;
|
||||
<Pass, VPast> => mkA (vstem + passpast + "ый") ;
|
||||
_ => mkA "" -- Russian participles do not have a future tense
|
||||
} ;
|
||||
|
||||
oper mkActPresParticiple : V -> A = mkParticiple Act (VPresent P3) ;
|
||||
oper mkActPastParticiple : V -> A = mkParticiple Act (VPresent P3) ;
|
||||
oper mkPassPresParticiple : V -> A = mkParticiple Pass VPast ;
|
||||
oper mkPassPastParticiple : V -> A = mkParticiple Pass VPast ;
|
||||
|
||||
oper mkGerund : VTense -> V -> Adv = \tense, v ->
|
||||
let vstem = verbStem v in
|
||||
let suffix = case hasConj v of {
|
||||
SecondA => "а" ;
|
||||
_ => "я"
|
||||
} in
|
||||
case tense of {
|
||||
VPresent _ => mkAdv (vstem + suffix) ;
|
||||
VPast => mkAdv (vstem + "в") ;
|
||||
_ => mkAdv "" -- Russian gerunds do not have a future tense
|
||||
} ;
|
||||
|
||||
mkA2 a p c= a ** {c2 = {s=p; c=c}; lock_A2 = <>};
|
||||
-- mkADeg a s = mkAdjDeg a s ** {lock_ADeg = <>}; -- defined in morpho.RusU
|
||||
|
||||
-- ap a p = mkAdjPhrase a p ** {lock_AP = <>}; -- defined in syntax module
|
||||
|
||||
mkAdv x = ss x ** {lock_Adv = <>} ;
|
||||
|
||||
-- Prepositions definitions
|
||||
mkPrep s c = {s = s ; c = c ; lock_Prep = <>} ;
|
||||
|
||||
-- Verb definitions
|
||||
|
||||
-- mkVerbum = \asp, sgP1, sgP2, sgP3, plP1, plP2, plP3,
|
||||
mkV = \asp, sgP1, sgP2, sgP3, plP1, plP2, plP3,
|
||||
sgMascPast, imperSgP2, inf -> case asp of {
|
||||
Perfective =>
|
||||
mkVerbPerfective inf imperSgP2
|
||||
(presentConj sgP1 sgP2 sgP3 plP1 plP2 plP3) (pastConj sgMascPast)
|
||||
** { lock_V=<> };
|
||||
Imperfective =>
|
||||
mkVerbImperfective inf imperSgP2
|
||||
(presentConj sgP1 sgP2 sgP3 plP1 plP2 plP3) (pastConj sgMascPast)
|
||||
** { lock_V=<> }
|
||||
};
|
||||
|
||||
oper presentConj: (_,_,_,_,_,_: Str) -> PresentVerb =
|
||||
\sgP1, sgP2, sgP3, plP1, plP2, plP3 ->
|
||||
table {
|
||||
PRF (GSg _) P1 => sgP1 ;
|
||||
PRF (GSg _) P2 => sgP2 ;
|
||||
PRF (GSg _) P3 => sgP3 ;
|
||||
PRF APl P1 => plP1 ;
|
||||
PRF APl P2 => plP2 ;
|
||||
PRF APl P3 => plP3
|
||||
};
|
||||
|
||||
regV a b c d e f g = verbDecl a b c d e f g ** {lock_V = <>} ;
|
||||
-- defined in morpho.RusU.gf
|
||||
{-
|
||||
mkV a b = extVerb a b ** {lock_V = <>}; -- defined in types.RusU.gf
|
||||
|
||||
mkPresentV = \aller, vox ->
|
||||
{ s = table {
|
||||
VFin gn p => aller.s ! VFORM vox (VIND (VPresent (numGNum gn) p)) ;
|
||||
VImper n p => aller.s ! VFORM vox (VIMP n p) ;
|
||||
VInf => aller.s ! VFORM vox VINF ;
|
||||
VSubj gn => aller.s ! VFORM vox (VSUB gn)
|
||||
}; t = Present ; a = aller.asp ; w = vox ; lock_V = <>} ;
|
||||
-}
|
||||
mkV2 v p cas = v ** {c2 = {s=p; c=cas}; lock_V2 = <>};
|
||||
dirV2 v = mkV2 v [] Acc;
|
||||
|
||||
|
||||
tvDirDir v = mkV3 v "" "" Acc Dat;
|
||||
|
||||
-- *Ditransitive verbs* are verbs with three argument places.
|
||||
-- We treat so far only the rule in which the ditransitive
|
||||
-- verb takes both complements to form a verb phrase.
|
||||
|
||||
mkV3 v s1 s2 c1 c2 = v ** {c2 = {s=s1; c=c1}; c3={s=s2; c=c2}; lock_V3 = <>};
|
||||
|
||||
mkVS v = v ** {lock_VS = <>} ;
|
||||
mkVQ v = v ** {lock_VQ = <>} ;
|
||||
mkV2V v p cas = v ** {c2 = {s=p; c=cas}; lock_V2V = <>};
|
||||
mkV2S v p cas = v ** {c2 = {s=p; c=cas}; lock_V2S = <>};
|
||||
mkV2Q v p cas = v ** {c2 = {s=p; c=cas}; lock_V2Q = <>};
|
||||
mkV2A v p cas = v ** {c2 = {s=p; c=cas}; lock_V2A = <>};
|
||||
|
||||
-- Liza Zimina 04/2018: to make correct short forms of adjectives
|
||||
|
||||
mk3A : Str -> Str -> Str -> Str -> Str -> A = \positive,shortMasc,shortFem,shortNeut,shortPl ->
|
||||
let {koren = Predef.tk 2 positive ;
|
||||
comparative = koren + "ее"} in
|
||||
case positive of {
|
||||
stem+"ый" => mkAdjDeg (aRegHardWorstCase StemStress Qual stem shortMasc shortFem shortNeut shortPl) comparative ;
|
||||
stem+"ой" => mkAdjDeg (aRegHardWorstCase EndStress Qual stem shortMasc shortFem shortNeut shortPl) comparative ;
|
||||
stem@(_+("г"|"к"|"х"))+"ий" => mkAdjDeg (aRegHardWorstCase StemStress Qual stem shortMasc shortFem shortNeut shortPl) comparative;
|
||||
stem@(_+("ш"|"ж"|"ч"|"щ"))+"ий" => mkAdjDeg (aRegHardWorstCase StemStress Qual stem shortMasc shortFem shortNeut shortPl) comparative;
|
||||
stem+"ий" => mkAdjDeg (aRegSoftWorstCase Qual stem shortMasc shortFem shortNeut shortPl) comparative ;
|
||||
stem => mkAdjDeg (adjInvar stem) comparative
|
||||
} ;
|
||||
|
||||
mk4A : Str -> ShortFormPreference -> A = \positive,prefshort ->
|
||||
let {koren = Predef.tk 2 positive ;
|
||||
comparative = koren + "ее"} in
|
||||
case positive of {
|
||||
stem+"ый" => mkAdjDegFull (aRegHardFull StemStress Qual stem) comparative prefshort ;
|
||||
stem+"ой" => mkAdjDegFull (aRegHardFull EndStress Qual stem) comparative prefshort ;
|
||||
stem@(_+("г"|"к"|"х"))+"ий" => mkAdjDegFull (aRegHardFull StemStress Qual stem) comparative prefshort ;
|
||||
stem@(_+("ш"|"ж"|"ч"|"щ"))+"ий" => mkAdjDegFull (aRegHardFull StemStress Qual stem) comparative prefshort ;
|
||||
stem+"ий" => mkAdjDegFull (aRegSoftFull Qual stem) comparative prefshort ;
|
||||
stem => mkAdjDegFull (adjInvar stem) comparative prefshort
|
||||
} ;
|
||||
|
||||
mk5A : Str -> Bool -> A = \adj,postfix ->
|
||||
case postfix of {
|
||||
False => mk1A adj ;
|
||||
True => lin A {
|
||||
s = \\d,af => adj ;
|
||||
p = True ;
|
||||
preferShort = PrefFull
|
||||
}
|
||||
} ;
|
||||
} ;
|
||||
}
|
||||
98
src/russian/ParamRus.gf
Normal file
98
src/russian/ParamRus.gf
Normal file
@@ -0,0 +1,98 @@
|
||||
resource ParamRus = ParamX, CommonX [Temp] ** open Prelude in {
|
||||
-- Mostly follows https://en.wikipedia.org/wiki/List_of_glossing_abbreviations
|
||||
-- see theory.txt
|
||||
|
||||
oper
|
||||
consonant : pattern Str = #("б"|"в"|"г"|"д"|"ж"|"з"|"й"|"к"|"л"|"м"|"н"|"п"|"р"|"с"|"т"|"ф"|"х"|"ц"|"ч"|"ш"|"щ") ;
|
||||
consonant_minus : pattern Str = #("б"|"в"|"г"|"д"|"з"|"й"|"к"|"л"|"м"|"н"|"п"|"р"|"с"|"т"|"ф"|"х") ; -- шжчщц
|
||||
vowel : pattern Str = #("а"|"е"|"ё"|"и"|"о"|"у"|"ы"|"э"|"ю"|"я") ;
|
||||
vowel_but_i : pattern Str = #("а"|"е"|"ё"|"о"|"у"|"ы"|"э"|"ю"|"я") ;
|
||||
digit : pattern Str = #("0"|"1"|"2"|"3"|"4"|"5"|"6"|"7"|"8"|"9") ;
|
||||
small_num : pattern Str = #("1"|"2"|"3"|"4"|"5"|"6"|"7"|"8"|"9"|"10"|"11"|"12"|"13"|"14"|"15"|"16") ;
|
||||
stress_schema : pattern Str = #("a'"|"a"|"b'"|"b"|"c''"|"c'"|"c"|"d'"|"d"|"e"|"f''"|"f'"|"f") ;
|
||||
adj_stress_schema : pattern Str = #("b/c''"|"a/c''"|"a/b'"|"a/c'"|"b/a'"|"b/b'"|"b/c'"|"b/c"|"b/a"|"b/b"|"a/a'"|"a/a"|"a/c"|"a/b"|"a'"|"b'"|"a"|"b"|"c") ;
|
||||
verb_stress_schema : pattern Str = #("a/c'"|"b/c'"|"c/c'"|"a/c"|"b/c"|"c/c"|"a/b"|"a/c"|"b/b"|"b/c"|"c/b"|"c/c"|"a"|"b"|"c") ;
|
||||
|
||||
param
|
||||
Gender = Masc | Fem | Neut ; -- род
|
||||
Animacy = Animate | Inanimate ; -- одушевлённый / неодушевлённый
|
||||
Voice = Act | Pass ; -- залог
|
||||
Aspect = Imperfective | Perfective ; -- вид / аспект
|
||||
Reflexivity = Reflexive | NonReflexive ; -- возвратность
|
||||
Transitivity = Transitive | Intransitive ; -- возвратность
|
||||
Mood = Infinitive | Sbjv | Imperative | Ind ; -- SBJV and COND will be treated as same for now
|
||||
|
||||
GenNum = GSg Gender | GPl ; -- The plural never makes a gender distinction
|
||||
NumSize = Num1 | NumAll | Num2_4 | Num5 ; -- Num1 - Sg, NumAll - Pl, Num2_4 - "Dual"
|
||||
Agr = Ag GenNum Person ;
|
||||
|
||||
Case = Nom | Gen | Dat | Acc | Ins | Pre -- падеж, "малые падежи":
|
||||
| Loc | Ptv | VocRus ; -- "minor cases", usually Loc = Pre, Ptv = Gen, VocRus = Nom
|
||||
ShortFormPreference = PrefShort | PrefFull ;
|
||||
CopulaType = NomCopula | InsCopula | EllCopula;
|
||||
SpecialFuture = NormalFuture | BeFuture | CanFuture | WantFuture | NullFuture ;
|
||||
oper
|
||||
-- GenNum helpers and coercions
|
||||
MSg = GSg Masc ;
|
||||
FSg = GSg Fem ;
|
||||
NSg = GSg Neut ;
|
||||
gennum : Gender -> Number -> GenNum
|
||||
= \g,n -> case n of {Sg => GSg g ; Pl => GPl} ;
|
||||
numGenNum : GenNum -> Number
|
||||
= \gn -> case gn of {GSg _ => Sg ; GPl => Pl} ;
|
||||
genGenNum : GenNum -> Gender
|
||||
= \gn -> case gn of {GSg x => x ; GPl => Neut} ;
|
||||
agrGenNum : Agr -> GenNum
|
||||
= \a -> case a of {Ag gn _ => gn} ;
|
||||
genNumAgrP3 : GenNum -> Agr
|
||||
= \gn -> Ag gn P3 ;
|
||||
|
||||
DeclType = Predef.Ints 8 ; -- Declension type
|
||||
|
||||
NounFormsBase : Type = {
|
||||
snom, sgen, sdat, sacc, sins, sprep,
|
||||
pnom, pgen, pdat, pacc, pins, pprep : Str ;
|
||||
g : Gender ;
|
||||
anim : Animacy
|
||||
} ;
|
||||
|
||||
AdjForms : Type = {
|
||||
msnom, fsnom, nsnom, pnom, -- pvoc = pnom
|
||||
msgen, fsgen, pgen, -- nsgen = msgen ; ploc = pprep = pgen = pptv (?)
|
||||
msdat, -- nsdat = msdat ; fsdat = fsgen
|
||||
fsacc, -- amsacc = msgen, imsacc = msnom, nsacc = nsnom
|
||||
msins, fsins, pins, -- nsins = msins, pdat = msins ; there is also variant fsins == fsgen
|
||||
msprep, -- nsprep = msprep, fsprep = fsgen, msloc = msprep
|
||||
sm, sf, sn, sp, -- short forms
|
||||
comp -- comparative variants
|
||||
: Str ;
|
||||
preferShort : ShortFormPreference
|
||||
} ;
|
||||
|
||||
PronForms : Type = {
|
||||
msnom, fsnom, nsnom, pnom, -- pvoc = pnom
|
||||
msgen, fsgen, pgen, -- nsgen = msgen = msptv = nsptv; fsgen = fsptv; ploc = pprep = pgen = pptv
|
||||
msdat, -- nsdat = msdat, fsdat = fsgen
|
||||
fsacc, -- amsacc = msgen, imsacc = msnom, nsacc = nsnom, pacc = pgen
|
||||
msins, fsins, pins, -- nsins = msins, pdat = msins ; there is also variant fsins == fsgen
|
||||
msprep -- nsprep = msprep, fsprep = fsgen, msloc = msprep
|
||||
-- unlike adjective forms, short forms are not here
|
||||
: Str ;
|
||||
} ;
|
||||
|
||||
ConjType = Predef.Ints 16 ; -- Conjugation type
|
||||
TempParts = {p1: Str; p2: Str} ;
|
||||
VerbForms : Type = {
|
||||
inf, infrefl,
|
||||
prsg1, prsg2, prsg3, prpl1, prpl2, prpl3,
|
||||
psgm, psgs,
|
||||
isg2, ipl1, isg2refl,
|
||||
pppss, -- past passive participle. Here only short stem
|
||||
prtr, ptr -- present and past transgressives (converbs)
|
||||
: Str ;
|
||||
fut : SpecialFuture ;
|
||||
asp : Aspect ;
|
||||
refl : Reflexivity ;
|
||||
tran : Transitivity
|
||||
} ;
|
||||
}
|
||||
@@ -1,31 +1,56 @@
|
||||
--# -path=.:../abstract:../common:../../prelude
|
||||
|
||||
concrete PhraseRus of Phrase = CatRus ** open Prelude, ResRus in {
|
||||
|
||||
flags coding=utf8 ;
|
||||
lin
|
||||
PhrUtt pconj utt voc = {s = pconj.s ++ utt.s ++ voc.s} ;
|
||||
|
||||
UttS s = s ;
|
||||
lin
|
||||
-- : S -> Utt ; -- John walks
|
||||
UttS s = {s = s.s ! Ind} ;
|
||||
-- : QS -> Utt ; -- is it good
|
||||
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
|
||||
-- : Pol -> Imp -> Utt ; -- (don't) love yourself
|
||||
UttImpSg pol imp = {s = imp.s ! pol.p ! GSg Masc} ;
|
||||
-- : Pol -> Imp -> Utt ; -- (don't) love yourselves
|
||||
UttImpPl pol imp = {s = imp.s ! pol.p ! GPl} ;
|
||||
-- : Pol -> Imp -> Utt ; -- (don't) sleep (polite)
|
||||
UttImpPol pol imp = {s = imp.s ! pol.p ! GPl} ;
|
||||
|
||||
-- : IP -> Utt ; -- who
|
||||
UttIP ip = {s = ip.nom} ; --- Acc also?
|
||||
|
||||
-- : IAdv -> Utt ; -- why
|
||||
UttIAdv iadv = iadv ;
|
||||
UttNP np = {s = np.s ! PF Nom No NonPoss} ; -- why was Acc instead of Nom here? (Liza Zimina 04/2018)
|
||||
UttVP vp = {s = vp.s ! ClInfinit ! GSg Masc ! P3} ;
|
||||
|
||||
-- : NP -> Utt ; -- this man
|
||||
UttNP np = {s = np.s ! Nom} ;
|
||||
|
||||
-- : Adv -> Utt ; -- here
|
||||
UttAdv adv = adv ;
|
||||
UttCN n = {s = n.nounpart ! NF Sg Nom nom ++ n.relcl ! Sg ! Nom} ;
|
||||
UttCard n = {s = n.s ! Neut ! Inanimate ! Nom} ;
|
||||
UttAP ap = {s = ap.s ! AF Nom Inanimate (GSg Neut)} ; ---- gennum ? (AR)
|
||||
|
||||
-- : VP -> Utt ; -- to sleep
|
||||
UttVP vp
|
||||
= let a=Ag (GSg Neut) P3 in {
|
||||
s=vp.adv ! a ++ (verbInf vp.verb) ++ vp.dep ++ vp.compl ! a
|
||||
} ;
|
||||
|
||||
-- : CN -> Utt ; -- house
|
||||
UttCN cn = {s = cn.s ! Sg ! Nom} ;
|
||||
-- : Card -> Utt ; -- five
|
||||
UttCard card = {s=card.s ! Neut ! Inanimate ! Nom};
|
||||
-- : AP -> Utt ; -- fine
|
||||
UttAP ap = {s = ap.s ! GSg Masc ! Animate ! Nom } ;
|
||||
-- : Interj -> Utt ; -- alas
|
||||
UttInterj i = i ;
|
||||
|
||||
NoPConj = {s = []} ;
|
||||
PConjConj conj = ss conj.s2 ;
|
||||
-- : PConj -> Utt -> Voc -> Phr ; -- but come here, my friend
|
||||
PhrUtt pconj utt voc = {s = pconj.s ++ utt.s ++ voc.s} ;
|
||||
|
||||
-- : PConj ; -- [plain phrase without conjunction in front]
|
||||
NoPConj = {s = []} ;
|
||||
-- : Conj -> PConj ; -- and
|
||||
PConjConj conj = {s = conj.s2} ;
|
||||
|
||||
-- : Voc ; -- [plain phrase without vocative]
|
||||
NoVoc = {s = []} ;
|
||||
VocNP np = {s = "," ++ np.s ! PF Nom No NonPoss} ;
|
||||
-- : NP -> Voc ; -- my friend
|
||||
VocNP np = {s = "," ++ np.s ! VocRus } ;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,74 +1,81 @@
|
||||
--# -path=.:../abstract:../common:../../prelude
|
||||
|
||||
concrete QuestionRus of Question = CatRus ** open ResRus, Prelude in {
|
||||
flags optimize=all_subs ; coding=utf8 ;
|
||||
|
||||
flags optimize=all_subs ; coding=utf8 ;
|
||||
lin
|
||||
-- : Cl -> QCl ; -- does John walk
|
||||
QuestCl cl = cl ** {qf=QDir} ;
|
||||
|
||||
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
|
||||
-- : IP -> VP -> QCl ; -- who walks
|
||||
QuestVP ip vp = {
|
||||
subj=ip.nom ;
|
||||
adv=[] ;
|
||||
verb=vp.verb ;
|
||||
dep=vp.dep ;
|
||||
compl=vp.compl ! ip.a ; --???
|
||||
a=ip.a
|
||||
} ;
|
||||
|
||||
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
|
||||
-- : IP -> ClSlash -> QCl ; -- whom does John love
|
||||
QuestSlash ip cls = cls ** {
|
||||
subj=(applyIPronPrep cls.c ip) ++ cls.subj ; -- cls.subj ???
|
||||
a=ip.a
|
||||
} ;
|
||||
|
||||
IdetCN kakoj okhotnik =
|
||||
{s = \\pf => case kakoj.c of {
|
||||
Nom =>
|
||||
kakoj.s ! AF (extCase pf) okhotnik.anim (gennum okhotnik.g kakoj.n) ++
|
||||
okhotnik.nounpart ! NF kakoj.n (extCase pf) nom ++ okhotnik.relcl ! kakoj.n ! extCase pf ;
|
||||
_ =>
|
||||
kakoj.s ! AF (extCase pf) okhotnik.anim (gennum okhotnik.g kakoj.n) ++
|
||||
okhotnik.nounpart ! NF kakoj.n kakoj.c plg } ++ okhotnik.relcl ! kakoj.n ! kakoj.c ;
|
||||
n = kakoj.n ;
|
||||
p = P3 ;
|
||||
pron = False;
|
||||
g = kakoj.g ;
|
||||
anim = okhotnik.anim
|
||||
-- : IAdv -> Cl -> QCl ; -- why does John walk
|
||||
QuestIAdv iadv cl = cl ** {
|
||||
subj=iadv.s ++ cl.subj
|
||||
} ;
|
||||
|
||||
-- 1.4 additions 17/6/2008 by AR
|
||||
|
||||
IdetIP kakoj = let anim = Inanimate in
|
||||
{s = \\pf => kakoj.s ! AF (extCase pf) anim (pgNum kakoj.g kakoj.n) ;
|
||||
n = kakoj.n ;
|
||||
p = P3 ;
|
||||
pron = False;
|
||||
g = kakoj.g ;
|
||||
anim = anim
|
||||
-- : IComp -> NP -> QCl ; -- where is John
|
||||
QuestIComp icomp np = {
|
||||
subj=icomp.s ! Ag (GSg Neut) P3 ; --???
|
||||
compl=np.s ! Nom ; --???
|
||||
adv=icomp.adv ;
|
||||
verb=selectCopula icomp.cop ;
|
||||
dep=[] ;
|
||||
a=np.a
|
||||
} ;
|
||||
|
||||
IdetQuant kakoj pyat = -- okhotnik =
|
||||
{s = \\af =>
|
||||
kakoj.s ! pyat.n ! af ++
|
||||
pyat.s ! genAF af ! animAF af ! caseAF af ;
|
||||
n = pyat.n ;
|
||||
g = kakoj.g ;
|
||||
c = kakoj.c
|
||||
-- : Prep -> IP -> IAdv ; -- with whom
|
||||
PrepIP prep ip = {s=applyIPronPrep prep ip} ;
|
||||
|
||||
-- : IP -> Adv -> IP
|
||||
AdvIP ip adv = appendToIP (ip ** {a=ip.a}) adv.s ;
|
||||
|
||||
-- : IAdv -> Adv -> IAdv ; -- where in Paris
|
||||
AdvIAdv = cc2 ;
|
||||
|
||||
-- : IAdv -> IComp ; -- where (is it)
|
||||
CompIAdv iadv = {
|
||||
s=\\a=>[] ;
|
||||
adv=iadv.s ;
|
||||
cop=EllCopula -- ???
|
||||
} ;
|
||||
|
||||
AdvIAdv i a = {s = i.s ++ a.s} ;
|
||||
-- : IP -> IComp ; -- who (is it)
|
||||
CompIP ip = {
|
||||
s=\\a=>ip.nom ; -- ???
|
||||
adv=[] ;
|
||||
cop=EllCopula -- ???
|
||||
} ;
|
||||
|
||||
-- : IDet -> CN -> IP ; -- which five songs
|
||||
IdetCN idet cn = caseTableToRecord (\\cas => idet.s ! cn.g ! cn.anim ! cas
|
||||
++ cn.s ! numSizeNum idet.size ! numSizeCase idet.size)
|
||||
(Ag (gennum cn.g (numSizeNumber idet.size)) P3) cn.anim ;
|
||||
|
||||
-- : IDet -> IP ; -- which five
|
||||
IdetIP idet = caseTableToRecord (\\cas => idet.s ! idet.g ! Inanimate ! cas)
|
||||
(Ag (gennum idet.g (numSizeNumber idet.size)) P3) Inanimate ;
|
||||
|
||||
-- : IQuant -> Num -> IDet ; -- which (five)
|
||||
IdetQuant iq num = {
|
||||
s=\\g,a,cas => iq.s ! gennum g (numSizeNumber num.size) ! a ! cas ++ num.s ! iq.g ! a ! cas ;
|
||||
size=num.size ;
|
||||
g=iq.g ;
|
||||
c=iq.c
|
||||
} ;
|
||||
|
||||
CompIAdv a = a ;
|
||||
CompIP ip = {s = ip.s ! PF Nom No NonPoss} ;
|
||||
}
|
||||
|
||||
67
src/russian/README.md
Normal file
67
src/russian/README.md
Normal file
@@ -0,0 +1,67 @@
|
||||
# Russian
|
||||
|
||||
Russian Resource Grammar v.2.
|
||||
|
||||
## Language information
|
||||
- English name: Russian
|
||||
- Autonym: русский
|
||||
- ISO code: Rus
|
||||
|
||||
## Authors
|
||||
|
||||
* Roman Suzi
|
||||
|
||||
Borrowed heavily from older Russian Resource Grammar: ...
|
||||
|
||||
Lexicon information from ru.wiktionary.org
|
||||
|
||||
## Implementation information
|
||||
|
||||
See also [References](references.txt) and [some theory](theory.txt)
|
||||
|
||||
### Morphology
|
||||
|
||||
The [ZaliznyakRus](ZaliznyakRus.gf) module contains inflection tables for
|
||||
Russian nouns and adjectives using a subset of algorithms by A.A.Zaliznyak (see http://gramdict.ru ).
|
||||
|
||||
### Known issues
|
||||
|
||||
TODO: Most frequent copula in present tense requires Nom, so needs to be done via Extend / Idioms. For example:
|
||||
|
||||
TODO: Check: Old
|
||||
```
|
||||
> l CAdvAP less_CAdv (ComplA2 married_A2 (UsePron youPl_Pron)) (MassNP (ApposCN (UseN2 brother_N2) (UsePron youSg_Pron)))
|
||||
менее замужем за вами менее брата тебя
|
||||
```
|
||||
New:
|
||||
|
||||
```
|
||||
Lang: CAdvAP less_CAdv (ComplA2 married_A2 (UsePron youPl_Pron)) (MassNP (ApposCN (UseN2 brother_N2) (UsePron youSg_Pron)))
|
||||
LangRus: менее замужем за вами , чем брат ты
|
||||
```
|
||||
|
||||
TODO: Check:
|
||||
```
|
||||
Lang: UseCl (TTAnt TPres ASimul) PPos (GenericCl (UseComp (CompAdv already_Adv)))
|
||||
LangRus: уже — ты
|
||||
```
|
||||
|
||||
```
|
||||
> l DetCN (DetQuant (PossPron i_Pron) NumSg) (ConjCN and_Conj (ConsCN (UseN grammar_N) (BaseCN (UseN apple_N) (UseN flower_N))))
|
||||
мой грамматика , яблоко и цветок
|
||||
```
|
||||
|
||||
```
|
||||
> l UseCl (TTAnt TCond ASimul) PPos (GenericCl (ComplVV can_VV hungry_VP))
|
||||
мог быть бы ты голоден
|
||||
```
|
||||
|
||||
```
|
||||
> cc mkUtt (mkNP (mkDigits n4_Dig) (mkCN old_A apple_N))
|
||||
{s = "4" ++ "старого" ++ "яблока"; lock_Utt = <>}
|
||||
11 msec
|
||||
> cc mkUtt (mkNP (mkDigits n4_Dig) (mkCN apple_N))
|
||||
{s = "4" ++ "яблока"; lock_Utt = <>}
|
||||
```
|
||||
|
||||
## Maintainer
|
||||
@@ -1,37 +1,44 @@
|
||||
--# -path=.:../abstract:../common:../../prelude
|
||||
concrete RelativeRus of Relative = CatRus ** open
|
||||
ParadigmsRus,
|
||||
ResRus,
|
||||
MorphoRus,
|
||||
Prelude, Coordination in {
|
||||
|
||||
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 = numGenNum gn } in
|
||||
kotoruj.s ! gn ! c ! anim ++ gulyaet.s2 ++ gulyaet.s ! clf ! gn !P3 ++
|
||||
gulyaet.s3 ! genGNum gn ! nu
|
||||
lin
|
||||
-- : Cl -> RCl ; -- such that John loves her
|
||||
RelCl cl = {
|
||||
subj=such.s ;
|
||||
adv=\\a=> comma ++ "что" ++ cl.adv ; -- TODO: this should be after subj in this case
|
||||
verb=cl.verb ;
|
||||
dep=cl.dep ;
|
||||
compl=\\a=>cl.compl ;
|
||||
a=cl.a
|
||||
} ;
|
||||
-- : RP -> ClSlash -> RCl ; -- whom John loves
|
||||
RelSlash rp cls = let rp_as_adj = rp.poss ** {preferShort=PrefFull; sf,sm,sn,sp,comp = []} in {
|
||||
subj=(adjFormsAdjective rp_as_adj).s ; -- TODO: cls.c and applyPrep not used?
|
||||
adv=\\a=>cls.adv ; -- TODO: this should be after subj in this case
|
||||
verb=cls.verb ;
|
||||
dep=cls.dep ;
|
||||
compl=\\a=>cls.compl ;
|
||||
a=cls.a
|
||||
} ;
|
||||
|
||||
|
||||
-- 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
|
||||
-- RelVP : RP -> VP -> RCl ; -- who loves John
|
||||
RelVP rp vp =
|
||||
let rp_as_adj = rp.poss ** {preferShort=PrefFull; sf,sm,sn,sp,comp = []} in {
|
||||
subj=(adjFormsAdjective rp_as_adj).s ;
|
||||
adv=\\a=>[] ;
|
||||
verb=vp.verb ;
|
||||
dep=vp.dep ;
|
||||
compl=vp.compl ;
|
||||
a=rp.a
|
||||
} ;
|
||||
|
||||
FunRP p mama kotoruj =
|
||||
{s = \\gn,c, anim => let {nu = numGenNum gn} in
|
||||
mama.s ! PF c No NonPoss ++
|
||||
p.s ++ kotoruj.s ! gn ! p.c ! anim
|
||||
} ;
|
||||
-- : RP ; -- which
|
||||
IdRP = lin RP (doKotoryjPron "который" (Ag (GSg Neut) P3) Inanimate) ;
|
||||
|
||||
-- Prep -> NP -> RP -> RP ; -- the mother of whom
|
||||
FunRP prep np rp = (prependIP (np.s ! Nom ++ prep.s) rp) ; -- TODO: This is wrong... RP should be in agreement, but with records it's a bit hard...
|
||||
|
||||
IdRP ={ s = \\gn, c, anim =>
|
||||
kotorujDet.s ! (AF c anim gn )} ;
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,139 +1,143 @@
|
||||
concrete SentenceRus of Sentence = CatRus ** open Prelude, TenseRus, ParamRus, Coordination, (R=ResRus) in {
|
||||
flags optimize=all_subs ; coding=utf8 ;
|
||||
lin
|
||||
-- : Adv -> S -> S ; -- then I will go home
|
||||
AdvS adv s = {s=\\m => adv.s ++ s.s ! m} ;
|
||||
-- : Adv -> S -> S ; -- next week, I will go home
|
||||
ExtAdvS adv s = {s=\\m => adv.s ++ comma ++ s.s ! m} ; -- TODO: what is the case for this? embed in commas?
|
||||
|
||||
--# -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
|
||||
-- : Temp -> Pol -> Cl -> S ; -- she had not slept - она не спала
|
||||
UseCl temp pol cl = {
|
||||
s = table {
|
||||
Infinitive => let parts = R.verbAgr cl.verb Infinitive temp.t cl.a pol.p in
|
||||
temp.s ++ parts.p1 ++ cl.subj ++ pol.s ++ cl.adv ++ parts.p2 ++ cl.dep ++ cl.compl ;
|
||||
Ind => let parts = R.verbAgr cl.verb Ind temp.t cl.a pol.p in
|
||||
-- temp.s ++ parts.p1 ++ cl.subj ++ pol.s ++ cl.adv ++ parts.p2 ++ cl.dep ++ cl.compl ;
|
||||
temp.s ++ cl.adv ++ pol.s ++ parts.p1 ++ parts.p2 ++ cl.dep ++ cl.subj ++ cl.compl ;
|
||||
Sbjv => let parts = R.verbAgr cl.verb Sbjv temp.t cl.a pol.p in
|
||||
temp.s ++ parts.p1 ++ cl.subj ++ pol.s ++ cl.adv ++ parts.p2 ++ cl.dep ++ cl.compl ;
|
||||
Imperative => let parts = R.verbAgr cl.verb Imperative temp.t cl.a pol.p in
|
||||
temp.s ++ parts.p1 ++ cl.subj ++ pol.s ++ cl.adv ++ parts.p2 ++ cl.dep ++ cl.compl
|
||||
}
|
||||
in
|
||||
if_then_else Str tebyaNeVizhu.negBefore
|
||||
(ya ++ ne ++ vizhu ++ tebya ++ khorosho)
|
||||
(ya ++ vizhu ++ ne ++ tebya ++ khorosho)
|
||||
} ;
|
||||
|
||||
-- : Temp -> Pol -> RCl -> RS ; -- that had not slept
|
||||
UseRCl temp pol rcl = {
|
||||
s = \\gn,anim,cas =>
|
||||
let parts = R.verbAgr rcl.verb Ind temp.t rcl.a pol.p in
|
||||
let a=genNumAgrP3 gn in
|
||||
temp.s ++ parts.p1 ++ rcl.subj ! gn ! anim ! cas ++ pol.s ++ rcl.adv ! a ++ parts.p2 ++ rcl.dep ++ rcl.compl ! a ;
|
||||
c = Nom
|
||||
} ;
|
||||
|
||||
-- : Temp -> Pol -> ClSlash -> SSlash ; -- (that) she had not seen
|
||||
UseSlash temp pol cls = {
|
||||
s = table {
|
||||
Infinitive => let parts = R.verbAgr cls.verb Infinitive temp.t cls.a pol.p in
|
||||
temp.s ++ parts.p1 ++ cls.subj ++ pol.s ++ cls.adv ++ parts.p2 ++ cls.dep ++ cls.compl ;
|
||||
Ind => let parts = R.verbAgr cls.verb Ind temp.t cls.a pol.p in
|
||||
temp.s ++ parts.p1 ++ cls.subj ++ pol.s ++ cls.adv ++ parts.p2 ++ cls.dep ++ cls.compl ;
|
||||
Sbjv => let parts = R.verbAgr cls.verb Sbjv temp.t cls.a pol.p in
|
||||
temp.s ++ parts.p1 ++ cls.subj ++ pol.s ++ cls.adv ++ parts.p2 ++ cls.dep ++ cls.compl ;
|
||||
Imperative => let parts = R.verbAgr cls.verb Imperative temp.t cls.a pol.p in
|
||||
temp.s ++ parts.p1 ++ cls.subj ++ pol.s ++ cls.adv ++ parts.p2 ++ cls.dep ++ cls.compl
|
||||
} ;
|
||||
c=cls.c
|
||||
} ;
|
||||
|
||||
-- : NP -> VPSlash -> ClSlash ; -- (whom) he sees
|
||||
SlashVP np vps = {
|
||||
subj=np.s ! Nom ; -- ????????
|
||||
compl=vps.compl ! np.a ; -- ??
|
||||
adv=vps.adv ! np.a ; -- ??
|
||||
verb=vps.verb ;
|
||||
dep=vps.dep ;
|
||||
a=np.a ;
|
||||
c=vps.c
|
||||
} ;
|
||||
|
||||
-- : Cl -> Prep -> ClSlash ; -- (with whom) he walks
|
||||
SlashPrep cl prep = {
|
||||
subj=cl.subj ;
|
||||
compl=cl.compl ;
|
||||
adv=cl.adv ;
|
||||
verb=cl.verb ;
|
||||
dep=cl.dep ;
|
||||
a=cl.a ;
|
||||
c=prep
|
||||
} ;
|
||||
|
||||
-- NP -> VS -> SSlash -> ClSlash ; -- (whom) she says that he loves
|
||||
SlashVS np vs ss = {
|
||||
subj=np.s ! Nom ; -- ????????
|
||||
compl=embedInCommas ("что" ++ ss.s ! Ind) ; -- ?? that?
|
||||
adv=[]; -- ??
|
||||
verb=vs ;
|
||||
dep=[] ;
|
||||
a=np.a ;
|
||||
c=ss.c
|
||||
} ;
|
||||
|
||||
|
||||
PredSCVP sc vp = { s = \\b,clf =>
|
||||
let {
|
||||
ne = case b of {Pos=>""; Neg=>"не"};
|
||||
vizhu = vp.s ! clf ! (GSg Neut)! P3;
|
||||
tebya = vp.s3 ! Neut ! Sg
|
||||
-- : S -> Subj -> S -> S ; -- I go home, if she comes
|
||||
SSubjS s subj s2 = {
|
||||
s=\\m => s.s ! m ++ comma ++ subj.s ++ s2.s ! Ind
|
||||
} ;
|
||||
|
||||
-- : ClSlash -> Adv -> ClSlash ; -- (whom) he sees today
|
||||
AdvSlash cls adv = cls ** {
|
||||
-- subj=cls.subj ++ adv.s -- two variants? TODO: check
|
||||
adv=cls.adv ++ adv.s
|
||||
} ;
|
||||
|
||||
-- : VP -> Imp ; -- love yourselves
|
||||
ImpVP vp = {
|
||||
s = \\polarity, gn =>
|
||||
let pol = case polarity of {Neg => PNeg; Pos => PPos} in
|
||||
let a = Ag gn P2 in
|
||||
let parts = R.verbAgr vp.verb Imperative Pres a pol.p in
|
||||
parts.p1 ++ pol.s ++ parts.p2 ++ vp.dep ++ vp.adv ! a ++ vp.compl ! a
|
||||
} ;
|
||||
|
||||
-- : NP -> VP -> Cl ; -- John walks - Иван гуляет
|
||||
PredVP np vp = {
|
||||
subj=np.s ! Nom ;
|
||||
adv=[] ;
|
||||
verb=vp.verb ;
|
||||
dep=vp.dep ;
|
||||
compl=vp.compl ! np.a ;
|
||||
a=np.a
|
||||
} ;
|
||||
|
||||
-- : SC -> VP -> Cl ; -- that she goes is good - что она идёт есть хорошо
|
||||
PredSCVP sc vp = {
|
||||
subj=sc.s ;
|
||||
adv=[] ;
|
||||
verb=vp.verb ;
|
||||
dep=vp.dep ;
|
||||
compl=vp.compl ! Ag (GSg Neut) P3 ; -- ???
|
||||
a=Ag (GSg Neut) P3 -- ???
|
||||
} ;
|
||||
|
||||
-- : S -> SC ; -- that she goes - что она идёт
|
||||
EmbedS s = {s = "что" ++ s.s ! Ind} ;
|
||||
|
||||
-- : Temp -> Pol -> QCl -> QS ; -- who had not slept
|
||||
UseQCl temp pol cl = {
|
||||
s = table {_ =>
|
||||
let parts = R.verbAgr cl.verb Ind temp.t cl.a pol.p in
|
||||
temp.s ++ parts.p1 ++ cl.subj ++ pol.s ++ cl.adv ++ parts.p2 ++ cl.dep ++ cl.compl
|
||||
}
|
||||
in
|
||||
if_then_else Str vp.negBefore
|
||||
(sc.s ++ ne ++ vizhu ++ tebya)
|
||||
(sc.s ++ vizhu ++ ne ++ tebya)
|
||||
} ;
|
||||
|
||||
|
||||
---- AR 17/12/2008
|
||||
SlashVP 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) ;
|
||||
s2=tebyaNeVizhu.s2 ;
|
||||
c=tebyaNeVizhu.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 ! gennum g n ! P2 ++
|
||||
inf.s2++inf.s3!g!n
|
||||
} ;
|
||||
|
||||
EmbedS s = {s = "что" ++ s.s} ;
|
||||
-- In Russian "Whether you go" transformed in "go whether you":
|
||||
-- : QS -> SC ; -- who goes
|
||||
EmbedQS qs = {s = qs.s ! QIndir} ;
|
||||
EmbedVP vp = {s = vp.s2 ++ vp.s!ClInfinit!(GSg Masc) !P3 ++ vp.s3!Masc!Sg} ;
|
||||
|
||||
UseCl t p cl = {s = t.s ++ p.s ++ case t.t of {
|
||||
Cond => cl.s! p.p ! ClCondit ; --# notpresent
|
||||
Pres => cl.s! p.p ! ClIndic Present t.a ---- AR work-around 13/12/2007
|
||||
; --# notpresent
|
||||
_ => cl.s! p.p ! ClIndic (getTense t.t) t.a --# notpresent
|
||||
}
|
||||
};
|
||||
-- : VP -> SC ; -- to go
|
||||
EmbedVP vp = {s=vp.adv ! Ag (GSg Neut) P3 ++ (R.verbInf vp.verb) ++ vp.dep ++ vp.compl ! Ag (GSg Neut) P3} ;
|
||||
|
||||
UseQCl t p qcl= {s = case t.t of {
|
||||
Cond => qcl.s! p.p ! ClCondit ; --# notpresent
|
||||
Pres => qcl.s! p.p ! ClIndic Present t.a
|
||||
; --# notpresent
|
||||
_ => qcl.s!p.p! ClIndic (getTense t.t) t.a --# notpresent
|
||||
}};
|
||||
|
||||
UseRCl t p rcl ={s = \\gn,c,anim => case t.t of {
|
||||
Cond => [", "] ++ rcl.s! p.p ! ClCondit ! gn !c !anim ; --# notpresent
|
||||
Pres => [", "] ++ rcl.s! p.p ! ClIndic Present t.a !gn !c !anim
|
||||
; --# notpresent
|
||||
_ => [", "] ++ rcl.s! p.p ! ClIndic (getTense t.t) t.a !gn !c !anim --# notpresent
|
||||
}};
|
||||
|
||||
UseSlash t p cl = {
|
||||
s = case t.t of {
|
||||
Cond => cl.s! p.p ! ClCondit ; --# notpresent
|
||||
Pres => cl.s! p.p ! ClIndic Present t.a
|
||||
; --# notpresent
|
||||
_ => cl.s! p.p ! ClIndic (getTense t.t) t.a --# notpresent
|
||||
-- : S -> RS -> S ; -- she sleeps, which is good
|
||||
RelS s rs = {
|
||||
s=\\m=>s.s ! m ++ embedInCommas (rs.s ! GSg Neut ! Inanimate ! Nom) ;
|
||||
} ;
|
||||
s2 = cl.s2 ;
|
||||
c = cl.c
|
||||
};
|
||||
|
||||
|
||||
AdvS a s = {s = a.s ++ s.s} ; ---- AR 19/6/2007
|
||||
ExtAdvS a s = {s = a.s ++ "," ++ s.s} ; ---- AR 1/9/2011
|
||||
|
||||
---- AR 17/12/2008
|
||||
RelS s r = {s = s.s ++ "," ++ r.s ! gennum Neut Sg ! Nom ! Inanimate} ; ---- ?
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,154 +1,181 @@
|
||||
--# -path=.:../abstract:../common:../../prelude
|
||||
|
||||
concrete StructuralRus of Structural = CatRus **
|
||||
open ResRus, MorphoRus, (P = ParadigmsRus), Prelude, NounRus in {
|
||||
|
||||
flags optimize=all ; coding=utf8 ;
|
||||
open ParadigmsRus, ResRus, MorphoRus, (X = ConstructX), Coordination, Prelude in {
|
||||
|
||||
lin
|
||||
-- First mount the numerals.
|
||||
-- UseNumeral i = i ;
|
||||
i_Pron = personalPron (Ag MSg P1) ;
|
||||
we_Pron = personalPron (Ag GPl P1) ;
|
||||
youSg_Pron = personalPron (Ag MSg P2) ;
|
||||
youPl_Pron = personalPron (Ag GPl P2) ;
|
||||
youPol_Pron = youPl_Pron ;
|
||||
he_Pron = personalPron (Ag MSg P3) ;
|
||||
she_Pron = personalPron (Ag FSg P3) ;
|
||||
it_Pron = personalPron (Ag NSg P3) ;
|
||||
they_Pron = personalPron (Ag GPl P3) ;
|
||||
|
||||
-- Then an alphabetical list of structural words
|
||||
whatSg_IP = what_sg ;
|
||||
whatPl_IP = what_pl ;
|
||||
whoSg_IP = who_sg ;
|
||||
whoPl_IP = who_pl ;
|
||||
|
||||
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; size = 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 = {
|
||||
s = \\c,a,g => kazhdujDet.s ! AF c a (gennum g Sg) ;
|
||||
n = Sg ; g = PNoGen ; c = Nom ; size = nom} ;
|
||||
everybody_NP = DetCN (DetQuant IndefArt NumPl) (UseN ((eEnd_Decl "вс")**{lock_N=<>})) ;
|
||||
everything_NP = UsePron (pronVseInanimate ** {lock_Pron=<>}) ;
|
||||
everywhere_Adv = ss "везде" ;
|
||||
few_Det = {
|
||||
s = \\c,a,g => nemnogoSgDet.s ! AF c a (gennum g Sg) ;
|
||||
n = Sg ; g = PNoGen ; c = Nom ; size = plg} ;
|
||||
--- DEPREC first_Ord = (uy_j_EndDecl "перв" ) ** {lock_A = <>}; --AStaruyj
|
||||
for_Prep = { s = "для" ; c = Gen };
|
||||
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};
|
||||
how8much_IAdv = ss "сколько" ;
|
||||
i_Pron = pronYa Masc ;
|
||||
if_Subj = ss "если" ;
|
||||
in8front_Prep = { s = "перед" ; c = Inst};
|
||||
in_Prep = { s = "в" ; c = Prepos PrepVNa } ;
|
||||
it_Pron = pronOno ;
|
||||
less_CAdv = {s="менее"; p=""} ;
|
||||
many_Det = {
|
||||
s = \\c,a,g => mnogoSgDet.s ! AF c a (gennum g Sg) ;
|
||||
n = Sg; g = (PGen Neut); c = Gen; size = plg} ;
|
||||
more_CAdv = {s="более"; p=""} ;
|
||||
most_Predet = bolshinstvoSgDet ** {n = Sg; g = (PGen Neut); c= Gen; size = plg} ;
|
||||
-- inanimate, Sg: "большинство телефонов безмолвству-ет"
|
||||
-- most8many_Det = bolshinstvoPlDet ** {n = Pl; g = (PGen Neut); c= Gen} ;
|
||||
-- animate, Pl: "большинство учащихся хорошо подготовлен-ы"
|
||||
much_Det = {
|
||||
s = \\c,a,g => mnogoSgDet.s ! AF c a (gennum g Sg) ;
|
||||
n = Sg ; g = (PGen Neut) ; c= Gen ; size = plg} ; -- same as previous
|
||||
must_VV = verbDolzhen ;
|
||||
no_Utt = ss ["Нет"] ;
|
||||
on_Prep = { s = "на" ; c = Prepos PrepVNa };
|
||||
--- DEPREC one_Quant = odinDet ** {lock_QuantSg = <>; n= Sg; g = PNoGen; c = Nom };
|
||||
--AStaruyj :
|
||||
only_Predet = (uy_j_EndDecl "единственн" ) ** {lock_Predet = <>; n= Sg; g = PNoGen; c = Nom; size = 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 = {
|
||||
s = \\c,a,g => nekotorujDet.s ! AF c a (gennum g Sg) ;
|
||||
n = Sg ; g = PNoGen ; c= Nom ; size = nom} ;
|
||||
somePl_Det = {
|
||||
s = \\c,a,g => nekotorujDet.s ! AF c a (gennum g Pl) ;
|
||||
n = Pl ; g = PNoGen ; c= Nom ; size = nom} ;
|
||||
something_NP = UsePron (pronChtoTo** {lock_Pron=<> }) ;
|
||||
somewhere_Adv = ss "где-нибудь" ;
|
||||
that_Quant = totDet ** {n = Sg; g = PNoGen; c= Nom; size = 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; size = 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 Masc;
|
||||
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
|
||||
which_IQuant = (adjFormsAdjective (makeAdjectiveForms "который" "" "1a" PrefFull)) ** {
|
||||
preferShort=PrefFull ;
|
||||
g=Neut ;
|
||||
c=Nom
|
||||
} ;
|
||||
whoPl_IP = pron2NounPhraseNum pronKto Animate Pl;
|
||||
whoSg_IP = pron2NounPhraseNum pronKto Animate Sg;
|
||||
this_Quant = (adjFormsAdjective this_forms) ** {
|
||||
preferShort=PrefFull ;
|
||||
g=Neut ;
|
||||
c=Nom
|
||||
} ;
|
||||
that_Quant = (adjFormsAdjective that_forms) ** {
|
||||
preferShort=PrefFull ;
|
||||
g=Neut ;
|
||||
c=Nom
|
||||
} ;
|
||||
no_Quant = (adjFormsAdjective (makeAdjectiveForms "никакой" "" "3b" PrefFull)) ** {
|
||||
preferShort=PrefFull ;
|
||||
g=Neut ;
|
||||
c=Nom
|
||||
} ;
|
||||
|
||||
above_Prep = {s="над" ; c=Ins; hasPrep=True} ;
|
||||
after_Prep = {s="после" ; c=Gen; hasPrep=True };
|
||||
before_Prep = {s="перед" ; c=Ins; hasPrep=True};
|
||||
behind_Prep = {s="за" ; c=Ins; hasPrep=True };
|
||||
between_Prep = {s="между" ; c=Ins; hasPrep=True};
|
||||
by8agent_Prep = {s=["с помощью"] ; c=Gen; hasPrep=True};
|
||||
by8means_Prep = {s=["с помощью"] ; c=Gen; hasPrep=True};
|
||||
during_Prep = {s=["в течение"] ; c=Gen; hasPrep=True};
|
||||
except_Prep = {s=["за исключением"] ; c=Gen; hasPrep=True};
|
||||
for_Prep = {s="для" ; c=Gen ; hasPrep=True};
|
||||
from_Prep = {s="от" ; c=Gen ; hasPrep=True} ;
|
||||
in8front_Prep = {s="перед" ; c=Ins; hasPrep=True};
|
||||
in_Prep = {s="в" ; c=Loc ; hasPrep=True} ;
|
||||
on_Prep = {s="на" ; c=Loc ; hasPrep=True};
|
||||
part_Prep = {s="" ; c=Nom ; hasPrep=False }; -- missing in Russian???
|
||||
possess_Prep = {s="" ; c=Gen ; hasPrep=False};
|
||||
through_Prep = {s="через" ; c=Acc ; hasPrep=True};
|
||||
to_Prep = {s="к" ; c=Dat ; hasPrep=True} ;
|
||||
under_Prep = {s="под" ; c=Ins ; hasPrep=True};
|
||||
without_Prep = {s="без" ; c=Gen; hasPrep=True };
|
||||
|
||||
or_Conj = mkConj "или" Sg ;
|
||||
and_Conj = mkConj "и" Pl ;
|
||||
both7and_DConj = mkConj "как" (comma ++ "так и") Pl ;
|
||||
either7or_DConj = mkConj "либо" (comma ++ "либо") Sg ;
|
||||
if_then_Conj = mkConj "если" (comma ++ "то") Sg ;
|
||||
|
||||
with_Prep = {s="с" ; c=Ins; hasPrep=True};
|
||||
|
||||
please_Voc = ss "пожалуйста" ;
|
||||
|
||||
everywhere_Adv = mkAdv "везде" ;
|
||||
here_Adv = mkAdv "здесь" ;
|
||||
here7to_Adv = mkAdv "сюда" ;
|
||||
here7from_Adv = mkAdv "отсюда" ;
|
||||
quite_Adv = mkAdv "довольно" ;
|
||||
somewhere_Adv = mkAdv "где-нибудь" ;
|
||||
there_Adv = mkAdv "там" ;
|
||||
there7to_Adv = mkAdv "туда" ;
|
||||
there7from_Adv = mkAdv "оттуда" ;
|
||||
|
||||
how_IAdv = ss "как" ;
|
||||
how8much_IAdv = ss "сколько" ;
|
||||
when_IAdv = ss "когда" ;
|
||||
where_IAdv = ss "где" ;
|
||||
why_IAdv = ss "почему" ;
|
||||
with_Prep = {s = pre {#sconsonant => "со" ; ("щ"|"Щ") => "со" ; _ => "с"} ; c = Inst} ;
|
||||
without_Prep = { s = "без" ; c = Gen};
|
||||
youPl_Pron = pronVu Masc;
|
||||
yes_Utt = ss ["Да"] ;
|
||||
youSg_Pron = pronTu Masc;
|
||||
youPol_Pron = pronVu Masc;
|
||||
|
||||
have_V2= P.dirV2 (P.regV P.imperfective P.first "име" "ю" "имел" "имей" "иметь" );
|
||||
have_V3 = P.mkV3 (P.mkV P.imperfective "есть" "есть" "есть" "есть" "есть" "есть" "был" "будь" "есть") "" "у" Nom Gen;
|
||||
so_AdA = ss "так";
|
||||
|
||||
have_not_V3 = P.mkV3 (P.mkV P.imperfective "нет" "нет" "нет" "нет" "нет" "нет" "не было" "не будь" "нет") "" "у" Gen Gen;
|
||||
less_CAdv = X.mkCAdv "менее" "чем" ;
|
||||
more_CAdv = X.mkCAdv "более" "чем" ;
|
||||
as_CAdv = X.mkCAdv "так же" "как и" ;
|
||||
|
||||
--- 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;
|
||||
can8know_VV = {v=can; modal=\\a=>[]} ;
|
||||
can_VV = {v=can; modal=\\a=>[]} ;
|
||||
must_VV = {v=nullVerb; modal=adjFormsToShort (makeAdjectiveForms "должный" "" "1*a" PrefFull)} ;
|
||||
want_VV = {v=want; modal=\\a=>[]} ;
|
||||
|
||||
-- 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
|
||||
every_Det = {
|
||||
s = \\g => (adjFormsAdjective (makeAdjectiveForms "каждый" "" "1*a" PrefFull)).s ! GSg g;
|
||||
g = Masc ;
|
||||
c = Nom ;
|
||||
size = Num1 ;
|
||||
} ;
|
||||
someSg_Det = {
|
||||
s = \\g => (adjFormsAdjective (makeAdjectiveForms "некоторый" "" "1*a" PrefFull)).s ! GSg g;
|
||||
g = Masc ;
|
||||
c = Nom ;
|
||||
size = Num1 ;
|
||||
} ;
|
||||
somePl_Det = {
|
||||
s = \\g => (adjFormsAdjective (makeAdjectiveForms "некоторый" "" "1*a" PrefFull)).s ! GPl;
|
||||
g = Masc ;
|
||||
c = Nom ;
|
||||
size = NumAll ;
|
||||
} ;
|
||||
|
||||
lin language_title_Utt = ss "Русский" ;
|
||||
few_Det = { -- numeral! TODO: мало ? немного ?
|
||||
s = \\g => (adjFormsAdjective (makeAdjectiveForms "немногий" "" "3a" PrefFull)).s ! GPl;
|
||||
g = Masc ;
|
||||
c = Nom ;
|
||||
size = NumAll ;
|
||||
} ;
|
||||
|
||||
oper
|
||||
sconsonant : pattern Str = #(("с"|"з"|"ж"|"ш"|"л"|"ль"|"р"|"м"|"в"|"С"|"З"|"Ж"|"Ш"|"Л"|"Ль"|"Р"|"М"|"В"|"ЛЬ") +
|
||||
("б" | "в" | "г" | "д" | "ж" | "з" | "й" | "к" | "л" | "м" | "н" | "п" | "р" | "с" | "т" | "ф" | "х" | "ц" | "ч" | "ш" | "щ" |
|
||||
"Б" | "В" | "Г" | "Д" | "Ж" | "З" | "Й" | "К" | "Л" | "М" | "Н" | "П" | "Р" | "С" | "Т" | "Ф" | "Х" | "Ц" | "Ч" | "Ш" | "Щ")) ;
|
||||
many_Det, much_Det = {
|
||||
s = \\g => (adjFormsAdjective (makeAdjectiveForms "многий" "" "3a" PrefFull)).s ! GPl;
|
||||
g = Neut ;
|
||||
c = Gen ;
|
||||
size = NumAll
|
||||
} ;
|
||||
|
||||
only_Predet = (adjFormsAdjective (noShorts only_Pron)) ** {size=Num1} ;
|
||||
most_Predet = (makeAdjectiveFromNoun (nounFormsNoun (guessNounForms "большинство"))) ** {size=Num5} ;
|
||||
all_Predet = (adjFormsAdjective (noShorts all_Pron)) ** {size=NumAll};
|
||||
not_Predet = (adjFormsAdjective (mkA "не" "" "0")) ** {size=Num1} ;
|
||||
|
||||
how8many_IDet = {
|
||||
s=\\g,anim,cas => case <anim,cas> of {
|
||||
<_,Nom|VocRus|Ptv> => "сколько" ;
|
||||
<_,Gen|Pre|Loc> => "скольких" ;
|
||||
<_,Dat> => "скольким" ;
|
||||
<_,Ins> => "сколькими" ;
|
||||
<Inanimate,Acc> => "сколько" ;
|
||||
<Animate,Acc> => "скольких" -- also as Nom?
|
||||
} ;
|
||||
g=Neut ;
|
||||
size=NumAll ; --it depends???
|
||||
c=Nom --???
|
||||
} ;
|
||||
|
||||
almost_AdA = ss "почти" ;
|
||||
almost_AdN = ss "почти" ;
|
||||
always_AdV = ss "всегда" ;
|
||||
at_least_AdN = ss "по меньшей мере" ; -- TODO: ?
|
||||
at_most_AdN = ss "самое большее" ; -- TODO: ?
|
||||
too_AdA = ss "слишком" ;
|
||||
very_AdA = ss "очень" ;
|
||||
|
||||
everybody_NP = lin NP everybody ;
|
||||
everything_NP = lin NP everything ;
|
||||
something_NP = lin NP something ;
|
||||
somebody_NP = lin NP somebody ;
|
||||
nothing_NP = lin NP nothing ;
|
||||
nobody_NP = lin NP nobody ;
|
||||
|
||||
but_PConj = ss "но" ;
|
||||
otherwise_PConj = ss "иначе" ;
|
||||
therefore_PConj = ss "следовательно" ;
|
||||
|
||||
although_Subj = ss "хотя" ;
|
||||
because_Subj = ss ["потому что"] ;
|
||||
if_Subj = ss "если" ;
|
||||
when_Subj = ss "когда" ;
|
||||
that_Subj = ss "что" ; -- TODO: ?
|
||||
|
||||
have_V2 = dirV2 (mkV Imperfective "иметь" "имею" "имеет");
|
||||
|
||||
language_title_Utt = ss "русский" ;
|
||||
yes_Utt = ss ["да"] ;
|
||||
no_Utt = ss ["нет"] ;
|
||||
}
|
||||
@@ -2,40 +2,46 @@
|
||||
|
||||
concrete SymbolRus of Symbol = CatRus ** open Prelude, ResRus in {
|
||||
flags coding=utf8;
|
||||
{- TODO! -}
|
||||
|
||||
lin
|
||||
SymbPN i = {s = table {_ => i.s} ; g = Neut; anim = Inanimate } ;
|
||||
IntPN i = {s = table {_ => i.s} ; g = Neut; anim = Inanimate } ;
|
||||
FloatPN i = {s = table {_ => i.s} ; g = Neut; anim = Inanimate } ;
|
||||
NumPN n = {s = table {_ => n.s ! Neut ! Inanimate ! Nom} ; g = Neut; anim = Inanimate } ;
|
||||
-- : Symb -> PN ; -- x
|
||||
SymbPN i = (immutableNounForms i.s Neut Inanimate) ** {g = Neut; a = Inanimate} ;
|
||||
|
||||
CNIntNP cn i = {s = \\cas => cn.nounpart ! NF Sg (extCase cas) nom ++ cn.relcl ! Sg ! extCase cas ++ i.s;
|
||||
n = Sg ; p = P3 ;
|
||||
g = PGen cn.g ; anim = cn.anim ; pron = False } ;
|
||||
CNNumNP cn n = {s = \\cas => cn.nounpart ! NF Sg (extCase cas) nom ++ cn.relcl ! Sg ! extCase cas
|
||||
++ n.s ! cn.g ! cn. anim ! (extCase cas) ;
|
||||
n = Sg ; p = P3 ;
|
||||
g = PGen cn.g ; anim = cn.anim ; pron = False } ;
|
||||
-- : Int -> PN ; -- 27
|
||||
IntPN i = (immutableNounForms i.s Neut Inanimate) ** {g = Neut; a = Inanimate} ;
|
||||
-- : Float -> PN ; -- 3.14159
|
||||
FloatPN i = (immutableNounForms i.s Neut Inanimate) ** {g = Neut; a = Inanimate} ;
|
||||
-- : Card -> PN ; -- twelve [as proper name] -- TODO: implement properly
|
||||
NumPN card = (immutableNounForms (card.s ! Neut ! Inanimate ! Nom) Neut Inanimate) ** {g = Neut; a = Inanimate} ;
|
||||
|
||||
CNSymbNP d cn ss = {s = \\cas => cn.nounpart ! NF Sg (extCase cas) nom ++ cn.relcl ! Sg ! extCase cas ;
|
||||
n = Sg ; p = P3 ;
|
||||
g = PGen cn.g ; anim = cn.anim ; pron = False } ;
|
||||
-- : CN -> Card -> NP ; -- level five ; level 5
|
||||
CNNumNP cn n = {
|
||||
s = \\cas => cn.s ! Sg ! cas ++ n.s ! cn.g ! cn.anim ! cas ;
|
||||
pron=False ;
|
||||
a = Ag (gennum cn.g Sg) P3
|
||||
} ;
|
||||
|
||||
SymbS sy = sy ;
|
||||
-- : Det -> CN -> [Symb] -> NP ; -- (the) (2) numbers x and
|
||||
CNSymbNP det cn xs = {
|
||||
s=\\cas => det.s ! cn.g ! cn.anim ! cas ++ sizeNumCase cn.s det.size ++ xs.s ;
|
||||
pron=False ;
|
||||
a=Ag (gennum cn.g (numSizeNumber det.size)) P3
|
||||
} ;
|
||||
|
||||
SymbNum sy = { s = \\_,_,_=>sy.s; n=Pl ; size = plg };
|
||||
-- : Symb -> S ; -- A
|
||||
SymbS symb = {s=\\m=>symb.s};
|
||||
|
||||
SymbOrd sy = { s = \\af => sy.s } ;
|
||||
-- : Symb -> Card ; -- n
|
||||
SymbNum symb = {s = \\_,_,_ => symb.s ; size = Num5} ;
|
||||
|
||||
-- : Symb -> Ord ; -- n'th
|
||||
SymbOrd symb = immutableAdjForms symb.s ; -- TODO: better implementation
|
||||
|
||||
lincat
|
||||
|
||||
Symb, [Symb] = SS ;
|
||||
|
||||
lin
|
||||
MkSymb s = s ;
|
||||
|
||||
BaseSymb = infixSS "и" ;
|
||||
ConsSymb = infixSS "," ;
|
||||
|
||||
|
||||
}
|
||||
|
||||
13
src/russian/TenseRus.gf
Normal file
13
src/russian/TenseRus.gf
Normal file
@@ -0,0 +1,13 @@
|
||||
concrete TenseRus of Tense = CatRus, TenseX - [PNeg,PPos]
|
||||
** open ResRus, (P=ParamRus), Prelude in {
|
||||
flags coding=utf8 ; optimize=all ;
|
||||
lin
|
||||
PNeg = {
|
||||
s = "не" ;
|
||||
p = Neg
|
||||
} ;
|
||||
PPos = {
|
||||
s = [] ;
|
||||
p = Pos
|
||||
} ;
|
||||
}
|
||||
8
src/russian/TextRus.gf
Normal file
8
src/russian/TextRus.gf
Normal file
@@ -0,0 +1,8 @@
|
||||
concrete TextRus of Text = CatRus ** open ResRus in {
|
||||
|
||||
lin
|
||||
TEmpty = {s = []} ;
|
||||
TFullStop x xs = {s = x.s ++ "." ++ xs.s} ;
|
||||
TQuestMark x xs = {s = x.s ++ "?" ++ xs.s} ;
|
||||
TExclMark x xs = {s = x.s ++ "!" ++ xs.s} ;
|
||||
}
|
||||
@@ -1,431 +1,177 @@
|
||||
concrete VerbRus of Verb = CatRus ** open ResRus, Prelude, Coordination in {
|
||||
|
||||
--# -path=.:../abstract:../common:../../prelude
|
||||
|
||||
concrete VerbRus of Verb = CatRus ** open ResRus, Prelude in {
|
||||
|
||||
-- 1.4 additions by AR 17/6/2008
|
||||
|
||||
flags optimize=all_subs ; coding=utf8 ;
|
||||
lin
|
||||
CompNP masha =
|
||||
{ s=\\clf,gn,p => case clf of
|
||||
{
|
||||
(ClIndic Present _) => masha.s ! (mkPronForm Nom No NonPoss) ;
|
||||
(ClIndic PastRus _) => case gn of
|
||||
{ (GSg Fem) =>"была"++masha.s ! (mkPronForm Inst No NonPoss);
|
||||
(GSg Masc) =>"был" ++ masha.s!(mkPronForm Inst No NonPoss);
|
||||
(GSg Neut) =>"было" ++ masha.s!(mkPronForm Inst No NonPoss);
|
||||
GPl => "были" ++ masha.s ! (mkPronForm Inst No NonPoss)
|
||||
};
|
||||
(ClIndic Future _) => case gn of
|
||||
{ GPl => case p of
|
||||
{ P3 => "будут"++masha.s ! (mkPronForm Inst No NonPoss);
|
||||
P2 => "будете"++masha.s !(mkPronForm Inst No NonPoss);
|
||||
P1 => "будем"++masha.s ! (mkPronForm Inst No NonPoss)
|
||||
};
|
||||
(GSg _) => 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 => masha.s!(mkPronForm Inst No NonPoss) ;
|
||||
ClImper => case (numGenNum 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 => ""
|
||||
lin
|
||||
-- : V -> VP ; -- sleep
|
||||
UseV v = {
|
||||
adv = \\a=>[] ;
|
||||
verb = v ;
|
||||
dep=[] ;
|
||||
compl = \\_ => []
|
||||
} ;
|
||||
|
||||
CompAP zloj ={
|
||||
s= \\clf,gn,p => case clf of {
|
||||
-- person is ignored !
|
||||
ClInfinit => "быть" ++ zloj.s ! AF Inst Animate (GSg Masc) ;
|
||||
ClImper => case gn of
|
||||
{ (GSg _) => "будь" ++ zloj.s ! AF Inst Animate (GSg Masc);
|
||||
GPl => "будьте" ++ zloj.s ! AF Inst Animate GPl
|
||||
};
|
||||
-- infinitive does not save GenNum,
|
||||
-- but indicative does for the sake of adjectival predication !
|
||||
-- ClIndic Present _ => zloj.s ! AF Nom Animate gn ;
|
||||
ClIndic Present _ | ClCondit => zloj.s ! AFShort gn ; ---- CLCondit AR 6/2/2013
|
||||
ClIndic PastRus _ => case gn of
|
||||
{ (GSg Fem) => "была" ++ zloj.s! AF Nom Animate (GSg Fem);
|
||||
(GSg Masc) => "был" ++ zloj.s! AF Nom Animate (GSg Masc);
|
||||
(GSg Neut) => "был" ++ zloj.s! AF Nom Animate (GSg Neut);
|
||||
GPl => "были" ++ zloj.s! AF Nom Animate GPl
|
||||
};
|
||||
ClIndic Future _ => case gn of
|
||||
{ GPl => case p of
|
||||
{ P3 => "будут" ++ zloj.s! AF Nom Animate GPl;
|
||||
P2 => "будете" ++ zloj.s! AF Nom Animate GPl;
|
||||
P1 => "будем" ++ zloj.s! AF Nom Animate GPl
|
||||
-- : V2 -> VP ; -- be loved
|
||||
PassV2 v2 = {
|
||||
adv = \\a=>[] ;
|
||||
verb = passivate v2 ;
|
||||
dep=[] ;
|
||||
compl = \\a=>[]
|
||||
} ;
|
||||
(GSg _) => case p of
|
||||
{P3 => "будет" ++ zloj.s! AF Nom Animate (GSg (genGNum gn));
|
||||
P2 => "будешь"++ zloj.s! AF Nom Animate (GSg (genGNum gn));
|
||||
P1=> "буду" ++ zloj.s! AF Nom Animate (GSg (genGNum gn))
|
||||
|
||||
-- : VV -> VP -> VP ; -- want to run
|
||||
ComplVV vv vp = vp ** {
|
||||
verb=vv.v ;
|
||||
dep=verbInf vp.verb ;
|
||||
adv=\\a=>vv.modal ! a ++ vp.adv ! a
|
||||
} ;
|
||||
|
||||
-- : VS -> S -> VP ; -- say that she runs
|
||||
ComplVS vs s = {
|
||||
verb = vs ;
|
||||
dep=[] ;
|
||||
adv=\\a=>[] ;
|
||||
compl=\\A=>comma ++ "что" ++ s.s ! Ind
|
||||
} ;
|
||||
|
||||
-- : VQ -> QS -> VP ; -- wonder who runs
|
||||
ComplVQ vq qs = {
|
||||
verb = vq ;
|
||||
dep=[] ;
|
||||
adv=\\a=>[] ;
|
||||
compl=\\A=>comma ++ "что" ++ qs.s ! QDir
|
||||
} ;
|
||||
|
||||
|
||||
-- : VA -> AP -> VP ; -- they become red
|
||||
ComplVA va ap = {
|
||||
verb=va ;
|
||||
dep=[] ;
|
||||
adv=\\a=>[] ;
|
||||
compl=case ap.preferShort of {
|
||||
PrefFull => (\\a => ap.s ! agrGenNum a ! Inanimate ! Ins) ;
|
||||
PrefShort => ap.short
|
||||
}
|
||||
}
|
||||
---- ; ClCondit => ""
|
||||
} ;
|
||||
|
||||
asp = Imperfective ;
|
||||
w = Act;
|
||||
negBefore = True;
|
||||
s2 = "";
|
||||
s3 = \\g,n=> ""
|
||||
-- : V2 -> VPSlash ; -- love (it)
|
||||
SlashV2a v2 = {adv=\\a=>[] ; verb=v2 ; dep=[] ; compl=\\_ => [] ; c=v2.c} ; -- looses complement info?
|
||||
|
||||
-- : V3 -> NP -> VPSlash ; -- give it (to her)
|
||||
Slash2V3 v3 np = {
|
||||
adv=\\a=>[] ;
|
||||
verb=v3 ;
|
||||
dep=[] ;
|
||||
compl=\\a=> v3.c.s ++ np.s ! v3.c.c;
|
||||
c=v3.c2
|
||||
} ;
|
||||
|
||||
-- AR 7/12/2010 --- hmmm
|
||||
CompCN zloj ={
|
||||
s= \\clf,gn,p =>
|
||||
let num = numGenNum gn ;
|
||||
zlojsg = zloj.nounpart ! NF Sg Nom nom ++ zloj.relcl ! Sg ! Nom ;
|
||||
zlojpl = zloj.nounpart ! NF Pl Nom plg ++ zloj.relcl ! Pl ! Nom
|
||||
in
|
||||
case clf of {
|
||||
-- person is ignored !
|
||||
ClInfinit => "быть" ++ zloj.nounpart ! NF Sg Inst nom ++ zloj.relcl ! Sg ! Inst ;
|
||||
ClImper => case gn of
|
||||
{ (GSg _) => "будь" ++ zloj.nounpart ! NF Sg Inst plg ++ zloj.relcl ! Sg ! Inst ;
|
||||
GPl => "будьте" ++ zloj.nounpart ! NF Pl Inst plg ++ zloj.relcl ! Pl ! Inst
|
||||
-- : V3 -> NP -> VPSlash ; -- give (it) to her
|
||||
Slash3V3 v3 np = {
|
||||
adv=\\a=>[] ;
|
||||
verb=v3 ;
|
||||
dep=[] ;
|
||||
compl=\\a=> v3.c2.s ++ np.s ! v3.c2.c;
|
||||
c=v3.c
|
||||
} ;
|
||||
|
||||
-- : V2V -> VP -> VPSlash ; -- beg (her) to go
|
||||
SlashV2V v2v vp = vp ** {
|
||||
verb=v2v ;
|
||||
dep=verbInf vp.verb ;
|
||||
c=v2v.c
|
||||
} ;
|
||||
|
||||
-- : V2S -> S -> VPSlash ; -- answer (to him) that it is good
|
||||
SlashV2S v2s s = {
|
||||
adv=\\a=>[] ;
|
||||
verb=v2s ;
|
||||
dep=[] ;
|
||||
compl=\\a=> embedInCommas ("что" ++ s.s ! Ind) ;
|
||||
c=v2s.c
|
||||
} ;
|
||||
-- : V2Q -> QS -> VPSlash ; -- ask (him) who came
|
||||
SlashV2Q v2q qs = {
|
||||
adv=\\a=>[] ;
|
||||
verb=v2q ;
|
||||
dep=[] ;
|
||||
compl=\\a=>qs.s ! QDir;
|
||||
c=v2q.c
|
||||
} ;
|
||||
|
||||
-- : V2A -> AP -> VPSlash ; -- paint (it) red
|
||||
SlashV2A v2a ap = {
|
||||
adv=\\a=>[] ;
|
||||
verb=v2a ;
|
||||
dep=[] ;
|
||||
compl=case ap.preferShort of {
|
||||
PrefFull => (\\a => ap.s ! agrGenNum a ! Inanimate ! v2a.c.c) ; -- TODO: Check acc dep on animacy
|
||||
PrefShort => ap.short
|
||||
} ;
|
||||
c=v2a.c
|
||||
} ;
|
||||
|
||||
-- : VPSlash -> NP -> VP ; -- love it
|
||||
ComplSlash vps np = vps ** {
|
||||
compl=\\a => vps.compl ! a ++ (applyPrep vps.c np) -- hasPrep? order?
|
||||
} ;
|
||||
|
||||
-- : VV -> VPSlash -> VPSlash ; -- want to buy
|
||||
SlashVV vv vps = vps ** {
|
||||
verb=vv.v ;
|
||||
dep=(verbInf vps.verb) ++ vps.dep ;
|
||||
adv=\\a=>vv.modal ! a ++ vps.adv ! a
|
||||
} ;
|
||||
-- : V2V -> NP -> VPSlash -> VPSlash ; -- beg me to buy
|
||||
SlashV2VNP v2v np vps = vps ** {
|
||||
verb=v2v ;
|
||||
dep=(verbInf vps.verb) ++ vps.dep ;
|
||||
compl=\\a=>vps.compl ! a ++ (applyPrep vps.c np); -- hasPrep? Order?
|
||||
c=v2v.c
|
||||
} ;
|
||||
|
||||
-- : VPSlash -> VP ; -- love himself
|
||||
ReflVP vps = vps ** {
|
||||
compl=\\a => vps.compl ! a ++ vps.c.s ++ sam.s ! vps.c.c
|
||||
} ;
|
||||
|
||||
-- : Comp -> VP ; -- be warm
|
||||
UseComp comp = {
|
||||
adv=\\a=>comp.adv ;
|
||||
compl=comp.s ;
|
||||
verb=selectCopula comp.cop ;
|
||||
dep=[] ;
|
||||
} ;
|
||||
|
||||
-- : VP -> Adv -> VP ; -- sleep here
|
||||
AdvVP vp adv = vp ** {compl=\\a => vp.compl ! a ++ adv.s} ;
|
||||
|
||||
-- : VP -> Adv -> VP ; -- sleep , even though ...
|
||||
ExtAdvVP vp adv = vp ** {compl=\\a => vp.compl ! a ++ embedInCommas adv.s};
|
||||
|
||||
-- : AdV -> VP -> VP ; -- always sleep
|
||||
AdVVP adv vp = vp ** {adv=\\a => adv.s ++ vp.adv ! a} ;
|
||||
|
||||
-- : VPSlash -> Adv -> VPSlash ; -- use (it) here
|
||||
AdvVPSlash vps adv = vps ** {compl=\\a => vps.compl ! a ++ adv.s} ;
|
||||
|
||||
-- : AdV -> VPSlash -> VPSlash ; -- always use (it)
|
||||
AdVVPSlash adv vps = vps ** {adv=\\a=>adv.s ++ vps.adv ! a} ;
|
||||
|
||||
-- : VP -> Prep -> VPSlash ; -- live in (it)
|
||||
VPSlashPrep vp prep = vp ** {c=prep} ;
|
||||
-- : AP -> Comp ; -- (be) small
|
||||
CompAP ap = case ap.preferShort of {
|
||||
PrefFull => {s=\\a=>ap.s ! agrGenNum a ! Inanimate ! Ins ; adv=[] ; cop=InsCopula} ;
|
||||
PrefShort => {s=ap.short ; adv=[] ; cop=EllCopula}
|
||||
};
|
||||
-- infinitive does not save GenNum,
|
||||
-- but indicative does for the sake of adjectival predication !
|
||||
ClIndic Present _ | ClCondit => zloj.nounpart ! NF num Nom nom ++ zloj.relcl ! num ! Nom ;
|
||||
ClIndic PastRus _ => case gn of
|
||||
{ (GSg Fem) => "была" ++ zlojsg ;
|
||||
(GSg Masc) => "был" ++ zlojsg ;
|
||||
(GSg Neut) => "был" ++ zlojsg ;
|
||||
GPl => "были" ++ zlojpl
|
||||
};
|
||||
ClIndic Future _ => case gn of
|
||||
{ GPl => case p of
|
||||
{ P3 => "будут" ++ zlojpl ;
|
||||
P2 => "будете" ++ zlojpl ;
|
||||
P1 => "будем" ++ zlojpl
|
||||
} ;
|
||||
(GSg _) => case p of
|
||||
{P3 => "будет" ++ zlojsg ;
|
||||
P2 => "будешь"++ zlojsg ;
|
||||
P1=> "буду" ++ zlojsg
|
||||
}
|
||||
}
|
||||
---- ; 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
|
||||
{ GSg _ => "будь" ++ zloj.s; -- person is ignored !
|
||||
GPl => "будьте" ++ zloj.s
|
||||
};
|
||||
ClInfinit => "быть" ++ zloj.s;
|
||||
ClIndic Present _ | ClCondit => zloj.s ;
|
||||
ClIndic PastRus _ => case gn of
|
||||
{ (GSg Fem) => "была" ++ zloj.s;
|
||||
(GSg Masc) => "был" ++ zloj.s;
|
||||
(GSg Neut) => "было" ++ zloj.s;
|
||||
GPl => "были" ++ zloj.s
|
||||
};
|
||||
ClIndic Future _ => case gn of
|
||||
{ (GSg _) => "будет" ++ zloj.s;
|
||||
GPl => "будут" ++ 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) (numGenNum 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) (numGenNum gn) p) ;
|
||||
asp = se.asp ;
|
||||
w = Act;
|
||||
s2 = "";
|
||||
s3 = \\g,n => "";
|
||||
negBefore = True ;
|
||||
sc = se.c2.s ;
|
||||
c = se.c2.c
|
||||
} ;
|
||||
|
||||
ComplSlash se tu =
|
||||
{s = \\clf,gn,p => se.s ! clf ! gn ! p
|
||||
++ se.sc ++ tu.s ! (mkPronForm se.c No NonPoss) ;
|
||||
asp = se.asp ;
|
||||
w = se.w;
|
||||
s2 = se.s2;
|
||||
s3 = se.s3;
|
||||
negBefore = se.negBefore
|
||||
} ;
|
||||
|
||||
Slash2V3 dat tu =
|
||||
let
|
||||
tebepivo = dat.c2.s ++ tu.s ! PF dat.c2.c No NonPoss ++ dat.c3.s ;
|
||||
in
|
||||
{s = \\clf,gn,p => dat.s ! (getActVerbForm clf (genGNum gn) (numGenNum gn) p) ++ tebepivo ;
|
||||
asp = dat.asp ;
|
||||
w = Act;
|
||||
negBefore = True;
|
||||
s2 = "";
|
||||
s3 = \\g,n=> "" ;
|
||||
sc = dat.c3.s ;
|
||||
c = dat.c3.c
|
||||
} ;
|
||||
|
||||
Slash3V3 dat pivo =
|
||||
let
|
||||
tebepivo = dat.c3.s ++ pivo.s ! PF dat.c3.c Yes NonPoss
|
||||
in
|
||||
{s = \\clf,gn,p => dat.s ! (getActVerbForm clf (genGNum gn) (numGenNum gn) p) ++ tebepivo ;
|
||||
asp = dat.asp ;
|
||||
w = Act;
|
||||
negBefore = True;
|
||||
s2 = "";
|
||||
s3 = \\g,n=> "" ;
|
||||
sc = dat.c2.s ;
|
||||
c = dat.c2.c
|
||||
} ;
|
||||
|
||||
---- AR 17/12/2008
|
||||
SlashV2Q dat esliOnPridet =
|
||||
{s = \\clf,gn,p => dat.s ! (getActVerbForm clf (genGNum gn) (numGenNum gn) p) ++ esliOnPridet.s ! QDir ;
|
||||
asp = dat.asp ;
|
||||
w = Act;
|
||||
negBefore = True;
|
||||
s2 = "";
|
||||
s3 = \\g,n=> "" ;
|
||||
sc = dat.c2.s ;
|
||||
c = dat.c2.c
|
||||
} ;
|
||||
|
||||
---- AR 17/12/2008
|
||||
SlashV2S vidit tuUlubaeshsya =
|
||||
{s = \\clf,gn,p => vidit.s ! (getActVerbForm clf (genGNum gn) (numGenNum gn) p)
|
||||
++ [", что"] ++ tuUlubaeshsya.s ;
|
||||
asp = vidit.asp;
|
||||
w = Act;
|
||||
s2="";
|
||||
negBefore = True;
|
||||
s3 = \\g,n => "" ;
|
||||
sc = vidit.c2.s ;
|
||||
c = vidit.c2.c
|
||||
} ;
|
||||
|
||||
---- AR 17/12/2008
|
||||
SlashV2V putatsya bezhat =
|
||||
{ s = \\clf,gn,p => putatsya.s ! (getActVerbForm clf (genGNum gn)
|
||||
(numGenNum gn) p) ++ bezhat.s!ClInfinit !gn!p ;
|
||||
asp = putatsya.asp ;
|
||||
w = Act;
|
||||
negBefore = True;
|
||||
s2 = "";
|
||||
s3 =\\g,n => "" ;
|
||||
sc = putatsya.c2.s ;
|
||||
c = putatsya.c2.c
|
||||
} ;
|
||||
|
||||
---- AR 17/12/2008
|
||||
ReflVP vp =
|
||||
{ s = \\clf,gn,p => vp.s ! clf ! gn ! p ++ vp.s2 ++ sebya ! vp.c;
|
||||
asp = vp.asp ;
|
||||
w = Act ;
|
||||
negBefore = True;
|
||||
s2 = "";
|
||||
s3 = \\g,n=> ""
|
||||
} ;
|
||||
|
||||
---- AR 17/12/2008
|
||||
SlashVV putatsya bezhat =
|
||||
{ s = \\clf,gn,p => putatsya.s ! (getActVerbForm clf (genGNum gn)
|
||||
(numGenNum gn) p) ++ bezhat.s!ClInfinit !gn!p ;
|
||||
asp = putatsya.asp ;
|
||||
w = Act;
|
||||
negBefore = True;
|
||||
s2 = "";
|
||||
s3 =\\g,n => "" ;
|
||||
sc = bezhat.s2 ;
|
||||
c = bezhat.c
|
||||
} ;
|
||||
|
||||
---- AR 17/12/2008
|
||||
SlashV2VNP putatsya np bezhat =
|
||||
{ s = \\clf,gn,p =>
|
||||
putatsya.s ! (getActVerbForm clf (genGNum gn) (numGenNum gn) p) ++
|
||||
np.s ! (mkPronForm putatsya.c2.c No NonPoss) ++ ---- ?
|
||||
bezhat.s!ClInfinit !gn!p ;
|
||||
asp = putatsya.asp ;
|
||||
w = Act;
|
||||
negBefore = True;
|
||||
s2 = "";
|
||||
s3 =\\g,n => "" ;
|
||||
sc = bezhat.s2 ; ---- ?
|
||||
c = bezhat.c
|
||||
} ;
|
||||
|
||||
|
||||
-- To generate "сказал, что Иван гуляет" / "не сказал, что Иван гуляет":
|
||||
ComplVS vidit tuUlubaeshsya =
|
||||
{s = \\clf,gn,p => vidit.s ! (getActVerbForm clf (genGNum gn) (numGenNum 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)
|
||||
(numGenNum gn) p) ++ bezhat.s!ClInfinit !gn!p ++ bezhat.s2 ; ---- s2 added by AR 7/12/2012 - but where should s3 go?
|
||||
asp = putatsya.asp ;
|
||||
w = Act;
|
||||
negBefore = True;
|
||||
s2 = "";
|
||||
s3 =\\g,n => ""
|
||||
} ;
|
||||
ComplVQ dat esliOnPridet =
|
||||
{s = \\clf,gn,p => dat.s ! (getActVerbForm clf (genGNum gn) (numGenNum 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) (numGenNum gn) p) ;
|
||||
asp = vuglyadet.asp ;
|
||||
w = Act;
|
||||
negBefore = True;
|
||||
s2 = "";
|
||||
s3 = \\g,n => molodoj.s!(AF Inst Animate (gennum g n))
|
||||
} ;
|
||||
|
||||
SlashV2A obechat molodoj =
|
||||
{s = \\clf,gn,p =>
|
||||
obechat.s ! (getActVerbForm clf (genGNum gn) (numGenNum gn) p) ++
|
||||
molodoj.s ! AF Inst Inanimate (GSg Neut) ;
|
||||
---- AR 17/6; AF Inst tu.anim (pgNum tu.g tu.n) ;
|
||||
asp = obechat.asp ;
|
||||
w = Act;
|
||||
negBefore = True;
|
||||
s2 = "";
|
||||
s3 = \\g,n =>"" ;
|
||||
sc = obechat.c2.s ;
|
||||
c = obechat.c2.c
|
||||
} ;
|
||||
|
||||
AdvVP poet khorosho =
|
||||
{s = \\clf,gn,p => poet.s ! clf!gn!p; s2 = poet.s2 ++ khorosho.s; s3 = poet.s3;
|
||||
asp = poet.asp; w = poet.w; t = poet.t ; negBefore = poet.negBefore } ;
|
||||
|
||||
AdVVP khorosho poet =
|
||||
{s = \\clf,gn,p => poet.s ! clf!gn!p; s2 = khorosho.s ++ poet.s2; s3 = poet.s3;
|
||||
asp = poet.asp; w = poet.w; t = poet.t ; negBefore = poet.negBefore } ;
|
||||
|
||||
PassV2 se =
|
||||
{s=\\clf,gn,p => se.s ! (getPassVerbForm clf (genGNum gn) (numGenNum gn) p) ;
|
||||
asp=se.asp; w=Pass; s2 = se.c2.s;
|
||||
negBefore = True;
|
||||
s3 = table{_=> table{_ => ""}}
|
||||
};
|
||||
|
||||
VPSlashPrep vp prep = vp ** {sc = prep.s ; c = prep.c} ; ---- AR
|
||||
|
||||
|
||||
---- AR 6/2/2013. Unfortunately there's no copula in the resources...
|
||||
|
||||
UseCopula =
|
||||
{ s=\\clf,gn,p => case clf of
|
||||
{
|
||||
(ClIndic Present _) => [] ;
|
||||
(ClIndic PastRus _) => case gn of
|
||||
{ (GSg Fem) =>"была" ;
|
||||
(GSg Masc) =>"был" ;
|
||||
(GSg Neut) =>"было" ;
|
||||
GPl => "были"
|
||||
};
|
||||
(ClIndic Future _) => case gn of
|
||||
{ GPl => case p of
|
||||
{ P3 => "будут" ;
|
||||
P2 => "будете" ;
|
||||
P1 => "будем"
|
||||
};
|
||||
(GSg _) => case p of
|
||||
{ P3=>"будет" ;
|
||||
P2 => "будешь" ;
|
||||
P1=> "буду"
|
||||
} --case p
|
||||
}; --case gn
|
||||
ClCondit => "" ;
|
||||
ClImper => case (numGenNum gn) of
|
||||
{Sg => "будь" ;
|
||||
Pl => "будьте"
|
||||
};
|
||||
ClInfin => "быть"
|
||||
}; -- case clf
|
||||
asp = Imperfective ;
|
||||
w = Act;
|
||||
negBefore = True;
|
||||
s2 = "";
|
||||
s3 = \\g,n => ""
|
||||
} ;
|
||||
-- : NP -> Comp ; -- (be) the man
|
||||
CompNP np = {s=\\a=>np.s ! Ins ; adv=[] ; cop=InsCopula} ;
|
||||
|
||||
-- : Adv -> Comp ; -- (be) here
|
||||
CompAdv adv = {s=\\a=>[] ; adv=adv.s ; cop=NomCopula} ;
|
||||
-- : CN -> Comp ; -- (be) a man/men
|
||||
CompCN cn = {s=\\a=>cn.s ! numGenNum (agrGenNum a) ! Ins ; adv=[] ; cop=InsCopula} ;
|
||||
|
||||
-- : VP ; -- be
|
||||
UseCopula = {adv=\\a=>[] ; verb=copulaIns ; dep=[] ; compl=\\a=>[]} ;
|
||||
}
|
||||
|
||||
|
||||
1013
src/russian/ZaliznyakAlgo.gf
Normal file
1013
src/russian/ZaliznyakAlgo.gf
Normal file
File diff suppressed because it is too large
Load Diff
23
src/russian/references.txt
Normal file
23
src/russian/references.txt
Normal file
@@ -0,0 +1,23 @@
|
||||
|
||||
Some references:
|
||||
|
||||
[KING1] Katherine E. King Master of Arts Thesis. University of Washington Mixed Gender Agreement in Russian DPs.
|
||||
https://digital.lib.washington.edu/researchworks/bitstream/handle/1773/35231/King_washington_0250O_15352.pdf?sequence=1&isAllowed=y
|
||||
|
||||
[LISTENMAA1] https://inariksit.github.io/gf/2018/09/22/grammar-blowup.html#inflection-tables-vs-glu--ing-morph--eme--s
|
||||
|
||||
[RUSGRAM] Проект корпусного описания русской грамматики (http://rusgram.ru);
|
||||
|
||||
[RUWIKT] https://ru.wiktionary.org
|
||||
|
||||
[RUWIKI] https://ru.wikipedia.org
|
||||
|
||||
[KHOLODILOVA1] Холодилова М. А. Словоизменительная одушевленность местоимения который. Труды института русского языка им. В.В. Виноградова. 2016. Т. X. С. 342-355.
|
||||
|
||||
[ZALIZNYAK] http://gramdict.ru/ А. А. Зализняк Грамматический словарь русского языка Словоизменение
|
||||
|
||||
[MALKOVSKYETAL] М. Г. Мальковский, Т. Ю. Грацианова, И. Н. Полякова Прикладное программное обеспечение: системы автоматической обработки текстов
|
||||
|
||||
[VEREMEY] Веремей, В.В. Алгоритмы создания и пополнения грамматического словаря русского языка для синтеза речи по тексту / В.В. Веремей, Л.И. Цирульник / Информатика – 2012 – № 1 – С.61-68.
|
||||
|
||||
[ISACHENKO] Исаченко, А.В. Грамматический строй русского языка в сопоставлении с словацким. Братислава : Словацкая акад. наук, 1954-1960
|
||||
39
src/russian/todo.txt
Normal file
39
src/russian/todo.txt
Normal file
@@ -0,0 +1,39 @@
|
||||
# Some problematic places
|
||||
|
||||
> l UttS (AdvS (AdAdv quite_Adv (ComparAdvAdj less_CAdv narrow_A everything_NP)) (UseCl (TTAnt TPres ASimul) PNeg (ExistNP something_NP)))
|
||||
довольно менее узко , чем всё не существовает что &+ -то
|
||||
|
||||
Lang: DetCN many_Det (RelCN (UseN bike_N) (UseRCl (TTAnt TPres AAnter) PNeg (RelVP IdRP (UseV fall_V))))
|
||||
LangRus: многие велосипеды , которые не падает
|
||||
|
||||
Lang: DetCN (DetQuantOrd (PossPron he_Pron) (NumCard (NumDigits (IDig D_0))) (OrdSuperl bad_A)) (RelCN (ConjCN both7and_DConj (BaseCN (UseN2 mother_N2) (UseN lamp_N))) (UseRCl (TTAnt TPast ASimul) PNeg (RelCl (ImpersCl ready_VP))))
|
||||
LangRus: 0 его самых плохих как матерей , так и ламп , таких не , что бы &+ ло готово
|
||||
|
||||
Lang: AdvS there7from_Adv (UseCl (TTAnt TFut AAnter) PPos (CleftNP everybody_NP (UseRCl (TTAnt TPres AAnter) PPos (RelSlash (FunRP in8front_Prep (languageNP polish_Language) IdRP) (SlashPrep (PredVP somebody_NP hungry_VP) through_Prep)))))
|
||||
LangRus: оттуда это все , польский перед которые голоден
|
||||
|
||||
Lang: ComplN3 distance_N3 (DetCN (DetQuant (PossPron youPol_Pron) NumSg) (SentCN (ComplN2 brother_N2 everything_NP) (EmbedVP hungry_VP)))
|
||||
LangRus: расстояние от вашего брат всего быть голодно до
|
||||
|
||||
> l (RelNP everybody_NP (UseRCl (TTAnt TFut ASimul) PPos (RelVP IdRP ill_VP)))
|
||||
все , которые будет больны
|
||||
|
||||
> l timeunitRange (NumDigits (IDig D_1)) (NumDigits (IDig D_2)) year_Timeunit
|
||||
от 1 до 2 года
|
||||
|
||||
AllRusAbs: UseCl (TTAnt TPres AAnter) PNeg (CleftNP (PredetNP not_Predet (CountNP somePl_Det everybody_NP)) (UseRCl (TTAnt TFut AAnter) PNeg (RelVP IdRP ready_VP)))
|
||||
AllRus: это не не некоторые из всех , которые не будет готовы
|
||||
|
||||
> l (AdvS (weekdayNextAdv saturday_Weekday) (UseCl (TTAnt TPres AAnter) PNeg (GenericCl UseCopula)))
|
||||
в следующий суббота не являешься
|
||||
|
||||
> l PrepNP above_Prep (UsePron i_Pron)
|
||||
над мной
|
||||
(should be: надо мной)
|
||||
|
||||
- verb zv index does not support "*", it figures forms out from 3 given examples instead. Most of the time.
|
||||
|
||||
|
||||
AllRusAbs: UttImpPol PPos (ImpVP (ComplSlash (Slash2V3 add_V3 everybody_NP) (PPartNP somebody_NP drink_V2)))
|
||||
AllRus: складываем &+ те всех в кого &+ -то пит
|
||||
|
||||
Reference in New Issue
Block a user