(Dut) Fixes in ComplSlash, mkClause, ProgrVP + general cleanup

This commit is contained in:
Inari Listenmaa
2018-04-18 10:13:55 +02:00
parent 100bb34dcd
commit f2a02c438d
4 changed files with 59 additions and 86 deletions
+25 -35
View File
@@ -10,15 +10,8 @@ concrete VerbDut of Verb = CatDut ** open Prelude, ResDut in {
vpv = predVGen v.isAux vp.negPos (v2v v) ;
vpi = infVP v.isAux vp ;
in
vpv ** {n2 = vpi.p1 ; inf = <vpi.p2, True> ; ext = vpi.p3} ; ----
vpv ** {n2 = vpi.obj ; inf = <vpi.inf, True> ; ext = vpi.ext} ; ---- Why replace and not use insertInfVP? TODO find out
{-
in
insertInf vpi.p3 (
insertInf vpi.p2 (
insertObj vpi.p1 (
predVGen v.isAux vp.negPos (v2v v)))) ; ---- subtyp
-}
ComplVS v s =
insertExtrapos (conjThat ++ s.s ! Sub) (predV v) ;
ComplVQ v q =
@@ -32,43 +25,40 @@ concrete VerbDut of Verb = CatDut ** open Prelude, ResDut in {
insertObj (\\_ => appPrep v.c2.p1 np) (predVv v) ** {c2 = v.c3} ;
Slash3V3 v np =
insertObj (\\_ => appPrep v.c3.p1 np) (predVv v) ** {c2 = v.c2} ;
SlashV2S v s =
insertExtrapos (conjThat ++ s.s ! Sub) (predVv v) ** {c2 = v.c2} ;
SlashV2Q v q =
insertExtrapos (q.s ! QIndir) (predVv v) ** {c2 = v.c2} ;
SlashV2V v vp =
let
vpi = infVP v.isAux vp
in
insertExtrapos vpi.p3 (
insertInf vpi.p2 (
insertObj vpi.p1 ((predVGen v.isAux vp.negPos v)))) ** {c2 = v.c2} ;
SlashV2V v vp =
insertInfVP v.isAux vp (predVGen v.isAux vp.negPos v) ** {c2 = v.c2} ;
SlashV2A v ap =
insertObj (\\agr => ap.s ! agr ! APred)
(predVGen False BetweenObjs (v2v v)) ** {c2 = v.c2} ;
--vp.c2.p2: if the verb has a preposition or not
ComplSlash vp np = insertObjNP np.isPron (case vp.c2.p2 of {True => BeforeObjs; False => vp.negPos}) (\\_ => appPrep vp.c2.p1 np) vp ;
ComplSlash vp np =
let obj : Agr => Str = \\_ => appPrep vp.c2.p1 np ;
SlashVV v vp =
let
vpi = infVP v.isAux vp
in
insertExtrapos vpi.p3 (
insertInf vpi.p2 (
insertObj vpi.p1 (
predVGen v.isAux vp.negPos (v2v v)))) ** {c2 = vp.c2} ;
-- If there is an infinitive, put the old object before it.
-- If not, just keep the old vp.
vp': VP = case vp.inf.p2 of {
True => let emptyObjVP : VP = vp ** {n0, n2 = \\_ => [] } ;
infCompl = vp.n0 ! np.a ++ vp.n2 ! np.a ;
in insertInf infCompl emptyObjVP ;
False => vp } ;
SlashV2VNP v np vp =
let
vpi = infVP v.isAux vp
in
insertExtrapos vpi.p3 (
insertInf vpi.p2 (
insertObj vpi.p1 (
insertObj (\\_ => appPrep v.c2.p1 np) (
predVGen v.isAux vp.negPos v)))) ** {c2 = v.c2} ;
negPos = case vp.c2.p2 of { -- if the verb has a preposition or not
True => BeforeObjs ;
False => vp.negPos } ;
in insertObjNP np.isPron negPos obj vp' ;
SlashVV v vp =
insertInfVP v.isAux vp (predVGen v.isAux vp.negPos v) ** {c2 = vp.c2} ;
SlashV2VNP v np vp =
insertInfVP v.isAux vp (
insertObj (\\_ => appPrep v.c2.p1 np)
(predVGen v.isAux vp.negPos v))
** {c2 = v.c2} ;
UseComp comp = insertObj comp.s (compV zijn_V) ;