some moving around of new phrasebook entries

This commit is contained in:
aarne
2010-04-28 16:53:20 +00:00
parent b47098f14f
commit 6e7bbf3aa8
4 changed files with 61 additions and 44 deletions

View File

@@ -38,9 +38,9 @@ abstract Sentences = Numeral ** {
Date ; -- definite date e.g. "on Friday" Date ; -- definite date e.g. "on Friday"
Name ; -- name of person e.g. "NN" Name ; -- name of person e.g. "NN"
Number ; -- number expression 1 .. 999,999 e.g. "twenty" Number ; -- number expression 1 .. 999,999 e.g. "twenty"
Transp ; -- transportation device e.g. "car" Transport ; -- transportation device e.g. "car"
ByTransp ; -- mean of transportation e.g. "by tram" ByTransport ; -- mean of transportation e.g. "by tram"
SuperlModif ; -- superlative modifiers of places e.g. "the best restaurant" Superlative ; -- superlative modifiers of places e.g. "the best restaurant"
-- Many of the categories are accessible as Phrases, i.e. as translation units. -- Many of the categories are accessible as Phrases, i.e. as translation units.
@@ -77,20 +77,6 @@ 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
@@ -115,23 +101,9 @@ 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 ; -- a bar
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)
YouPolMale, YouPolFemale : Person ; -- polite you, said to man/woman (affects agreement) YouPolMale, YouPolFemale : Person ; -- polite you, said to man/woman (affects agreement)

View File

@@ -34,6 +34,9 @@ incomplete concrete SentencesI of Sentences = Numeral **
Date = Adv ; Date = Adv ;
Name = NP ; Name = NP ;
Number = Card ; Number = Card ;
ByTransport = Adv ;
Transport = {name : NP ; by : Adv} ;
Superlative = Det ;
lin lin
PSentence s = mkText s | lin Text (mkUtt s) ; -- optional '.' PSentence s = mkText s | lin Text (mkUtt s) ; -- optional '.'
PQuestion s = mkText s | lin Text (mkUtt s) ; -- optional '?' PQuestion s = mkText s | lin Text (mkUtt s) ; -- optional '?'
@@ -84,12 +87,19 @@ incomplete concrete SentencesI of Sentences = Numeral **
Very property = mkAP very_AdA (mkAP property) ; Very property = mkAP very_AdA (mkAP property) ;
Too property = mkAP too_AdA (mkAP property) ; Too property = mkAP too_AdA (mkAP property) ;
PropQuality property = mkAP property ; PropQuality property = mkAP property ;
ThePlace kind = ThePlace kind =
let name : NP = mkNP the_Quant kind.name in { let name : NP = mkNP the_Quant kind.name in {
name = name ; name = name ;
at = mkAdv kind.at name ; at = mkAdv kind.at name ;
to = mkAdv kind.to name to = mkAdv kind.to name
} ; } ;
APlace kind =
let name : NP = mkNP a_Quant kind.name in {
name = name ;
at = mkAdv kind.at name ;
to = mkAdv kind.to name
} ;
IMale, IFemale = mkPerson i_Pron ; IMale, IFemale = mkPerson i_Pron ;
YouFamMale, YouFamFemale = mkPerson youSg_Pron ; YouFamMale, YouFamFemale = mkPerson youSg_Pron ;
@@ -114,6 +124,7 @@ incomplete concrete SentencesI of Sentences = Numeral **
ACitizen p n = mkCl p.name n ; ACitizen p n = mkCl p.name n ;
ABePlace p place = mkCl p.name place.at ; ABePlace p place = mkCl p.name place.at ;
oper oper
-- These operations are used internally in Sentences. -- These operations are used internally in Sentences.

View File

@@ -56,7 +56,7 @@ abstract Words = Sentences ** {
University : PlaceKind ; University : PlaceKind ;
NationalRestaurant : Nationality -> PlaceKind ; CitRestaurant : Citizenship -> PlaceKind ;
Parking : PlaceKind ; Parking : PlaceKind ;
Supermarket : PlaceKind ; Supermarket : PlaceKind ;
Pharmacy : PlaceKind ; Pharmacy : PlaceKind ;
@@ -107,17 +107,17 @@ abstract Words = Sentences ** {
-- means of transportation -- means of transportation
Train : Transp ; Train : Transport ;
Bus : Transp ; Bus : Transport ;
Plane : Transp ; Plane : Transport ;
Ferry : Transp ; Ferry : Transport ;
Subway : Transp ; Subway : Transport ;
Tram : Transp ; Tram : Transport ;
Taxi : Transp ; Taxi : Transport ;
Car : Transp ; Car : Transport ;
Bike : Transp ; Bike : Transport ;
ByFoot : ByTransp ; ByFoot : ByTransport ;
-- Actions (which can be expressed by different structures in different languages). -- Actions (which can be expressed by different structures in different languages).
@@ -174,4 +174,26 @@ abstract Words = Sentences ** {
Tomorrow : Date ; 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 -> Transport -> 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 ?
ByTransp : Transport -> ByTransport ; -- by bus
TheBest : Superlative ;
TheClosest : Superlative ;
TheCheapest : Superlative ;
TheWorst : Superlative ;
MostExpensive : Superlative ;
MostPopular : Superlative ;
SuperlPlace : Superlative -> PlaceKind -> Place ; -- the best bar
} }

View File

@@ -55,6 +55,18 @@ concrete WordsFin of Words = SentencesFin **
University = mkPlace (mkN "yliopisto") lla ; University = mkPlace (mkN "yliopisto") lla ;
School = mkPlace (mkN "koulu") lla ; School = mkPlace (mkN "koulu") lla ;
CitRestaurant cit = {
name = mkCN cit (mkN "ravintola") ; at = casePrep inessive ; to = casePrep illative
} ;
Parking = mkPlace (mkN "pysäköinti" (mkN "alue")) lla ;
Supermarket = mkPlace (mkN "supermarket") ssa ;
Pharmacy = mkPlace (mkN "apteekki") ssa ;
Center = mkPlace (mkN "keskusta") ssa ;
Cafeteria = mkPlace (mkN "kahvila") ssa ;
Disco = mkPlace (mkN "disko") ssa ;
Pub = mkPlace (mkN "pub") ssa ;
AmusementPark = mkPlace (mkN "huvi" (mkN "puisto")) ssa ;
-- currencies -- currencies
DanishCrown = mkCN (mkN "Tanskan kruunu") | mkCN (mkN "kruunu") ; DanishCrown = mkCN (mkN "Tanskan kruunu") | mkCN (mkN "kruunu") ;