mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-20 08:32:50 -06:00
abstract syntax for the phrasebook - extended version
This commit is contained in:
@@ -73,6 +73,20 @@ abstract Sentences = Numeral ** {
|
|||||||
WherePlace : Place -> Question ; -- where is the bar
|
WherePlace : Place -> Question ; -- where is the bar
|
||||||
WherePerson : Person -> Question ; -- where are you
|
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.
|
-- This is the way to build propositions about persons.
|
||||||
|
|
||||||
PropAction : Action -> Proposition ; -- (you (are|aren't) | are you) Swedish
|
PropAction : Action -> Proposition ; -- (you (are|aren't) | are you) Swedish
|
||||||
@@ -98,6 +112,21 @@ abstract Sentences = Numeral ** {
|
|||||||
AmountCurrency : Number -> Currency -> Price ; -- five euros
|
AmountCurrency : Number -> Currency -> Price ; -- five euros
|
||||||
|
|
||||||
ThePlace : PlaceKind -> Place ; -- the bar
|
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)
|
IMale, IFemale, -- I, said by man/woman (affects agreement)
|
||||||
YouFamMale, YouFamFemale, -- familiar you, said to man/woman (affects agreement)
|
YouFamMale, YouFamFemale, -- familiar you, said to man/woman (affects agreement)
|
||||||
|
|||||||
@@ -55,13 +55,29 @@ abstract Words = Sentences ** {
|
|||||||
Toilet : PlaceKind ;
|
Toilet : PlaceKind ;
|
||||||
University : PlaceKind ;
|
University : PlaceKind ;
|
||||||
|
|
||||||
|
|
||||||
|
NationalRestaurant : Nationality -> PlaceKind ;
|
||||||
|
Parking : PlaceKind ;
|
||||||
|
Supermarket : PlaceKind ;
|
||||||
|
Pharmacy : PlaceKind ;
|
||||||
|
Center : PlaceKind ;
|
||||||
|
Cafeteria : PlaceKind ;
|
||||||
|
Disco : PlaceKind ;
|
||||||
|
Pub : PlaceKind ;
|
||||||
|
AmusementPark : PlaceKind ;
|
||||||
|
|
||||||
-- currency units
|
-- currency units
|
||||||
|
|
||||||
DanishCrown : Currency ;
|
DanishCrown : Currency ;
|
||||||
Dollar : Currency ;
|
Dollar : Currency ;
|
||||||
Euro : Currency ;
|
Euro : Currency ; -- Germany, France, Italy, Finland, Spain, Netherlands
|
||||||
Lei : Currency ;
|
Lei : Currency ; -- Romania
|
||||||
|
Leva : Currency ; -- Bulgaria
|
||||||
|
NorwegianCrown : Currency ;
|
||||||
|
Ruble : Currency ; -- Russia
|
||||||
SwedishCrown : Currency ;
|
SwedishCrown : Currency ;
|
||||||
|
Zloty : Currency ; -- Poland
|
||||||
|
|
||||||
|
|
||||||
-- nationalities, countries, languages, citizenships
|
-- nationalities, countries, languages, citizenships
|
||||||
|
|
||||||
@@ -75,6 +91,35 @@ abstract Words = Sentences ** {
|
|||||||
Romanian : Nationality ;
|
Romanian : Nationality ;
|
||||||
Swedish : 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).
|
-- Actions (which can be expressed by different structures in different languages).
|
||||||
-- Notice that also negations and questions can be formed from these.
|
-- Notice that also negations and questions can be formed from these.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user