(Dut) Add all AForms into VForm for past participle; update rest of the modules accordingly. Fix agreement in PastPartAP.

This commit is contained in:
Inari Listenmaa
2018-04-19 12:01:05 +02:00
parent b5ca8710cf
commit 34d27a6876
7 changed files with 179 additions and 172 deletions

View File

@@ -176,7 +176,7 @@ oper
tr (th (heading imperative_Parameter ++ heading singular_Parameter) ++ td (vfin VImp2 ++ Predef.BIND ++ "," ++ vfin VImp3)) ++ tr (th (heading imperative_Parameter ++ heading singular_Parameter) ++ td (vfin VImp2 ++ Predef.BIND ++ "," ++ vfin VImp3)) ++
tr (th (heading imperative_Parameter ++ heading plural_Parameter) ++ td (vfin (VImpPl))) ++ tr (th (heading imperative_Parameter ++ heading plural_Parameter) ++ td (vfin (VImpPl))) ++
tr (th (heading infinitive_Parameter) ++ td (verb.s ! VInf)) ++ tr (th (heading infinitive_Parameter) ++ td (verb.s ! VInf)) ++
tr (th (heading perfect_Parameter ++ heading participle_Parameter) ++ td (verb.s ! VPerf)) ++ tr (th (heading perfect_Parameter ++ heading participle_Parameter) ++ td (verb.s ! VPerf APred)) ++
tr (th (heading imperfect_Parameter ++ heading participle_Parameter) ++ td (verb.s ! VPresPart)) ++ tr (th (heading imperfect_Parameter ++ heading participle_Parameter) ++ td (verb.s ! VPresPart)) ++
tr (th (heading gerund_Parameter) ++ td (verb.s ! VGer)) ++ tr (th (heading gerund_Parameter) ++ td (verb.s ! VGer)) ++
tr (th (heading aux_verb_Parameter) ++ td (case verb.aux of {VHebben => "hebben" ; VZijn => "zijn"})) tr (th (heading aux_verb_Parameter) ++ td (case verb.aux of {VHebben => "hebben" ; VZijn => "zijn"}))

View File

@@ -14,8 +14,11 @@ concrete ExtendDut of Extend =
lin lin
PastPartAP vp = { PastPartAP vp = {
s = \\agr,af => (infClause [] agr vp).s ! Past ! Anter ! Pos ! Sub ; s = \\agr,af => let aForm = case vp.isHeavy of {
isPre = notB vp.inf.p2 True => APred ;
False => af } ;
in (infClause [] agr vp aForm).s ! Past ! Anter ! Pos ! Sub ;
isPre = notB vp.isHeavy ;
} ; } ;
} }

View File

@@ -58,7 +58,7 @@ lin
b = p.p ; b = p.p ;
vform = vForm t agr.g agr.n agr.p o ; vform = vForm t agr.g agr.n agr.p o ;
auxv = (auxVerb vp.s.aux).s ; auxv = (auxVerb vp.s.aux).s ;
vperf = vp.s.s ! VPerf ; vperf = vp.s.s ! VPerf APred ;
verb : Str * Str = case <t,a> of { verb : Str * Str = case <t,a> of {
<Fut|Cond,Simul> => <zullen_V.s ! vform, vp.s.s ! VInf> ; --# notpresent <Fut|Cond,Simul> => <zullen_V.s ! vform, vp.s.s ! VInf> ; --# notpresent
<Fut|Cond,Anter> => <zullen_V.s ! vform, vperf ++ auxv ! VInf> ; --# notpresent <Fut|Cond,Anter> => <zullen_V.s ! vform, vperf ++ auxv ! VInf> ; --# notpresent
@@ -96,9 +96,9 @@ lin
ConjVPS = conjunctDistrTable2 Order Agr ; ConjVPS = conjunctDistrTable2 Order Agr ;
PassVPSlash vps = PassVPSlash vps =
insertInf (vps.s.s ! VPerf) (predV ResDut.worden_V) ; insertInf (vps.s.s ! VPerf APred) (predV ResDut.worden_V) ;
PassAgentVPSlash vps np = PassAgentVPSlash vps np =
insertAdv (appPrep (P.mkPrep "door") np) (insertInf (vps.s.s ! VPerf) (predV ResDut.worden_V)) ; insertAdv (appPrep (P.mkPrep "door") np) (insertInf (vps.s.s ! VPerf APred) (predV ResDut.worden_V)) ;
lin lin
NominalizeVPSlashNP vpslash np = NominalizeVPSlashNP vpslash np =

View File

@@ -34,7 +34,7 @@ concrete NounDut of Noun = CatDut ** open ResDut, Prelude in {
} ; } ;
PPartNP np v2 = heavyNP { PPartNP np v2 = heavyNP {
s = \\c => np.s ! c ++ v2.s ! VPerf ; -- invar part s = \\c => np.s ! c ++ v2.s ! VPerf APred ; -- invar part
a = np.a ; a = np.a ;
} ; } ;

View File

@@ -289,7 +289,7 @@ oper
no_geV v = let vs = v.s in { no_geV v = let vs = v.s in {
s = table { s = table {
VPerf => Predef.drop 2 (vs ! VPerf) ; VPerf x => Predef.drop 2 (vs ! VPerf x) ;
p => vs ! p p => vs ! p
} ; } ;
prefix = v.prefix ; lock_V = v.lock_V ; particle = v.particle ; aux = v.aux ; vtype = v.vtype prefix = v.prefix ; lock_V = v.lock_V ; particle = v.particle ; aux = v.aux ; vtype = v.vtype
@@ -297,7 +297,7 @@ oper
fixprefixV s v = let vs = v.s in { fixprefixV s v = let vs = v.s in {
s = table { s = table {
VPerf => s + Predef.drop 2 (vs ! VPerf) ; VPerf x => s + Predef.drop 2 (vs ! VPerf x) ;
p => s + vs ! p p => s + vs ! p
} ; } ;
prefix = v.prefix ; lock_V = v.lock_V ; aux = v.aux ; particle = v.particle ; vtype = v.vtype prefix = v.prefix ; lock_V = v.lock_V ; aux = v.aux ; particle = v.particle ; vtype = v.vtype

View File

@@ -122,8 +122,7 @@ param
| VImp2 -- wees | VImp2 -- wees
| VImp3 -- weest | VImp3 -- weest
| VImpPl -- wezen | VImpPl -- wezen
| VPerf -- geweest | VPerf AForm -- geweest / geweeste / geweests (e.g. "iets verdwaalds")
| VPerfInfl -- geweeste
| VPresPart -- zijnde | VPresPart -- zijnde
| VGer -- zijnde | VGer -- zijnde
; ;
@@ -148,8 +147,9 @@ param
VPresSg3 | VImp3 => aait; -- hij/zij aait VPresSg3 | VImp3 => aait; -- hij/zij aait
VPastSg => aaide; -- ik aaide --# notpresent VPastSg => aaide; -- ik aaide --# notpresent
VPastPl => aaiden; -- hij/zij/het/wij aaiden --# notpresent VPastPl => aaiden; -- hij/zij/het/wij aaiden --# notpresent
VPerf => geaaid ; -- ik heb geaaid VPerf APred => geaaid ; -- ik heb geaaid
VPerfInfl => geaaide ; -- inflected form of participle VPerf AAttr => geaaide ; -- geaaide X
VPerf AGen => geaaid + "s" ; -- iets geaaids
VPresPart => aaien + "de" ; VPresPart => aaien + "de" ;
VGer => aaien + "d" VGer => aaien + "d"
} }
@@ -187,7 +187,7 @@ param
-- if_then_Str b (ein + geb) geb ; -- if_then_Str b (ein + geb) geb ;
in in
{s = table { {s = table {
f@(VInfFull | VPerf) => ein + vs ! f; f@(VInfFull | VPerf _) => ein + vs ! f;
f => vs ! f f => vs ! f
} ; } ;
prefix = ein ; prefix = ein ;
@@ -213,7 +213,6 @@ param
_+ ("t" | "tt") => t_end_regVerb vergeten vergeet ; _+ ("t" | "tt") => t_end_regVerb vergeten vergeet ;
_+ "d" => d_end_regVerb vergeten vergeet ; _+ "d" => d_end_regVerb vergeten vergeet ;
_ => d_regVerb vergeten vergeet _ => d_regVerb vergeten vergeet
}; };
consonant : pattern Str = #("b"|"c"|"d"|"f"|"g"|"h"|"j"|"k"|"l"|"m"|"n"|"p"|"q"|"r"|"s"|"t"|"v"|"w"|"x"|"y"|"z") ; consonant : pattern Str = #("b"|"c"|"d"|"f"|"g"|"h"|"j"|"k"|"l"|"m"|"n"|"p"|"q"|"r"|"s"|"t"|"v"|"w"|"x"|"y"|"z") ;
@@ -271,26 +270,24 @@ param
-- For regular verbs with past tense 't' -- For regular verbs with past tense 't'
t_regVerb : (_,_ :Str) -> Verb = \botsen,bots -> t_regVerb : (_,_ :Str) -> Verb = \botsen,bots ->
mkVerb bots (bots + "t") botsen mkVerb bots (bots + "t") botsen (bots + "te")
(bots + "te") (bots + "te") (bots + "ten") (bots + "te") (bots + "ten") ("ge" + bots + "t");
("ge" + bots + "t");
-- For verbs that dont need an extra 't' at the end -- For verbs that dont need an extra 't' at the end
t_end_regVerb : (_,_ : Str) -> Verb = \achten,acht -> t_end_regVerb : (_,_ : Str) -> Verb = \achten,acht ->
mkVerb acht (acht) achten mkVerb acht (acht) achten (acht + "te")
(acht + "te") (acht +"te") (acht+"ten") ("ge"+acht); (acht +"te") (acht+"ten") ("ge"+acht);
-- For verbs that dont need an extra 'd' at the end -- For verbs that dont need an extra 'd' at the end
d_end_regVerb : (_,_ : Str) -> Verb = \aarden,aard -> d_end_regVerb : (_,_ : Str) -> Verb = \aarden,aard ->
mkVerb aard (aard+"t") aarden mkVerb aard (aard+"t") aarden (aard + "de")
(aard + "de") (aard +"de") (aard+"den") ("ge"+aard); (aard +"de") (aard+"den") ("ge"+aard);
-- For verbs that need a vowel doubled in singular -- For verbs that need a vowel doubled in singular
add_vowel_regVerb : (_,_ : Str) -> Verb = \absorberen,stem -> add_vowel_regVerb : (_,_ : Str) -> Verb = \absorberen,stem ->
case stem of { case stem of {
_+ ("t"|"k"|"f"|"s"|"c"|"h"|"p") => t_regVerb absorberen stem; _+ ("t"|"k"|"f"|"s"|"c"|"h"|"p") => t_regVerb absorberen stem;
_ => d_regVerb absorberen stem _ => d_regVerb absorberen stem };
};
-- For verbs that have their stem ending with a 'z' -- For verbs that have their stem ending with a 'z'
z_regVerb : (_,_ : Str) -> Verb = \omhelzen,stem -> z_regVerb : (_,_ : Str) -> Verb = \omhelzen,stem ->
@@ -298,7 +295,8 @@ param
-- For verbs that have their stem ending with a 'v' -- For verbs that have their stem ending with a 'v'
v_regVerb : (_,_ : Str) -> Verb = \hoeven,hoef -> v_regVerb : (_,_ : Str) -> Verb = \hoeven,hoef ->
mkVerb hoef (hoef +"t") hoeven (hoef+"de") (hoef+"de") (hoef+"den") ("ge"+hoef+"d"); mkVerb hoef (hoef +"t") hoeven (hoef+"de")
(hoef+"de") (hoef+"den") ("ge"+hoef+"d");
zijn_V : VVerb = { zijn_V : VVerb = {
s = table { s = table {
@@ -313,8 +311,9 @@ param
VImp2 => "wees" ; VImp2 => "wees" ;
VImp3 => "weest" ; VImp3 => "weest" ;
VImpPl => "wezen" ; VImpPl => "wezen" ;
VPerf => "geweest" ; VPerf APred => "geweest" ;
VPerfInfl => "geweeste" ; VPerf AAttr => "geweeste" ;
VPerf AGen => "geweests" ;
VPresPart => "zijnde" ; VPresPart => "zijnde" ;
VGer => "wezend" VGer => "wezend"
} ; } ;
@@ -337,8 +336,9 @@ param
VImp2 => "heb" ; VImp2 => "heb" ;
VImp3 => "heeft" ; VImp3 => "heeft" ;
VImpPl => "hebben" ; VImpPl => "hebben" ;
VPerf => "gehad" ; VPerf APred => "gehad" ;
VPerfInfl => "gehadde" ; VPerf AAttr => "gehadde" ;
VPerf AGen => "gehads" ;
VPresPart => "hebbende" ; VPresPart => "hebbende" ;
VGer => "hebbend" VGer => "hebbend"
} ; } ;
@@ -361,8 +361,9 @@ param
VImp2 => "zoud" ; ---- not used VImp2 => "zoud" ; ---- not used
VImp3 => "zoudt" ; VImp3 => "zoudt" ;
VImpPl => "zouden" ; ---- VImpPl => "zouden" ; ----
VPerf => "gezoudt" ; VPerf APred => "gezoudt" ;
VPerfInfl => "gezoude" ; VPerf AAttr => "gezoude" ;
VPerf AGen => "gezouds" ;
VPresPart => "zullende" ; VPresPart => "zullende" ;
VGer => "zullend" VGer => "zullend"
} ; } ;
@@ -385,8 +386,9 @@ param
VImp2 => "kan" ; ---- not used VImp2 => "kan" ; ---- not used
VImp3 => "kan" ; VImp3 => "kan" ;
VImpPl => "kunnen" ; ---- VImpPl => "kunnen" ; ----
VPerf => "gekund" ; VPerf APred => "gekund" ;
VPerfInfl => "gekunde" ; VPerf AAttr => "gekunde" ;
VPerf AGen => "gekunds" ;
VPresPart => "kunnende" ; VPresPart => "kunnende" ;
VGer => "kunnend" VGer => "kunnend"
} ; } ;
@@ -531,7 +533,8 @@ param
isAux : Bool ; -- is a double infinitive isAux : Bool ; -- is a double infinitive
negPos : NegPosition ; -- ik schoop X niet ; ik houd niet van X ; dat is niet leuk negPos : NegPosition ; -- ik schoop X niet ; ik houd niet van X ; dat is niet leuk
inf : Str * Bool ; -- zeggen (True = non-empty) inf : Str * Bool ; -- zeggen (True = non-empty)
ext : Str -- dat je komt ext : Str ; -- dat je komt
isHeavy : Bool ; -- has any other field than s. Affects any VP* -> AP function.
} ; } ;
predV : VVerb -> VP = predVGen False AfterObjs ; predV : VVerb -> VP = predVGen False AfterObjs ;
@@ -550,7 +553,8 @@ param
isAux = isAux ; isAux = isAux ;
negPos = negPos ; negPos = negPos ;
inf : Str * Bool = <[],False> ; inf : Str * Bool = <[],False> ;
ext : Str = [] ext : Str = [] ;
isHeavy = False ;
} ; } ;
negation : Polarity => Str = table { negation : Polarity => Str = table {
@@ -568,6 +572,7 @@ param
n0 = \\a => case isPron of {True => obj ! a ; _ => []} ++ vp.n0 ! a ; n0 = \\a => case isPron of {True => obj ! a ; _ => []} ++ vp.n0 ! a ;
n2 = \\a => case isPron of {False => obj ! a ; _ => []} ++ vp.n2 ! a ; n2 = \\a => case isPron of {False => obj ! a ; _ => []} ++ vp.n2 ! a ;
negPos = negPos ; negPos = negPos ;
isHeavy = True ;
} ; } ;
insertAdV : Str -> VP -> VP = \adv,vp -> vp ** { insertAdV : Str -> VP -> VP = \adv,vp -> vp ** {
@@ -579,11 +584,13 @@ param
} ; } ;
insertExtrapos : Str -> VP -> VP = \ext,vp -> vp ** { insertExtrapos : Str -> VP -> VP = \ext,vp -> vp ** {
ext = vp.ext ++ ext ext = vp.ext ++ ext ;
isHeavy = True ;
} ; } ;
insertInf : Str -> VP -> VP = \inf,vp -> vp ** { insertInf : Str -> VP -> VP = \inf,vp -> vp ** {
inf = <inf ++ vp.inf.p1, True> ; inf = <inf ++ vp.inf.p1, True> ;
isHeavy = True ;
} ; } ;
-- For $Sentence$. -- For $Sentence$.
@@ -596,31 +603,28 @@ param
s : Tense => Anteriority => Polarity => Order => Str s : Tense => Anteriority => Polarity => Order => Str
} ; } ;
-- To be used for normal clauses -- To be used for normal clauses. APred chooses the noninflected past participle.
mkClause : Str -> Agr -> VP -> Clause = \subj,agr,vp -> mkClause : Str -> Agr -> VP -> Clause = \subj,agr,vp ->
mkClause' subj agr vp ! Fin ; mkClause' subj agr vp APred Fin ;
-- To be used for ExtendDut.PastPartAP -- To be used for ExtendDut.PastPartAP
-- If we need more variants, extend mkClause' -- If we need more variants, extend mkClause'
infClause : Str -> Agr -> VP -> Clause = \subj,agr,vp -> infClause : Str -> Agr -> VP -> AForm -> Clause = \subj,agr,vp,af ->
mkClause' subj agr vp ! Inf ; mkClause' subj agr vp af Inf ;
-- Lines 615-618 add a possibility to choose a participle verb form. -- Added a possibility to choose a participle verb form.
-- This is so far only used in ExtendDut.PastPartAP. /IL2018 -- This is so far only used in ExtendDut.PastPartAP. /IL2018
mkClause' : Str -> Agr -> VP -> (ClType => Clause) = \subj,agr,vp -> mkClause' : Str -> Agr -> VP -> AForm -> ClType -> Clause = \subj,agr,vp,af,isPart -> {
\\isPart => {
s = \\t,a,b,o => s = \\t,a,b,o =>
let let
vform = vForm t agr.g agr.n agr.p o ; vform = vForm t agr.g agr.n agr.p o ;
auxv = (auxVerb vp.s.aux).s ; auxv = (auxVerb vp.s.aux).s ;
vperf = vp.s.s ! VPerf ; vperf = vp.s.s ! VPerf af ;
verb : Str * Str = case <isPart,t,a> of { verb : Str * Str = case <isPart,t,a> of {
-- <Experimental: only used in ExtendDut.PastPartAP> -- <Experimental: only used in ExtendDut.PastPartAP>
<Inf,Pres, _> => <vp.s.s ! VPresPart, []> ; <Inf,Pres, _> => <vp.s.s ! VPresPart, []> ;
<Inf,_,_> => <case agr.g of { Utr => vp.s.s ! VPerfInfl ; <Inf,_, _> => <vperf,[]> ;
_ => vperf }
,[]> ;
-- </Experimental> -- </Experimental>
<_,Fut|Cond,Simul> => <zullen_V.s ! vform, vp.s.s ! VInf> ; --# notpresent <_,Fut|Cond,Simul> => <zullen_V.s ! vform, vp.s.s ! VInf> ; --# notpresent
@@ -688,7 +692,7 @@ param
in in
\vps -> insertExtrapos vpi.ext \vps -> insertExtrapos vpi.ext
(insertInf vpi.inf (insertInf vpi.inf
(insertObj vpi.obj vps)) ; (insertObj vpi.obj (vps ** {isHeavy=True}))) ;
useInfVP : Bool -> VP -> Agr => Str = \isAux,vp -> useInfVP : Bool -> VP -> Agr => Str = \isAux,vp ->
let vpi = infVP isAux vp in let vpi = infVP isAux vp in

View File

@@ -80,7 +80,7 @@ concrete VerbDut of Verb = CatDut ** open Prelude, ResDut in {
(npLite (\\_ => reflPron ! a)) (npLite (\\_ => reflPron ! a))
) vp ; ) vp ;
PassV2 v = insertInf (v.s ! VPerf) (predV worden_V) ; PassV2 v = insertInf (v.s ! VPerf APred) (predV worden_V) ;
VPSlashPrep vp prep = vp ** {c2 = <prep,True>} ; VPSlashPrep vp prep = vp ** {c2 = <prep,True>} ;