1
0
forked from GitHub/gf-rgl

(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 plural_Parameter) ++ td (vfin (VImpPl))) ++
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 gerund_Parameter) ++ td (verb.s ! VGer)) ++
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
PastPartAP vp = {
s = \\agr,af => (infClause [] agr vp).s ! Past ! Anter ! Pos ! Sub ;
isPre = notB vp.inf.p2
s = \\agr,af => let aForm = case vp.isHeavy of {
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 ;
vform = vForm t agr.g agr.n agr.p o ;
auxv = (auxVerb vp.s.aux).s ;
vperf = vp.s.s ! VPerf ;
vperf = vp.s.s ! VPerf APred ;
verb : Str * Str = case <t,a> of {
<Fut|Cond,Simul> => <zullen_V.s ! vform, vp.s.s ! VInf> ; --# notpresent
<Fut|Cond,Anter> => <zullen_V.s ! vform, vperf ++ auxv ! VInf> ; --# notpresent
@@ -96,9 +96,9 @@ lin
ConjVPS = conjunctDistrTable2 Order Agr ;
PassVPSlash vps =
insertInf (vps.s.s ! VPerf) (predV ResDut.worden_V) ;
insertInf (vps.s.s ! VPerf APred) (predV ResDut.worden_V) ;
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
NominalizeVPSlashNP vpslash np =

View File

@@ -34,7 +34,7 @@ concrete NounDut of Noun = CatDut ** open ResDut, Prelude in {
} ;
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 ;
} ;

View File

@@ -289,7 +289,7 @@ oper
no_geV v = let vs = v.s in {
s = table {
VPerf => Predef.drop 2 (vs ! VPerf) ;
VPerf x => Predef.drop 2 (vs ! VPerf x) ;
p => vs ! p
} ;
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 {
s = table {
VPerf => s + Predef.drop 2 (vs ! VPerf) ;
VPerf x => s + Predef.drop 2 (vs ! VPerf x) ;
p => s + vs ! p
} ;
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
| VImp3 -- weest
| VImpPl -- wezen
| VPerf -- geweest
| VPerfInfl -- geweeste
| VPerf AForm -- geweest / geweeste / geweests (e.g. "iets verdwaalds")
| VPresPart -- zijnde
| VGer -- zijnde
;
@@ -148,8 +147,9 @@ param
VPresSg3 | VImp3 => aait; -- hij/zij aait
VPastSg => aaide; -- ik aaide --# notpresent
VPastPl => aaiden; -- hij/zij/het/wij aaiden --# notpresent
VPerf => geaaid ; -- ik heb geaaid
VPerfInfl => geaaide ; -- inflected form of participle
VPerf APred => geaaid ; -- ik heb geaaid
VPerf AAttr => geaaide ; -- geaaide X
VPerf AGen => geaaid + "s" ; -- iets geaaids
VPresPart => aaien + "de" ;
VGer => aaien + "d"
}
@@ -187,7 +187,7 @@ param
-- if_then_Str b (ein + geb) geb ;
in
{s = table {
f@(VInfFull | VPerf) => ein + vs ! f;
f@(VInfFull | VPerf _) => ein + vs ! f;
f => vs ! f
} ;
prefix = ein ;
@@ -213,7 +213,6 @@ param
_+ ("t" | "tt") => t_end_regVerb vergeten vergeet ;
_+ "d" => d_end_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") ;
@@ -271,26 +270,24 @@ param
-- For regular verbs with past tense 't'
t_regVerb : (_,_ :Str) -> Verb = \botsen,bots ->
mkVerb bots (bots + "t") botsen
(bots + "te") (bots + "te") (bots + "ten")
("ge" + bots + "t");
mkVerb bots (bots + "t") botsen (bots + "te")
(bots + "te") (bots + "ten") ("ge" + bots + "t");
-- For verbs that dont need an extra 't' at the end
t_end_regVerb : (_,_ : Str) -> Verb = \achten,acht ->
mkVerb acht (acht) achten
(acht + "te") (acht +"te") (acht+"ten") ("ge"+acht);
mkVerb acht (acht) achten (acht + "te")
(acht +"te") (acht+"ten") ("ge"+acht);
-- For verbs that dont need an extra 'd' at the end
d_end_regVerb : (_,_ : Str) -> Verb = \aarden,aard ->
mkVerb aard (aard+"t") aarden
(aard + "de") (aard +"de") (aard+"den") ("ge"+aard);
mkVerb aard (aard+"t") aarden (aard + "de")
(aard +"de") (aard+"den") ("ge"+aard);
-- For verbs that need a vowel doubled in singular
add_vowel_regVerb : (_,_ : Str) -> Verb = \absorberen,stem ->
case stem of {
_+ ("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'
z_regVerb : (_,_ : Str) -> Verb = \omhelzen,stem ->
@@ -298,7 +295,8 @@ param
-- For verbs that have their stem ending with a 'v'
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 = {
s = table {
@@ -313,8 +311,9 @@ param
VImp2 => "wees" ;
VImp3 => "weest" ;
VImpPl => "wezen" ;
VPerf => "geweest" ;
VPerfInfl => "geweeste" ;
VPerf APred => "geweest" ;
VPerf AAttr => "geweeste" ;
VPerf AGen => "geweests" ;
VPresPart => "zijnde" ;
VGer => "wezend"
} ;
@@ -337,8 +336,9 @@ param
VImp2 => "heb" ;
VImp3 => "heeft" ;
VImpPl => "hebben" ;
VPerf => "gehad" ;
VPerfInfl => "gehadde" ;
VPerf APred => "gehad" ;
VPerf AAttr => "gehadde" ;
VPerf AGen => "gehads" ;
VPresPart => "hebbende" ;
VGer => "hebbend"
} ;
@@ -361,8 +361,9 @@ param
VImp2 => "zoud" ; ---- not used
VImp3 => "zoudt" ;
VImpPl => "zouden" ; ----
VPerf => "gezoudt" ;
VPerfInfl => "gezoude" ;
VPerf APred => "gezoudt" ;
VPerf AAttr => "gezoude" ;
VPerf AGen => "gezouds" ;
VPresPart => "zullende" ;
VGer => "zullend"
} ;
@@ -385,8 +386,9 @@ param
VImp2 => "kan" ; ---- not used
VImp3 => "kan" ;
VImpPl => "kunnen" ; ----
VPerf => "gekund" ;
VPerfInfl => "gekunde" ;
VPerf APred => "gekund" ;
VPerf AAttr => "gekunde" ;
VPerf AGen => "gekunds" ;
VPresPart => "kunnende" ;
VGer => "kunnend"
} ;
@@ -531,7 +533,8 @@ param
isAux : Bool ; -- is a double infinitive
negPos : NegPosition ; -- ik schoop X niet ; ik houd niet van X ; dat is niet leuk
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 ;
@@ -550,7 +553,8 @@ param
isAux = isAux ;
negPos = negPos ;
inf : Str * Bool = <[],False> ;
ext : Str = []
ext : Str = [] ;
isHeavy = False ;
} ;
negation : Polarity => Str = table {
@@ -568,6 +572,7 @@ param
n0 = \\a => case isPron of {True => obj ! a ; _ => []} ++ vp.n0 ! a ;
n2 = \\a => case isPron of {False => obj ! a ; _ => []} ++ vp.n2 ! a ;
negPos = negPos ;
isHeavy = True ;
} ;
insertAdV : Str -> VP -> VP = \adv,vp -> vp ** {
@@ -579,11 +584,13 @@ param
} ;
insertExtrapos : Str -> VP -> VP = \ext,vp -> vp ** {
ext = vp.ext ++ ext
ext = vp.ext ++ ext ;
isHeavy = True ;
} ;
insertInf : Str -> VP -> VP = \inf,vp -> vp ** {
inf = <inf ++ vp.inf.p1, True> ;
isHeavy = True ;
} ;
-- For $Sentence$.
@@ -596,31 +603,28 @@ param
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' subj agr vp ! Fin ;
mkClause' subj agr vp APred Fin ;
-- To be used for ExtendDut.PastPartAP
-- If we need more variants, extend mkClause'
infClause : Str -> Agr -> VP -> Clause = \subj,agr,vp ->
mkClause' subj agr vp ! Inf ;
infClause : Str -> Agr -> VP -> AForm -> Clause = \subj,agr,vp,af ->
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
mkClause' : Str -> Agr -> VP -> (ClType => Clause) = \subj,agr,vp ->
\\isPart => {
mkClause' : Str -> Agr -> VP -> AForm -> ClType -> Clause = \subj,agr,vp,af,isPart -> {
s = \\t,a,b,o =>
let
vform = vForm t agr.g agr.n agr.p o ;
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 {
-- <Experimental: only used in ExtendDut.PastPartAP>
<Inf,Pres, _> => <vp.s.s ! VPresPart, []> ;
<Inf,_,_> => <case agr.g of { Utr => vp.s.s ! VPerfInfl ;
_ => vperf }
,[]> ;
<Inf,_, _> => <vperf,[]> ;
-- </Experimental>
<_,Fut|Cond,Simul> => <zullen_V.s ! vform, vp.s.s ! VInf> ; --# notpresent
@@ -688,7 +692,7 @@ param
in
\vps -> insertExtrapos vpi.ext
(insertInf vpi.inf
(insertObj vpi.obj vps)) ;
(insertObj vpi.obj (vps ** {isHeavy=True}))) ;
useInfVP : Bool -> VP -> Agr => Str = \isAux,vp ->
let vpi = infVP isAux vp in

View File

@@ -80,7 +80,7 @@ concrete VerbDut of Verb = CatDut ** open Prelude, ResDut in {
(npLite (\\_ => reflPron ! a))
) 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>} ;