mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-09 04:59:31 -06:00
imperatives added to Phrasebook (familiar,polite,plural,positive,negative)
This commit is contained in:
@@ -15,7 +15,13 @@ concrete DisambPhrasebookEng of Phrasebook = PhrasebookEng -
|
||||
WeMale, WeFemale,
|
||||
YouPlurFamMale, YouPlurFamFemale,
|
||||
YouPlurPolMale, YouPlurPolFemale,
|
||||
TheyMale, TheyFemale
|
||||
TheyMale, TheyFemale,
|
||||
PImperativeFamPos,
|
||||
PImperativeFamNeg,
|
||||
PImperativePolPos,
|
||||
PImperativePlurNeg,
|
||||
PImperativePlurPos,
|
||||
PImperativePlurNeg
|
||||
]
|
||||
** open SyntaxEng, ParadigmsEng, IrregEng, Prelude in {
|
||||
lin
|
||||
@@ -53,6 +59,14 @@ lin
|
||||
|
||||
ObjMass x = mkNP (mkNP x) (ParadigmsEng.mkAdv "(a portion of)") ;
|
||||
|
||||
PImperativeFamPos v = phrasePlease (mkUtt (mkImp (addAdv ("singular,familiar") v))) ;
|
||||
PImperativeFamNeg v = phrasePlease (mkUtt negativePol (mkImp (addAdv ("singular,familiar") v))) ;
|
||||
PImperativePolPos v = phrasePlease (mkUtt politeImpForm (mkImp (addAdv ("singular,polite") v))) ;
|
||||
PImperativePolNeg v = phrasePlease (mkUtt politeImpForm negativePol (mkImp (addAdv ("singular,polite") v))) ;
|
||||
PImperativePlurPos v = phrasePlease (mkUtt pluralImpForm (mkImp (addAdv ("plural,familiar") v))) ;
|
||||
PImperativePlurNeg v = phrasePlease (mkUtt pluralImpForm negativePol (mkImp (addAdv ("plural,familiar") v))) ;
|
||||
|
||||
|
||||
oper
|
||||
fam : Str -> SS = \s -> postfixSS "(familiar)" (ss s) ;
|
||||
pol : Str -> SS = \s -> postfixSS "(polite)" (ss s) ;
|
||||
@@ -62,4 +76,6 @@ oper
|
||||
isPron = False ; -- to show the disambiguation
|
||||
poss = SyntaxEng.mkQuant youSg_Pron
|
||||
} ;
|
||||
|
||||
addAdv : Str -> VP -> VP = \s,vp -> mkVP vp (ParadigmsEng.mkAdv ("("+s+")")) ;
|
||||
}
|
||||
|
||||
@@ -199,6 +199,14 @@ abstract Sentences = Numeral ** {
|
||||
V2Buy, V2Drink, V2Eat : Object -> VerbPhrase ;
|
||||
V2Wait : Person -> VerbPhrase ;
|
||||
|
||||
PImperativeFamPos, -- eat
|
||||
PImperativeFamNeg, -- don't eat
|
||||
PImperativePolPos, -- essen Sie
|
||||
PImperativePlurNeg, -- essen Sie nicht
|
||||
PImperativePlurPos, -- esst
|
||||
PImperativePlurNeg : -- esst nicht
|
||||
VerbPhrase -> Phrase ;
|
||||
|
||||
-- other new things allowed by the resource
|
||||
|
||||
--- PBecause : Sentence -> Sentence -> Phrase ; -- I want to swim because it is hot
|
||||
|
||||
@@ -238,6 +238,8 @@ oper
|
||||
-- for languages with GenNP, use "p's wife"
|
||||
-- relativePerson n x (\a,b,c -> mkNP (GenNP b) a c) p ;
|
||||
|
||||
phrasePlease : Utt -> Text = \u -> lin Text (mkPhr noPConj u please_Voc) | lin Text u ;
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
-- New things added 30/11/2011 by AR
|
||||
------------------------------------------------------------------------------------------
|
||||
@@ -276,6 +278,13 @@ oper
|
||||
V2Eat o = mkVP eat_V2 o ;
|
||||
V2Wait o = mkVP wait_V2 o.name ;
|
||||
|
||||
PImperativeFamPos v = phrasePlease (mkUtt (mkImp v)) ;
|
||||
PImperativeFamNeg v = phrasePlease (mkUtt negativePol (mkImp v)) ;
|
||||
PImperativePolPos v = phrasePlease (mkUtt politeImpForm (mkImp v)) ;
|
||||
PImperativePolNeg v = phrasePlease (mkUtt politeImpForm negativePol (mkImp v)) ;
|
||||
PImperativePlurPos v = phrasePlease (mkUtt pluralImpForm (mkImp v)) ;
|
||||
PImperativePlurNeg v = phrasePlease (mkUtt pluralImpForm negativePol (mkImp v)) ;
|
||||
|
||||
-- other new things allowed by the resource
|
||||
|
||||
--- PBecause a b = SSubjS a because_Subj b ;
|
||||
|
||||
@@ -216,10 +216,22 @@ abstract Words = Sentences ** {
|
||||
Durian : Kind ;
|
||||
Mango : Kind ;
|
||||
Pineapple : Kind ;
|
||||
Egg : Kind ;
|
||||
|
||||
Coke : DrinkKind ;
|
||||
IceCream : DrinkKind ; --- both mass and plural
|
||||
OrangeJuice : DrinkKind ;
|
||||
Lemonade : DrinkKind ;
|
||||
Salad : DrinkKind ;
|
||||
|
||||
Beach : PlaceKind ;
|
||||
|
||||
ItsRaining : Proposition ;
|
||||
ItsWindy : Proposition ;
|
||||
ItsWarm : Proposition ;
|
||||
ItsCold : Proposition ;
|
||||
SunShine : Proposition ;
|
||||
|
||||
Smoke : VerbPhrase ;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user