forked from GitHub/gf-rgl
(Ger) Agreement with ReflVP + ComplSlash
ComplSlash ( … ReflVP … ) X: reflexive should agree with X ReflVP ... ( … ComplSlash … X): reflexive should agree with subject
This commit is contained in:
@@ -520,7 +520,10 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
subjc : Preposition -- determines case of "subj"
|
subjc : Preposition -- determines case of "subj"
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
predV : Verb -> VP = predVGen False ;
|
predV : Verb -> VPSlash = predVGen False ;
|
||||||
|
|
||||||
|
predVc : Verb ** {c2 : Preposition} -> VPSlash = \v ->
|
||||||
|
predV v ** {c2 = v.c2} ;
|
||||||
|
|
||||||
useVP : VP -> VPC = \vp ->
|
useVP : VP -> VPC = \vp ->
|
||||||
let
|
let
|
||||||
@@ -577,7 +580,7 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|
||||||
predVGen : Bool -> Verb -> VP = \isAux, verb -> {
|
predVGen : Bool -> Verb -> VPSlash = \isAux, verb -> {
|
||||||
s = {
|
s = {
|
||||||
s = verb.s ;
|
s = verb.s ;
|
||||||
prefix = verb.prefix ;
|
prefix = verb.prefix ;
|
||||||
@@ -594,7 +597,10 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
} ;
|
} ;
|
||||||
isAux = isAux ; ----
|
isAux = isAux ; ----
|
||||||
inf,ext,infExt,adj : Str = [] ;
|
inf,ext,infExt,adj : Str = [] ;
|
||||||
subjc = PrepNom
|
subjc = PrepNom ;
|
||||||
|
-- Dummy values for subtyping.
|
||||||
|
c2 = noPreposition Nom ;
|
||||||
|
missingAdv = False
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
auxPerfect : Verb -> VForm => Str = \verb ->
|
auxPerfect : Verb -> VForm => Str = \verb ->
|
||||||
@@ -654,13 +660,20 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
Neg => "nicht"
|
Neg => "nicht"
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
VPSlash = VP ** {c2 : Preposition} ;
|
VPSlash = VP ** {c2 : Preposition ; missingAdv : Bool } ;
|
||||||
|
|
||||||
|
-- IL 24/04/2018 Fixing the scope of reflexives
|
||||||
|
objAgr : { a : Agr } -> VP -> VP = \obj,vp -> vp ** {
|
||||||
|
nn = \\a => vp.nn ! obj.a } ;
|
||||||
|
|
||||||
-- Extending a verb phrase with new constituents.
|
-- Extending a verb phrase with new constituents.
|
||||||
|
|
||||||
insertObj : (Agr => Str) -> VP -> VP = insertObjNP False ;
|
insertObj : (Agr => Str) -> VPSlash -> VPSlash = insertObjNP False ;
|
||||||
|
|
||||||
insertObjNP : Bool -> (Agr => Str) -> VP -> VP = \isPron, obj,vp -> vp ** {
|
insertObjc : (Agr => Str) -> VPSlash -> VPSlash = \obj,vp ->
|
||||||
|
insertObj obj vp ** {c2 = vp.c2 ; missingAdv = vp.missingAdv } ;
|
||||||
|
|
||||||
|
insertObjNP : Bool -> (Agr => Str) -> VPSlash -> VPSlash = \isPron, obj,vp -> vp ** {
|
||||||
nn = \\a =>
|
nn = \\a =>
|
||||||
let vpnn = vp.nn ! a in
|
let vpnn = vp.nn ! a in
|
||||||
case isPron of {
|
case isPron of {
|
||||||
@@ -682,16 +695,16 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
insertAdv : Str -> VP -> VP = \adv,vp -> vp ** {
|
insertAdv : Str -> VP -> VP = \adv,vp -> vp ** {
|
||||||
a2 = vp.a2 ++ adv } ;
|
a2 = vp.a2 ++ adv } ;
|
||||||
|
|
||||||
insertExtrapos : Str -> VP -> VP = \ext,vp -> vp ** {
|
insertExtrapos : Str -> VPSlash -> VPSlash = \ext,vp -> vp ** {
|
||||||
ext = vp.ext ++ ext } ;
|
ext = vp.ext ++ ext } ;
|
||||||
|
|
||||||
insertInfExt : Str -> VP -> VP = \infExt,vp -> vp ** {
|
insertInfExt : Str -> VPSlash -> VPSlash = \infExt,vp -> vp ** {
|
||||||
infExt = vp.infExt ++ infExt } ;
|
infExt = vp.infExt ++ infExt } ;
|
||||||
|
|
||||||
insertInf : Str -> VP -> VP = \inf,vp -> vp ** {
|
insertInf : Str -> VPSlash -> VPSlash = \inf,vp -> vp ** {
|
||||||
inf = inf ++ vp.inf } ;
|
inf = inf ++ vp.inf } ;
|
||||||
|
|
||||||
insertAdj : Str -> Str * Str -> Str -> VP -> VP = \adj,c,ext,vp -> vp ** {
|
insertAdj : Str -> Str * Str -> Str -> VPSlash -> VPSlash = \adj,c,ext,vp -> vp ** {
|
||||||
nn = \\a =>
|
nn = \\a =>
|
||||||
let vpnn = vp.nn ! a in
|
let vpnn = vp.nn ! a in
|
||||||
<vpnn.p1 ++ c.p1 , vpnn.p2> ;
|
<vpnn.p1 ++ c.p1 , vpnn.p2> ;
|
||||||
|
|||||||
@@ -7,13 +7,13 @@ concrete VerbGer of Verb = CatGer ** open Prelude, ResGer, Coordination in {
|
|||||||
|
|
||||||
ComplVV v vp =
|
ComplVV v vp =
|
||||||
let
|
let
|
||||||
vpi = infVP v.isAux vp
|
vpi = infVP v.isAux vp ;
|
||||||
|
vps = predVGen v.isAux v ;
|
||||||
in
|
in
|
||||||
insertExtrapos vpi.p4 (
|
insertExtrapos vpi.p4 (
|
||||||
insertInfExt vpi.p3 (
|
insertInfExt vpi.p3 (
|
||||||
insertInf vpi.p2 (
|
insertInf vpi.p2 (
|
||||||
insertObj vpi.p1 (
|
insertObjc vpi.p1 vps))) ;
|
||||||
predVGen v.isAux v)))) ;
|
|
||||||
|
|
||||||
ComplVS v s =
|
ComplVS v s =
|
||||||
insertExtrapos (comma ++ conjThat ++ s.s ! Sub) (predV v) ;
|
insertExtrapos (comma ++ conjThat ++ s.s ! Sub) (predV v) ;
|
||||||
@@ -21,48 +21,53 @@ concrete VerbGer of Verb = CatGer ** open Prelude, ResGer, Coordination in {
|
|||||||
insertExtrapos (comma ++ q.s ! QIndir) (predV v) ;
|
insertExtrapos (comma ++ q.s ! QIndir) (predV v) ;
|
||||||
ComplVA v ap = insertAdj (v.c2.s ++ ap.s ! APred) ap.c ap.ext (predV v) ; -- changed
|
ComplVA v ap = insertAdj (v.c2.s ++ ap.s ! APred) ap.c ap.ext (predV v) ; -- changed
|
||||||
|
|
||||||
SlashV2a v = predV v ** {c2 = v.c2} ;
|
SlashV2a v = predVc v ;
|
||||||
|
|
||||||
Slash2V3 v np =
|
Slash2V3 v np =
|
||||||
insertObj (\\_ => appPrepNP v.c2 np) (predV v) ** {c2 = v.c3} ;
|
insertObjc (\\_ => appPrepNP v.c2 np) (predVc v) ** {c2 = v.c3} ;
|
||||||
Slash3V3 v np =
|
Slash3V3 v np =
|
||||||
insertObj (\\_ => appPrepNP v.c3 np) (predV v) ** {c2 = v.c2} ;
|
insertObjc (\\_ => appPrepNP v.c3 np) (predVc v) ;
|
||||||
|
|
||||||
SlashV2S v s =
|
SlashV2S v s =
|
||||||
insertExtrapos (conjThat ++ s.s ! Sub) (predV v) ** {c2 = v.c2} ;
|
insertExtrapos (conjThat ++ s.s ! Sub) (predVc v) ;
|
||||||
SlashV2Q v q =
|
SlashV2Q v q =
|
||||||
insertExtrapos (q.s ! QIndir) (predV v) ** {c2 = v.c2} ;
|
insertExtrapos (q.s ! QIndir) (predVc v) ;
|
||||||
SlashV2V v vp =
|
SlashV2V v vp =
|
||||||
let
|
let
|
||||||
vpi = infVP v.isAux vp
|
vpi = infVP v.isAux vp ;
|
||||||
in
|
vps = predVGen v.isAux v ** {c2 = v.c2} ;
|
||||||
|
in vps **
|
||||||
insertExtrapos vpi.p3 (
|
insertExtrapos vpi.p3 (
|
||||||
insertInf vpi.p2 (
|
insertInf vpi.p2 (
|
||||||
insertObj vpi.p1 ((predVGen v.isAux v)))) ** {c2 = v.c2} ;
|
insertObj vpi.p1 vps)) ;
|
||||||
|
|
||||||
SlashV2A v ap =
|
SlashV2A v ap =
|
||||||
insertAdj (ap.s ! APred) ap.c ap.ext (predV v) ** {c2 = v.c2} ; -- changed
|
insertAdj (ap.s ! APred) ap.c ap.ext (predVc v) ;
|
||||||
|
|
||||||
ComplSlash vp np = insertObjNP (isLightComplement np.isPron vp.c2) (\\_ => appPrepNP vp.c2 np) vp ;
|
ComplSlash vps np =
|
||||||
|
let vp = insertObjNP (isLightComplement np.isPron vps.c2) (\\_ => appPrepNP vps.c2 np) vps ;
|
||||||
|
in case vp.missingAdv of {
|
||||||
|
True => vp ;
|
||||||
|
False => objAgr np vp } ; -- IL 24/04/2018 force reflexive in the VPSlash to take the agreement of the object introduced by ComplSlash.
|
||||||
|
|
||||||
SlashVV v vp =
|
SlashVV v vp =
|
||||||
let
|
let
|
||||||
vpi = infVP v.isAux vp
|
vpi = infVP v.isAux vp ;
|
||||||
in
|
vps = predVGen v.isAux v ** {c2 = vp.c2} ;
|
||||||
|
in vps **
|
||||||
insertExtrapos vpi.p3 (
|
insertExtrapos vpi.p3 (
|
||||||
insertInf vpi.p2 (
|
insertInf vpi.p2 (
|
||||||
insertObj vpi.p1 (
|
insertObj vpi.p1 vps)) ;
|
||||||
predVGen v.isAux v))) ** {c2 = vp.c2} ;
|
|
||||||
|
|
||||||
SlashV2VNP v np vp =
|
SlashV2VNP v np vp =
|
||||||
let
|
let
|
||||||
vpi = infVP v.isAux vp
|
vpi = infVP v.isAux vp ;
|
||||||
in
|
vps = predVGen v.isAux v ** {c2 = v.c2} ;
|
||||||
|
in vps **
|
||||||
insertExtrapos vpi.p3 (
|
insertExtrapos vpi.p3 (
|
||||||
insertInf vpi.p2 (
|
insertInf vpi.p2 (
|
||||||
insertObj vpi.p1 (
|
insertObj vpi.p1 (
|
||||||
insertObj (\\_ => appPrepNP v.c2 np) (
|
insertObj (\\_ => appPrepNP v.c2 np) vps))) ;
|
||||||
predVGen v.isAux v)))) ** {c2 = v.c2} ;
|
|
||||||
|
|
||||||
UseComp comp =
|
UseComp comp =
|
||||||
insertExtrapos comp.ext (insertObj comp.s (predV sein_V)) ; -- agr not used
|
insertExtrapos comp.ext (insertObj comp.s (predV sein_V)) ; -- agr not used
|
||||||
@@ -87,14 +92,14 @@ concrete VerbGer of Verb = CatGer ** open Prelude, ResGer, Coordination in {
|
|||||||
|
|
||||||
AdVVP adv vp = insertAdv adv.s vp ; -- not AdV 27/5/2012: nicht immer
|
AdVVP adv vp = insertAdv adv.s vp ; -- not AdV 27/5/2012: nicht immer
|
||||||
|
|
||||||
AdvVPSlash vp adv = insertAdv adv.s vp ** {c2 = vp.c2} ;
|
AdvVPSlash vp adv = vp ** insertAdv adv.s vp ;
|
||||||
AdVVPSlash adv vp = insertAdv adv.s vp ** {c2 = vp.c2} ;
|
AdVVPSlash adv vp = vp ** insertAdv adv.s vp ;
|
||||||
|
|
||||||
ReflVP vp = insertObj (\\a => appPrep vp.c2
|
ReflVP vp = insertObj (\\a => appPrep vp.c2
|
||||||
(\\k => usePrepC k (\c -> reflPron ! a ! c))) vp ;
|
(\\k => usePrepC k (\c -> reflPron ! a ! c))) vp ;
|
||||||
|
|
||||||
PassV2 v = insertInf (v.s ! VPastPart APred) (predV werdenPass) ;
|
PassV2 v = insertInf (v.s ! VPastPart APred) (predV werdenPass) ;
|
||||||
|
|
||||||
VPSlashPrep vp prep = vp ** {c2 = prep} ;
|
VPSlashPrep vp prep = vp ** {c2 = prep ; missingAdv = True} ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user