1
0
forked from GitHub/gf-rgl

added more functions in Extend

This commit is contained in:
Krasimir Angelov
2018-06-23 22:47:02 +02:00
parent 8cfc229164
commit 5f2d520e30
3 changed files with 43 additions and 4 deletions

View File

@@ -88,10 +88,22 @@ lin
vp.compl1 ! a ++ vp.compl2 ! a) Pos (predV verbBe) ; vp.compl1 ! a ++ vp.compl2 ! a) Pos (predV verbBe) ;
PassAgentVPSlash vp np = 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)) ++ (insertObj (\\a => vp.s ! Perf ! VPassive (aform a.gn Indef (RObj Acc)) ++
vp.compl1 ! a ++ vp.compl2 ! a) Pos (predV verbBe)) ; 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 lincat
VPS = {s : Agr => Str} ; VPS = {s : Agr => Str} ;
[VPS] = {s : Bool => Ints 3 => Agr => Str} ; [VPS] = {s : Bool => Ints 3 => Agr => Str} ;
@@ -164,5 +176,19 @@ lin
p = rnp.p 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
} ;
} }

View File

@@ -58,6 +58,10 @@ concrete ExtendEng of Extend =
c = NPAcc c = NPAcc
} ; } ;
DetNPFem det = {
s = det.sp ;
a = agrgP3 det.n Fem
} ;
lincat lincat
VPS = {s : Agr => Str} ; VPS = {s : Agr => Str} ;
@@ -314,9 +318,12 @@ concrete ExtendEng of Extend =
Cons_rr_RNP x xs = consrTable Agr comma x xs ; Cons_rr_RNP x xs = consrTable Agr comma x xs ;
Cons_nr_RNP x xs = consrTable Agr comma {s = \\a => x.s ! NPAcc} 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 ---- TODO: RNPList construction
lin
ComplGenVV v a p vp = insertObj (\\agr => a.s ++ p.s ++ ComplGenVV v a p vp = insertObj (\\agr => a.s ++ p.s ++
infVP v.typ vp a.a p.p agr) infVP v.typ vp a.a p.p agr)
(predVV v) ; (predVV v) ;

View File

@@ -3,8 +3,9 @@ concrete ExtendSwe of Extend = CatSwe **
ExtendFunctor - ExtendFunctor -
[ [
GenNP, GenModNP, ComplBareVS, CompBareCN, GenNP, GenModNP, ComplBareVS, CompBareCN,
ApposNP,
StrandRelSlash, EmptyRelSlash, StrandQuestSlash, StrandRelSlash, EmptyRelSlash, StrandQuestSlash,
PassVPSlash, PassAgentVPSlash, PassVPSlash, PassAgentVPSlash, UttVPShort,
MkVPI, BaseVPI, ConsVPI, ConjVPI, ComplVPIVV, MkVPI, BaseVPI, ConsVPI, ConjVPI, ComplVPIVV,
MkVPS, BaseVPS, ConsVPS, ConjVPS, PredVPS, MkVPS, BaseVPS, ConsVPS, ConjVPS, PredVPS,
ICompAP, ICompAP,
@@ -65,6 +66,8 @@ concrete ExtendSwe of Extend = CatSwe **
PassAgentVPSlash vps np = PassAgentVPSlash vps np =
insertObjPost (\\a => vps.c2.s ++ vps.n3 ! a) (insertObj (\\_ => (PrepNP by8agent_Prep np).s) (passiveVP vps)) ; 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 lincat
VPI = {s : VPIForm => Agr => Str} ; VPI = {s : VPIForm => Agr => Str} ;
[VPI] = {s1,s2 : 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_rr_RNP x xs = consrTable Agr comma x xs ;
Cons_nr_RNP x xs = consrTable Agr comma {s = \\a => x.s ! NPAcc} 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 = { CompoundN n1 n2 = {
s = \\n,s,c => n1.co ++ BIND ++ n2.s ! n ! s ! c ; s = \\n,s,c => n1.co ++ BIND ++ n2.s ! n ! s ! c ;
co = n1.co ++ BIND ++ n2.co ; co = n1.co ++ BIND ++ n2.co ;