mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-24 03:52:50 -06:00
VPS in Ger
This commit is contained in:
@@ -46,4 +46,63 @@ concrete ExtraGer of ExtraGerAbs = CatGer **
|
|||||||
a = agrP3 det.n ;
|
a = agrP3 det.n ;
|
||||||
isPron = False
|
isPron = False
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
lincat
|
||||||
|
VPS = {s : Order => Agr => Str} ;
|
||||||
|
[VPS] = {s1,s2 : Order => Agr => Str} ;
|
||||||
|
|
||||||
|
lin
|
||||||
|
BaseVPS = twoTable2 Order Agr ;
|
||||||
|
ConsVPS = consrTable2 Order Agr comma ;
|
||||||
|
|
||||||
|
PredVPS np vpi =
|
||||||
|
let
|
||||||
|
subj = np.s ! NPC Nom ;
|
||||||
|
agr = np.a ;
|
||||||
|
in {
|
||||||
|
s = \\o =>
|
||||||
|
let verb = vpi.s ! o ! agr
|
||||||
|
in case o of {
|
||||||
|
Main => subj ++ verb ;
|
||||||
|
Inv => verb ++ subj ; ---- älskar henne och sover jag
|
||||||
|
Sub => subj ++ verb
|
||||||
|
}
|
||||||
|
} ;
|
||||||
|
|
||||||
|
MkVPS tm p vp =
|
||||||
|
let vps = useVP vp in {
|
||||||
|
s = \\o,agr =>
|
||||||
|
let
|
||||||
|
ord = case o of {
|
||||||
|
Sub => True ; -- glue prefix to verb
|
||||||
|
_ => False
|
||||||
|
} ;
|
||||||
|
b = p.p ;
|
||||||
|
a = tm.a ;
|
||||||
|
t = tm.t ;
|
||||||
|
m = tm.m ;
|
||||||
|
subj = [] ;
|
||||||
|
verb = vps.s ! ord ! agr ! VPFinite m t a ;
|
||||||
|
neg = vp.a1 ! b ;
|
||||||
|
obj0 = vp.n0 ! agr ;
|
||||||
|
obj = vp.n2 ! agr ;
|
||||||
|
compl = obj0 ++ neg ++ obj ++ vp.a2 ; -- from EG 15/5
|
||||||
|
inf = vp.inf ++ verb.inf ;
|
||||||
|
extra = vp.ext ;
|
||||||
|
inffin : Str =
|
||||||
|
case <a,vp.isAux> of {
|
||||||
|
<Anter,True> => verb.fin ++ inf ; -- double inf --# notpresent
|
||||||
|
_ => inf ++ verb.fin --- or just auxiliary vp
|
||||||
|
}
|
||||||
|
in
|
||||||
|
case o of {
|
||||||
|
Main => subj ++ verb.fin ++ compl ++ vp.infExt ++ inf ++ extra ;
|
||||||
|
Inv => verb.fin ++ subj ++ compl ++ vp.infExt ++ inf ++ extra ;
|
||||||
|
Sub => subj ++ compl ++ vp.infExt ++ inffin ++ extra
|
||||||
|
}
|
||||||
|
} ;
|
||||||
|
|
||||||
|
ConjVPS = conjunctDistrTable2 Order Agr ;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
abstract ExtraGerAbs = Extra [
|
abstract ExtraGerAbs = Extra [
|
||||||
VPI,ListVPI,BaseVPI,ConsVPI,MkVPI,ComplVPIVV,ConjVPI,
|
VPI,ListVPI,BaseVPI,ConsVPI,MkVPI,ComplVPIVV,ConjVPI,
|
||||||
VV,VP,Conj,IAdv,IComp,ICompAP,IAdvAdv,Adv,AP] ** {
|
VPS,ListVPS,BaseVPS,ConsVPS,ConjVPS,MkVPS,PredVPS,
|
||||||
|
Temp,Pol,S,NP,VV,VP,Conj,IAdv,IComp,ICompAP,IAdvAdv,Adv,AP] ** {
|
||||||
|
|
||||||
fun
|
fun
|
||||||
PPzuAdv : CN -> Adv ; -- zum Lied, zur Flasche
|
PPzuAdv : CN -> Adv ; -- zum Lied, zur Flasche
|
||||||
|
|||||||
Reference in New Issue
Block a user