mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-14 07:19:31 -06:00
polite imperative except Scand,Rus; todo in Ita,Spa
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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 <m,n> of {
|
||||
<Sg,Sg> => Sg ;
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 ;
|
||||
|
||||
@@ -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" ;
|
||||
|
||||
@@ -41,5 +41,5 @@ concrete ExtraFin of ExtraFinAbs = CatFin ** open ResFin, MorphoFin, Coordinatio
|
||||
n = Sg
|
||||
} ;
|
||||
|
||||
|
||||
vai_Conj = {s = "vai" ; n = Sg} ;
|
||||
}
|
||||
|
||||
@@ -8,4 +8,6 @@ abstract ExtraFinAbs = Extra [
|
||||
i_implicPron : Pron ; -- (minä), minut, ...
|
||||
whatPart_IP : IP ;
|
||||
|
||||
vai_Conj : Conj ; -- minä vai sinä? ("or" in question)
|
||||
|
||||
}
|
||||
|
||||
@@ -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 ;
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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 ;
|
||||
|
||||
@@ -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
|
||||
} ;
|
||||
|
||||
@@ -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 => <P3,"Sie",True> ; -- setzen Sie sich
|
||||
_ => <P2,[],False>
|
||||
} ;
|
||||
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 =
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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 ;
|
||||
|
||||
@@ -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 <v2.c2.c,v2.c2.isDir> of {
|
||||
|
||||
Reference in New Issue
Block a user