conjunction of Object in Phrasebook

This commit is contained in:
aarne
2010-04-16 09:57:10 +00:00
parent 03c64d9f3d
commit 727b3bf626
5 changed files with 27 additions and 12 deletions

View File

@@ -26,6 +26,7 @@ gfdoc - a rudimentary GF document generator.
Quality = AP ; Quality = AP ;
Property = A ; Property = A ;
Object = NP ; Object = NP ;
PrimObject = NP ;
Place = NPPlace ; -- {name : NP ; at : Adv ; to : Adv} ; Place = NPPlace ; -- {name : NP ; at : Adv ; to : Adv} ;
PlaceKind = CNPlace ; -- {name : CN ; at : Prep ; to : Prep} ; PlaceKind = CNPlace ; -- {name : CN ; at : Prep ; to : Prep} ;
Currency = CN ; Currency = CN ;
@@ -76,6 +77,8 @@ gfdoc - a rudimentary GF document generator.
ObjItem i = i ; ObjItem i = i ;
ObjNumber n k = mkNP n k ; ObjNumber n k = mkNP n k ;
ObjIndef k = mkNP a_Quant k ; ObjIndef k = mkNP a_Quant k ;
ObjAndObj = mkNP and_Conj ;
OneObj o = o ;
This kind = mkNP this_Quant kind ; This kind = mkNP this_Quant kind ;
That kind = mkNP that_Quant kind ; That kind = mkNP that_Quant kind ;
@@ -111,6 +114,7 @@ gfdoc - a rudimentary GF document generator.
{name = n ; isPron = False ; poss = mkQuant he_Pron} ; -- poss not used {name = n ; isPron = False ; poss = mkQuant he_Pron} ; -- poss not used
</pre> </pre>
-- NameString s = symb s ; --%
<pre> <pre>
NameNN = symb "NN" ; NameNN = symb "NN" ;

View File

@@ -25,7 +25,8 @@ are defined in other modules.
Question ; -- question, either yes/no or wh e.g. "where are you" Question ; -- question, either yes/no or wh e.g. "where are you"
-- Greeting ; -- idiomatic phrase, not inflected, e.g. "hello" -- Greeting ; -- idiomatic phrase, not inflected, e.g. "hello"
Proposition ; -- can be turned into sentence or question e.g. "this pizza is good" 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" 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" Item ; -- a single entity e.g. "this pizza"
Kind ; -- a type of an item e.g. "pizza" Kind ; -- a type of an item e.g. "pizza"
Quality ; -- qualification of an item, can be complex e.g. "very good" Quality ; -- qualification of an item, can be complex e.g. "very good"
@@ -90,9 +91,11 @@ This is the way to build propositions about persons.
Here are some general syntactic constructions. Here are some general syntactic constructions.
<pre> <pre>
ObjItem : Item -> Object ; -- this pizza ObjItem : Item -> PrimObject ; -- this pizza
ObjNumber : Number -> Kind -> Object ; -- five pizzas ObjNumber : Number -> Kind -> PrimObject ; -- five pizzas
ObjIndef : Kind -> Object ; -- a pizza ObjIndef : Kind -> PrimObject ; -- a pizza
ObjAndObj : PrimObject -> Object -> Object ; -- this pizza and a beer
OneObj : PrimObject -> Object ; -- this pizza
SuchKind : Quality -> Kind -> Kind ; -- Italian pizza SuchKind : Quality -> Kind -> Kind ; -- Italian pizza
Very : Property -> Quality ; -- very Italian Very : Property -> Quality ; -- very Italian
@@ -125,6 +128,7 @@ Determiners.
NameNN : Name ; -- the name "NN" NameNN : Name ; -- the name "NN"
</pre> </pre>
-- NameString : String -> Name ; ---- creates ambiguities with all words --%
<pre> <pre>
NNumeral : Numeral -> Number ; -- numeral in words, e.g. "twenty" NNumeral : Numeral -> Number ; -- numeral in words, e.g. "twenty"
</pre> </pre>
@@ -140,6 +144,7 @@ structurally. However, these ones are mostly functorial.
</pre> </pre>
<h2> Words and idiomatic phrases of the Phrasebook</h2> <h2> Words and idiomatic phrases of the Phrasebook</h2>
(c) 2009 Aarne Ranta under LGPL --%
<pre> <pre>
abstract Words = Sentences ** { abstract Words = Sentences ** {
@@ -224,7 +229,7 @@ Notice that also negations and questions can be formed from these.
<pre> <pre>
AHasAge : Person -> Number -> Action ; -- I am seventy years AHasAge : Person -> Number -> Action ; -- I am seventy years
AHasChildren: Person -> Number -> Action ; -- I have six children AHasChildren: Person -> Number -> Action ; -- I have six children
AHasName : Person -> Name -> Action ; -- my name is Bond AHasName : Person -> Name -> Action ; -- my name is Bond
AHasRoom : Person -> Number -> Action ; -- you have a room for five persons AHasRoom : Person -> Number -> Action ; -- you have a room for five persons
AHasTable : Person -> Number -> Action ; -- you have a table for five persons AHasTable : Person -> Number -> Action ; -- you have a table for five persons
AHungry : Person -> Action ; -- I am hungry AHungry : Person -> Action ; -- I am hungry
@@ -247,7 +252,7 @@ Notice that also negations and questions can be formed from these.
Miscellaneous phrases. Notice that also negations and questions can be formed from Miscellaneous phrases. Notice that also negations and questions can be formed from
propositions. propositions.
<pre> <pre>
QWhatAge : Person -> Question ; -- how many years are you QWhatAge : Person -> Question ; -- how old are you
QWhatName : Person -> Question ; -- what is your name QWhatName : Person -> Question ; -- what is your name
HowMuchCost : Item -> Question ; -- how much does the pizza cost HowMuchCost : Item -> Question ; -- how much does the pizza cost
ItCost : Item -> Price -> Proposition ; -- the pizza costs five euros ItCost : Item -> Price -> Proposition ; -- the pizza costs five euros

View File

@@ -18,7 +18,8 @@ abstract Sentences = Numeral ** {
Question ; -- question, either yes/no or wh e.g. "where are you" Question ; -- question, either yes/no or wh e.g. "where are you"
-- Greeting ; -- idiomatic phrase, not inflected, e.g. "hello" -- Greeting ; -- idiomatic phrase, not inflected, e.g. "hello"
Proposition ; -- can be turned into sentence or question e.g. "this pizza is good" 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" 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" Item ; -- a single entity e.g. "this pizza"
Kind ; -- a type of an item e.g. "pizza" Kind ; -- a type of an item e.g. "pizza"
Quality ; -- qualification of an item, can be complex e.g. "very good" Quality ; -- qualification of an item, can be complex e.g. "very good"
@@ -78,9 +79,11 @@ abstract Sentences = Numeral ** {
-- Here are some general syntactic constructions. -- Here are some general syntactic constructions.
ObjItem : Item -> Object ; -- this pizza ObjItem : Item -> PrimObject ; -- this pizza
ObjNumber : Number -> Kind -> Object ; -- five pizzas ObjNumber : Number -> Kind -> PrimObject ; -- five pizzas
ObjIndef : Kind -> Object ; -- a pizza ObjIndef : Kind -> PrimObject ; -- a pizza
ObjAndObj : PrimObject -> Object -> Object ; -- this pizza and a beer
OneObj : PrimObject -> Object ; -- this pizza
SuchKind : Quality -> Kind -> Kind ; -- Italian pizza SuchKind : Quality -> Kind -> Kind ; -- Italian pizza
Very : Property -> Quality ; -- very Italian Very : Property -> Quality ; -- very Italian

View File

@@ -19,6 +19,7 @@ incomplete concrete SentencesI of Sentences = Numeral **
Quality = AP ; Quality = AP ;
Property = A ; Property = A ;
Object = NP ; Object = NP ;
PrimObject = NP ;
Place = NPPlace ; -- {name : NP ; at : Adv ; to : Adv} ; Place = NPPlace ; -- {name : NP ; at : Adv ; to : Adv} ;
PlaceKind = CNPlace ; -- {name : CN ; at : Prep ; to : Prep} ; PlaceKind = CNPlace ; -- {name : CN ; at : Prep ; to : Prep} ;
Currency = CN ; Currency = CN ;
@@ -69,6 +70,8 @@ incomplete concrete SentencesI of Sentences = Numeral **
ObjItem i = i ; ObjItem i = i ;
ObjNumber n k = mkNP n k ; ObjNumber n k = mkNP n k ;
ObjIndef k = mkNP a_Quant k ; ObjIndef k = mkNP a_Quant k ;
ObjAndObj = mkNP and_Conj ;
OneObj o = o ;
This kind = mkNP this_Quant kind ; This kind = mkNP this_Quant kind ;
That kind = mkNP that_Quant kind ; That kind = mkNP that_Quant kind ;

View File

@@ -80,7 +80,7 @@ abstract Words = Sentences ** {
AHasAge : Person -> Number -> Action ; -- I am seventy years AHasAge : Person -> Number -> Action ; -- I am seventy years
AHasChildren: Person -> Number -> Action ; -- I have six children AHasChildren: Person -> Number -> Action ; -- I have six children
AHasName : Person -> Name -> Action ; -- my name is Bond AHasName : Person -> Name -> Action ; -- my name is Bond
AHasRoom : Person -> Number -> Action ; -- you have a room for five persons AHasRoom : Person -> Number -> Action ; -- you have a room for five persons
AHasTable : Person -> Number -> Action ; -- you have a table for five persons AHasTable : Person -> Number -> Action ; -- you have a table for five persons
AHungry : Person -> Action ; -- I am hungry AHungry : Person -> Action ; -- I am hungry
@@ -102,7 +102,7 @@ abstract Words = Sentences ** {
-- Miscellaneous phrases. Notice that also negations and questions can be formed from -- Miscellaneous phrases. Notice that also negations and questions can be formed from
-- propositions. -- propositions.
QWhatAge : Person -> Question ; -- how many years are you QWhatAge : Person -> Question ; -- how old are you
QWhatName : Person -> Question ; -- what is your name QWhatName : Person -> Question ; -- what is your name
HowMuchCost : Item -> Question ; -- how much does the pizza cost HowMuchCost : Item -> Question ; -- how much does the pizza cost
ItCost : Item -> Price -> Proposition ; -- the pizza costs five euros ItCost : Item -> Price -> Proposition ; -- the pizza costs five euros