From de5ce221b689b0f1e2a033c8007e435357c1b196 Mon Sep 17 00:00:00 2001 From: Inari Listenmaa Date: Wed, 18 Apr 2018 16:30:41 +0200 Subject: [PATCH] (Dut) Add inflected form of past participle + WIP on PastPartAP in ExtendDut --- src/dutch/ExtendDut.gf | 9 ++++- src/dutch/ResDut.gf | 88 +++++++++++++++++++++++++++++++----------- 2 files changed, 73 insertions(+), 24 deletions(-) diff --git a/src/dutch/ExtendDut.gf b/src/dutch/ExtendDut.gf index 74e2e6aa..eaaf8bee 100644 --- a/src/dutch/ExtendDut.gf +++ b/src/dutch/ExtendDut.gf @@ -2,7 +2,7 @@ concrete ExtendDut of Extend = CatDut ** ExtendFunctor --- - [] -- put the names of your own definitions here + - [PastPartAP] with (Grammar = GrammarDut) ** open @@ -11,6 +11,11 @@ concrete ExtendDut of Extend = Coordination, Prelude, ParadigmsDut in { - -- put your own definitions here + lin + + PastPartAP vp = { + s = \\agr,af => (infClause [] agr vp).s ! Past ! Anter ! Pos ! Sub ; + isPre = notB vp.inf.p2 + } ; } \ No newline at end of file diff --git a/src/dutch/ResDut.gf b/src/dutch/ResDut.gf index ca059d0d..602248b3 100644 --- a/src/dutch/ResDut.gf +++ b/src/dutch/ResDut.gf @@ -123,6 +123,7 @@ param | VImp3 -- weest | VImpPl -- wezen | VPerf -- geweest + | VPerfInfl -- geweeste --# notpresent | VPresPart -- zijnde | VGer -- zijnde ; @@ -136,21 +137,35 @@ param \aai, aait, aaien, aaide, aaidet, aaiden, geaaid -> mkVerb8 aai aait aait aaien aaide aaidet aaiden geaaid ; - mkVerb8 : (_,_,_,_,_,_,_,_ : Str) -> - Verb = \aai, aaitt, aait, aaien, aaide, _, aaiden, geaaid -> { - s = table { - VInf | VInfFull | VImpPl | VPresPl => aaien; -- hij/zij/het/wij aaien + mkVerb8 : (_,_,_,_,_,_,_,_ : Str) -> Verb = + \aai, aaitt, aait, aaien, aaide, _, aaiden, geaaid -> + let geaaide = inflParticiple geaaid + in { s = table { + VInf | VInfFull | + VImpPl | VPresPl => aaien; -- hij/zij/het/wij aaien VPresSg1 | VImp2 => aai; -- ik aai - VPresSg2 => aaitt ; -- jij aait - VPresSg3 | VImp3 => aait; -- jij aait - VPastSg => aaide; -- ik aaide --# notpresent - VPastPl => aaiden; -- hij/zij/het/wij aaiden --# notpresent - VPerf => geaaid ; -- ik heb geaaid - VPresPart => aaien + "de" ; - VGer => aaien + "d" - } + VPresSg2 => aaitt ; -- jij aait + 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 --# notpresent + VPresPart => aaien + "de" ; + VGer => aaien + "d" + } }; - + + inflParticiple : Str -> Str = \gezien -> + case gezien of { + _ + "ien" => gezien + "e" ; -- gezien/geziene + _ + "en" => gezien ; -- geboren/geboren + x + "aa" + n@? => x + "a" + n + "e" ; -- gegaan/gegane ; gepraat/geprate + -- not sure if these even exist, remove if wrong + x + "ee" + n@? => x + "e" + n + "e" ; + x + "oo" + n@? => x + "o" + n + "e" ; + _ => gezien + "e" -- betaald/betaalde ; gemaakt/gemaakte + } ; + regVerb : Str -> Verb = \s -> smartVerb s (mkStem s) ; irregVerb : (breken,brak,gebroken : Str) -> Verb = \breken,brak,gebroken -> @@ -161,7 +176,7 @@ param irregVerb2 : (breken,brak,braken,gebroken : Str) -> Verb = \breken,brak,braken,gebroken -> let brek = (regVerb breken).s in - mkVerb (brek ! VPresSg1) (brek ! VPresSg3) (brek ! VInf) brak brak (braken) gebroken ; + mkVerb (brek ! VPresSg1) (brek ! VPresSg3) (brek ! VInf) brak brak braken gebroken ; -- To add a prefix (like "ein") to an already existing verb. @@ -200,8 +215,9 @@ param _ => 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") ; - vowel : pattern Str = #("a"|"e"|"i"|"o"|"u") ; + + consonant : pattern Str = #("b"|"c"|"d"|"f"|"g"|"h"|"j"|"k"|"l"|"m"|"n"|"p"|"q"|"r"|"s"|"t"|"v"|"w"|"x"|"y"|"z") ; + vowel : pattern Str = #("a"|"e"|"i"|"o"|"u") ; -- To make a stem out of a verb -- If a stem ends in a 'v' then the 'v' changes into a 'f' -- If a stem ends in a 'z' then the 'z' changes into an 's' @@ -298,6 +314,7 @@ param VImp3 => "weest" ; VImpPl => "wezen" ; VPerf => "geweest" ; + VPerfInfl => "geweeste" ; VPresPart => "zijnde" ; VGer => "wezend" } ; @@ -321,6 +338,7 @@ param VImp3 => "heeft" ; VImpPl => "hebben" ; VPerf => "gehad" ; + VPerfInfl => "gehadde" ; VPresPart => "hebbende" ; VGer => "hebbend" } ; @@ -344,6 +362,7 @@ param VImp3 => "zoudt" ; VImpPl => "zouden" ; ---- VPerf => "gezoudt" ; + VPerfInfl => "gezoude" ; VPresPart => "zullende" ; VGer => "zullend" } ; @@ -367,6 +386,7 @@ param VImp3 => "kan" ; VImpPl => "kunnen" ; ---- VPerf => "gekund" ; + VPerfInfl => "gekunde" ; VPresPart => "kunnende" ; VGer => "kunnend" } ; @@ -568,21 +588,45 @@ param -- For $Sentence$. + param + ClType = Inf | Fin ; + oper + Clause : Type = { s : Tense => Anteriority => Polarity => Order => Str } ; - mkClause : Str -> Agr -> VP -> Clause = \subj,agr,vp -> { + -- To be used for normal clauses + mkClause : Str -> Agr -> VP -> Clause = \subj,agr,vp -> + mkClause' subj agr vp ! 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 ; + + -- Lines 615-618 add 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 => { 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 ; - verb : Str * Str = case of { - => ; --# notpresent - => ; --# notpresent - <_, Anter> => ; --# notpresent - <_, Simul> => + verb : Str * Str = case of { + + -- + => ; --# notpresent + => vp.s.s ! VPerfInfl ; + _ => vperf } + ,[]> ; --# notpresent + -- + + <_,Fut|Cond,Simul> => ; --# notpresent + <_,Fut|Cond,Anter> => ; --# notpresent + <_,_, Anter> => ; --# notpresent + <_,_, Simul> => } ; fin = verb.p1 ; neg = vp.a1 ! b ;