diff --git a/examples/phrasebook/DisambPhrasebookEng.gf b/examples/phrasebook/DisambPhrasebookEng.gf index 4f71c91ab..e2c622e11 100644 --- a/examples/phrasebook/DisambPhrasebookEng.gf +++ b/examples/phrasebook/DisambPhrasebookEng.gf @@ -9,7 +9,8 @@ concrete DisambPhrasebookEng of Phrasebook = PhrasebookEng - GExcuse, GExcusePol, GSorry, GSorryPol, GPleaseGive, GPleaseGivePol, - GNiceToMeetYou, GNiceToMeetYouPol + GNiceToMeetYou, -- GNiceToMeetYouPol, + PYes, PYesToNo ] ** open SyntaxEng, ParadigmsEng, Prelude in { lin @@ -30,7 +31,10 @@ lin GPleaseGive = fam "please" ; GPleaseGivePol = pol "please" ; GNiceToMeetYou = fam "nice to meet you" ; - GNiceToMeetYouPol = pol "nice to meet you" ; +-- GNiceToMeetYouPol = pol "nice to meet you" ; + + PYes = mkPhrase (lin Utt (ss "yes (answer to positive question)")) ; + PYesToNo = mkPhrase (lin Utt (ss "yes (answer to negative question)")) ; oper fam : Str -> SS = \s -> postfixSS "(familiar)" (ss s) ; diff --git a/examples/phrasebook/Sentences.gf b/examples/phrasebook/Sentences.gf index 1109b8bfa..572d89f74 100644 --- a/examples/phrasebook/Sentences.gf +++ b/examples/phrasebook/Sentences.gf @@ -22,6 +22,7 @@ abstract Sentences = Numeral ** { PrimObject ; -- single object of wanting, ordering, etc e.g. "three pizzas" Item ; -- a single entity e.g. "this pizza" Kind ; -- a type of an item e.g. "pizza" + MassKind ; -- a type mass (uncountable) e.g. "water" Quality ; -- qualification of an item, can be complex e.g. "very good" Property ; -- basic property of an item, one word e.g. "good" Place ; -- location e.g. "the bar" @@ -49,22 +50,23 @@ abstract Sentences = Numeral ** { PSentence : Sentence -> Phrase ; PQuestion : Question -> Phrase ; - PObject : Object -> Phrase ; - PKind : Kind -> Phrase ; - PQuality : Quality -> Phrase ; - PNumber : Number -> Phrase ; - PPlace : Place -> Phrase ; - PPlaceKind : PlaceKind-> Phrase ; - PCurrency : Currency -> Phrase ; - PPrice : Price -> Phrase ; - PLanguage : Language -> Phrase ; + PObject : Object -> Phrase ; + PKind : Kind -> Phrase ; + PMassKind : MassKind -> Phrase ; + PQuality : Quality -> Phrase ; + PNumber : Number -> Phrase ; + PPlace : Place -> Phrase ; + PPlaceKind : PlaceKind -> Phrase ; + PCurrency : Currency -> Phrase ; + PPrice : Price -> Phrase ; + PLanguage : Language -> Phrase ; PCitizenship : Citizenship -> Phrase ; - PCountry : Country -> Phrase ; - PDay : Day -> Phrase ; + PCountry : Country -> Phrase ; + PDay : Day -> Phrase ; PByTransport : ByTransport -> Phrase ; - PTransport : Transport -> Phrase ; + PTransport : Transport -> Phrase ; - PYes, PNo : Phrase ; + PYes, PNo, PYesToNo : Phrase ; -- yes, no, si/doch (pos. answer to neg. question) -- This is the way to build propositions about inanimate items. @@ -88,20 +90,23 @@ abstract Sentences = Numeral ** { ObjItem : Item -> PrimObject ; -- this pizza ObjNumber : Number -> Kind -> PrimObject ; -- five pizzas ObjIndef : Kind -> PrimObject ; -- a pizza + ObjMass : MassKind -> PrimObject ; -- water ObjAndObj : PrimObject -> Object -> Object ; -- this pizza and a beer OneObj : PrimObject -> Object ; -- this pizza SuchKind : Quality -> Kind -> Kind ; -- Italian pizza + SuchMassKind : Quality -> MassKind -> MassKind ; -- Italian water Very : Property -> Quality ; -- very Italian Too : Property -> Quality ; -- too Italian PropQuality : Property -> Quality ; -- Italian -- Determiners. - This, That, These, Those : Kind -> Item ; -- this pizza,...,those pizzas - The, Thes : Kind -> Item ; -- the pizza, the pizzas + This, That, These, Those : Kind -> Item ; -- this pizza,...,those pizzas + The, Thes : Kind -> Item ; -- the pizza, the pizzas + ThisMass, ThatMass, TheMass : MassKind -> Item ; -- this/that/the water - AmountCurrency : Number -> Currency -> Price ; -- five euros + AmountCurrency : Number -> Currency -> Price ; -- five euros ThePlace : PlaceKind -> Place ; -- the bar APlace : PlaceKind -> Place ; -- a bar @@ -128,7 +133,8 @@ abstract Sentences = Numeral ** { -- Actions are typically language-dependent, not only lexically but also -- structurally. However, these ones are mostly functorial. - AHave : Person -> Kind -> Action ; -- you have a pizza + AHave : Person -> Kind -> Action ; -- you have pizzas + AHaveMass : Person -> MassKind -> Action ; -- you have water AHaveCurr : Person -> Currency -> Action ; -- you have dollars ACitizen : Person -> Citizenship -> Action ; -- you are Swedish ABePlace : Person -> Place -> Action ; -- you are in the bar diff --git a/examples/phrasebook/SentencesFre.gf b/examples/phrasebook/SentencesFre.gf index 6bd8b4dcb..cbc6db8c4 100644 --- a/examples/phrasebook/SentencesFre.gf +++ b/examples/phrasebook/SentencesFre.gf @@ -1,6 +1,7 @@ concrete SentencesFre of Sentences = NumeralFre ** SentencesI - [ QProp, - IFemale, YouFamFemale, YouPolFemale + IFemale, YouFamFemale, YouPolFemale, + PYesToNo ] with (Syntax = SyntaxFre), @@ -18,4 +19,5 @@ concrete SentencesFre of Sentences = NumeralFre ** SentencesI - [ YouPolFemale = {name = mkNP youPol8fem_Pron ; isPron = True ; poss = mkQuant youPol_Pron}; + PYesToNo = mkPhrase (lin Utt (ss "si")) ; } diff --git a/examples/phrasebook/SentencesGer.gf b/examples/phrasebook/SentencesGer.gf index 2bb7f51d4..22facc45c 100644 --- a/examples/phrasebook/SentencesGer.gf +++ b/examples/phrasebook/SentencesGer.gf @@ -1,4 +1,8 @@ -concrete SentencesGer of Sentences = NumeralGer ** SentencesI with +concrete SentencesGer of Sentences = NumeralGer ** SentencesI - [PYesToNo] with (Syntax = SyntaxGer), (Symbolic = SymbolicGer), - (Lexicon = LexiconGer) ; + (Lexicon = LexiconGer) ** open Prelude in { + + lin PYesToNo = mkPhrase (lin Utt (ss "doch")) ; + +} diff --git a/examples/phrasebook/SentencesI.gf b/examples/phrasebook/SentencesI.gf index 9de5b2676..bcd6f01b8 100644 --- a/examples/phrasebook/SentencesI.gf +++ b/examples/phrasebook/SentencesI.gf @@ -16,6 +16,7 @@ incomplete concrete SentencesI of Sentences = Numeral ** Proposition = Cl ; Item = NP ; Kind = CN ; + MassKind = CN ; Quality = AP ; Property = A ; Object = NP ; @@ -43,6 +44,7 @@ incomplete concrete SentencesI of Sentences = Numeral ** PObject x = mkPhrase (mkUtt x) ; PKind x = mkPhrase (mkUtt x) ; + PMassKind x = mkPhrase (mkUtt x) ; PQuality x = mkPhrase (mkUtt x) ; PNumber x = mkPhrase (mkUtt x) ; PPlace x = mkPhrase (mkUtt x.name) ; @@ -58,6 +60,7 @@ incomplete concrete SentencesI of Sentences = Numeral ** PYes = mkPhrase yes_Utt ; PNo = mkPhrase no_Utt ; + PYesToNo = mkPhrase yes_Utt ; Is = mkCl ; @@ -75,6 +78,7 @@ incomplete concrete SentencesI of Sentences = Numeral ** ObjItem i = i ; ObjNumber n k = mkNP n k ; ObjIndef k = mkNP a_Quant k ; + ObjMass k = mkNP k ; ObjAndObj = mkNP and_Conj ; OneObj o = o ; @@ -83,9 +87,13 @@ incomplete concrete SentencesI of Sentences = Numeral ** These kind = mkNP this_Quant plNum kind ; Those kind = mkNP that_Quant plNum kind ; The kind = mkNP the_Quant kind ; - The kind = mkNP the_Quant kind ; Thes kind = mkNP the_Quant plNum kind ; + ThisMass kind = mkNP this_Quant kind ; + ThatMass kind = mkNP that_Quant kind ; + TheMass kind = mkNP the_Quant kind ; + SuchKind quality kind = mkCN quality kind ; + SuchMassKind quality kind = mkCN quality kind ; Very property = mkAP very_AdA (mkAP property) ; Too property = mkAP too_AdA (mkAP property) ; PropQuality property = mkAP property ; @@ -112,7 +120,8 @@ incomplete concrete SentencesI of Sentences = Numeral ** NNumeral n = mkCard ; - AHave p kind = mkCl p.name have_V2 (mkNP kind) ; + AHave p kind = mkCl p.name have_V2 (mkNP aPl_Det kind) ; + AHaveMass p kind = mkCl p.name have_V2 (mkNP kind) ; AHaveCurr p curr = mkCl p.name have_V2 (mkNP aPl_Det curr) ; ACitizen p n = mkCl p.name n ; ABePlace p place = mkCl p.name place.at ; diff --git a/examples/phrasebook/SentencesSwe.gf b/examples/phrasebook/SentencesSwe.gf index a1eaf975c..98b4eb4bf 100644 --- a/examples/phrasebook/SentencesSwe.gf +++ b/examples/phrasebook/SentencesSwe.gf @@ -1,4 +1,8 @@ -concrete SentencesSwe of Sentences = NumeralSwe ** SentencesI with +concrete SentencesSwe of Sentences = NumeralSwe ** SentencesI - [PYesToNo] with (Syntax = SyntaxSwe), (Symbolic = SymbolicSwe), - (Lexicon = LexiconSwe) ; + (Lexicon = LexiconSwe) ** open Prelude in { + + lin PYesToNo = mkPhrase (lin Utt (ss "jo")) ; + +} diff --git a/examples/phrasebook/Words.gf b/examples/phrasebook/Words.gf index 1fe7a4d8b..92b423cf3 100644 --- a/examples/phrasebook/Words.gf +++ b/examples/phrasebook/Words.gf @@ -10,19 +10,19 @@ abstract Words = Sentences ** { -- kinds of items (so far mostly food stuff) Apple : Kind ; - Beer : Kind ; - Bread : Kind ; - Cheese : Kind ; - Chicken : Kind ; - Coffee : Kind ; - Fish : Kind ; - Meat : Kind ; - Milk : Kind ; + Beer : MassKind ; + Bread : MassKind ; + Cheese : MassKind ; + Chicken : MassKind ; + Coffee : MassKind ; + Fish : MassKind ; + Meat : MassKind ; + Milk : MassKind ; Pizza : Kind ; - Salt : Kind ; - Tea : Kind ; - Water : Kind ; - Wine : Kind ; + Salt : MassKind ; + Tea : MassKind ; + Water : MassKind ; + Wine : MassKind ; -- properties of kinds (so far mostly of food) diff --git a/examples/phrasebook/missing.txt b/examples/phrasebook/missing.txt index 65daf4acf..3d7d2177b 100644 --- a/examples/phrasebook/missing.txt +++ b/examples/phrasebook/missing.txt @@ -1,13 +1,10 @@ DisambPhrasebookEng : -PhrasebookBul : GCongratulations GGoodLuck GHappyBirthday -PhrasebookDan : +PhrasebookBul : AHasName AHasRoom AHasTable AHungry AIll AKnow ALike ALive ALove AMarried AReady AScared ASpeak AThirsty ATired AUnderstand AWant AWantGo AmusementPark Bank Belgium Bike Bulgarian Bus ByFoot Cafeteria Car Catalan Center Children CitRestaurant Danish Daughter Disco Dutch English Ferry Finnish Flemish French Friday German HowFar HowFarBy HowFarFrom HowFarFromBy HowMuchCost Husband IsTranspPlace ItCost Italian Leva Monday Norwegian NorwegianCrown PSeeYouDate PSeeYouPlace PSeeYouPlaceDate Parking Pharmacy Plane Polish PostOffice Pound PropClosed PropClosedDate PropClosedDay PropOpen PropOpenDate PropOpenDay Pub QWhatAge QWhatName Romanian Rouble Russian Saturday Son Spanish Subway Sunday SuperlPlace Supermarket Swedish Taxi TheBest TheCheapest TheClosest TheMostExpensive TheMostPopular TheWorst Thursday Tomorrow Train Tram Tuesday Wednesday WhichTranspPlace Wife Zloty Zoo PhrasebookDut : PhrasebookEng : PhrasebookFin : PhrasebookFre : -PhrasebookGer : -PhrasebookIta : HowFar HowFarBy HowFarFrom HowFarFromBy Pound -PhrasebookNor : Cafeteria GDamn -PhrasebookRon : -PhrasebookSpa : GCongratulations GGoodLuck GHappyBirthday +PhrasebookGer : AmusementPark Bank Bar Bike Bulgarian Bus ByFoot Cafeteria Car Catalan Center Chicken Cinema CitRestaurant Coffee Danish Disco Dollar Dutch Ferry GNiceToMeetYou German Hotel HowFar HowFarBy HowFarFrom HowFarFromBy IsTranspPlace Lei Leva Meat Museum Norwegian NorwegianCrown PSeeYouDate PSeeYouPlace PSeeYouPlaceDate Park Parking Pharmacy Plane Polish PostOffice Pound Pub Rouble Russian School Shop Spanish Subway SuperlPlace Supermarket Suspect Taxi Tea TheBest TheCheapest TheClosest TheMostExpensive TheMostPopular TheWorst Theatre Toilet Train Tram WhichTranspPlace Zloty Zoo +PhrasebookIta : AmusementPark Bank Bike Bulgarian Bus ByFoot Cafeteria Car Catalan Center CitRestaurant Danish Disco Dutch Ferry German HowFar HowFarBy HowFarFrom HowFarFromBy IsTranspPlace Leva Norwegian NorwegianCrown Parking Pharmacy Plane Polish PostOffice Pound Pub Rouble Russian Spanish Subway SuperlPlace Supermarket Taxi TheBest TheCheapest TheClosest TheMostExpensive TheMostPopular TheWorst Train Tram WhichTranspPlace Zloty Zoo +PhrasebookRon : GExcusePol GPleaseGivePol GSorryPol PhrasebookSwe :