forked from GitHub/gf-core
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.
|
-- Utterances are formed from sentences, questions, and imperatives.
|
||||||
|
|
||||||
UttS : S -> Utt ; -- John walks
|
UttS : S -> Utt ; -- John walks
|
||||||
UttQS : QS -> Utt ; -- is it good
|
UttQS : QS -> Utt ; -- is it good
|
||||||
UttImpSg : Pol -> Imp -> Utt; -- (don't) help yourself
|
UttImpSg : Pol -> Imp -> Utt; -- (don't) help yourself
|
||||||
UttImpPl : Pol -> Imp -> Utt; -- (don't) help yourselves
|
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
|
-- There are also 'one-word utterances'. A typical use of them is
|
||||||
-- as answers to questions.
|
-- as answers to questions.
|
||||||
|
|||||||
@@ -22,7 +22,16 @@ resource ParamX = open Prelude in {
|
|||||||
|
|
||||||
QForm = QDir | QIndir ;
|
QForm = QDir | QIndir ;
|
||||||
|
|
||||||
|
-- Imperatives: True = polite, False = familiar.
|
||||||
|
|
||||||
|
ImpForm = ImpF Number Bool ;
|
||||||
|
|
||||||
oper
|
oper
|
||||||
|
numImp : ImpForm -> Number = \i ->
|
||||||
|
case i of {
|
||||||
|
ImpF n _ => n
|
||||||
|
} ;
|
||||||
|
|
||||||
conjNumber : Number -> Number -> Number = \m,n ->
|
conjNumber : Number -> Number -> Number = \m,n ->
|
||||||
case <m,n> of {
|
case <m,n> of {
|
||||||
<Sg,Sg> => Sg ;
|
<Sg,Sg> => Sg ;
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ concrete CatEng of Cat = CommonX ** open ResEng, Prelude in {
|
|||||||
s : Tense => Anteriority => CPolarity => Order => Str ;
|
s : Tense => Anteriority => CPolarity => Order => Str ;
|
||||||
c2 : Str
|
c2 : Str
|
||||||
} ;
|
} ;
|
||||||
Imp = {s : CPolarity => Number => Str} ;
|
Imp = {s : CPolarity => ImpForm => Str} ;
|
||||||
|
|
||||||
-- Question
|
-- Question
|
||||||
|
|
||||||
|
|||||||
@@ -40,8 +40,8 @@ concrete ExtraEng of ExtraEngAbs = CatEng **
|
|||||||
s = \\r => t.s ++ a.s ++ cl.s ! t.t ! a.a ! neg ! r ;
|
s = \\r => t.s ++ a.s ++ cl.s ! t.t ! a.a ! neg ! r ;
|
||||||
c = cl.c
|
c = cl.c
|
||||||
} ;
|
} ;
|
||||||
UncNegImpSg imp = {s = imp.s ! neg ! Sg} ;
|
UncNegImpSg imp = {s = imp.s ! neg ! ImpF Sg False} ;
|
||||||
UncNegImpPl imp = {s = imp.s ! neg ! Pl} ;
|
UncNegImpPl imp = {s = imp.s ! neg ! ImpF Pl False} ;
|
||||||
|
|
||||||
|
|
||||||
oper
|
oper
|
||||||
|
|||||||
@@ -5,8 +5,9 @@ concrete PhraseEng of Phrase = CatEng ** open Prelude, ResEng in {
|
|||||||
|
|
||||||
UttS s = s ;
|
UttS s = s ;
|
||||||
UttQS qs = {s = qs.s ! QDir} ;
|
UttQS qs = {s = qs.s ! QDir} ;
|
||||||
UttImpSg pol imp = {s = pol.s ++ imp.s ! contrNeg True pol.p ! Sg} ;
|
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 ! Pl} ;
|
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
|
UttIP ip = {s = ip.s ! Nom} ; --- Acc also
|
||||||
UttIAdv iadv = iadv ;
|
UttIAdv iadv = iadv ;
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ concrete SentenceEng of Sentence = CatEng ** open Prelude, ResEng in {
|
|||||||
ImpVP vp = {
|
ImpVP vp = {
|
||||||
s = \\pol,n =>
|
s = \\pol,n =>
|
||||||
let
|
let
|
||||||
agr = {n = n ; p = P2} ;
|
agr = {n = numImp n ; p = P2} ;
|
||||||
verb = infVP True vp agr ;
|
verb = infVP True vp agr ;
|
||||||
dont = case pol of {
|
dont = case pol of {
|
||||||
CNeg True => "don't" ;
|
CNeg True => "don't" ;
|
||||||
|
|||||||
@@ -41,5 +41,5 @@ concrete ExtraFin of ExtraFinAbs = CatFin ** open ResFin, MorphoFin, Coordinatio
|
|||||||
n = Sg
|
n = Sg
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
vai_Conj = {s = "vai" ; n = Sg} ;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,4 +8,6 @@ abstract ExtraFinAbs = Extra [
|
|||||||
i_implicPron : Pron ; -- (minä), minut, ...
|
i_implicPron : Pron ; -- (minä), minut, ...
|
||||||
whatPart_IP : IP ;
|
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 ;
|
UttS s = s ;
|
||||||
UttQS qs = {s = qs.s} ;
|
UttQS qs = {s = qs.s} ;
|
||||||
UttImpSg pol imp = {s = pol.s ++ imp.s ! pol.p ! Sg} ;
|
UttImpSg pol imp = {s = pol.s ++ imp.s ! pol.p ! Sg} ;
|
||||||
UttImpPl pol imp = {s = pol.s ++ imp.s ! pol.p ! Pl} ;
|
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} ;
|
UttIP ip = {s = ip.s ! NPCase Nom} ;
|
||||||
UttIAdv iadv = iadv ;
|
UttIAdv iadv = iadv ;
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ concrete CatGer of Cat = CommonX ** open ResGer, Prelude in {
|
|||||||
Cl = {s : Tense => Anteriority => Polarity => Order => Str} ;
|
Cl = {s : Tense => Anteriority => Polarity => Order => Str} ;
|
||||||
Slash = {s : Tense => Anteriority => Polarity => Order => Str} **
|
Slash = {s : Tense => Anteriority => Polarity => Order => Str} **
|
||||||
{c2 : Preposition} ;
|
{c2 : Preposition} ;
|
||||||
Imp = {s : Polarity => Number => Str} ;
|
Imp = {s : Polarity => ImpForm => Str} ;
|
||||||
|
|
||||||
-- Question
|
-- Question
|
||||||
|
|
||||||
|
|||||||
@@ -7,8 +7,9 @@ concrete PhraseGer of Phrase = CatGer ** open Prelude, ResGer in {
|
|||||||
|
|
||||||
UttS s = {s = s.s ! Main} ;
|
UttS s = {s = s.s ! Main} ;
|
||||||
UttQS qs = {s = qs.s ! QDir} ;
|
UttQS qs = {s = qs.s ! QDir} ;
|
||||||
UttImpSg pol imp = {s = pol.s ++ imp.s ! pol.p ! Sg} ;
|
UttImpSg pol imp = {s = pol.s ++ imp.s ! pol.p ! ImpF Sg False} ;
|
||||||
UttImpPl pol imp = {s = pol.s ++ imp.s ! pol.p ! Pl} ;
|
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
|
UttIP ip = {s = ip.s ! Nom} ; --- Acc also
|
||||||
UttIAdv iadv = iadv ;
|
UttIAdv iadv = iadv ;
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
|
|
||||||
param VPForm =
|
param VPForm =
|
||||||
VPFinite Tense Anteriority
|
VPFinite Tense Anteriority
|
||||||
| VPImperat
|
| VPImperat Bool
|
||||||
| VPInfinit Anteriority ;
|
| VPInfinit Anteriority ;
|
||||||
|
|
||||||
param VAux = VHaben | VSein ;
|
param VAux = VHaben | VSein ;
|
||||||
@@ -371,7 +371,8 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
Fut => vf (wird a) (vpart ++ haben) ; --# notpresent
|
Fut => vf (wird a) (vpart ++ haben) ; --# notpresent
|
||||||
Cond => vf (wuerde a) (vpart ++ haben) --# notpresent
|
Cond => vf (wuerde a) (vpart ++ haben) --# notpresent
|
||||||
} ; --# 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 Anter => vf [] (vpart ++ haben) ; --# notpresent
|
||||||
VPInfinit Simul => vf [] vinf
|
VPInfinit Simul => vf [] vinf
|
||||||
} ;
|
} ;
|
||||||
@@ -424,8 +425,8 @@ resource ResGer = ParamX ** open Prelude in {
|
|||||||
VPresInd Pl (P1 | P3) => "sind" ;
|
VPresInd Pl (P1 | P3) => "sind" ;
|
||||||
VPresSubj Sg P2 => (variants {"seiest" ; "seist"}) ;
|
VPresSubj Sg P2 => (variants {"seiest" ; "seist"}) ;
|
||||||
VPresSubj Sg _ => "sei" ;
|
VPresSubj Sg _ => "sei" ;
|
||||||
VPresSubj Pl P2 => "seien" ;
|
VPresSubj Pl P2 => "seiet" ;
|
||||||
VPresSubj Pl _ => "seiet" ;
|
VPresSubj Pl _ => "seien" ;
|
||||||
VPresPart a => (regA "seiend").s ! Posit ! a ;
|
VPresPart a => (regA "seiend").s ! Posit ! a ;
|
||||||
v => sein.s ! v
|
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 ;
|
flags optimize=all_subs ;
|
||||||
|
|
||||||
@@ -11,10 +11,15 @@ concrete SentenceGer of Sentence = CatGer ** open ResGer in {
|
|||||||
ImpVP vp = {
|
ImpVP vp = {
|
||||||
s = \\pol,n =>
|
s = \\pol,n =>
|
||||||
let
|
let
|
||||||
agr = {g = Fem ; n = n ; p = P2} ; --- g does not matter
|
ps = case n of {
|
||||||
verb = vp.s ! agr ! VPImperat ;
|
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
|
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 =
|
SlashV2 np v2 =
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ incomplete concrete CatRomance of Cat =
|
|||||||
s : AAgr => RTense => Anteriority => Polarity => Mood => Str ;
|
s : AAgr => RTense => Anteriority => Polarity => Mood => Str ;
|
||||||
c2 : Compl
|
c2 : Compl
|
||||||
} ;
|
} ;
|
||||||
Imp = {s : Polarity => AAgr => Str} ;
|
Imp = {s : Polarity => ImpForm => Gender => Str} ;
|
||||||
|
|
||||||
-- Question
|
-- Question
|
||||||
|
|
||||||
|
|||||||
@@ -8,8 +8,9 @@ incomplete concrete PhraseRomance of Phrase =
|
|||||||
|
|
||||||
UttS s = {s = s.s ! Indic} ;
|
UttS s = {s = s.s ! Indic} ;
|
||||||
UttQS qs = {s = qs.s ! QDir} ;
|
UttQS qs = {s = qs.s ! QDir} ;
|
||||||
UttImpSg pol imp = {s = pol.s ++ imp.s ! pol.p ! aagr Fem Sg} ;
|
UttImpSg pol imp = {s = pol.s ++ imp.s ! pol.p ! ImpF Sg False ! Fem} ;
|
||||||
UttImpPl pol imp = {s = pol.s ++ imp.s ! pol.p ! aagr Fem Pl} ;
|
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
|
UttIP ip = {s = ip.s ! Nom} ; --- Acc also
|
||||||
UttIAdv iadv = iadv ;
|
UttIAdv iadv = iadv ;
|
||||||
|
|||||||
@@ -8,7 +8,12 @@ incomplete concrete SentenceRomance of Sentence =
|
|||||||
|
|
||||||
PredSCVP sc vp = mkClause sc.s (agrP3 Masc Sg) vp ;
|
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 =
|
SlashV2 np v2 =
|
||||||
{s = \\ag =>case <v2.c2.c,v2.c2.isDir> of {
|
{s = \\ag =>case <v2.c2.c,v2.c2.isDir> of {
|
||||||
|
|||||||
Reference in New Issue
Block a user