mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-30 10:28:53 -06:00
(Dut) Fixes in ComplSlash, mkClause, ProgrVP + general cleanup
This commit is contained in:
@@ -17,25 +17,6 @@ concrete ExtraDut of ExtraDutAbs = CatDut **
|
||||
ComplVPIVV v vpi =
|
||||
insertInf (vpi.s ! v.isAux) (
|
||||
predVGen v.isAux BeforeObjs v) ; ----
|
||||
--{-
|
||||
-- insertExtrapos vpi.p3 (
|
||||
-- insertInf vpi.p2 (
|
||||
-- insertObj vpi.p1 (
|
||||
-- predVGen v.isAux vpi.negPos v))) ;
|
||||
---}
|
||||
--
|
||||
-- PPzuAdv cn = {s = case cn.g of {
|
||||
-- Masc | Neutr => "zum" ;
|
||||
-- Fem => "zur"
|
||||
-- } ++ cn.s ! adjfCase Weak Dat ! Sg ! Dat
|
||||
-- } ;
|
||||
--
|
||||
-- TImpfSubj = {s = [] ; t = Past ; m = MConjunct} ; --# notpresent
|
||||
--
|
||||
-- moegen_VV = auxVV mögen_V ;
|
||||
--
|
||||
--}
|
||||
|
||||
|
||||
lin
|
||||
ICompAP ap = {s = \\agr => "hoe" ++ ap.s ! agr ! APred} ;
|
||||
|
||||
@@ -32,16 +32,14 @@ concrete IdiomDut of Idiom = CatDut **
|
||||
}
|
||||
} ;
|
||||
|
||||
ProgrVP vp = insertObj (\\agr => "aan" ++ "het" ++ useInfVP True vp ! agr) (predV zijn_V) ;
|
||||
ProgrVP vp = let vpi = infVP True vp in
|
||||
insertAdv ("aan het" ++ vpi.inf ++ vpi.ext)
|
||||
(insertObj vpi.obj (compV zijn_V)) ;
|
||||
|
||||
ImpPl1 vp =
|
||||
let
|
||||
v = laten_V ;
|
||||
vpi = infVP True vp ;
|
||||
vvp = insertExtrapos vpi.p3 (
|
||||
insertInf vpi.p2 (
|
||||
insertObj vpi.p1 (
|
||||
predVGen True vp.negPos v))) ;
|
||||
vvp = insertInfVP True vp (predVGen True vp.negPos v) ;
|
||||
in
|
||||
{s = (mkClause "we" {g = Utr ; n = Pl ; p = P1} vvp).s !
|
||||
Pres ! Simul ! Pos ! Inv
|
||||
|
||||
@@ -575,10 +575,6 @@ param
|
||||
mkClause : Str -> Agr -> VP -> Clause = \subj,agr,vp -> {
|
||||
s = \\t,a,b,o =>
|
||||
let
|
||||
ord = case o of {
|
||||
Sub => True ; -- glue prefix to verb
|
||||
_ => False
|
||||
} ;
|
||||
vform = vForm t agr.g agr.n agr.p o ;
|
||||
auxv = (auxVerb vp.s.aux).s ;
|
||||
vperf = vp.s.s ! VPerf ;
|
||||
@@ -593,12 +589,16 @@ param
|
||||
obj0 = vp.n0 ! agr ;
|
||||
obj = vp.n2 ! agr ;
|
||||
part = vp.s.particle ;
|
||||
pref = case a of {
|
||||
Anter => [] ; -- prefix is part of participle: toegevoegd
|
||||
_ => vp.s.prefix -- prefix not present in verb form
|
||||
} ;
|
||||
compl = case vp.negPos of {
|
||||
BeforeObjs => neg ++ obj0 ++ obj ++ part ++ vp.a2 ++ vp.s.prefix ;
|
||||
AfterObjs => obj0 ++ obj ++ neg ++ part ++ vp.a2 ++ vp.s.prefix ;
|
||||
BetweenObjs => obj0 ++ neg ++ obj ++ part ++ vp.a2 ++ vp.s.prefix
|
||||
BeforeObjs => neg ++ obj0 ++ obj ++ part ++ vp.a2 ++ pref ;
|
||||
AfterObjs => obj0 ++ obj ++ neg ++ part ++ vp.a2 ++ pref ;
|
||||
BetweenObjs => obj0 ++ neg ++ obj ++ part ++ vp.a2 ++ pref
|
||||
} ;
|
||||
inf : Str =
|
||||
inf : Str =
|
||||
case <vp.isAux, vp.inf.p2, a> of {
|
||||
<True,True,Anter> => vp.s.s ! VInf ++ vp.inf.p1 ; --# notpresent
|
||||
_ => verb.p2 ++ vp.inf.p1 } ; -- cunger: changed from vp.inf.p1 ++ verb.p2
|
||||
@@ -608,15 +608,12 @@ param
|
||||
inffin : Str =
|
||||
case <t,a,vp.isAux> of {
|
||||
-- gezien zou/zal hebben
|
||||
<Cond,Anter,False> => vperf ++ fin ++ auxv ! VInf ; --# notpresent
|
||||
<Fut,Anter,False> => vperf ++ fin ++ auxv ! VInf ; --# notpresent
|
||||
<Fut|Cond,Anter,False> => vperf ++ fin ++ auxv ! VInf ++ vp.inf.p1 ; --# notpresent
|
||||
-- zou/zal zien
|
||||
<Cond,Simul,False> => fin ++ verb.p2 ;
|
||||
<Fut,Simul,False> => fin ++ verb.p2 ;
|
||||
<Fut|Cond,Simul,False> => fin ++ verb.p2 ++ vp.inf.p1 ;
|
||||
|
||||
-- wil kunnen zien (first line in inf)
|
||||
<_,Anter,True> => fin ++ inf ; -- double inf --# notpresent
|
||||
_ => fin ++ inf
|
||||
-- no inf ++ fin, this is not German :-P
|
||||
_ => fin ++ inf -- double inf --# notpresent
|
||||
}
|
||||
in
|
||||
case o of {
|
||||
@@ -631,20 +628,27 @@ param
|
||||
VZijn => zijn_V
|
||||
} ;
|
||||
|
||||
infVP : Bool -> VP -> ((Agr => Str) * Str * Str) = \isAux, vp ->
|
||||
<
|
||||
\\agr => vp.n0 ! agr ++ vp.n2 ! agr ++ vp.a2,
|
||||
let vverb = vp.s
|
||||
in
|
||||
vp.a1 ! Pos ++
|
||||
vverb.particle ++
|
||||
if_then_Str isAux (vverb.s ! VInfFull) (vverb.prefix ++ "te" ++ vverb.s ! VInf),
|
||||
vp.inf.p1 ++ vp.ext
|
||||
> ;
|
||||
infVP : Bool -> VP -> {obj : (Agr => Str) ; inf : Str ; ext : Str} = \isAux,vp ->
|
||||
let vverb = vp.s in {
|
||||
obj = \\agr => vp.n0 ! agr ++ vp.n2 ! agr ++ vp.a2 ;
|
||||
inf = vp.a1 ! Pos ++ -- altijd
|
||||
vverb.particle ++ -- leuk
|
||||
if_then_Str isAux
|
||||
(vverb.s ! VInfFull) -- toevoegen
|
||||
(vverb.prefix ++ "te" ++ vverb.s ! VInf) ; -- te vinden
|
||||
ext = vp.inf.p1 ++ vp.ext } ;
|
||||
|
||||
insertInfVP : Bool -> VP -> (VP -> VP) = \isAux,vp ->
|
||||
let
|
||||
vpi = infVP isAux vp
|
||||
in
|
||||
\vps -> insertExtrapos vpi.ext
|
||||
(insertInf vpi.inf
|
||||
(insertObj vpi.obj vps)) ;
|
||||
|
||||
useInfVP : Bool -> VP -> Agr => Str = \isAux,vp ->
|
||||
let vpi = infVP isAux vp in
|
||||
\\agr => vpi.p1 ! agr ++ vpi.p2 ++ vpi.p3 ;
|
||||
\\agr => vpi.obj ! agr ++ vpi.inf ++ vpi.ext ;
|
||||
|
||||
reflPron : Agr => Str = table {
|
||||
{n = Sg ; p = P1} => "mijzelf" ;
|
||||
|
||||
@@ -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} ;
|
||||
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 ;
|
||||
|
||||
-- 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 } ;
|
||||
|
||||
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 =
|
||||
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} ;
|
||||
insertInfVP v.isAux vp (predVGen v.isAux vp.negPos v) ** {c2 = vp.c2} ;
|
||||
|
||||
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} ;
|
||||
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) ;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user