mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-09-24 03:06:02 -06:00
extended with Codex and manually refactored
This commit is contained in:
@@ -35,8 +35,8 @@ lin
|
||||
|
||||
-- : A -> NP -> AP ; -- warmer than I - теплее меня
|
||||
ComparA a np = {
|
||||
s = \\gn,anim,cas => a.comp ++ (applyPrep {s="" ; c=Gen ; neggen=True ; hasPrep=False} np) ; -- True?
|
||||
short = \\ag=>a.comp ++ (applyPrep {s="" ; c=Gen ; neggen=True ; hasPrep=False} np) ;
|
||||
s = \\gn,anim,cas => a.comp ++ (applyPrep {s="" ; c=Gen ; hasPrep=False} np) ; -- True?
|
||||
short = \\gn=>a.comp ++ (applyPrep {s="" ; c=Gen ; hasPrep=False} np) ;
|
||||
isPost = False ;
|
||||
preferShort = PrefShort
|
||||
} ;
|
||||
@@ -59,4 +59,4 @@ lin
|
||||
isPost = False ;
|
||||
preferShort = a2.preferShort
|
||||
} ;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,18 +5,18 @@ flags coding=utf8 ;
|
||||
|
||||
lin
|
||||
-- : A -> Adv ; -- warmly - тепло
|
||||
PositAdvAdj a = {s = a.sn} ; -- only qual
|
||||
PositAdvAdj a = {s = a.short ! (GSg Neut)} ; -- only qual
|
||||
|
||||
-- : A -> AdA ; -- extremely - исключительно
|
||||
PositAdAAdj a = {s = a.sn} ; -- only qual
|
||||
PositAdAAdj a = {s = a.short ! (GSg Neut)} ; -- only qual
|
||||
|
||||
-- : CAdv -> A -> NP -> Adv ; -- more warmly than John - более тепло чем Иван
|
||||
ComparAdvAdj cadv a np = {
|
||||
s = cadv.s ++ a.sn ++ embedInCommas (cadv.p ++ np.s ! Nom)
|
||||
s = cadv.s ++ a.short ! (GSg Neut) ++ embedInCommas (cadv.p ++ np.s ! Nom)
|
||||
} ;
|
||||
-- : CAdv -> A -> S -> Adv ; -- more warmly than he runs - более тепло чем он бежал
|
||||
ComparAdvAdjS cadv a s = {
|
||||
s = cadv.s ++ a.sn ++ cadv.p ++ s.s ! Ind
|
||||
s = cadv.s ++ a.short ! (GSg Neut) ++ cadv.p ++ s.s ! Ind
|
||||
} ;
|
||||
|
||||
-- : Prep -> NP -> Adv ; -- in the house - в доме
|
||||
|
||||
+13
-3
@@ -82,6 +82,7 @@ lincat
|
||||
Numeral = NumeralForms ;
|
||||
Num = NumDet ;
|
||||
Card = NumDet ;
|
||||
ACard = {s : Str} ;
|
||||
Digits = {s : Str ; size: NumSize; tail: DTail} ;
|
||||
Decimal = {s : Str ; size: NumSize; hasDot : Bool} ;
|
||||
|
||||
@@ -124,8 +125,8 @@ linref
|
||||
Pron = \s -> s.nom ;
|
||||
N2 = \s -> s.snom ++ s.c2.s ;
|
||||
N3 = \s -> s.snom ++ s.c2.s ++ s.c3.s ;
|
||||
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 ; -- ?
|
||||
A = \s -> case s.preferShort of {PrefShort => s.short ! (GSg Masc) ; _ => s.msnom} ;
|
||||
A2 = \s -> case s.preferShort of {PrefShort => s.short ! (GSg Masc) ; _ => s.msnom} ++ s.c.s ; -- ?
|
||||
V = \s -> verbInf s ;
|
||||
V2 = \s -> (verbInf s) ++ s.c.s ;
|
||||
V2V = \s -> (verbInf s) ++ s.c.s ;
|
||||
@@ -161,9 +162,18 @@ lindef
|
||||
prpl1,prpl2,prpl3,
|
||||
psgm,psgs,
|
||||
isg2,isg2refl,ipl1,
|
||||
ppps,pppss,prtr,ptr=s;
|
||||
prtr,ptr=s;
|
||||
asp=Imperfective ;
|
||||
fut=NullFuture ;
|
||||
prap={
|
||||
msnom,fsnom,nsnom,pnom,msgen,fsgen,pgen,msdat,fsacc,
|
||||
msins,fsins,pins,msprep=s;
|
||||
};
|
||||
pppa={
|
||||
msnom,fsnom,nsnom,pnom,msgen,fsgen,pgen,msdat,fsacc,
|
||||
msins,fsins,pins,msprep=s;
|
||||
short=\\_=>s;
|
||||
};
|
||||
refltran = Trans
|
||||
} ;
|
||||
dep = "" ;
|
||||
|
||||
@@ -10,7 +10,7 @@ concrete ConjunctionRus of Conjunction =
|
||||
[IAdv] = {s1,s2 : Str} ;
|
||||
[AdV] = {s1,s2 : Str} ;
|
||||
[AP] = {s1,s2 : AdjTable ;
|
||||
short1,short2 : AgrTable ;
|
||||
short1,short2 : GenNum => Str ;
|
||||
isPost : Bool;
|
||||
preferShort : ShortFormPreference
|
||||
} ;
|
||||
@@ -58,7 +58,7 @@ concrete ConjunctionRus of Conjunction =
|
||||
|
||||
-- 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 ;
|
||||
short1 = \\gn=> x.short ! gn ++ comma ++ xs.short1 ! gn ;
|
||||
short2 = xs.short2 ;
|
||||
isPost = orB x.isPost xs.isPost ;
|
||||
preferShort = selectAPForm x.preferShort xs.preferShort
|
||||
@@ -72,7 +72,6 @@ concrete ConjunctionRus of Conjunction =
|
||||
|
||||
-- : 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?
|
||||
} ;
|
||||
@@ -81,7 +80,6 @@ concrete ConjunctionRus of Conjunction =
|
||||
ConjDet conj xs = {
|
||||
s=\\g,anim,cas => conj.s1 ++ xs.s1 ! g ! anim ! cas ++ conj.s2 ++ xs.s2 ! g ! anim ! cas ;
|
||||
type=NormalDet ; -- hopefully ok to drop empty cases
|
||||
g=xs.g ;
|
||||
c=xs.c ;
|
||||
size=xs.size
|
||||
} ;
|
||||
@@ -93,10 +91,10 @@ concrete ConjunctionRus of Conjunction =
|
||||
ConsS = consrTable Mood comma ;
|
||||
|
||||
-- : RS -> RS -> ListRS ; -- who walks, whom I know
|
||||
BaseRS x y = twoTable3 GenNum Animacy Case x y ** {c = y.c} ;
|
||||
BaseRS x y = twoTable3 GenNum Animacy Case x y ;
|
||||
|
||||
-- : RS -> ListRS -> ListRS ; -- who walks, whom I know, who is here
|
||||
ConsRS xs x = consrTable3 GenNum Animacy Case comma xs x ** {c = xs.c} ;
|
||||
ConsRS xs x = consrTable3 GenNum Animacy Case comma xs x ;
|
||||
|
||||
-- : Conj -> ListAdv -> Adv ; -- here or there
|
||||
ConjAdv = conjunctDistrSS ;
|
||||
@@ -118,9 +116,7 @@ concrete ConjunctionRus of Conjunction =
|
||||
ConjS conj ss = conjunctDistrTable Mood conj ss ;
|
||||
|
||||
-- : Conj -> ListRS -> RS ; -- who walks and whose mother runs
|
||||
ConjRS conj ss = conjunctDistrTable3 GenNum Animacy Case conj ss ** {
|
||||
c = ss.c
|
||||
} ;
|
||||
ConjRS conj ss = conjunctDistrTable3 GenNum Animacy Case conj ss ;
|
||||
|
||||
-- : CN -> CN -> ListCN ; -- man, woman
|
||||
BaseCN x y = {
|
||||
@@ -165,8 +161,7 @@ concrete ConjunctionRus of Conjunction =
|
||||
--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
|
||||
pron = xs.pron
|
||||
} ;
|
||||
|
||||
-- : Conj -> ListNP -> NP ; -- she or we
|
||||
@@ -176,8 +171,7 @@ concrete ConjunctionRus of Conjunction =
|
||||
Sg => xs.a ;
|
||||
Pl => case xs.a of {Ag gn p => Ag GPl p}
|
||||
} ;
|
||||
pron = xs.pron ;
|
||||
anim = xs.anim
|
||||
pron = xs.pron
|
||||
} ;
|
||||
|
||||
oper
|
||||
|
||||
@@ -29,7 +29,7 @@ lin
|
||||
adv=[];
|
||||
verb=copulaEll ; -- ???
|
||||
dep=[] ;
|
||||
compl=\\_ => (PositA married).short ! np1.a ++ applyPrep cc np2 ;
|
||||
compl=\\_ => (PositA married).short ! (agrGenNum np1.a) ++ applyPrep cc np2 ;
|
||||
a=np1.a ; ---
|
||||
} ;
|
||||
|
||||
@@ -63,7 +63,7 @@ lin
|
||||
subj=[] ;
|
||||
adv=[] ;
|
||||
verb=copulaEll ;
|
||||
dep=ap.short ! Ag (GSg Neut) P3 ;
|
||||
dep=ap.short ! (GSg Neut) ;
|
||||
compl=\\p=>[] ;
|
||||
a=Ag (GSg Neut) P3
|
||||
} ;
|
||||
|
||||
@@ -4156,4 +4156,4 @@ lin
|
||||
|
||||
vzjvshij_A = mkA vzjatq_V Act Past ; --# notpresent
|
||||
vzjatyj_A = mkA vzjatq_V Pass Past ; --# notpresent
|
||||
}
|
||||
}
|
||||
|
||||
@@ -196,7 +196,7 @@ oper
|
||||
let pres : Agr=>Str = \\a => verbPresAgree v a in
|
||||
let past : Agr=>Str = \\a => verbPastAgree v a "" in
|
||||
let imp : Agr=>Str = \\a => ((verbImperativeAgree v a).p1 ++ (verbImperativeAgree v a).p2) in
|
||||
let ppp : GenNum=>Str = \\gn => shortPastPassPart v gn in
|
||||
let ppp : GenNum=>Str = (pastPassPart v).short in
|
||||
case v.asp of {Imperfective => "несовершенного вида" ; Perfective => "совершенного вида"} ++ "," ++
|
||||
case v.refltran of {
|
||||
Refl => "возвратный" ;
|
||||
|
||||
+161
-34
@@ -21,9 +21,10 @@ concrete ExtendRus of Extend =
|
||||
-- MkVPS2, ConjVPS2, ComplVPS2, MkVPI2, ConjVPI2, ComplVPI2,
|
||||
-- Base_nr_RNP, Base_rn_RNP, Base_rr_RNP, ByVP, CompBareCN,
|
||||
-- CompQS, CompS, CompVP, ComplBareVS, ComplGenVV, ComplSlashPartLast, ComplVPSVV, CompoundAP,
|
||||
CompoundN,
|
||||
CompoundN, CompoundAP,
|
||||
|
||||
--ConjRNP, Cons_nr_RNP, Cons_rr_RNP,
|
||||
ConjImp, BaseImp, ConsImp,
|
||||
RNP, RNPList, ConjRNP, Base_rr_RNP, Base_nr_RNP, Base_rn_RNP, Cons_rr_RNP, Cons_nr_RNP,
|
||||
DetNPMasc,
|
||||
DetNPFem,
|
||||
UseDAP,
|
||||
@@ -36,20 +37,21 @@ concrete ExtendRus of Extend =
|
||||
-- FocusAP, FocusAdV, FocusAdv,
|
||||
FocusObj,
|
||||
-- GenIP, GenModIP, GenModNP, GenNP, GenRP,
|
||||
-- GerundAdv, GerundCN, GerundNP, IAdvAdv, ICompAP,
|
||||
GerundAdv, GerundCN, GerundNP, ByVP,
|
||||
InOrderToVP,
|
||||
-- NominalizeVPSlashNP,
|
||||
PassAgentVPSlash,
|
||||
PassVPSlash,
|
||||
-- ProgrVPSlash,
|
||||
ProgrVPSlash,
|
||||
PastPartAP,
|
||||
PastPartAgentAP,
|
||||
PositAdVAdj,
|
||||
PredVPS,
|
||||
-- PredVPSVV, PredetRNP, PrepCN,
|
||||
-- EmbedSSlash, PresPartAP,
|
||||
PresPartAP,
|
||||
PurposeVP,
|
||||
-- ReflPoss, ReflPron, ReflRNP, SlashBareV2S, SlashV2V, StrandQuestSlash, StrandRelSlash,
|
||||
ReflPoss, ReflPron, ReflRNP, PredetRNP, AdvRNP, AdvRVP, AdvRAP,
|
||||
ReflA2RNP, PossPronRNP,
|
||||
PredIAdvVP,
|
||||
-- UncontractedNeg, UttAccIP, UttAccNP,
|
||||
FrontComplDirectVS,
|
||||
@@ -64,8 +66,9 @@ lincat
|
||||
VPS = {s : Mood => Agr => Str} ;
|
||||
[VPS] = {s1,s2 : Mood => Agr => Str} ;
|
||||
[Comp] = {s1,s2 : AgrTable ; cop : CopulaType} ;
|
||||
RNP = {s : Agr => Str} ;
|
||||
RNPList = {s1,s2 : Agr => Str} ;
|
||||
[Imp] = {s1,s2 : Polarity => GenNum => Str} ;
|
||||
RNP = {s : Case => Str} ;
|
||||
RNPList = {s1,s2 : Case => Str} ;
|
||||
|
||||
lin
|
||||
-- : NP -> NP -> NP ; -- Mr Macron, the president of France,
|
||||
@@ -79,18 +82,18 @@ lin
|
||||
PredIAdvVP iadv vp = QuestIAdv iadv (GenericCl vp) ; -- DEFAULT how does one walk
|
||||
|
||||
-- : VP -> Adv ; -- (in order) to publish the document
|
||||
InOrderToVP vp = lin Adv ({
|
||||
InOrderToVP vp = {
|
||||
s = "чтобы"
|
||||
++ vp.adv ! Ag (GSg Neut) P3
|
||||
++ (verbInf vp.verb)
|
||||
++ vp.dep
|
||||
++ vp.compl ! Pos ! Ag (GSg Neut) P3
|
||||
}) ;
|
||||
} ;
|
||||
|
||||
-- : VP -> Adv ; -- to become happy
|
||||
PurposeVP vp = lin Adv ({
|
||||
PurposeVP vp = {
|
||||
s = vp.adv ! Ag (GSg Neut) P3 ++ (verbInf vp.verb) ++ vp.dep ++ vp.compl ! Pos ! Ag (GSg Neut) P3
|
||||
}) ;
|
||||
} ;
|
||||
|
||||
-- : NP -> Cl ; -- there exists a number / there exist numbers
|
||||
ExistsNP np = {
|
||||
@@ -148,21 +151,36 @@ lin
|
||||
}
|
||||
} ;
|
||||
|
||||
-- : VP -> AP ; -- (the man) looking at Mary
|
||||
PresPartAP vp = {
|
||||
s=\\gn,anim,cas =>
|
||||
vp.adv ! (genNumAgrP3 gn)
|
||||
++ (presActPart vp.verb).s ! gn ! anim ! cas
|
||||
++ vp.dep
|
||||
++ vp.compl ! Pos ! (genNumAgrP3 gn) ;
|
||||
short=\\gn =>
|
||||
vp.adv ! (genNumAgrP3 gn)
|
||||
++ (presActPart vp.verb).s ! gn ! Animate ! Nom
|
||||
++ vp.dep
|
||||
++ vp.compl ! Pos ! (genNumAgrP3 gn) ;
|
||||
isPost=False ;
|
||||
preferShort=PreferFull
|
||||
} ;
|
||||
|
||||
-- VPSlash -> AP ; -- lost (opportunity) ; (opportunity) lost in space
|
||||
PastPartAP vps = {
|
||||
s=\\gn,anim,cas =>
|
||||
vps.adv ! (genNumAgrP3 gn)
|
||||
++ shortPastPassPart vps.verb gn
|
||||
++ (pastPassPart vps.verb).s ! gn ! anim ! cas
|
||||
++ vps.dep
|
||||
++ vps.compl1 ! Pos ! (genNumAgrP3 gn)
|
||||
++ vps.compl2 ! Pos ! (genNumAgrP3 gn);
|
||||
short=\\a =>
|
||||
vps.adv ! a
|
||||
++ shortPastPassPart vps.verb (agrGenNum a)
|
||||
short=\\gn =>
|
||||
vps.adv ! (genNumAgrP3 gn)
|
||||
++ (pastPassPart vps.verb).short ! gn
|
||||
++ vps.dep
|
||||
++ vps.compl1 ! Pos ! a
|
||||
++ vps.compl2 ! Pos ! a
|
||||
++ vps.c.s ; --
|
||||
++ vps.compl1 ! Pos ! (genNumAgrP3 gn)
|
||||
++ vps.compl2 ! Pos ! (genNumAgrP3 gn) ;
|
||||
isPost = case vps.isSimple of {
|
||||
True => False ;
|
||||
False => True
|
||||
@@ -171,21 +189,21 @@ lin
|
||||
} ;
|
||||
|
||||
-- : VPSlash -> NP -> AP ; -- (opportunity) lost by the company
|
||||
PastPartAgentAP vps np ={
|
||||
PastPartAgentAP vps np = {
|
||||
s=\\gn,anim,cas =>
|
||||
vps.adv ! (genNumAgrP3 gn)
|
||||
++ shortPastPassPart vps.verb gn
|
||||
++ (pastPassPart vps.verb).s ! gn ! anim ! cas
|
||||
++ vps.dep
|
||||
++ applyPolPrep Pos vps.c np
|
||||
++ np.s ! Ins
|
||||
++ vps.compl1 ! Pos ! (genNumAgrP3 gn)
|
||||
++ vps.compl2 ! Pos ! (genNumAgrP3 gn);
|
||||
short=\\a =>
|
||||
vps.adv ! a
|
||||
++ shortPastPassPart vps.verb (agrGenNum a)
|
||||
short=\\gn =>
|
||||
vps.adv ! (genNumAgrP3 gn)
|
||||
++ (pastPassPart vps.verb).short ! gn
|
||||
++ vps.dep
|
||||
++ applyPolPrep Pos vps.c np
|
||||
++ vps.compl1 ! Pos ! a
|
||||
++ vps.compl2 ! Pos ! a ;
|
||||
++ np.s ! Ins
|
||||
++ vps.compl1 ! Pos ! (genNumAgrP3 gn)
|
||||
++ vps.compl2 ! Pos ! (genNumAgrP3 gn) ;
|
||||
isPost = False ;
|
||||
preferShort=PreferFull
|
||||
} ;
|
||||
@@ -194,7 +212,7 @@ lin
|
||||
PassVPSlash vps = case vps.verb.asp of {
|
||||
Perfective => vps ** {
|
||||
verb=copulaEll ;
|
||||
compl=\\p,a => shortPastPassPart vps.verb (agrGenNum a) ++ vps.compl1 ! p ! a ++ vps.compl2 ! p ! a ++ vps.c.s
|
||||
compl=\\p,a => (pastPassPart vps.verb).short ! (agrGenNum a) ++ vps.compl1 ! p ! a ++ vps.compl2 ! p ! a ++ vps.c.s
|
||||
} ;
|
||||
Imperfective => vps ** {
|
||||
verb=(passivate vps.verb);
|
||||
@@ -202,14 +220,11 @@ lin
|
||||
}
|
||||
};
|
||||
|
||||
-- PresPartAP : VP -> AP ; -- (the man) looking at Mary
|
||||
-- use PlP2 + "ый"
|
||||
|
||||
-- : VPSlash -> VP
|
||||
PassAgentVPSlash vps np = case vps.verb.asp of {
|
||||
Perfective => vps ** {
|
||||
verb=copulaEll ;
|
||||
compl=\\p,a => shortPastPassPart vps.verb (agrGenNum a) ++ vps.c.s ++ vps.compl1 ! p ! a ++ vps.compl2 ! p ! a ++ np.s ! Ins
|
||||
compl=\\p,a => (pastPassPart vps.verb).short ! (agrGenNum a) ++ vps.c.s ++ vps.compl1 ! p ! a ++ vps.compl2 ! p ! a ++ np.s ! Ins
|
||||
} ;
|
||||
Imperfective => vps ** {
|
||||
verb=(passivate vps.verb);
|
||||
@@ -217,6 +232,109 @@ lin
|
||||
}
|
||||
};
|
||||
|
||||
-- Russian has no productive nominal gerund. The infinitive is the
|
||||
-- neutral fallback used by the multilingual Extend API.
|
||||
GerundCN vp = nounFormsNoun (immutableNounForms
|
||||
(vp.adv ! Ag (GSg Neut) P3 ++ verbInf vp.verb ++ vp.dep
|
||||
++ vp.compl ! Pos ! Ag (GSg Neut) P3)
|
||||
Neut Inanimate) ;
|
||||
|
||||
GerundNP vp = {
|
||||
s=\\_ => vp.adv ! Ag (GSg Neut) P3 ++ verbInf vp.verb ++ vp.dep
|
||||
++ vp.compl ! Pos ! Ag (GSg Neut) P3 ;
|
||||
pron=False ;
|
||||
a=Ag (GSg Neut) P3
|
||||
} ;
|
||||
|
||||
GerundAdv vp = {
|
||||
s=vp.adv ! Ag (GSg Neut) P3
|
||||
++ vp.verb.prtr ++ verbRefl vp.verb ++ vp.dep
|
||||
++ vp.compl ! Pos ! Ag (GSg Neut) P3
|
||||
} ;
|
||||
|
||||
ByVP vp = GerundAdv vp ;
|
||||
|
||||
CompoundAP n a =
|
||||
let ap = adjFormsAdjective a in {
|
||||
s=\\gn,anim,cas => n.snom ++ "-" ++ ap.s ! gn ! anim ! cas ;
|
||||
short=\\agr => n.snom ++ "-" ++ ap.short ! agr ;
|
||||
isPost=False ;
|
||||
preferShort=a.preferShort
|
||||
} ;
|
||||
|
||||
ProgrVPSlash vps = vps ;
|
||||
|
||||
ReflRNP vps rnp = {
|
||||
verb=vps.verb ;
|
||||
adv=vps.adv ;
|
||||
dep=vps.dep ;
|
||||
compl=\\p,a => vps.compl1 ! p ! a ++ vps.c.s
|
||||
++ rnp.s ! vps.c.c ++ vps.compl2 ! p ! a ;
|
||||
p=vps.p
|
||||
} ;
|
||||
|
||||
ReflPron = sebya ;
|
||||
|
||||
ReflPoss num cn = {
|
||||
s=\\cas =>
|
||||
(mkPronTable (reflexivePron (Ag (GSg Masc) P3)).poss)
|
||||
! gennum cn.g (numSizeNumber num.size)
|
||||
! cn.anim ! numSizeCase cas num.size
|
||||
++ num.s ! cn.g ! cn.anim ! cas
|
||||
++ cn.s ! animNumSizeNum cn.anim cas num.size
|
||||
! numSizeCase cas num.size
|
||||
} ;
|
||||
|
||||
PredetRNP pred rnp = {
|
||||
s=\\cas => pred.s ! GSg Masc ! Inanimate ! cas ++ rnp.s ! cas
|
||||
} ;
|
||||
|
||||
AdvRNP np prep rnp = {
|
||||
s=\\cas => np.s ! cas ++ prep.s ++ rnp.s ! prep.c
|
||||
} ;
|
||||
|
||||
AdvRVP vp prep rnp = vp ** {
|
||||
compl=\\p,a => vp.compl ! p ! a ++ prep.s ++ rnp.s ! prep.c
|
||||
} ;
|
||||
|
||||
AdvRAP ap prep rnp = ap ** {
|
||||
s=\\gn,anim,cas => ap.s ! gn ! anim ! cas
|
||||
++ prep.s ++ rnp.s ! prep.c ;
|
||||
short=\\a => ap.short ! a ++ prep.s ++ rnp.s ! prep.c ;
|
||||
isPost=True
|
||||
} ;
|
||||
|
||||
ReflA2RNP a2 rnp = {
|
||||
s=\\gn,anim,cas =>
|
||||
(adjFormsAdjective a2).s ! gn ! anim ! cas
|
||||
++ a2.c.s ++ rnp.s ! a2.c.c ;
|
||||
short=\\a =>
|
||||
(adjFormsAdjective a2).short ! a
|
||||
++ a2.c.s ++ rnp.s ! a2.c.c ;
|
||||
isPost=False ;
|
||||
preferShort=a2.preferShort
|
||||
} ;
|
||||
|
||||
PossPronRNP pron num cn rnp =
|
||||
let np = DetCN (DetQuant (PossPron pron) num) cn in {
|
||||
s=\\cas => np.s ! cas ++ rnp.s ! Gen ;
|
||||
pron=False ;
|
||||
a=np.a
|
||||
} ;
|
||||
|
||||
ConjRNP conj xs = {
|
||||
s=\\cas => conj.s1 ++ xs.s1 ! cas ++ conj.s2 ++ xs.s2 ! cas
|
||||
} ;
|
||||
Base_rr_RNP x y = {s1=x.s ; s2=y.s} ;
|
||||
Base_nr_RNP x y = {s1=x.s ; s2=y.s} ;
|
||||
Base_rn_RNP x y = {s1=x.s ; s2=y.s} ;
|
||||
Cons_rr_RNP x xs = {
|
||||
s1=\\c => x.s ! c ++ comma ++ xs.s1 ! c ; s2=xs.s2
|
||||
} ;
|
||||
Cons_nr_RNP x xs = {
|
||||
s1=\\c => x.s ! c ++ comma ++ xs.s1 ! c ; s2=xs.s2
|
||||
} ;
|
||||
|
||||
|
||||
-- : Pron -> Pron ; -- unstressed subject pronoun becomes empty: "am tired"
|
||||
ProDrop pron = {
|
||||
@@ -230,7 +348,7 @@ lin
|
||||
UttAdV adv = {s=adv.s} ;
|
||||
|
||||
-- : A -> AdV ; -- (that she) positively (sleeps)
|
||||
PositAdVAdj a = ss a.sn ** {p=Pos} ;
|
||||
PositAdVAdj a = {s=a.short ! (GSg Neut); p=Pos} ;
|
||||
|
||||
-- : NP -> SSlash -> Utt ; -- her I love
|
||||
FocusObj np ss = {
|
||||
@@ -345,6 +463,15 @@ lin
|
||||
cop = xs.cop
|
||||
} ;
|
||||
|
||||
BaseImp x y = {s1=x.s ; s2=y.s} ;
|
||||
ConsImp x xs = {
|
||||
s1=\\p,gn => x.s ! p ! gn ++ comma ++ xs.s1 ! p ! gn ;
|
||||
s2=xs.s2
|
||||
} ;
|
||||
ConjImp conj xs = {
|
||||
s=\\p,gn => conj.s1 ++ xs.s1 ! p ! gn ++ conj.s2 ++ xs.s2 ! p ! gn
|
||||
} ;
|
||||
|
||||
-- : NP -> VPS -> S ;
|
||||
PredVPS np vps = {
|
||||
s = \\m => np.s ! Nom ++ vps.s ! m ! np.a
|
||||
|
||||
+12
-12
@@ -4,13 +4,13 @@ concrete ExtraRus of ExtraRusAbs = CatRus **
|
||||
open ResRus, MorphoRus, (P=ParadigmsRus), (X = ConstructX), Prelude, Coordination, NounRus in {
|
||||
flags optimize=all ; coding=utf8 ;
|
||||
lin
|
||||
nom_Prep = lin Prep {s="" ; c=Nom ; neggen=True ; hasPrep=False} ;
|
||||
obj_neg_Prep = lin Prep {s="" ; c=Gen ; neggen=False ; hasPrep=False} ;
|
||||
obj_no_Prep = lin Prep {s="" ; c=Acc ; neggen=True ; hasPrep=False} ;
|
||||
to_dat_Prep = lin Prep {s="" ; c=Dat ; neggen=False ; hasPrep=False} ;
|
||||
ins_Prep = lin Prep {s="" ; c=Ins ; neggen=False ; hasPrep=False} ;
|
||||
nom_Prep = {s="" ; c=Nom ; hasPrep=False} ;
|
||||
obj_neg_Prep = {s="" ; c=Gen ; hasPrep=False} ;
|
||||
obj_no_Prep = {s="" ; c=Acc ; hasPrep=False} ;
|
||||
to_dat_Prep = {s="" ; c=Dat ; hasPrep=False} ;
|
||||
ins_Prep = {s="" ; c=Ins ; hasPrep=False} ;
|
||||
to2_Prep = P.mkPrep v_prep_mod Acc ;
|
||||
u_Prep = lin Prep {s="у" ; c=Gen ; neggen=False ; hasPrep=True} ;
|
||||
u_Prep = {s="у" ; c=Gen ; hasPrep=True} ;
|
||||
on_to_Prep = P.mkPrep "до" Gen ;
|
||||
on2_Prep = P.on2_Prep ;
|
||||
along_Prep = P.mkPrep "по" Loc ;
|
||||
@@ -68,8 +68,8 @@ lin
|
||||
there_is_nowhere_Adv = P.mkAdv "негде" ;
|
||||
|
||||
-- indefinite
|
||||
nechto_NP = lin NP nechto ; -- "something unknown". Use Nom, Acc only
|
||||
anybody_NP = lin NP anybody ; -- "somenoby unknown". Use Nom only
|
||||
nechto_NP = nechto ; -- "something unknown". Use Nom, Acc only
|
||||
anybody_NP = anybody ; -- "somenoby unknown". Use Nom only
|
||||
|
||||
somehow_Adv = P.mkAdv "как-нибудь";
|
||||
somehow2_Adv = P.mkAdv "как-то";
|
||||
@@ -194,8 +194,8 @@ oper
|
||||
isg2="";
|
||||
isg2refl="" ;
|
||||
ipl1="";
|
||||
ppps="явленн"; --*
|
||||
pppss="явлен"; --*
|
||||
prap=mkPresPartForms "существующ";
|
||||
pppa=mkPastPassPartForms "явленн" "явлен";
|
||||
prtr="существуя"; --*
|
||||
ptr="существовав"; --*
|
||||
asp=Imperfective;
|
||||
@@ -216,8 +216,8 @@ oper
|
||||
isg2="";
|
||||
isg2refl="" ;
|
||||
ipl1="";
|
||||
ppps=["не явленн"]; --*
|
||||
pppss=["не явлен"]; --*
|
||||
prap=mkPresPartForms "несуществующ";
|
||||
pppa=mkPastPassPartForms "неявленн" "неявлен";
|
||||
prtr=["не существуя"]; --*
|
||||
ptr=["не существовав"]; --*
|
||||
asp=Imperfective;
|
||||
|
||||
@@ -550,11 +550,15 @@ oper
|
||||
|
||||
onlyParticipleForms : AdjForms -> AdjForms
|
||||
-- To prevent shadowing homonymic forms while parsing or empty, here asterisk has been to incorect forms
|
||||
= \af -> af ** {sm=af.sm+"*"; sf=af.sf+"*"; sn=af.sn+"*"; sp=af.sp+"*"; comp=af.comp+"*"} ;
|
||||
= \af -> af ** { short=\\gn => af.short ! gn + "*";
|
||||
comp=af.comp+"*"
|
||||
} ;
|
||||
|
||||
immutableAdjectiveCases : Str -> AdjForms
|
||||
= \s -> {
|
||||
msnom=s;fsnom=s;nsnom=s;pnom=s;msgen=s;fsgen=s;pgen=s;msdat=s;fsacc=s;msins=s;fsins=s;pins=s;msprep=s;sm=s;sf=s;sn=s;sp=s;comp=[];
|
||||
msnom=s;fsnom=s;nsnom=s;pnom=s;msgen=s;fsgen=s;pgen=s;msdat=s;fsacc=s;msins=s;fsins=s;pins=s;msprep=s;
|
||||
short=\\_=>s;
|
||||
comp=[];
|
||||
preferShort=PreferFull ;
|
||||
p=False
|
||||
} ;
|
||||
@@ -652,10 +656,12 @@ oper
|
||||
fsins = s + aef.fsins ;
|
||||
pins = s + aef.pins ;
|
||||
msprep= s + aef.msprep ;
|
||||
sm = sms + aef.sm ;
|
||||
sf = sstem + aef.sf ;
|
||||
sn = sstem + aef.sn ;
|
||||
sp = sstem + aef.sp ;
|
||||
short = table {
|
||||
GSg Masc => sms + aef.short ! GSg Masc ;
|
||||
GSg Fem => sstem + aef.short ! GSg Fem ;
|
||||
GSg Neut => sstem + aef.short ! GSg Neut ;
|
||||
GPl => sstem + aef.short ! GPl
|
||||
} ;
|
||||
comp = comps + aef.comp ;
|
||||
preferShort = aef.preferShort ;
|
||||
p = aef.p
|
||||
@@ -680,10 +686,12 @@ oper
|
||||
fsins = s + aef.fsins ;
|
||||
pins = s + aef.pins ;
|
||||
msprep= s + aef.msprep ;
|
||||
sm = sms + aef.sm ;
|
||||
sf = sstem + aef.sf ;
|
||||
sn = sstem + aef.sn ;
|
||||
sp = sstem + aef.sp ;
|
||||
short = table {
|
||||
GSg Masc => sms + aef.short ! GSg Masc ;
|
||||
GSg Fem => sstem + aef.short ! GSg Fem ;
|
||||
GSg Neut => sstem + aef.short ! GSg Neut ;
|
||||
GPl => sstem + aef.short ! GPl
|
||||
} ;
|
||||
comp = comps + aef.comp ;
|
||||
preferShort = aef.preferShort ;
|
||||
p = False
|
||||
@@ -711,10 +719,12 @@ oper
|
||||
fsins = stressSelectionAdj aef1.fsins ss "fsins" ;
|
||||
pins = stressSelectionAdj aef1.pins ss "pins" ;
|
||||
msprep = stressSelectionAdj aef1.msprep ss "msprep" ;
|
||||
sm = stressSelectionAdj aef1.sm ss "sm" ;
|
||||
sf = stressSelectionAdj aef1.sf ss "sf" ;
|
||||
sn = stressSelectionAdj aef1.sn ss "sn" ;
|
||||
sp = stressSelectionAdj aef1.sp ss "sp" ;
|
||||
short = table {
|
||||
GSg Masc => stressSelectionAdj aef1.sm ss "sm" ;
|
||||
GSg Fem => stressSelectionAdj aef1.sf ss "sf" ;
|
||||
GSg Neut => stressSelectionAdj aef1.sn ss "sn" ;
|
||||
GPl => stressSelectionAdj aef1.sp ss "sp"
|
||||
} ;
|
||||
comp = stressSelectionAdj aef1.comp ss "comp" ;
|
||||
preferShort = sfp ;
|
||||
p = False
|
||||
@@ -998,8 +1008,8 @@ oper
|
||||
isg2=imp.isg2 ;
|
||||
isg2refl=imp.isg2refl ;
|
||||
ipl1=imp.ipl1 ;
|
||||
ppps=ppp.ppps ;
|
||||
pppss=ppp.pppss ;
|
||||
prap=mkPresPartForms ((Predef.tk 1 presfut.prpl3) + "щ") ;
|
||||
pppa=mkPastPassPartForms ppp.ppps ppp.pppss ;
|
||||
prtr=tr.prtr ;
|
||||
ptr=tr.ptr
|
||||
} ;
|
||||
@@ -1110,8 +1120,8 @@ oper
|
||||
isg2=com + "ти";
|
||||
isg2refl=com + "тись";
|
||||
ipl1=[];
|
||||
ppps=com + "тим"; -- incorrect, but prevents empty
|
||||
pppss=com + "тим"; -- incorrect, but prevents empty
|
||||
prap=mkPresPartForms (com + "тящ");
|
||||
pppa=mkPastPassPartForms (com + "тим") (com + "тим");
|
||||
prtr=com + "тя";
|
||||
ptr=com + "тев";
|
||||
asp=asp;
|
||||
@@ -1139,8 +1149,8 @@ oper
|
||||
isg2=com + "ги";
|
||||
isg2refl=com + "гись";
|
||||
ipl1=[];
|
||||
ppps=com + "ган"; -- incorrect, but prevents parsing problems
|
||||
pppss=com + "ган"; -- incorrect, but prevents parsing problems
|
||||
prap=mkPresPartForms (com + "гущ");
|
||||
pppa=mkPastPassPartForms (com + "ган") (com + "ган");
|
||||
prtr=com + "жа"; -- *
|
||||
ptr=com + "жав";
|
||||
asp=asp;
|
||||
@@ -1168,8 +1178,8 @@ oper
|
||||
isg2=com + "шь";
|
||||
isg2refl=com + "шься";
|
||||
ipl1=[];
|
||||
ppps=com + "денн"; -- *
|
||||
pppss=com + "ден"; -- *
|
||||
prap=mkPresPartForms (com + "дящ");
|
||||
pppa=mkPastPassPartForms (com + "денн") (com + "ден");
|
||||
prtr=com + "дя";
|
||||
ptr=com + "в";
|
||||
asp=asp;
|
||||
@@ -1196,8 +1206,8 @@ oper
|
||||
isg2=com + "й";
|
||||
isg2refl=com + "йся";
|
||||
ipl1=[];
|
||||
ppps=com + "нн"; -- *
|
||||
pppss=com + "н"; -- *
|
||||
prap=mkPresPartForms (com + "ющ");
|
||||
pppa=mkPastPassPartForms (com + "нн") (com + "н");
|
||||
prtr=com + "вая";
|
||||
ptr=com + "в";
|
||||
asp=asp;
|
||||
@@ -1225,8 +1235,8 @@ oper
|
||||
isg2=com + "удь";
|
||||
isg2refl=com + "удься";
|
||||
ipl1=[];
|
||||
ppps=com + "ыт"; -- *
|
||||
pppss=com + "ыт"; -- *
|
||||
prap=mkPresPartForms (com + "ывающ");
|
||||
pppa=mkPastPassPartForms (com + "ыт") (com + "ыт");
|
||||
prtr=com + "ывая";
|
||||
ptr=com + "ыв";
|
||||
asp=asp;
|
||||
@@ -1255,8 +1265,8 @@ oper
|
||||
isg2=com + "ди";
|
||||
isg2refl=com + "дись";
|
||||
ipl1=[];
|
||||
ppps=com + "денн"; -- *
|
||||
pppss="com + ден"; -- *
|
||||
prap=mkPresPartForms (com + "дущ");
|
||||
pppa=mkPastPassPartForms (com + "денн") (com + "ден");
|
||||
prtr=com + "дя";
|
||||
ptr=[];
|
||||
asp=asp;
|
||||
|
||||
@@ -121,7 +121,11 @@ lin
|
||||
fridge_N = mkN "холодильник" ;
|
||||
friend_N = (mkNplus (mkN "друг" masculine inanimate "3c")) ** {pnom="друзья";pgen="друзей";pdat="друзьям";pacc="друзей";pins="друзьями";pprep="друзьях"};
|
||||
fruit_N = mkN "фрукт" ;
|
||||
full_A = (mkAplus (mkA "полный" "" "1*a/c'")) ** {sm="полон"} ;
|
||||
full_A = let adj = mkAplus (mkA "полный" "" "1*a/c'")
|
||||
in adj ** {short = table {
|
||||
GSg Masc => "полон";
|
||||
gn => adj.short ! gn
|
||||
}} ;
|
||||
fun_AV = (mkAltShort (mkA "весёлый" "" "1a/c'") (mkA "веселый")) ;
|
||||
garden_N = mkN "сад" ;
|
||||
girl_N = mkN "девочка" feminine animate "3*a";
|
||||
@@ -142,7 +146,11 @@ lin
|
||||
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
|
||||
heavy_A = let adj = mkAltShort (mkA "тяжёлый" "тяжелее") (mkA "тяжелый")
|
||||
in adj ** {short = table {
|
||||
GSg Masc => "тяжёл" ; -- TODO: same
|
||||
gn => adj.short ! gn
|
||||
}} ;
|
||||
hill_N = mkN "холм" ;
|
||||
hit_V2 = mkV2 (mkV imperfective "ударять" "ударяю" "ударяет") ;
|
||||
hold_V2 = mkV2 (mkV imperfective "держать" "держу" "держит") ;
|
||||
@@ -254,7 +262,7 @@ lin
|
||||
science_N = mkN "наука" ;
|
||||
scratch_V2 = mkV2 (mkV imperfective "чесать" "чешу" "чешет");
|
||||
sea_N = mkN "море" neuter inanimate "2c" (mkA "морской") ;
|
||||
see_V2 = (mkV2plus (mkV2 (mkV imperfective transitive "видеть" "вижу" "видит" "5a"))) ** {pppss="виден"; ppps="виденн"} ;
|
||||
see_V2 = (mkV2plus (mkV2 (mkV imperfective transitive "видеть" "вижу" "видит" "5a"))) ** {pppa=mkPastPassPartForms "виденн" "виден"} ;
|
||||
seed_N = mkN "семя" neuter inanimate "8°c" ;
|
||||
seek_V2 = mkV2 (mkV imperfective "искать" "ищу" "ищет");
|
||||
sell_V3 = tvDirDir (mkV imperfective "продавать" "продаю" "продаёт");
|
||||
@@ -329,7 +337,11 @@ lin
|
||||
wait_V2 = mkV2 (mkV imperfective "ждать" "жду" "ждёт");
|
||||
walk_V = mkV imperfective "гулять" "гуляю" "гуляет";
|
||||
war_N = mkN "война" (mkA "военный") ;
|
||||
warm_A = (mkAltShort (mkA "тёплый" "теплее" "1*a/b") (mkA "теплый" "" "1*a/b")) ** {sm="тёплый"} ; -- workaround TODO: Any way to remove yo from stem?
|
||||
warm_A = let adj = mkAltShort (mkA "тёплый" "теплее" "1*a/b") (mkA "теплый" "" "1*a/b")
|
||||
in adj ** {short=table {
|
||||
GSg Masc => "тёплый" ; -- workaround TODO: Any way to remove yo from stem?
|
||||
gn => adj.short ! gn
|
||||
}} ;
|
||||
wash_V2 = mkV2 (mkV imperfective "мыть" "мою" "моет");
|
||||
watch_V2 = mkV2 (mkV imperfective "смотреть" "смотрю" "смотрит");
|
||||
water_N = mkN "вода" feminine inanimate "1d'";
|
||||
@@ -349,5 +361,9 @@ lin
|
||||
worm_N = mkN "червь" masculine animate ;
|
||||
write_V2 = mkV2 (mkV imperfective "писать" "пишу" "пишет");
|
||||
year_N = (mkNplus (mkN "год" (mkA "годовой"))) ** {sloc="году"; pgen="лет"};
|
||||
yellow_A = (mkAplus (mkA "жёлтый" "желтее" "1a/c''") ** {sf="желта"}) ; -- TODO: variants
|
||||
}
|
||||
yellow_A = let adj = mkAplus (mkA "жёлтый" "желтее" "1a/c''") -- TODO: variants
|
||||
in adj ** {short = table {
|
||||
GSg Fem => "желта" ;
|
||||
gn => adj.short ! gn
|
||||
}} ;
|
||||
}
|
||||
|
||||
+10
-12
@@ -25,14 +25,14 @@ lin
|
||||
} ; -- Does NP need animacy?
|
||||
|
||||
-- : Pron -> NP ;
|
||||
UsePron pron = lin NP (pronFormsPronoun pron) ;
|
||||
UsePron pron = pronFormsPronoun pron ;
|
||||
|
||||
-- : Predet -> NP -> NP ; -- only the man
|
||||
PredetNP predet np = np ** {s=\\cas => predet.s ! (agrGenNum np.a) ! Inanimate ! cas ++ np.s ! numSizeCase cas predet.size} ;
|
||||
|
||||
-- : NP -> V2 -> NP ; -- the man seen
|
||||
PPartNP np v2 = np ** {
|
||||
s = \\cas => np.s ! cas ++ (shortPastPassPart v2 (agrGenNum np.a))
|
||||
s = \\cas => np.s ! cas ++ (pastPassPart v2).short ! (agrGenNum np.a)
|
||||
} ;
|
||||
|
||||
-- : NP -> Adv -> NP ; -- Paris today
|
||||
@@ -97,7 +97,6 @@ lin
|
||||
DetQuant quant num = {
|
||||
s=\\g,anim,cas => quant.s ! (gennum g (numSizeNumber num.size)) ! anim ! cas ++ num.s ! g ! anim ! cas ;
|
||||
type=quant.type ;
|
||||
g=quant.g ;
|
||||
c=quant.c ;
|
||||
size=num.size
|
||||
} ;
|
||||
@@ -108,7 +107,6 @@ lin
|
||||
++ quant.s ! (gennum g (numSizeNumber num.size)) ! a ! cas
|
||||
++ (adjFormsAdjective ord).s ! gennum g (animNumSizeNum Inanimate cas num.size) ! Inanimate ! numSizeCase cas num.size ;
|
||||
type=quant.type ;
|
||||
g=quant.g ;
|
||||
c=quant.c ;
|
||||
size=num.size
|
||||
} ;
|
||||
@@ -123,10 +121,12 @@ lin
|
||||
|
||||
-- : Numeral -> Ord ; -- fifty-first
|
||||
OrdNumeral numeral = numeral.o ** {
|
||||
sm=numeral.s ! Masc ! Inanimate ! Nom; -- these are not correct, but needed to prevent parsing problems
|
||||
sf=numeral.s ! Fem ! Inanimate ! Nom;
|
||||
sn=numeral.s ! Neut ! Inanimate ! Nom;
|
||||
sp=numeral.s ! Neut ! Inanimate ! Gen ;
|
||||
short = table { -- these are not correct, but needed to prevent parsing problems
|
||||
GSg Masc => numeral.s ! Masc ! Inanimate ! Nom;
|
||||
GSg Fem => numeral.s ! Fem ! Inanimate ! Nom;
|
||||
GSg Neut => numeral.s ! Neut ! Inanimate ! Nom;
|
||||
GPl => numeral.s ! Neut ! Inanimate ! Gen
|
||||
} ;
|
||||
comp=numeral.s ! Neut ! Inanimate ! Gen ;
|
||||
p=False ;
|
||||
preferShort=PreferFull
|
||||
@@ -167,10 +167,10 @@ lin
|
||||
UseN2 n = nounFormsNoun n ;
|
||||
|
||||
-- : N3 -> N2 ; -- distance (from this city)
|
||||
Use2N3 n3 = lin N2 n3 ** { compl1 = n3.compl2 } ;
|
||||
Use2N3 n3 = n3 ;
|
||||
|
||||
-- : N3 -> N2 ; -- distance (to Paris)
|
||||
Use3N3 n3 = lin N2 n3 ;
|
||||
Use3N3 n3 = n3 ;
|
||||
|
||||
|
||||
-- : CN -> RS -> CN ; -- house that John bought
|
||||
@@ -230,7 +230,6 @@ lin
|
||||
type=EmptyDef ;
|
||||
short=\\a=>[] ;
|
||||
c=Nom ;
|
||||
size=Num1 ;
|
||||
preferShort=PreferFull
|
||||
} ;
|
||||
-- : Quant ; -- a (house), (houses)
|
||||
@@ -239,7 +238,6 @@ lin
|
||||
type=EmptyIndef ;
|
||||
short=\\a=>[] ;
|
||||
c=Nom ;
|
||||
size=Num1 ;
|
||||
preferShort=PreferFull
|
||||
} ;
|
||||
|
||||
|
||||
@@ -405,8 +405,70 @@ lin pot3plus n m = {
|
||||
} ;
|
||||
lin pot3as4 n = n ;
|
||||
|
||||
lin pot41 = {
|
||||
s=\\g,a,c => million.s ! Sg ! c ;
|
||||
o=pronounAdj1A "миллионный" ;
|
||||
just1=True ;
|
||||
size=Num5
|
||||
} ;
|
||||
|
||||
lin pot4 n = {
|
||||
s=\\g,a,c => n.s ! attr ! Masc ! a ! c
|
||||
++ million.s ! animNumSizeNum Inanimate c n.size ! numSizeCase c n.size ;
|
||||
o=prependPF (n.s ! attr ! Masc ! Inanimate ! Nom) (pronounAdj1A "миллионный") ;
|
||||
just1=False ;
|
||||
size=Num5
|
||||
} ;
|
||||
|
||||
lin pot4plus n m = {
|
||||
s=\\g,a,c => n.s ! attr ! Masc ! a ! c
|
||||
++ million.s ! animNumSizeNum Inanimate c n.size ! numSizeCase c n.size
|
||||
++ m.s ! g ! a ! c ;
|
||||
o=m.o ;
|
||||
just1=False ;
|
||||
size=m.size
|
||||
} ;
|
||||
|
||||
lin pot4decimal d = {
|
||||
s=\\g,a,c => d.s ++ million.s ! Sg ! Gen ;
|
||||
o=pronounAdj1A "миллионный" ;
|
||||
just1=False ;
|
||||
size=Num5
|
||||
} ;
|
||||
|
||||
lin pot4as5 n = n ;
|
||||
|
||||
lin pot51 = {
|
||||
s=\\g,a,c => milliard.s ! Sg ! c ;
|
||||
o=pronounAdj1A "миллиардный" ;
|
||||
just1=True ;
|
||||
size=Num5
|
||||
} ;
|
||||
|
||||
lin pot5 n = {
|
||||
s=\\g,a,c => n.s ! attr ! Masc ! a ! c
|
||||
++ milliard.s ! animNumSizeNum Inanimate c n.size ! numSizeCase c n.size ;
|
||||
o=prependPF (n.s ! attr ! Masc ! Inanimate ! Nom) (pronounAdj1A "миллиардный") ;
|
||||
just1=False ;
|
||||
size=Num5
|
||||
} ;
|
||||
|
||||
lin pot5plus n m = {
|
||||
s=\\g,a,c => n.s ! attr ! Masc ! a ! c
|
||||
++ milliard.s ! animNumSizeNum Inanimate c n.size ! numSizeCase c n.size
|
||||
++ m.s ! g ! a ! c ;
|
||||
o=m.o ;
|
||||
just1=False ;
|
||||
size=m.size
|
||||
} ;
|
||||
|
||||
lin pot5decimal d = {
|
||||
s=\\g,a,c => d.s ++ milliard.s ! Sg ! Gen ;
|
||||
o=pronounAdj1A "миллиардный" ;
|
||||
just1=False ;
|
||||
size=Num5
|
||||
} ;
|
||||
|
||||
-- numerals as sequences of digits
|
||||
|
||||
lincat
|
||||
@@ -416,11 +478,10 @@ lincat
|
||||
IDig d = d ** {tail = T1} ;
|
||||
|
||||
IIDig d i = {
|
||||
s = d.s ++ spaceIf i.tail ++ i.s ;
|
||||
n = Pl ;
|
||||
size = i.size ;
|
||||
tail = inc i.tail
|
||||
} ;
|
||||
s = d.s ++ spaceIf i.tail ++ i.s ;
|
||||
size = i.size ;
|
||||
tail = inc i.tail
|
||||
} ;
|
||||
|
||||
D_0 = mk2Dig "0" Num5 ;
|
||||
D_1 = mk4Dig "1" "1" Sg Num1 ; ----
|
||||
@@ -436,16 +497,14 @@ lincat
|
||||
PosDecimal d = d ** {hasDot=False} ;
|
||||
NegDecimal d = {
|
||||
s = "-" ++ BIND ++ d.s ;
|
||||
n = Pl ;
|
||||
size = d.size ;
|
||||
size = NumAll ;
|
||||
hasDot=False
|
||||
} ;
|
||||
IFrac d i = {
|
||||
s=d.s ++
|
||||
if_then_Str d.hasDot BIND (BIND++"."++BIND) ++
|
||||
i.s;
|
||||
n = Pl ;
|
||||
size = d.size ;
|
||||
size = NumAll ;
|
||||
hasDot=True
|
||||
} ;
|
||||
|
||||
|
||||
+42
-20
@@ -207,7 +207,7 @@ oper
|
||||
infrefl = v.infrefl ++ s ;
|
||||
prsg1 = v.prsg1 ++ s ;
|
||||
prsg2 = v.prsg2 ++ s ;
|
||||
prsg3 = v.prsg2 ++ s ;
|
||||
prsg3 = v.prsg3 ++ s ;
|
||||
prpl1 = v.prpl1 ++ s ;
|
||||
prpl2 = v.prpl2 ++ s ;
|
||||
prpl3 = v.prpl3 ++ s ;
|
||||
@@ -216,8 +216,35 @@ oper
|
||||
isg2 = v.isg2 ++ s ;
|
||||
ipl1 = v.ipl1 ++ s ;
|
||||
isg2refl = v.isg2refl ++ s ;
|
||||
ppps = v.ppps ++ s ;
|
||||
pppss = v.pppss ++ s ;
|
||||
prap = {msnom = v.prap.msnom ++ s ;
|
||||
fsnom = v.prap.fsnom ++ s ;
|
||||
nsnom = v.prap.nsnom ++ s ;
|
||||
pnom = v.prap.pnom ++ s ;
|
||||
msgen = v.prap.msgen ++ s ;
|
||||
fsgen = v.prap.fsgen ++ s ;
|
||||
pgen = v.prap.pgen ++ s ;
|
||||
msdat = v.prap.msdat ++ s ;
|
||||
fsacc = v.prap.fsacc ++ s ;
|
||||
msins = v.prap.msins ++ s ;
|
||||
fsins = v.prap.fsins ++ s ;
|
||||
pins = v.prap.pins ++ s ;
|
||||
msprep = v.prap.msprep ++ s
|
||||
} ;
|
||||
pppa = {msnom = v.pppa.msnom ++ s ;
|
||||
fsnom = v.pppa.fsnom ++ s ;
|
||||
nsnom = v.pppa.nsnom ++ s ;
|
||||
pnom = v.pppa.pnom ++ s ;
|
||||
msgen = v.pppa.msgen ++ s ;
|
||||
fsgen = v.pppa.fsgen ++ s ;
|
||||
pgen = v.pppa.pgen ++ s ;
|
||||
msdat = v.pppa.msdat ++ s ;
|
||||
fsacc = v.pppa.fsacc ++ s ;
|
||||
msins = v.pppa.msins ++ s ;
|
||||
fsins = v.pppa.fsins ++ s ;
|
||||
pins = v.pppa.pins ++ s ;
|
||||
msprep = v.pppa.msprep ++ s ;
|
||||
short = \\gn => v.pppa.short ! gn ++ s
|
||||
} ;
|
||||
prtr = v.prtr ++ s ;
|
||||
ptr = v.ptr ++ s
|
||||
} ;
|
||||
@@ -244,7 +271,7 @@ oper
|
||||
------------------------------
|
||||
-- Nouns
|
||||
|
||||
nullPrep : Prep = lin Prep {s=[] ; c=Gen ; neggen=False ; hasPrep=False} ;
|
||||
nullPrep : Prep = lin Prep {s=[] ; c=Gen ; hasPrep=False} ;
|
||||
|
||||
mkN = overload {
|
||||
mkN : Str -> N
|
||||
@@ -598,12 +625,7 @@ oper
|
||||
let refl = case v.refltran of {Refl => "ся" ; _ => ""} in
|
||||
case <voice,t> of {
|
||||
<Pass,Past|Cond> => lin A ( --# notpresent TODO: check
|
||||
guessAdjectiveForms (v.ppps + "ый") ** { --# notpresent
|
||||
sm=v.pppss ; --# notpresent
|
||||
sf=v.pppss + "а"; --# notpresent
|
||||
sn=v.pppss + "о"; --# notpresent
|
||||
sp=v.pppss + "ы" --# notpresent
|
||||
} --# notpresent
|
||||
guessAdjectiveForms v.pppa.msnom ** v.pppa --# notpresent
|
||||
) ;--# notpresent
|
||||
<Pass,Pres> => lin A ( -- overgenerated
|
||||
let s : Str = case v.prpl1 of {
|
||||
@@ -677,26 +699,26 @@ oper
|
||||
|
||||
mkV2 = overload {
|
||||
mkV2 : V -> V2
|
||||
= \vf -> lin V2 (vf ** {c={s=[] ; c=Acc ; neggen=True ; hasPrep=False}}) ;
|
||||
= \vf -> lin V2 (vf ** {c={s=[] ; c=Acc ; hasPrep=False}}) ;
|
||||
mkV2 : V -> Case -> V2
|
||||
= \vf, c -> lin V2 (vf ** {c={s=[] ; c=c ; neggen=False ; hasPrep=False}}) ;
|
||||
= \vf, c -> lin V2 (vf ** {c={s=[] ; c=c ; hasPrep=False}}) ;
|
||||
mkV2 : V -> Prep -> V2
|
||||
= \vf, prep -> lin V2 (vf ** {c=prep}) ;
|
||||
|
||||
-- For backwards compatibility:
|
||||
mkV2 : V -> Str -> Case -> V2
|
||||
= \vf, prep_s, c -> lin V2 (vf ** {c={s=prep_s ; c=c ; neggen=False ; hasPrep=True}})
|
||||
= \vf, prep_s, c -> lin V2 (vf ** {c={s=prep_s ; c=c ; hasPrep=True}})
|
||||
} ;
|
||||
|
||||
mkV3 = overload {
|
||||
mkV3 : V -> Case -> Case -> V3 -- "сложить письмо в конверт"
|
||||
= \vf, cas1, cas2 -> lin V3 (vf ** {c={s=[] ; c=cas1 ; neggen=False ; hasPrep=False} ; c2={s=[] ; c=cas2 ; neggen=False ; hasPrep=False}} ) ;
|
||||
= \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} ) ;
|
||||
|
||||
-- For backwards compatibility:
|
||||
mkV3 : V -> Str -> Str -> Case -> Case -> V3
|
||||
= \vf, prep1, prep2, cas1, cas2 -> lin V3 (vf ** {c={s=prep1 ; c=cas1 ; neggen=False ; hasPrep=True} ; c2={s=prep2 ; c=cas2 ; neggen=False ; hasPrep=True}} ) ;
|
||||
= \vf, prep1, prep2, cas1, cas2 -> lin V3 (vf ** {c={s=prep1 ; c=cas1 ; hasPrep=True} ; c2={s=prep2 ; c=cas2 ; hasPrep=True}} ) ;
|
||||
} ;
|
||||
|
||||
|
||||
@@ -711,25 +733,25 @@ oper
|
||||
mkV2V : V -> Prep -> V2V
|
||||
= \v, prep -> lin V2V (v ** {c=prep}) ;
|
||||
mkV2V : V -> Str -> Case -> V2V
|
||||
= \v, prep, cas -> lin V2V (v ** {c={s=prep ; c=cas ; neggen=False ; hasPrep=True}}) ;
|
||||
= \v, prep, cas -> lin V2V (v ** {c={s=prep ; c=cas ; hasPrep=True}}) ;
|
||||
} ;
|
||||
mkV2S = overload {
|
||||
mkV2S : V -> Prep -> V2S
|
||||
= \v, prep -> lin V2S (v ** {c=prep}) ;
|
||||
mkV2S : V -> Str -> Case -> V2S
|
||||
= \v, prep, cas -> lin V2S (v ** {c={s=prep ; c=cas ; neggen=False ; hasPrep=True}}) ;
|
||||
= \v, prep, cas -> lin V2S (v ** {c={s=prep ; c=cas ; hasPrep=True}}) ;
|
||||
} ;
|
||||
mkV2Q = overload {
|
||||
mkV2Q : V -> Prep -> V2Q
|
||||
= \v, prep -> lin V2Q (v ** {c=prep}) ;
|
||||
mkV2Q : V -> Str -> Case -> V2Q
|
||||
= \v, prep, cas -> lin V2Q (v ** {c={s=prep ; c=cas ; neggen=False ; hasPrep=True}}) ;
|
||||
= \v, prep, cas -> lin V2Q (v ** {c={s=prep ; c=cas ; hasPrep=True}}) ;
|
||||
} ;
|
||||
mkV2A = overload {
|
||||
mkV2A : V -> Prep -> V2A
|
||||
= \v, prep -> lin V2A (v ** {c=prep}) ;
|
||||
mkV2A : V -> Str -> Case -> V2A
|
||||
= \v, prep, cas -> lin V2A (v ** {c={s=prep ; c=cas ; neggen=False ; hasPrep=True}}) ;
|
||||
= \v, prep, cas -> lin V2A (v ** {c={s=prep ; c=cas ; hasPrep=True}}) ;
|
||||
} ;
|
||||
|
||||
------------------------
|
||||
@@ -766,7 +788,7 @@ oper
|
||||
= \s -> lin Interj {s = s} ;
|
||||
|
||||
mkPrep : Str -> Case -> Prep
|
||||
= \s,c -> lin Prep {s = s ; c = c ; neggen = False ; hasPrep = True} ;
|
||||
= \s,c -> lin Prep {s = s ; c = c ; hasPrep = True} ;
|
||||
|
||||
|
||||
oper
|
||||
|
||||
+44
-3
@@ -75,9 +75,9 @@ oper
|
||||
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 ;
|
||||
short : GenNum => Str ; -- short forms
|
||||
p : Bool ;
|
||||
preferShort : ShortFormPreference
|
||||
} ;
|
||||
@@ -93,6 +93,27 @@ oper
|
||||
: Str ;
|
||||
} ;
|
||||
|
||||
PresPartForms : 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
|
||||
: Str ;
|
||||
} ;
|
||||
|
||||
PastPartForms : 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
|
||||
: Str ;
|
||||
short : GenNum => Str ; -- short forms
|
||||
} ;
|
||||
|
||||
ConjType = Predef.Ints 16 ; -- Conjugation type
|
||||
TempParts = {p1: Str; p2: Str} ;
|
||||
VerbForms : Type = {
|
||||
@@ -100,18 +121,38 @@ oper
|
||||
prsg1, prsg2, prsg3, prpl1, prpl2, prpl3,
|
||||
psgm, psgs,
|
||||
isg2, ipl1, isg2refl,
|
||||
ppps, -- past passive participle, stem
|
||||
pppss, -- past passive participle, short stem
|
||||
prtr, ptr -- present and past transgressives (converbs)
|
||||
: Str ;
|
||||
fut : SpecialFuture ;
|
||||
asp : Aspect ;
|
||||
refltran : ReflTran ;
|
||||
prap : PresPartForms ; -- present active participle
|
||||
pppa : PastPartForms ; -- past passive participle
|
||||
} ;
|
||||
ComplementCase : Type = {s : Str ; c : Case ; hasPrep : Bool} ;
|
||||
VerbForms2 : Type = VerbForms ** {c : ComplementCase} ;
|
||||
VerbForms3 : Type = VerbForms ** {c : ComplementCase ; c2 : ComplementCase} ;
|
||||
|
||||
mkPresPartForms : Str -> PresPartForms = \s -> {
|
||||
msnom=s+"ий"; fsnom=s+"ая"; nsnom=s+"ее"; pnom=s+"ие";
|
||||
msgen=s+"его"; fsgen=s+"ей"; pgen=s+"их"; msdat=s+"ему";
|
||||
fsacc=s+"ую"; msins=s+"им"; fsins=s+"ей"; pins=s+"ими";
|
||||
msprep=s+"ем"
|
||||
} ;
|
||||
|
||||
mkPastPassPartForms : Str -> Str -> PastPartForms = \s,ss -> {
|
||||
msnom=s+"ый"; fsnom=s+"ая"; nsnom=s+"ое"; pnom=s+"ые";
|
||||
msgen=s+"ого"; fsgen=s+"ой"; pgen=s+"ых"; msdat=s+"ому";
|
||||
fsacc=s+"ую"; msins=s+"ым"; fsins=s+"ой"; pins=s+"ыми";
|
||||
msprep=s+"ом";
|
||||
short = table {
|
||||
GSg Masc => ss;
|
||||
GSg Fem => ss+"а";
|
||||
GSg Neut => ss+"о";
|
||||
GPl => ss+"ы"
|
||||
}
|
||||
} ;
|
||||
|
||||
reflTran : Reflexivity -> Transitivity -> ReflTran = \r,t ->
|
||||
case <r,t> of {
|
||||
<Reflexive,_> => Refl ;
|
||||
|
||||
@@ -5,7 +5,7 @@ flags optimize=all_subs ; coding=utf8 ;
|
||||
|
||||
lin
|
||||
-- : Cl -> QCl ; -- does John walk
|
||||
QuestCl cl = cl ** {qf=QDir} ;
|
||||
QuestCl cl = cl ;
|
||||
|
||||
-- : IP -> VP -> QCl ; -- who walks
|
||||
QuestVP ip vp = {
|
||||
|
||||
@@ -36,7 +36,7 @@ lin
|
||||
} ;
|
||||
|
||||
-- : RP ; -- which
|
||||
IdRP = lin RP (doKotoryjPron "который" (Ag (GSg Neut) P3)) ;
|
||||
IdRP = doKotoryjPron "который" (Ag (GSg Neut) P3) ;
|
||||
|
||||
-- : Prep -> NP -> RP -> RP ; -- the mother of whom
|
||||
FunRP prep np rp = {
|
||||
|
||||
+102
-91
@@ -213,7 +213,7 @@ oper
|
||||
ComplTable = Polarity => Agr => Str ;
|
||||
PolarityTable = Polarity => Str ;
|
||||
|
||||
from2 = {s="из" ; c=Gen ; neggen=True ; hasPrep=True} ;
|
||||
from2 = {s="из" ; c=Gen ; hasPrep=True} ;
|
||||
|
||||
mkCompoundN : NounForms -> Str -> NounForms -> NounForms
|
||||
= \n1,link,n2 ->
|
||||
@@ -244,16 +244,18 @@ oper
|
||||
|
||||
Adjective : Type = {
|
||||
s : AdjTable ;
|
||||
short : AgrTable ;
|
||||
short : GenNum => Str ;
|
||||
preferShort : ShortFormPreference
|
||||
} ;
|
||||
|
||||
pronToAdj : PronForms -> AdjForms
|
||||
= \base -> base ** {
|
||||
sm = base.msnom ; -- these are incorrect, but empty causes parsing problems
|
||||
sf = base.fsnom ;
|
||||
sn = base.nsnom ;
|
||||
sp = base.pnom ;
|
||||
short = table {
|
||||
GSg Masc => base.msnom ; -- these are incorrect, but empty causes parsing problems
|
||||
GSg Fem => base.fsnom ;
|
||||
GSg Neut => base.nsnom ;
|
||||
GPl => base.pnom
|
||||
} ;
|
||||
comp = base.nsnom ;
|
||||
preferShort = PreferFull ;
|
||||
p = False
|
||||
@@ -266,15 +268,12 @@ oper
|
||||
|
||||
mkAltShort : AdjForms -> AdjForms -> AdjForms
|
||||
= \full, short -> full ** {
|
||||
sm = short.sm ;
|
||||
sf = short.sf ;
|
||||
sn = short.sn ;
|
||||
sp = short.sp
|
||||
short = short.short
|
||||
} ;
|
||||
|
||||
adjFormsAdjective : AdjForms -> Adjective
|
||||
= \forms -> {
|
||||
short = adjFormsToShort forms ;
|
||||
short = forms.short ;
|
||||
s = table {
|
||||
GSg Fem => table {
|
||||
(Inanimate|Animate) => table {
|
||||
@@ -351,8 +350,6 @@ oper
|
||||
}
|
||||
}
|
||||
} ;
|
||||
g = forms.g ;
|
||||
-- a = forms.a ;
|
||||
preferShort = forms.preferShort
|
||||
} ;
|
||||
|
||||
@@ -424,12 +421,8 @@ oper
|
||||
fsins = the_most.fsins ++ af.fsins ;
|
||||
pins = the_most.pins ++ af.pins ;
|
||||
msprep= the_most.msprep ++ af.msprep;
|
||||
sm = the_most.sm ++ af.sm ;
|
||||
sf = the_most.sf ++ af.sf ;
|
||||
sn = the_most.sn ++ af.sn ;
|
||||
sp = the_most.sp ++ af.sp ;
|
||||
short = \\gn => the_most.short ! gn ++ af.short ! gn ;
|
||||
comp = the_most.comp ++ af.comp ;
|
||||
g=af.g ;
|
||||
preferShort = PreferFull ;
|
||||
p = af.p
|
||||
} ;
|
||||
@@ -449,12 +442,13 @@ oper
|
||||
fsins = pf.fsins ++ the_most.fsins ++ af.fsins ;
|
||||
pins = pf.pins ++ the_most.pins ++ af.pins ;
|
||||
msprep= pf.msprep++ the_most.msprep ++ af.msprep;
|
||||
sm = pf.msnom ++ the_most.sm ++ af.sm ;
|
||||
sf = pf.fsnom ++ the_most.sf ++ af.sf ;
|
||||
sn = pf.nsnom ++ the_most.sn ++ af.sn ;
|
||||
sp = pf.pnom ++ the_most.sp ++ af.sp ;
|
||||
short = table {
|
||||
GSg Masc => pf.msnom ++ the_most.short ! (GSg Masc) ++ af.short ! (GSg Masc) ;
|
||||
GSg Fem => pf.fsnom ++ the_most.short ! (GSg Fem) ++ af.short ! (GSg Fem) ;
|
||||
GSg Neut => pf.nsnom ++ the_most.short ! (GSg Neut) ++ af.short ! (GSg Neut) ;
|
||||
GPl => pf.pnom ++ the_most.short ! GPl ++ af.short ! GPl
|
||||
} ;
|
||||
comp = pf.msnom ++ the_most.comp ++ af.comp ;
|
||||
g=af.g ;
|
||||
preferShort = PreferFull ;
|
||||
p = af.p
|
||||
} ;
|
||||
@@ -565,36 +559,25 @@ oper
|
||||
}
|
||||
} ;
|
||||
|
||||
adjFormsToShort : AdjForms -> AgrTable
|
||||
= \af -> table {
|
||||
Ag (GSg Fem) _ => af.sf ;
|
||||
Ag (GSg Masc) _ => af.sm ;
|
||||
Ag (GSg Neut) _ => af.sn ;
|
||||
Ag GPl _ => af.sp
|
||||
} ;
|
||||
|
||||
mkCompoundA : AdjForms -> Str -> AdjForms -> AdjForms
|
||||
= \a1,link,a2 ->
|
||||
let l : Str=case link of {x+"-" => BIND ++ "-" ++ BIND ; _ => link} in
|
||||
a2 ** {
|
||||
msnom = a1.sn ++ l ++ a2.msnom ;
|
||||
fsnom = a1.sn ++ l ++ a2.fsnom ;
|
||||
nsnom = a1.sn ++ l ++ a2.nsnom ;
|
||||
pnom = a1.sn ++ l ++ a2.pnom ;
|
||||
msgen = a1.sn ++ l ++ a2.msgen ;
|
||||
fsgen = a1.sn ++ l ++ a2.fsgen ;
|
||||
pgen = a1.sn ++ l ++ a2.pgen ;
|
||||
msdat = a1.sn ++ l ++ a2.msdat ;
|
||||
fsacc = a1.sn ++ l ++ a2.fsacc ;
|
||||
msins = a1.sn ++ l ++ a2.msins ;
|
||||
fsins = a1.sn ++ l ++ a2.fsins ;
|
||||
pins = a1.sn ++ l ++ a2.pins ;
|
||||
msprep= a1.sn ++ l ++ a2.msprep;
|
||||
sm = a1.sn ++ l ++ a2.sm ;
|
||||
sf = a1.sn ++ l ++ a2.sf ;
|
||||
sn = a1.sn ++ l ++ a2.sn ;
|
||||
sp = a1.sn ++ l ++ a2.sp ;
|
||||
comp = a1.sn ++ l ++ a2.comp ;
|
||||
msnom = a1.short ! GSg Neut ++ l ++ a2.msnom ;
|
||||
fsnom = a1.short ! GSg Neut ++ l ++ a2.fsnom ;
|
||||
nsnom = a1.short ! GSg Neut ++ l ++ a2.nsnom ;
|
||||
pnom = a1.short ! GSg Neut ++ l ++ a2.pnom ;
|
||||
msgen = a1.short ! GSg Neut ++ l ++ a2.msgen ;
|
||||
fsgen = a1.short ! GSg Neut ++ l ++ a2.fsgen ;
|
||||
pgen = a1.short ! GSg Neut ++ l ++ a2.pgen ;
|
||||
msdat = a1.short ! GSg Neut ++ l ++ a2.msdat ;
|
||||
fsacc = a1.short ! GSg Neut ++ l ++ a2.fsacc ;
|
||||
msins = a1.short ! GSg Neut ++ l ++ a2.msins ;
|
||||
fsins = a1.short ! GSg Neut ++ l ++ a2.fsins ;
|
||||
pins = a1.short ! GSg Neut ++ l ++ a2.pins ;
|
||||
msprep= a1.short ! GSg Neut ++ l ++ a2.msprep;
|
||||
short = \\gn => a1.short ! GSg Neut ++ l ++ a2.short ! gn ;
|
||||
comp = a1.short ! GSg Neut ++ l ++ a2.comp ;
|
||||
} ;
|
||||
|
||||
|
||||
@@ -646,17 +629,17 @@ oper
|
||||
compl2 = \\p,a => case p of {
|
||||
Pos => case ap.preferShort of {
|
||||
PreferFull => slash.compl2 ! p ! a ++ ap.s ! agrGenNum a ! Animate ! slash.c.c ;
|
||||
PrefShort => slash.compl2 ! p ! a ++ ap.short ! a
|
||||
PrefShort => slash.compl2 ! p ! a ++ ap.short ! agrGenNum a
|
||||
} ;
|
||||
Neg => case ap.preferShort of {
|
||||
PreferFull => case neggen slash.c of {
|
||||
False => slash.compl2 ! p ! a ++ ap.s ! agrGenNum a ! Animate ! slash.c.c ;
|
||||
True => slash.compl2 ! p ! a ++ ap.s ! agrGenNum a ! Animate ! Gen
|
||||
} ;
|
||||
PrefShort => slash.compl2 ! p ! a ++ ap.short ! a
|
||||
PrefShort => slash.compl2 ! p ! a ++ ap.short ! agrGenNum a
|
||||
}
|
||||
} ;
|
||||
c = {s="" ; c=Acc ; neggen=True ; hasPrep=False};
|
||||
c = {s="" ; c=Acc ; hasPrep=False};
|
||||
dep = slash.dep ;
|
||||
isSimple = False ;
|
||||
p = slash.p
|
||||
@@ -729,17 +712,21 @@ oper
|
||||
_ => passivateNonReflexive vf
|
||||
} ;
|
||||
|
||||
shortPastPassPart : VerbForms -> GenNum -> Str
|
||||
= \vf,gn ->
|
||||
case vf.refltran of {
|
||||
Trans => case <vf.fut,gn> of {
|
||||
<NormalFuture,GSg Masc> => vf.pppss ;
|
||||
<NormalFuture,GSg Fem> => vf.pppss ++ BIND ++ "а" ;
|
||||
<NormalFuture,GSg Neut> => vf.pppss ++ BIND ++ "о" ;
|
||||
<NormalFuture,GPl> => vf.pppss ++ BIND ++ "ы" ;
|
||||
_ => vf.pppss } ;
|
||||
_ => variants {}
|
||||
} ;
|
||||
presActPart : VerbForms -> Adjective =
|
||||
\v -> adjFormsAdjective (v.prap ** {
|
||||
short = table {
|
||||
GSg Masc => v.prap.msnom;
|
||||
GSg Fem => v.prap.fsnom;
|
||||
GSg Neut => v.prap.nsnom;
|
||||
GPl => v.prap.pnom
|
||||
} ;
|
||||
comp = [] ;
|
||||
p = False ;
|
||||
preferShort = PreferFull
|
||||
}) ;
|
||||
|
||||
pastPassPart : VerbForms -> Adjective =
|
||||
\v -> adjFormsAdjective (v.pppa ** {comp = []; p = False ; preferShort = PreferFull}) ;
|
||||
|
||||
copula : VerbForms
|
||||
= {
|
||||
@@ -757,8 +744,8 @@ oper
|
||||
isg2="будь";
|
||||
isg2refl="явись" ; -- ?
|
||||
ipl1="давайте будем";
|
||||
ppps="явленн"; --*
|
||||
pppss="явлен"; --*
|
||||
prap=mkPresPartForms "являющ";
|
||||
pppa=mkPastPassPartForms "явленн" "явлен";
|
||||
prtr="будучи";
|
||||
ptr="быв";
|
||||
asp=Imperfective;
|
||||
@@ -822,8 +809,8 @@ oper
|
||||
isg2refl="будь способны" ; -- *
|
||||
isg2="будь способен"; -- some improvisation here
|
||||
ipl1="давайте будем способны"; -- maybe, special like for future?
|
||||
ppps=""; --*
|
||||
pppss=""; --*
|
||||
prap=mkPresPartForms "могущ";
|
||||
pppa=mkPastPassPartForms "" "";
|
||||
prtr="могши"; --*
|
||||
ptr="могши";
|
||||
asp=Imperfective;
|
||||
@@ -846,8 +833,8 @@ oper
|
||||
isg2="желай";
|
||||
isg2refl="желайся" ;
|
||||
ipl1="давайте будем хотеть";
|
||||
ppps="хотим"; -- *
|
||||
pppss="хотим"; -- *
|
||||
prap=mkPresPartForms "хотящ";
|
||||
pppa=mkPastPassPartForms "хотим" "хотим";
|
||||
prtr="хотя";
|
||||
ptr="хотев";
|
||||
asp=Imperfective;
|
||||
@@ -860,10 +847,11 @@ oper
|
||||
prsg1, prsg2, prsg3, prpl1, prpl2, prpl3,
|
||||
psgm, psgs,
|
||||
isg2, isg2refl, ipl1,
|
||||
ppps, pppss,
|
||||
prtr, ptr ="";
|
||||
fut=NullFuture ;
|
||||
asp=Imperfective;
|
||||
prap=mkPresPartForms "";
|
||||
pppa=mkPastPassPartForms "" "";
|
||||
refltran = Trans ; -- used to be refl=NonReflexive; tran=Transitive
|
||||
} ;
|
||||
|
||||
@@ -1306,10 +1294,10 @@ oper
|
||||
= \ch, a, anim -> { -- "ч", "нич"
|
||||
a = a ;
|
||||
anim=anim ;
|
||||
nom, voc = ch + "то" ;
|
||||
gen, acc, ptv = ch + "его" ;
|
||||
nom = ch + "то" ;
|
||||
gen, acc = ch + "его" ;
|
||||
dat = ch + "ему" ;
|
||||
prep, loc = ch + "ём" ;
|
||||
prep = ch + "ём" ;
|
||||
ins = ch + "ем" ;
|
||||
poss = {
|
||||
msnom = ch + "ей" ;
|
||||
@@ -1333,10 +1321,10 @@ oper
|
||||
let subPoss = (Predef.tk 1 ch) + "ч" in {
|
||||
a = a ;
|
||||
anim=anim ;
|
||||
nom, voc = ch + "то" ;
|
||||
gen, acc, ptv = ch + "ого" ;
|
||||
nom = ch + "то" ;
|
||||
gen, acc = ch + "ого" ;
|
||||
dat = ch + "ому" ;
|
||||
prep, loc = ch + "ом" ;
|
||||
prep = ch + "ом" ;
|
||||
ins = ch + "ем" ;
|
||||
poss = (doChPron subPoss a anim).poss
|
||||
} ;
|
||||
@@ -1414,9 +1402,6 @@ oper
|
||||
pacc=n.s ! Pl ! Acc ;
|
||||
pins=n.s ! Pl ! Ins ;
|
||||
pprep=n.s ! Pl ! Pre ;
|
||||
ploc=n.s ! Pl ! Loc ;
|
||||
pptv=n.s ! Pl ! Ptv ;
|
||||
pvoc=n.s ! Pl ! VocRus ;
|
||||
g=n.g ;
|
||||
mayben=n.mayben ;
|
||||
anim=n.anim ;
|
||||
@@ -1466,15 +1451,21 @@ oper
|
||||
pins = "тех" ;
|
||||
msprep = "том" ;
|
||||
preferShort = PreferFull ;
|
||||
short = table {
|
||||
GSg Masc => "тот" ;
|
||||
GSg Fem => "та" ;
|
||||
GSg Neut => "то" ;
|
||||
GPl => "те"
|
||||
} ;
|
||||
comp = [] ;
|
||||
p = False
|
||||
} ;
|
||||
|
||||
this_forms = {
|
||||
msnom, sm = "этот" ;
|
||||
fsnom, sf = "эта" ;
|
||||
nsnom, sn = "это" ;
|
||||
pnom, sp = "эти" ;
|
||||
msnom = "этот" ;
|
||||
fsnom = "эта" ;
|
||||
nsnom = "это" ;
|
||||
pnom = "эти" ;
|
||||
msgen = "этого" ;
|
||||
fsgen = "этой" ;
|
||||
pgen = "этих" ;
|
||||
@@ -1485,15 +1476,21 @@ oper
|
||||
pins = "этими" ;
|
||||
msprep = "этом" ;
|
||||
preferShort = PreferFull ;
|
||||
short = table {
|
||||
GSg Masc => "этот" ;
|
||||
GSg Fem => "эта" ;
|
||||
GSg Neut => "это" ;
|
||||
GPl => "эти"
|
||||
} ;
|
||||
comp = [] ;
|
||||
p = False
|
||||
} ;
|
||||
|
||||
a_forms = { -- this pronoun is an approximate translation of indef article; preventing DetNP parsing problems
|
||||
msnom, sm = "некий" ;
|
||||
fsnom, sf = "некая" ;
|
||||
nsnom, sn = "некое" ;
|
||||
pnom, sp = "некие" ;
|
||||
msnom = "некий" ;
|
||||
fsnom = "некая" ;
|
||||
nsnom = "некое" ;
|
||||
pnom = "некие" ;
|
||||
msgen = "некого" ;
|
||||
fsgen = "некой" ;
|
||||
pgen = "неких" ;
|
||||
@@ -1504,6 +1501,12 @@ oper
|
||||
pins = "неким" ;
|
||||
msprep = "некой" ;
|
||||
preferShort = PreferFull ;
|
||||
short = table {
|
||||
GSg Masc => "некий" ;
|
||||
GSg Fem => "некая" ;
|
||||
GSg Neut => "некое" ;
|
||||
GPl => "некие"
|
||||
} ;
|
||||
comp = [] ;
|
||||
p = False
|
||||
} ;
|
||||
@@ -1540,6 +1543,12 @@ oper
|
||||
pins = "данных" ;
|
||||
msprep = "данном" ;
|
||||
preferShort = PreferFull ;
|
||||
short = table {
|
||||
GSg Masc => "данный" ;
|
||||
GSg Fem => "данная" ;
|
||||
GSg Neut => "данное" ;
|
||||
GPl => "данные"
|
||||
} ;
|
||||
comp = [] ;
|
||||
p = False
|
||||
} ;
|
||||
@@ -1568,6 +1577,8 @@ param DForm = unit | teen | ten | hund ;
|
||||
param Place = attr | indep ;
|
||||
oper
|
||||
mille : Noun = nounFormsNoun ((guessNounForms "тысяча" (doGuessAdjectiveForms "тысячный") AdjType) ** {sins=variants {"тысячей" ; "тысячью"}});
|
||||
million : Noun = nounFormsNoun (guessNounForms "миллион" (doGuessAdjectiveForms "миллионный") AdjType) ;
|
||||
milliard : Noun = nounFormsNoun (guessNounForms "миллиард" (doGuessAdjectiveForms "миллиардный") AdjType) ;
|
||||
|
||||
ith_forms : Str -> AdjForms
|
||||
= \s -> {
|
||||
@@ -1584,7 +1595,7 @@ oper
|
||||
fsins = s ++ BIND ++ "-й" ;
|
||||
pins = s ++ BIND ++ "-ми" ;
|
||||
msprep= s ++ BIND ++ "-м" ;
|
||||
sm, sf, sn, sp = s ;
|
||||
short = \\_ => s ;
|
||||
comp = s ++ BIND ++ "-е" ; --*
|
||||
p = False ;
|
||||
preferShort=PreferFull
|
||||
@@ -1689,7 +1700,7 @@ oper
|
||||
++ mfa.sacc ++ "," ++ ffa.sacc ++ "," ++ nfa.sacc ++ "," ++ mfa.pacc ++ ","
|
||||
++ mf.sins ++ "," ++ ff.sins ++ "," ++ nf.sins ++ "," ++ mf.pins ++ ","
|
||||
++ mf.sprep ++ "," ++ ff.sprep ++ "," ++ nf.sprep ++ "," ++ mf.pprep ++ ","
|
||||
++ af.sm ++ "," ++ af.sf ++ "," ++ af.sn ++ "," ++ af.sp ++ ","
|
||||
++ af.short ! (GSg Masc) ++ "," ++ af.short ! (GSg Fem) ++ "," ++ af.short ! (GSg Neut) ++ "," ++ af.short ! GPl ++ ","
|
||||
++ af.comp
|
||||
;
|
||||
|
||||
@@ -1697,8 +1708,8 @@ oper
|
||||
let fut : Agr=>Str = \\a => verbFutAgree v a in
|
||||
let pres : Agr=>Str = \\a => verbPresAgree v a in
|
||||
let past : Agr=>Str = \\a => verbPastAgree v a "" in
|
||||
let imp : Agr=>Str = \\a => ((verbImperativeAgree v a).p1 ++ (verbImperativeAgree v a).p2) in
|
||||
let ppp : GenNum=>Str = \\gn => shortPastPassPart v gn in
|
||||
let imp : Agr=>Str = \\a => (verbImperativeAgree v a).p1 ++ (verbImperativeAgree v a).p2 in
|
||||
let ppp : GenNum=>Str = variants {} {-(pastPassPart v).short-} in
|
||||
let inf = verbInf v in
|
||||
inf ++ "-"
|
||||
++ inf ++ ","
|
||||
|
||||
@@ -89,6 +89,10 @@ lin
|
||||
++ vp.compl ! pol.p ! a
|
||||
} ;
|
||||
|
||||
AdvImp adv imp = {
|
||||
s=\\p,gn => adv.s ++ imp.s ! p ! gn
|
||||
} ;
|
||||
|
||||
-- : NP -> VP -> Cl ; -- John walks - Иван гуляет
|
||||
PredVP np vp = {
|
||||
subj=np.s ! Nom ;
|
||||
|
||||
@@ -56,8 +56,8 @@ lin
|
||||
in8front_Prep = mkPrep "перед" Ins ;
|
||||
in_Prep = mkPrep v_prep_mod Loc ;
|
||||
on_Prep = mkPrep "на" Loc ;
|
||||
part_Prep = {s="" ; c=Ptv ; neggen=False ; hasPrep=False } ;
|
||||
possess_Prep = {s="у" ; c=Gen ; neggen=False ; hasPrep=False} ;
|
||||
part_Prep = {s="" ; c=Ptv ; hasPrep=False } ;
|
||||
possess_Prep = {s="у" ; c=Gen ; hasPrep=False} ;
|
||||
through_Prep = mkPrep "через" Acc ;
|
||||
to_Prep = mkPrep k_prep_dat_mod Dat ;
|
||||
under_Prep = mkPrep pod_prep_mod Ins ;
|
||||
@@ -99,14 +99,13 @@ lin
|
||||
|
||||
can8know_VV = {v=can; modal=\\a=>[]} ;
|
||||
can_VV = {v=can; modal=\\a=>[]} ;
|
||||
must_VV = {v=nullVerb; modal=adjFormsToShort (makeAdjectiveForms "должный" "" "1*a" PreferFull)} ;
|
||||
must_VV = {v=nullVerb; modal=table {Ag gn _ => (makeAdjectiveForms "должный" "" "1*a" PreferFull).short ! gn}} ;
|
||||
want_VV = {v=want; modal=\\a=>[]} ;
|
||||
|
||||
-- : Det ;
|
||||
every_Det = {
|
||||
s = \\g => (adjFormsAdjective (makeAdjectiveForms "каждый" "" "1*a" PreferFull)).s ! GSg g;
|
||||
type=NormalDet ;
|
||||
g = Masc ;
|
||||
c = Nom ;
|
||||
size = Num1 ;
|
||||
} ;
|
||||
@@ -114,7 +113,6 @@ lin
|
||||
someSg_Det = {
|
||||
s = \\g => (adjFormsAdjective (makeAdjectiveForms "некоторый" "" "1*a" PreferFull)).s ! GSg g;
|
||||
type=NormalDet ;
|
||||
g = Masc ;
|
||||
c = Nom ;
|
||||
size = Num1 ;
|
||||
} ;
|
||||
@@ -122,7 +120,6 @@ lin
|
||||
somePl_Det = {
|
||||
s = \\g => (adjFormsAdjective (makeAdjectiveForms "некоторый" "" "1*a" PreferFull)).s ! GPl;
|
||||
type=NormalDet ;
|
||||
g = Masc ;
|
||||
c = Nom ;
|
||||
size = NumAll ;
|
||||
} ;
|
||||
@@ -130,7 +127,6 @@ lin
|
||||
few_Det = {
|
||||
s = \\g => (adjFormsAdjective (makeAdjectiveForms "немногий" "" "3a" PreferFull)).s ! GPl;
|
||||
type=NormalDet ;
|
||||
g = Masc ;
|
||||
c = Nom ;
|
||||
size = NumAll ;
|
||||
} ;
|
||||
@@ -138,7 +134,6 @@ lin
|
||||
many_Det, much_Det = {
|
||||
s = \\g => (adjFormsAdjective (makeAdjectiveForms "многий" "" "3a" PreferFull)).s ! GPl;
|
||||
type=NormalDet ;
|
||||
g = Neut ;
|
||||
c = Gen ;
|
||||
size = NumAll
|
||||
} ;
|
||||
@@ -169,12 +164,12 @@ lin
|
||||
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 ;
|
||||
everybody_NP = everybody ;
|
||||
everything_NP = everything ;
|
||||
something_NP = something ;
|
||||
somebody_NP = somebody ;
|
||||
nothing_NP = nothing ;
|
||||
nobody_NP = nobody ;
|
||||
|
||||
but_PConj = ss "но" ;
|
||||
otherwise_PConj = ss "иначе" ;
|
||||
|
||||
@@ -53,7 +53,7 @@ lin
|
||||
adv=\\a=>[] ;
|
||||
compl=\\_ => case ap.preferShort of {
|
||||
PreferFull => (\\a => ap.s ! agrGenNum a ! Inanimate ! Ins) ;
|
||||
PrefShort => ap.short
|
||||
PrefShort => (\\a => ap.short ! agrGenNum a)
|
||||
} ;
|
||||
p = Pos
|
||||
} ;
|
||||
@@ -146,7 +146,7 @@ lin
|
||||
-- : AP -> Comp ; -- (be) small
|
||||
CompAP ap = case ap.preferShort of {
|
||||
PreferFull => {s=\\a=>ap.s ! agrGenNum a ! Inanimate ! Ins ; adv=[] ; cop=InsCopula} ;
|
||||
PrefShort => {s=ap.short ; adv=[] ; cop=EllCopula}
|
||||
PrefShort => {s=\\a=>ap.short ! agrGenNum a ; adv=[] ; cop=EllCopula}
|
||||
};
|
||||
|
||||
-- : NP -> Comp ; -- (be) the man
|
||||
|
||||
Reference in New Issue
Block a user