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"
Name ; -- name of person e.g. "NN"
Number ; -- number expression 1 .. 999,999 e.g. "twenty"
Transp ; -- transportation device e.g. "car"
ByTransp ; -- mean of transportation e.g. "by tram"
SuperlModif ; -- superlative modifiers of places e.g. "the best restaurant"
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.
@@ -77,20 +77,6 @@ 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
@@ -115,23 +101,9 @@ abstract Sentences = Numeral ** {
AmountCurrency : Number -> Currency -> Price ; -- five euros
ThePlace : PlaceKind -> Place ; -- the bar
-- ** added :
APlace : PlaceKind -> Place ;
ThePlace : PlaceKind -> Place ; -- the bar
APlace : PlaceKind -> Place ; -- a bar
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)
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 ;
Name = NP ;
Number = Card ;
ByTransport = Adv ;
Transport = {name : NP ; by : Adv} ;
Superlative = Det ;
lin
PSentence 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) ;
Too property = mkAP too_AdA (mkAP property) ;
PropQuality property = mkAP property ;
ThePlace kind =
let name : NP = mkNP the_Quant kind.name in {
name = name ;
at = mkAdv kind.at 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 ;
YouFamMale, YouFamFemale = mkPerson youSg_Pron ;
@@ -114,6 +124,7 @@ incomplete concrete SentencesI of Sentences = Numeral **
ACitizen p n = mkCl p.name n ;
ABePlace p place = mkCl p.name place.at ;
oper
-- These operations are used internally in Sentences.

View File

@@ -56,7 +56,7 @@ abstract Words = Sentences ** {
University : PlaceKind ;
NationalRestaurant : Nationality -> PlaceKind ;
CitRestaurant : Citizenship -> PlaceKind ;
Parking : PlaceKind ;
Supermarket : PlaceKind ;
Pharmacy : PlaceKind ;
@@ -107,17 +107,17 @@ abstract Words = Sentences ** {
-- means of transportation
Train : Transp ;
Bus : Transp ;
Plane : Transp ;
Ferry : Transp ;
Subway : Transp ;
Tram : Transp ;
Taxi : Transp ;
Car : Transp ;
Bike : Transp ;
Train : Transport ;
Bus : Transport ;
Plane : Transport ;
Ferry : Transport ;
Subway : Transport ;
Tram : Transport ;
Taxi : Transport ;
Car : Transport ;
Bike : Transport ;
ByFoot : ByTransp ;
ByFoot : ByTransport ;
-- Actions (which can be expressed by different structures in different languages).
@@ -174,4 +174,26 @@ abstract Words = Sentences ** {
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 ;
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
DanishCrown = mkCN (mkN "Tanskan kruunu") | mkCN (mkN "kruunu") ;