From bbc679c6d656225a204a506fa0a8900ada058677 Mon Sep 17 00:00:00 2001 From: aarne Date: Thu, 17 Sep 2015 09:50:52 +0000 Subject: [PATCH] additions and corrections to Dut,Fre,Ita needed for a dialogue system grammar --- lib/src/dutch/IrregDut.gf | 3 ++- lib/src/dutch/ParadigmsDut.gf | 5 ++++- lib/src/dutch/ResDut.gf | 11 ++++++++--- lib/src/dutch/SentenceDut.gf | 7 ++++--- lib/src/dutch/StructuralDut.gf | 2 +- lib/src/french/ExtraFre.gf | 17 +++++++++++++++++ lib/src/french/ExtraFreAbs.gf | 5 +++++ lib/src/italian/ExtraIta.gf | 8 ++++++++ lib/src/italian/ExtraItaAbs.gf | 6 ++++++ lib/src/spanish/NumeralSpa.gf | 2 +- 10 files changed, 56 insertions(+), 10 deletions(-) diff --git a/lib/src/dutch/IrregDut.gf b/lib/src/dutch/IrregDut.gf index 027a24706..fd3299827 100644 --- a/lib/src/dutch/IrregDut.gf +++ b/lib/src/dutch/IrregDut.gf @@ -62,7 +62,7 @@ lin klimmen_V = mkZijnHebbenV "klimmen" "klom" "klommen" "geklommen" ; lin klinken_V = mkV "klinken" "klonk" "klonken" "geklonken" ; lin kluiven_V = mkV "kluiven" "kloof" "kloven" "gekloven" ; lin knijpen_V = mkV "knijpen" "kneep" "knepen" "geknepen" ; -lin komen_V = mkV "komen" "kwam" "kwamen" "gekomen" ; +lin komen_V = mkV "komen" "komt" "kwam" "kwam" "kwamen" "gekomen" ; lin kopen_V = mkV "kopen" "kocht" "kochten" "gekocht" ; lin krijgen_V = mkV "krijgen" "kreeg" "kregen" "gekregen" ; lin krimpen_V = mkZijnV "krimpen" "kromp" "krompen" "gekrompen" ; @@ -169,6 +169,7 @@ lin weven_V = mkV "weven" "weefde" "weefden" "geweven" ; lin wijken_V = mkZijnV "wijken" "week" "weken" "geweken" ; lin wijten_V = mkV "wijten" "weet" "weten" "geweten" ; lin wijzen_V = mkV "wijzen" "wees" "wezen" "gewezen" ; +lin willen_V = mkV "wil" "wilt" "wil" "willen" "wou" "wou" "wouden" "gewild" ; lin winden_V = mkV "winden" "wond" "wonden" "gewonden" ; lin winnen_V = mkV "winnen" "won" "wonnen" "gewonnen" ; lin worden_V = mkV "worden" "werd" "werden" "geworden" ; diff --git a/lib/src/dutch/ParadigmsDut.gf b/lib/src/dutch/ParadigmsDut.gf index 9dcc54765..c0fcb43ca 100644 --- a/lib/src/dutch/ParadigmsDut.gf +++ b/lib/src/dutch/ParadigmsDut.gf @@ -124,7 +124,8 @@ oper mkV : (aaien,aait : Str) -> V ; -- regular verb with third person sg pres (giving stem) mkV : (breken,brak,gebroken : Str) -> V ; -- theme of irregular verb mkV : (breken,brak,braken,gebroken : Str) -> V ; -- also past plural irregular - mkV : (aai,aait,aaien,aaide,aaide,aaiden,geaaid : Str) -> V ; -- worst-case verb + mkV : (aai,aait,aaien,aaide,aaide,aaiden,geaaid : Str) -> V ; -- almost worst-case verb, Sg2=Sg3 + mkV : (aai,aait,aait,aaien,aaide,aaide,aaiden,geaaid : Str) -> V ; -- worst-case verb -- To add a movable suffix e.g. "auf(fassen)". @@ -269,6 +270,8 @@ oper \a,b,c,d -> lin V (v2vv (irregVerb2 a b c d)) ; mkV : (aai,aait,aaien,aaide,aaiden,geaaid : Str) -> V = \a,b,c,d,f,g -> lin V (v2vv (mkVerb a b c d d f g)) ; + mkV : (aai,aait,aait,aaien,aaide,aaide,aaiden,geaaid : Str) -> V = + \a,b2,b3,c,d2,d3,f,g -> lin V (v2vv (mkVerb8 a b2 b3 c d2 d3 f g)) ; mkV : Str -> V -> V = \v,s ->lin V (prefixV v s) ; mkV : V -> Str -> V = \s,v ->lin V (prefixV v s) ; ---- the same, in order matching Wiktionary-generated lexicon } ; diff --git a/lib/src/dutch/ResDut.gf b/lib/src/dutch/ResDut.gf index ffafa30cd..c82908fd8 100644 --- a/lib/src/dutch/ResDut.gf +++ b/lib/src/dutch/ResDut.gf @@ -129,12 +129,17 @@ param oper Verb : Type = {s: VForm => Str}; - mkVerb : (_,_,_,_,_,_,_ : Str) -> - Verb = \aai, aait, aaien, aaide, _, aaiden, geaaid -> { + mkVerb : (_,_,_,_,_,_,_ : Str) -> Verb = + \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 VPresSg1 | VImp2 => aai; -- ik aai - VPresSg2 | VPresSg3 | VImp3 => aait; -- jij aait + 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 diff --git a/lib/src/dutch/SentenceDut.gf b/lib/src/dutch/SentenceDut.gf index 3619a7ddb..30903244f 100644 --- a/lib/src/dutch/SentenceDut.gf +++ b/lib/src/dutch/SentenceDut.gf @@ -18,15 +18,16 @@ concrete SentenceDut of Sentence = CatDut ** open ResDut, Prelude in { } ; agr = {g = Utr ; n = ps.p3 ; p = P2} ; ---- P2? -- g does not matter verb = vp.s.s ! ps.p1 ; + part = vp.s.particle ++ vp.a2 ++ vp.s.prefix ; -- as in mkClause inf = vp.inf.p1 ; in case vp.negPos of { BeforeObjs => verb ++ ps.p2 ++ vp.a1 ! pol ++ vp.n0 ! agr ++ - vp.n2 ! agr ++ vp.a2 ++ inf ++ vp.ext ; + vp.n2 ! agr ++ part ++ inf ++ vp.ext ; AfterObjs => verb ++ ps.p2 ++ vp.n0 ! agr ++ vp.n2 ! agr ++ - vp.a1 ! pol ++ vp.a2 ++ inf ++ vp.ext ; + vp.a1 ! pol ++ part ++ inf ++ vp.ext ; BetweenObjs => verb ++ ps.p2 ++ vp.n0 ! agr ++ vp.a1 ! pol ++ vp.n2 ! agr ++ - vp.a2 ++ inf ++ vp.ext + part ++ inf ++ vp.ext } ; } ; diff --git a/lib/src/dutch/StructuralDut.gf b/lib/src/dutch/StructuralDut.gf index 17facc901..0254222e4 100644 --- a/lib/src/dutch/StructuralDut.gf +++ b/lib/src/dutch/StructuralDut.gf @@ -86,7 +86,7 @@ concrete StructuralDut of Structural = CatDut, Prelude ** to_Prep = mkPrep "naar" ; under_Prep = mkPrep "onder" ; very_AdA = ss "erg" ; - want_VV = auxVV (mkV "wil" "wil" "willen" "wou" "wouden" "gewild") ; + want_VV = auxVV (mkV "wil" "wilt" "wil" "willen" "wou" "wou" "wouden" "gewild") ; we_Pron = mkPronoun "we" "ons" "ons" "wij" "ons" "onze" "onze" Utr Pl P3 ; ---- diff --git a/lib/src/french/ExtraFre.gf b/lib/src/french/ExtraFre.gf index 8013fc733..1776d5644 100644 --- a/lib/src/french/ExtraFre.gf +++ b/lib/src/french/ExtraFre.gf @@ -82,6 +82,23 @@ concrete ExtraFre of ExtraFreAbs = ExtraRomanceFre ** ExistsNP np = mkClause "il" True False np.a (insertComplement (\\_ => (np.s ! Nom).ton) (predV (regV "exister"))) ; + + EstcequeQuestCl cl = + {s = \\t,a,p => -- est-ce qu'il dort ? + let cls = cl.s ! DDir ! t ! a ! p + in table { + QDir => "est-ce" ++ elisQue ++ cls ! Indic ; + QIndir => subjIf ++ cls ! Indic + } + } ; + InvQuestCl cl = {s = \\t,a,p => -- dort-il ? + let cls = cl.s ! DInv ! t ! a ! p + in table { + QDir => cls ! Indic ; + QIndir => subjIf ++ cls ! Indic + } + } ; + --- in ExtraRomance -- PassAgentVPSlash vps np = passVPSlash -- vps ("par" ++ (np.s ! Acc).ton) ; diff --git a/lib/src/french/ExtraFreAbs.gf b/lib/src/french/ExtraFreAbs.gf index cb3f67d26..fc815e653 100644 --- a/lib/src/french/ExtraFreAbs.gf +++ b/lib/src/french/ExtraFreAbs.gf @@ -48,5 +48,10 @@ abstract ExtraFreAbs = ExtraRomanceAbs - [ProDrop] ** { PNegNe : Pol ; +-- alternative forms of questions + + EstcequeQuestCl : Cl -> QCl ; -- est-ce qu'il dort + InvQuestCl : Cl -> QCl ; -- dort-il + } diff --git a/lib/src/italian/ExtraIta.gf b/lib/src/italian/ExtraIta.gf index 1b919cb5c..40933568a 100644 --- a/lib/src/italian/ExtraIta.gf +++ b/lib/src/italian/ExtraIta.gf @@ -48,5 +48,13 @@ concrete ExtraIta of ExtraItaAbs = ExtraRomanceIta ** ExistsNP np = mkClause [] True False np.a (insertComplement (\\_ => (np.s ! Nom).ton) (predV (regV "esistere"))) ; + che_cosa_IP = {s = \\c => prepCase c ++ ["che cosa"] ; a = aagr Fem Sg} ; + cosa_IP = {s = \\c => prepCase c ++ ["cosa"] ; a = aagr Fem Sg} ; + + voiPol_Pron = mkPronoun + "voi" "vi" "vi" "ve" "voi" "vostro" "vostra" "vostri" "vostre" + Masc Pl P2 + ** {isPol = True} ; + } diff --git a/lib/src/italian/ExtraItaAbs.gf b/lib/src/italian/ExtraItaAbs.gf index e2524fe50..a048c25c6 100644 --- a/lib/src/italian/ExtraItaAbs.gf +++ b/lib/src/italian/ExtraItaAbs.gf @@ -34,4 +34,10 @@ abstract ExtraItaAbs = ExtraRomanceAbs ** { AdvDatVP : VP -> VP ; -- ci vado AdvGenVP : VP -> VP ; -- ne arrivo +-- alternatives of what = che + + che_cosa_IP : IP ; + cosa_IP : IP ; + + voiPol_Pron : Pron ; } diff --git a/lib/src/spanish/NumeralSpa.gf b/lib/src/spanish/NumeralSpa.gf index c04bfe044..894f3cfe9 100644 --- a/lib/src/spanish/NumeralSpa.gf +++ b/lib/src/spanish/NumeralSpa.gf @@ -21,7 +21,7 @@ lin n4 = mkTal "cuatro" "catorce" "cuarenta" "cuatrocientos" "cuarto" "decimocuarto" "cuadragésimo" "cuadringentesimo" ; lin n5 = - mkTal "cinco" "quince" "cinquenta" "quinientos" + mkTal "cinco" "quince" "cincuenta" "quinientos" "quinto" "decimoquinto" "quincuagésimo" "guingentésimo" ; lin n6 = mkTal "seis" "dieciséis" "sesenta" "seiscientos"