forked from GitHub/gf-rgl
added more functions in Extend
This commit is contained in:
@@ -88,10 +88,22 @@ lin
|
||||
vp.compl1 ! a ++ vp.compl2 ! a) Pos (predV verbBe) ;
|
||||
|
||||
PassAgentVPSlash vp np =
|
||||
insertObj (\\_ => "чрез" ++ np.s ! RObj Acc) Pos
|
||||
insertObj (\\_ => "от" ++ np.s ! RObj Acc) Pos
|
||||
(insertObj (\\a => vp.s ! Perf ! VPassive (aform a.gn Indef (RObj Acc)) ++
|
||||
vp.compl1 ! a ++ vp.compl2 ! a) Pos (predV verbBe)) ;
|
||||
|
||||
UttVPShort vp = {
|
||||
s = let agr = agrP3 (GSg Neut) ;
|
||||
clitic = case vp.vtype of {
|
||||
VNormal => {s=[]; agr=agr} ;
|
||||
VMedial c => {s=reflClitics ! c; agr=agr} ;
|
||||
VPhrasal c => {s=personalClitics ! c ! agr.gn ! agr.p; agr={gn=GSg Neut; p=P3}}
|
||||
} ;
|
||||
in vp.ad.s ++ clitic.s ++
|
||||
vp.s ! Imperf ! VPres (numGenNum clitic.agr.gn) clitic.agr.p ++
|
||||
vp.compl ! agr
|
||||
} ;
|
||||
|
||||
lincat
|
||||
VPS = {s : Agr => Str} ;
|
||||
[VPS] = {s : Bool => Ints 3 => Agr => Str} ;
|
||||
@@ -164,5 +176,19 @@ lin
|
||||
p = rnp.p
|
||||
} ;
|
||||
|
||||
lin
|
||||
ApposNP np1 np2 = {s = \\role => np1.s ! role ++ comma ++ np2.s ! role; a = np1.a; p = np1.p} ;
|
||||
|
||||
DetNPFem det = {
|
||||
s = \\role => let s = det.s ! False ! AFem ! role
|
||||
in case role of {
|
||||
RObj Dat => "на" ++ s;
|
||||
RObj WithPrep => with_Word ++ s;
|
||||
_ => s
|
||||
} ;
|
||||
a = {gn = gennum AFem (numnnum det.nn); p = P3} ;
|
||||
p = Pos
|
||||
} ;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -57,7 +57,11 @@ concrete ExtendEng of Extend =
|
||||
s = \\t,a,p,_ => slash.s ! t ! a ! p ! oDir ++ slash.c2 ;
|
||||
c = NPAcc
|
||||
} ;
|
||||
|
||||
|
||||
DetNPFem det = {
|
||||
s = det.sp ;
|
||||
a = agrgP3 det.n Fem
|
||||
} ;
|
||||
|
||||
lincat
|
||||
VPS = {s : Agr => Str} ;
|
||||
@@ -314,9 +318,12 @@ concrete ExtendEng of Extend =
|
||||
Cons_rr_RNP x xs = consrTable Agr comma x xs ;
|
||||
Cons_nr_RNP x xs = consrTable Agr comma {s = \\a => x.s ! NPAcc} xs ;
|
||||
|
||||
|
||||
lin
|
||||
ApposNP np1 np2 = {s = \\c => np1.s ! c ++ comma ++ np2.s ! c; a = np1.a} ;
|
||||
|
||||
---- TODO: RNPList construction
|
||||
|
||||
lin
|
||||
ComplGenVV v a p vp = insertObj (\\agr => a.s ++ p.s ++
|
||||
infVP v.typ vp a.a p.p agr)
|
||||
(predVV v) ;
|
||||
|
||||
@@ -3,8 +3,9 @@ concrete ExtendSwe of Extend = CatSwe **
|
||||
ExtendFunctor -
|
||||
[
|
||||
GenNP, GenModNP, ComplBareVS, CompBareCN,
|
||||
ApposNP,
|
||||
StrandRelSlash, EmptyRelSlash, StrandQuestSlash,
|
||||
PassVPSlash, PassAgentVPSlash,
|
||||
PassVPSlash, PassAgentVPSlash, UttVPShort,
|
||||
MkVPI, BaseVPI, ConsVPI, ConjVPI, ComplVPIVV,
|
||||
MkVPS, BaseVPS, ConsVPS, ConjVPS, PredVPS,
|
||||
ICompAP,
|
||||
@@ -65,6 +66,8 @@ concrete ExtendSwe of Extend = CatSwe **
|
||||
PassAgentVPSlash vps np =
|
||||
insertObjPost (\\a => vps.c2.s ++ vps.n3 ! a) (insertObj (\\_ => (PrepNP by8agent_Prep np).s) (passiveVP vps)) ;
|
||||
|
||||
lin UttVPShort vp = {s = infVP vp (agrP3 Utr Sg)} ;
|
||||
|
||||
lincat
|
||||
VPI = {s : VPIForm => Agr => Str} ;
|
||||
[VPI] = {s1,s2 : VPIForm => Agr => Str} ;
|
||||
@@ -152,6 +155,9 @@ concrete ExtendSwe of Extend = CatSwe **
|
||||
Cons_rr_RNP x xs = consrTable Agr comma x xs ;
|
||||
Cons_nr_RNP x xs = consrTable Agr comma {s = \\a => x.s ! NPAcc} xs ;
|
||||
|
||||
lin
|
||||
ApposNP np1 np2 = {s = \\nform => np1.s ! nform ++ comma ++ np2.s ! nform; a = np1.a; isPron = False} ;
|
||||
|
||||
CompoundN n1 n2 = {
|
||||
s = \\n,s,c => n1.co ++ BIND ++ n2.s ! n ! s ! c ;
|
||||
co = n1.co ++ BIND ++ n2.co ;
|
||||
|
||||
Reference in New Issue
Block a user