abstract Sentences = Numeral ** {The ontology of the phrasebook is defined by the following types. The commented ones are defined in other modules.
cat Phrase ; -- complete phrase, the unit of translation e.g. "Where are you?" Sentence ; -- declarative sentence e.g. "I am in the bar" Question ; -- question, either yes/no or wh e.g. "where are you" -- Greeting ; -- idiomatic phrase, not inflected, e.g. "hello" Proposition ; -- can be turned into sentence or question e.g. "this pizza is good" Object ; -- the object of wanting, ordering, etc e.g. "three pizzas and a beer" 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" PlaceKind ; -- type of location e.g. "bar" Currency ; -- currency unit e.g. "leu" Price ; -- number of currency units e.g. "eleven leu" Person ; -- agent wanting or doing something e.g. "you" Action ; -- proposition about a Person e.g. "you are here" Nationality ; -- complex of language, property, country e.g. "Swedish, Sweden" Language ; -- language (can be without nationality) e.g. "Flemish" Citizenship ; -- property (can be without language) e.g. "Belgian" Country ; -- country (can be without language) e.g. "Belgium" Day ; -- weekday type e.g. "Friday" Date ; -- definite date e.g. "on Friday" Name ; -- name of person e.g. "NN" Number ; -- number expression 1 .. 999,999 e.g. "twenty" Transport ; -- transportation device e.g. "car" ByTransport ; -- mean of transportation e.g. "by tram" Superlative ; -- superlative modifiers of places e.g. "the best restaurant"Many of the categories are accessible as Phrases, i.e. as translation units.
fun PSentence : Sentence -> Phrase ; PQuestion : Question -> 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 ; PByTransport : ByTransport -> Phrase ; PTransport : Transport -> Phrase ; PYes, PNo, PYesToNo : Phrase ; -- yes, no, si/doch (pos. answer to neg. question)This is the way to build propositions about inanimate items.
Is : Item -> Quality -> Proposition ; -- this pizza is goodTo use propositions on higher levels.
SProp : Proposition -> Sentence ; -- this pizza is good SPropNot : Proposition -> Sentence ; -- this pizza isn't good QProp : Proposition -> Question ; -- is this pizza good WherePlace : Place -> Question ; -- where is the bar WherePerson : Person -> Question ; -- where are youThis is the way to build propositions about persons.
PropAction : Action -> Proposition ; -- (you (are|aren't) | are you) SwedishHere are some general syntactic constructions.
ObjItem : Item -> PrimObject ; -- this pizza ObjNumber : Number -> Kind -> PrimObject ; -- five pizzas ObjIndef : Kind -> PrimObject ; -- a pizza ObjPlural : Kind -> PrimObject ; -- pizzas 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 ; -- ItalianDeterminers.
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 ThePlace : PlaceKind -> Place ; -- the bar APlace : PlaceKind -> Place ; -- a bar IMale, IFemale, -- I, said by man/woman (affects agreement) YouFamMale, YouFamFemale, -- familiar you, said to man/woman (affects agreement) YouPolMale, YouPolFemale : Person ; -- polite you, said to man/woman (affects agreement) LangNat : Nationality -> Language ; -- Swedish CitiNat : Nationality -> Citizenship ; -- Swedish CountryNat : Nationality -> Country ; -- Sweden PropCit : Citizenship -> Property ; -- Swedish OnDay : Day -> Date ; -- on Friday Today : Date ; -- today PersonName : Name -> Person ; -- person referred by name NameNN : Name ; -- the name "NN"
NNumeral : Numeral -> Number ; -- numeral in words, e.g. "twenty"Actions are typically language-dependent, not only lexically but also structurally. However, these ones are mostly functorial.
SHave : Person -> Object -> Sentence ; -- you have beer SHaveNo : Person -> Kind -> Sentence ; -- you have no apples SHaveNoMass : Person -> MassKind -> Sentence ; -- you have no beer QDoHave : Person -> Object -> Question ; -- do you have beer AHaveCurr : Person -> Currency -> Action ; -- you have dollars ACitizen : Person -> Citizenship -> Action ; -- you are Swedish ABePlace : Person -> Place -> Action ; -- you are in the bar ByTransp : Transport -> ByTransport ; -- by bus }
abstract Words = Sentences ** { funkinds of items (so far mostly food stuff)
Apple : Kind ; Beer : MassKind ; Bread : MassKind ; Cheese : MassKind ; Chicken : MassKind ; Coffee : MassKind ; Fish : MassKind ; Meat : MassKind ; Milk : MassKind ; Pizza : Kind ; Salt : MassKind ; Tea : MassKind ; Water : MassKind ; Wine : MassKind ;properties of kinds (so far mostly of food)
Bad : Property ; Boring : Property ; Cheap : Property ; Cold : Property ; Delicious : Property ; Expensive : Property ; Fresh : Property ; Good : Property ; Suspect : Property ; Warm : Property ;kinds of places
Airport : PlaceKind ; AmusementPark : PlaceKind ; Bank : PlaceKind ; Bar : PlaceKind ; Cafeteria : PlaceKind ; Center : PlaceKind ; Cinema : PlaceKind ; Church : PlaceKind ; Disco : PlaceKind ; Hospital : PlaceKind ; Hotel : PlaceKind ; Museum : PlaceKind ; Park : PlaceKind ; Parking : PlaceKind ; Pharmacy : PlaceKind ; PostOffice : PlaceKind ; Pub : PlaceKind ; Restaurant : PlaceKind ; School : PlaceKind ; Shop : PlaceKind ; Station : PlaceKind ; Supermarket : PlaceKind ; Theatre : PlaceKind ; Toilet : PlaceKind ; University : PlaceKind ; Zoo : PlaceKind ; CitRestaurant : Citizenship -> PlaceKind ;currency units
DanishCrown : Currency ; Dollar : Currency ; Euro : Currency ; -- Germany, France, Italy, Finland, Spain, The Netherlands Lei : Currency ; -- Romania Leva : Currency ; -- Bulgaria NorwegianCrown : Currency ; Pound : Currency ; -- UK Rouble : Currency ; -- Russia SwedishCrown : Currency ; Zloty : Currency ; -- Polandnationalities, countries, languages, citizenships
Belgian : Citizenship ; Belgium : Country ; Bulgarian : Nationality ; Catalan : Nationality ; Danish : Nationality ; Dutch : Nationality ; English : Nationality ; Finnish : Nationality ; Flemish : Language ; French : Nationality ; German : Nationality ; Italian : Nationality ; Norwegian : Nationality ; Polish : Nationality ; Romanian : Nationality ; Russian : Nationality ; Spanish : Nationality ; Swedish : Nationality ;means of transportation
Bike : Transport ; Bus : Transport ; Car : Transport ; Ferry : Transport ; Plane : Transport ; Subway : Transport ; Taxi : Transport ; Train : Transport ; Tram : Transport ; ByFoot : ByTransport ;Actions (which can be expressed by different structures in different languages). Notice that also negations and questions can be formed from these.
AHasAge : Person -> Number -> Action ; -- I am seventy years AHasChildren: Person -> Number -> Action ; -- I have six children AHasName : Person -> Name -> Action ; -- my name is Bond AHasRoom : Person -> Number -> Action ; -- you have a room for five persons AHasTable : Person -> Number -> Action ; -- you have a table for five persons AHungry : Person -> Action ; -- I am hungry AIll : Person -> Action ; -- I am ill AKnow : Person -> Action ; -- I (don't) know ALike : Person -> Item -> Action ; -- I like this pizza ALive : Person -> Country -> Action ; -- I live in Sweden ALove : Person -> Person -> Action ; -- I love you AMarried : Person -> Action ; -- I am married AReady : Person -> Action ; -- I am ready AScared : Person -> Action ; -- I am scared ASpeak : Person -> Language -> Action ; -- I speak Finnish AThirsty : Person -> Action ; -- I am thirsty ATired : Person -> Action ; -- I am tired AUnderstand : Person -> Action ; -- I (don't) understand AWant : Person -> Object -> Action ; -- I want two apples AWantGo : Person -> Place -> Action ; -- I want to go to the hospitalMiscellaneous phrases. Notice that also negations and questions can be formed from propositions.
QWhatAge : Person -> Question ; -- how old are you QWhatName : Person -> Question ; -- what is your name HowMuchCost : Item -> Question ; -- how much does the pizza cost ItCost : Item -> Price -> Proposition ; -- the pizza costs five euros PropOpen : Place -> Proposition ; -- the museum is open PropClosed : Place -> Proposition ; -- the museum is closed PropOpenDate : Place -> Date -> Proposition ; -- the museum is open today PropClosedDate : Place -> Date -> Proposition ; -- the museum is closed today PropOpenDay : Place -> Day -> Proposition ; -- the museum is open on Mondays PropClosedDay : Place -> Day -> Proposition ; -- the museum is closed on Mondays PSeeYouPlaceDate : Place -> Date -> Phrase ; -- see you in the bar on Monday PSeeYouPlace : Place -> Phrase ; -- see you in the bar PSeeYouDate : Date -> Phrase ; -- see you on Mondayfamily relations
Wife, Husband : Person -> Person ; -- my wife, your husband Son, Daughter : Person -> Person ; -- my son, your husband Children : Person -> Person ; -- my childrenweek days
Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday : Day ; Tomorrow : Date ;transports
HowFar : Place -> Question ; -- how far is the zoo ? HowFarFrom : Place -> Place -> Question ; -- how far is the center from the hotel ? HowFarFromBy : Place -> Place -> ByTransport -> Question ; -- how far is the airport from the hotel by taxi ? HowFarBy : Place -> ByTransport -> Question ; -- how far is the museum by bus ? WhichTranspPlace : Transport -> Place -> Question ; -- which bus goes to the hotel IsTranspPlace : Transport -> Place -> Question ; -- is there a metro to the airport ?modifiers of places
TheBest : Superlative ; TheClosest : Superlative ; TheCheapest : Superlative ; TheMostExpensive : Superlative ; TheMostPopular : Superlative ; TheWorst : Superlative ; SuperlPlace : Superlative -> PlaceKind -> Place ; -- the best bar }