summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorramona.enache <ramona.enache@chalmers.se>2010-04-28 14:56:07 +0000
committerramona.enache <ramona.enache@chalmers.se>2010-04-28 14:56:07 +0000
commit65a10ddb1343c50ff6da73334e803ea649ce376a (patch)
tree19a40ff22d1151a12d6781b9955e8612cf8c8bee
parentc87bbcb8e43619695ce09db6e980f795bf461d4c (diff)
abstract syntax for the phrasebook - extended version
-rw-r--r--examples/phrasebook/Sentences.gf29
-rw-r--r--examples/phrasebook/Words.gf51
2 files changed, 77 insertions, 3 deletions
diff --git a/examples/phrasebook/Sentences.gf b/examples/phrasebook/Sentences.gf
index b08c2fe0d..4d0b88612 100644
--- a/examples/phrasebook/Sentences.gf
+++ b/examples/phrasebook/Sentences.gf
@@ -73,6 +73,20 @@ abstract Sentences = Numeral ** {
WherePlace : Place -> Question ; -- where is the bar
WherePerson : Person -> Question ; -- where are you
+--** added
+ HowFar : Place -> Question ; -- how far is the zoo ?
+ HowFarFrom : Place -> Place -> Question ; -- how far is the center from the hotel ?
+ HowFarFromBy : Place -> Place -> ByTransp -> Question ; -- how far is the airport from the hotel by taxi ?
+ HowFarBy : Place -> Transp -> Question ; -- how far is the museum by bus ?
+
+
+ By : Transp -> ByTransp ; -- by bus
+
+ WhichTranspPlace : Transp -> Place -> Question ; -- which bus goes to the best amusement park ?
+ IsTranspPlace : Transp -> Place -> Question ; -- is there a metro to the airport ?
+
+-- **
+
-- This is the way to build propositions about persons.
PropAction : Action -> Proposition ; -- (you (are|aren't) | are you) Swedish
@@ -98,6 +112,21 @@ abstract Sentences = Numeral ** {
AmountCurrency : Number -> Currency -> Price ; -- five euros
ThePlace : PlaceKind -> Place ; -- the bar
+-- ** added :
+ APlace : PlaceKind -> Place ;
+
+
+ SuperlPlace : SuperlModif -> PlaceKind -> Place ; -- the best bar
+
+
+ TheBest : SuperlModif ;
+ TheClosest : SuperlModif ;
+ TheCheapest : SuperlModif ;
+ TheWorst : SuperlModif ;
+ MostExpensive : SuperlModif ;
+ MostPopular : SuperlModif ;
+
+-- **
IMale, IFemale, -- I, said by man/woman (affects agreement)
YouFamMale, YouFamFemale, -- familiar you, said to man/woman (affects agreement)
diff --git a/examples/phrasebook/Words.gf b/examples/phrasebook/Words.gf
index 755a91c53..6c9412b10 100644
--- a/examples/phrasebook/Words.gf
+++ b/examples/phrasebook/Words.gf
@@ -54,15 +54,31 @@ abstract Words = Sentences ** {
Theatre : PlaceKind ;
Toilet : PlaceKind ;
University : PlaceKind ;
+
+
+ NationalRestaurant : Nationality -> PlaceKind ;
+ Parking : PlaceKind ;
+ Supermarket : PlaceKind ;
+ Pharmacy : PlaceKind ;
+ Center : PlaceKind ;
+ Cafeteria : PlaceKind ;
+ Disco : PlaceKind ;
+ Pub : PlaceKind ;
+ AmusementPark : PlaceKind ;
-- currency units
- DanishCrown : Currency ;
+ DanishCrown : Currency ;
Dollar : Currency ;
- Euro : Currency ;
- Lei : Currency ;
+ Euro : Currency ; -- Germany, France, Italy, Finland, Spain, Netherlands
+ Lei : Currency ; -- Romania
+ Leva : Currency ; -- Bulgaria
+ NorwegianCrown : Currency ;
+ Ruble : Currency ; -- Russia
SwedishCrown : Currency ;
+ Zloty : Currency ; -- Poland
+
-- nationalities, countries, languages, citizenships
Belgian : Citizenship ;
@@ -74,6 +90,35 @@ abstract Words = Sentences ** {
Italian : Nationality ;
Romanian : Nationality ;
Swedish : Nationality ;
+
+-- ** added
+ Spanish : Nationality ;
+ Norwegian : Nationality ;
+ Danish : Nationality ;
+-- Dane : Citizenship ;
+ Dutch : Nationality ;
+ Polish : Nationality ;
+ Catalan : Language ; -- ???
+ German : Nationality ;
+ Russian : Nationality ;
+ Bulgarian : Nationality ;
+
+
+
+-- means of transportation
+
+ Train : Transp ;
+ Bus : Transp ;
+ Plane : Transp ;
+ Ferry : Transp ;
+ Subway : Transp ;
+ Tram : Transp ;
+ Taxi : Transp ;
+ Car : Transp ;
+ Bike : Transp ;
+
+ ByFoot : ByTransp ;
+
-- Actions (which can be expressed by different structures in different languages).
-- Notice that also negations and questions can be formed from these.