diff --git a/lib/resource-1.0/abstract/Phrase.gf b/lib/resource-1.0/abstract/Phrase.gf index 486e488d0..d080e78bf 100644 --- a/lib/resource-1.0/abstract/Phrase.gf +++ b/lib/resource-1.0/abstract/Phrase.gf @@ -11,10 +11,11 @@ abstract Phrase = Cat ** { -- Utterances are formed from sentences, questions, and imperatives. - UttS : S -> Utt ; -- John walks - UttQS : QS -> Utt ; -- is it good - UttImpSg : Pol -> Imp -> Utt; -- (don't) help yourself - UttImpPl : Pol -> Imp -> Utt; -- (don't) help yourselves + UttS : S -> Utt ; -- John walks + UttQS : QS -> Utt ; -- is it good + UttImpSg : Pol -> Imp -> Utt; -- (don't) help yourself + UttImpPl : Pol -> Imp -> Utt; -- (don't) help yourselves + UttImpPol : Pol -> Imp -> Utt ; -- (don't) help (polite) -- There are also 'one-word utterances'. A typical use of them is -- as answers to questions. diff --git a/lib/resource-1.0/common/ParamX.gf b/lib/resource-1.0/common/ParamX.gf index 97c842173..9710eb669 100644 --- a/lib/resource-1.0/common/ParamX.gf +++ b/lib/resource-1.0/common/ParamX.gf @@ -22,7 +22,16 @@ resource ParamX = open Prelude in { QForm = QDir | QIndir ; +-- Imperatives: True = polite, False = familiar. + + ImpForm = ImpF Number Bool ; + oper + numImp : ImpForm -> Number = \i -> + case i of { + ImpF n _ => n + } ; + conjNumber : Number -> Number -> Number = \m,n -> case of { => Sg ; diff --git a/lib/resource-1.0/english/CatEng.gf b/lib/resource-1.0/english/CatEng.gf index fc90f9eaf..a9e90927c 100644 --- a/lib/resource-1.0/english/CatEng.gf +++ b/lib/resource-1.0/english/CatEng.gf @@ -17,7 +17,7 @@ concrete CatEng of Cat = CommonX ** open ResEng, Prelude in { s : Tense => Anteriority => CPolarity => Order => Str ; c2 : Str } ; - Imp = {s : CPolarity => Number => Str} ; + Imp = {s : CPolarity => ImpForm => Str} ; -- Question diff --git a/lib/resource-1.0/english/ExtraEng.gf b/lib/resource-1.0/english/ExtraEng.gf index 6c0d6be6e..097fce5e8 100644 --- a/lib/resource-1.0/english/ExtraEng.gf +++ b/lib/resource-1.0/english/ExtraEng.gf @@ -40,8 +40,8 @@ concrete ExtraEng of ExtraEngAbs = CatEng ** s = \\r => t.s ++ a.s ++ cl.s ! t.t ! a.a ! neg ! r ; c = cl.c } ; - UncNegImpSg imp = {s = imp.s ! neg ! Sg} ; - UncNegImpPl imp = {s = imp.s ! neg ! Pl} ; + UncNegImpSg imp = {s = imp.s ! neg ! ImpF Sg False} ; + UncNegImpPl imp = {s = imp.s ! neg ! ImpF Pl False} ; oper diff --git a/lib/resource-1.0/english/PhraseEng.gf b/lib/resource-1.0/english/PhraseEng.gf index 936bfdff9..9aeadc762 100644 --- a/lib/resource-1.0/english/PhraseEng.gf +++ b/lib/resource-1.0/english/PhraseEng.gf @@ -5,8 +5,9 @@ concrete PhraseEng of Phrase = CatEng ** open Prelude, ResEng in { UttS s = s ; UttQS qs = {s = qs.s ! QDir} ; - UttImpSg pol imp = {s = pol.s ++ imp.s ! contrNeg True pol.p ! Sg} ; - UttImpPl pol imp = {s = pol.s ++ imp.s ! contrNeg True pol.p ! Pl} ; + UttImpSg pol imp = {s = pol.s ++ imp.s ! contrNeg True pol.p ! ImpF Sg False} ; + UttImpPl pol imp = {s = pol.s ++ imp.s ! contrNeg True pol.p ! ImpF Pl False} ; + UttImpPol pol imp = {s = pol.s ++ imp.s ! contrNeg True pol.p ! ImpF Sg True} ; UttIP ip = {s = ip.s ! Nom} ; --- Acc also UttIAdv iadv = iadv ; diff --git a/lib/resource-1.0/english/SentenceEng.gf b/lib/resource-1.0/english/SentenceEng.gf index 36fb48633..8084b3964 100644 --- a/lib/resource-1.0/english/SentenceEng.gf +++ b/lib/resource-1.0/english/SentenceEng.gf @@ -11,7 +11,7 @@ concrete SentenceEng of Sentence = CatEng ** open Prelude, ResEng in { ImpVP vp = { s = \\pol,n => let - agr = {n = n ; p = P2} ; + agr = {n = numImp n ; p = P2} ; verb = infVP True vp agr ; dont = case pol of { CNeg True => "don't" ; diff --git a/lib/resource-1.0/finnish/ExtraFin.gf b/lib/resource-1.0/finnish/ExtraFin.gf index 595419283..bf886005f 100644 --- a/lib/resource-1.0/finnish/ExtraFin.gf +++ b/lib/resource-1.0/finnish/ExtraFin.gf @@ -41,5 +41,5 @@ concrete ExtraFin of ExtraFinAbs = CatFin ** open ResFin, MorphoFin, Coordinatio n = Sg } ; - + vai_Conj = {s = "vai" ; n = Sg} ; } diff --git a/lib/resource-1.0/finnish/ExtraFinAbs.gf b/lib/resource-1.0/finnish/ExtraFinAbs.gf index 651c4826f..29a95869e 100644 --- a/lib/resource-1.0/finnish/ExtraFinAbs.gf +++ b/lib/resource-1.0/finnish/ExtraFinAbs.gf @@ -8,4 +8,6 @@ abstract ExtraFinAbs = Extra [ i_implicPron : Pron ; -- (minä), minut, ... whatPart_IP : IP ; + vai_Conj : Conj ; -- minä vai sinä? ("or" in question) + } diff --git a/lib/resource-1.0/finnish/PhraseFin.gf b/lib/resource-1.0/finnish/PhraseFin.gf index 059d162c5..3ced695f4 100644 --- a/lib/resource-1.0/finnish/PhraseFin.gf +++ b/lib/resource-1.0/finnish/PhraseFin.gf @@ -5,8 +5,9 @@ concrete PhraseFin of Phrase = CatFin ** open ResFin in { UttS s = s ; UttQS qs = {s = qs.s} ; - UttImpSg pol imp = {s = pol.s ++ imp.s ! pol.p ! Sg} ; - UttImpPl pol imp = {s = pol.s ++ imp.s ! pol.p ! Pl} ; + UttImpSg pol imp = {s = pol.s ++ imp.s ! pol.p ! Sg} ; + UttImpPl pol imp = {s = pol.s ++ imp.s ! pol.p ! Pl} ; + UttImpPol pol imp = {s = pol.s ++ imp.s ! pol.p ! Pl} ; UttIP ip = {s = ip.s ! NPCase Nom} ; UttIAdv iadv = iadv ; diff --git a/lib/resource-1.0/german/CatGer.gf b/lib/resource-1.0/german/CatGer.gf index ba0a78aea..b28d77992 100644 --- a/lib/resource-1.0/german/CatGer.gf +++ b/lib/resource-1.0/german/CatGer.gf @@ -15,7 +15,7 @@ concrete CatGer of Cat = CommonX ** open ResGer, Prelude in { Cl = {s : Tense => Anteriority => Polarity => Order => Str} ; Slash = {s : Tense => Anteriority => Polarity => Order => Str} ** {c2 : Preposition} ; - Imp = {s : Polarity => Number => Str} ; + Imp = {s : Polarity => ImpForm => Str} ; -- Question diff --git a/lib/resource-1.0/german/PhraseGer.gf b/lib/resource-1.0/german/PhraseGer.gf index 34800c0c9..e2c72a398 100644 --- a/lib/resource-1.0/german/PhraseGer.gf +++ b/lib/resource-1.0/german/PhraseGer.gf @@ -7,8 +7,9 @@ concrete PhraseGer of Phrase = CatGer ** open Prelude, ResGer in { UttS s = {s = s.s ! Main} ; UttQS qs = {s = qs.s ! QDir} ; - UttImpSg pol imp = {s = pol.s ++ imp.s ! pol.p ! Sg} ; - UttImpPl pol imp = {s = pol.s ++ imp.s ! pol.p ! Pl} ; + UttImpSg pol imp = {s = pol.s ++ imp.s ! pol.p ! ImpF Sg False} ; + UttImpPl pol imp = {s = pol.s ++ imp.s ! pol.p ! ImpF Pl False} ; + UttImpPol pol imp = {s = pol.s ++ imp.s ! pol.p ! ImpF Sg True} ; UttIP ip = {s = ip.s ! Nom} ; --- Acc also UttIAdv iadv = iadv ; diff --git a/lib/resource-1.0/german/ResGer.gf b/lib/resource-1.0/german/ResGer.gf index de6a145cd..211d8ffb8 100644 --- a/lib/resource-1.0/german/ResGer.gf +++ b/lib/resource-1.0/german/ResGer.gf @@ -59,7 +59,7 @@ resource ResGer = ParamX ** open Prelude in { param VPForm = VPFinite Tense Anteriority - | VPImperat + | VPImperat Bool | VPInfinit Anteriority ; param VAux = VHaben | VSein ; @@ -371,7 +371,8 @@ resource ResGer = ParamX ** open Prelude in { Fut => vf (wird a) (vpart ++ haben) ; --# notpresent Cond => vf (wuerde a) (vpart ++ haben) --# notpresent } ; --# notpresent - VPImperat => vf (verb.s ! VImper a.n) [] ; + VPImperat False => vf (verb.s ! VImper a.n) [] ; + VPImperat True => vf (verb.s ! VPresSubj Pl P3) [] ; VPInfinit Anter => vf [] (vpart ++ haben) ; --# notpresent VPInfinit Simul => vf [] vinf } ; @@ -424,8 +425,8 @@ resource ResGer = ParamX ** open Prelude in { VPresInd Pl (P1 | P3) => "sind" ; VPresSubj Sg P2 => (variants {"seiest" ; "seist"}) ; VPresSubj Sg _ => "sei" ; - VPresSubj Pl P2 => "seien" ; - VPresSubj Pl _ => "seiet" ; + VPresSubj Pl P2 => "seiet" ; + VPresSubj Pl _ => "seien" ; VPresPart a => (regA "seiend").s ! Posit ! a ; v => sein.s ! v } ; diff --git a/lib/resource-1.0/german/SentenceGer.gf b/lib/resource-1.0/german/SentenceGer.gf index 71be6f75b..c1a1caf90 100644 --- a/lib/resource-1.0/german/SentenceGer.gf +++ b/lib/resource-1.0/german/SentenceGer.gf @@ -1,4 +1,4 @@ -concrete SentenceGer of Sentence = CatGer ** open ResGer in { +concrete SentenceGer of Sentence = CatGer ** open ResGer, Prelude in { flags optimize=all_subs ; @@ -11,10 +11,15 @@ concrete SentenceGer of Sentence = CatGer ** open ResGer in { ImpVP vp = { s = \\pol,n => let - agr = {g = Fem ; n = n ; p = P2} ; --- g does not matter - verb = vp.s ! agr ! VPImperat ; + ps = case n of { + ImpF _ True => ; -- setzen Sie sich + _ => + } ; + agr = {g = Fem ; n = numImp n ; p = ps.p1} ; --- g does not matter + verb = vp.s ! agr ! VPImperat ps.p3 ; in - verb.fin ++ vp.a1 ! pol ++ verb.inf ++ vp.n2 ! agr ++ vp.a2 ++ vp.inf ++ vp.ext + verb.fin ++ ps.p2 ++ verb.inf ++ + vp.n2 ! agr ++ vp.a1 ! pol ++ vp.a2 ++ vp.inf ++ vp.ext } ; SlashV2 np v2 = diff --git a/lib/resource-1.0/romance/CatRomance.gf b/lib/resource-1.0/romance/CatRomance.gf index d877a9bec..838d5bf5b 100644 --- a/lib/resource-1.0/romance/CatRomance.gf +++ b/lib/resource-1.0/romance/CatRomance.gf @@ -19,7 +19,7 @@ incomplete concrete CatRomance of Cat = s : AAgr => RTense => Anteriority => Polarity => Mood => Str ; c2 : Compl } ; - Imp = {s : Polarity => AAgr => Str} ; + Imp = {s : Polarity => ImpForm => Gender => Str} ; -- Question diff --git a/lib/resource-1.0/romance/PhraseRomance.gf b/lib/resource-1.0/romance/PhraseRomance.gf index 3c604646d..e45f1beff 100644 --- a/lib/resource-1.0/romance/PhraseRomance.gf +++ b/lib/resource-1.0/romance/PhraseRomance.gf @@ -8,8 +8,9 @@ incomplete concrete PhraseRomance of Phrase = UttS s = {s = s.s ! Indic} ; UttQS qs = {s = qs.s ! QDir} ; - UttImpSg pol imp = {s = pol.s ++ imp.s ! pol.p ! aagr Fem Sg} ; - UttImpPl pol imp = {s = pol.s ++ imp.s ! pol.p ! aagr Fem Pl} ; + UttImpSg pol imp = {s = pol.s ++ imp.s ! pol.p ! ImpF Sg False ! Fem} ; + UttImpPl pol imp = {s = pol.s ++ imp.s ! pol.p ! ImpF Pl False ! Fem} ; + UttImpPol pol imp = {s = pol.s ++ imp.s ! pol.p ! ImpF Sg True ! Fem} ; UttIP ip = {s = ip.s ! Nom} ; --- Acc also UttIAdv iadv = iadv ; diff --git a/lib/resource-1.0/romance/SentenceRomance.gf b/lib/resource-1.0/romance/SentenceRomance.gf index 1c776ceb9..fa00e6acc 100644 --- a/lib/resource-1.0/romance/SentenceRomance.gf +++ b/lib/resource-1.0/romance/SentenceRomance.gf @@ -8,7 +8,12 @@ incomplete concrete SentenceRomance of Sentence = PredSCVP sc vp = mkClause sc.s (agrP3 Masc Sg) vp ; - ImpVP = mkImperative P2 ; + ImpVP vp = { + s = \\p,i,g => case i of { + ImpF n True => (mkImperative P2 vp).s ! p ! (aagr g Pl) ; --- fix for Spa,Ita + ImpF n False => (mkImperative P2 vp).s ! p ! (aagr g n) + } + } ; SlashV2 np v2 = {s = \\ag =>case of {