diff --git a/examples/phrasebook/Implementation.html b/examples/phrasebook/Implementation.html index 5cb0635fb..a4b2ccd12 100644 --- a/examples/phrasebook/Implementation.html +++ b/examples/phrasebook/Implementation.html @@ -85,6 +85,7 @@ gfdoc - a rudimentary GF document generator. ObjItem i = i ; ObjNumber n k = mkNP n k ; ObjIndef k = mkNP a_Quant k ; + ObjPlural k = mkNP aPl_Det k ; ObjMass k = mkNP k ; ObjAndObj = mkNP and_Conj ; OneObj o = o ; @@ -129,8 +130,7 @@ gfdoc - a rudimentary GF document generator. NNumeral n = mkCard <lin Numeral n : Numeral> ; - AHave p kind = mkCl p.name have_V2 (mkNP aPl_Det kind) ; - AHaveMass p kind = mkCl p.name have_V2 (mkNP kind) ; + AHave p obj = mkCl p.name have_V2 obj ; AHaveCurr p curr = mkCl p.name have_V2 (mkNP aPl_Det curr) ; ACitizen p n = mkCl p.name n ; ABePlace p place = mkCl p.name place.at ; diff --git a/examples/phrasebook/Makefile b/examples/phrasebook/Makefile index b1a944276..93c4a70c5 100644 --- a/examples/phrasebook/Makefile +++ b/examples/phrasebook/Makefile @@ -5,10 +5,10 @@ all: fin demo missing demo: compdemo linkdemo compdemo: - $(compile) Bul Dan Dut Eng Fre Ger Ita Nor Ron Spa Swe DisambPhrasebookEng + $(compile) Bul Cat Dan Dut Eng Fre Ger Ita Nor Ron Spa Swe DisambPhrasebookEng linkdemo: - $(compile) -link Eng Bul Dan Dut Fin Fre Ger Ita Nor Ron Spa Swe DisambPhrasebookEng + $(compile) -link Eng Bul Cat Dan Dut Fin Fre Ger Ita Nor Ron Spa Swe DisambPhrasebookEng #separate, because slow... fin: diff --git a/examples/phrasebook/Ontology.html b/examples/phrasebook/Ontology.html index e431598da..0765ac4e0 100644 --- a/examples/phrasebook/Ontology.html +++ b/examples/phrasebook/Ontology.html @@ -101,6 +101,7 @@ Here 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 @@ -146,8 +147,7 @@ Determiners. Actions are typically language-dependent, not only lexically but also structurally. However, these ones are mostly functorial.
- AHave : Person -> Kind -> Action ; -- you have pizzas
- AHaveMass : Person -> MassKind -> Action ; -- you have water
+ AHave : Person -> Object -> Action ; -- you have pizzas
AHaveCurr : Person -> Currency -> Action ; -- you have dollars
ACitizen : Person -> Citizenship -> Action ; -- you are Swedish
ABePlace : Person -> Place -> Action ; -- you are in the bar
@@ -300,7 +300,7 @@ Notice that also negations and questions can be formed from these.
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 beers
+ AWant : Person -> Object -> Action ; -- I want two apples
AWantGo : Person -> Place -> Action ; -- I want to go to the hospital
diff --git a/examples/phrasebook/Sentences.gf b/examples/phrasebook/Sentences.gf
index 572d89f74..2d2fc8aab 100644
--- a/examples/phrasebook/Sentences.gf
+++ b/examples/phrasebook/Sentences.gf
@@ -90,6 +90,7 @@ abstract Sentences = Numeral ** {
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
@@ -133,8 +134,7 @@ abstract Sentences = Numeral ** {
-- Actions are typically language-dependent, not only lexically but also
-- structurally. However, these ones are mostly functorial.
- AHave : Person -> Kind -> Action ; -- you have pizzas
- AHaveMass : Person -> MassKind -> Action ; -- you have water
+ AHave : Person -> Object -> Action ; -- you have pizzas
AHaveCurr : Person -> Currency -> Action ; -- you have dollars
ACitizen : Person -> Citizenship -> Action ; -- you are Swedish
ABePlace : Person -> Place -> Action ; -- you are in the bar
diff --git a/examples/phrasebook/SentencesFin.gf b/examples/phrasebook/SentencesFin.gf
index 625890046..61533b35c 100644
--- a/examples/phrasebook/SentencesFin.gf
+++ b/examples/phrasebook/SentencesFin.gf
@@ -1,5 +1,5 @@
concrete SentencesFin of Sentences = NumeralFin ** SentencesI -
- [Is,NameNN,
+ [Is, NameNN, ObjMass,
IFemale, YouFamFemale, YouPolFemale, IMale, YouFamMale, YouPolMale
] with
(Syntax = SyntaxFin),
@@ -15,5 +15,8 @@ concrete SentencesFin of Sentences = NumeralFin ** SentencesI -
YouFamMale, YouFamFemale =
{name = mkNP (ProDrop youSg_Pron) ; isPron = True ; poss = mkQuant youSg_Pron} ;
YouPolMale, YouPolFemale =
- {name = mkNP (ProDrop youPol_Pron) ; isPron = True ; poss = mkQuant youPol_Pron};
+ {name = mkNP (ProDrop youPol_Pron) ; isPron = True ; poss = mkQuant youPol_Pron} ;
+
+ ObjMass = PartCN ;
+
}
diff --git a/examples/phrasebook/SentencesI.gf b/examples/phrasebook/SentencesI.gf
index bcd6f01b8..be7170a93 100644
--- a/examples/phrasebook/SentencesI.gf
+++ b/examples/phrasebook/SentencesI.gf
@@ -78,6 +78,7 @@ incomplete concrete SentencesI of Sentences = Numeral **
ObjItem i = i ;
ObjNumber n k = mkNP n k ;
ObjIndef k = mkNP a_Quant k ;
+ ObjPlural k = mkNP aPl_Det k ;
ObjMass k = mkNP k ;
ObjAndObj = mkNP and_Conj ;
OneObj o = o ;
@@ -120,8 +121,7 @@ incomplete concrete SentencesI of Sentences = Numeral **
NNumeral n = mkCard @@ -17,9 +18,11 @@ History
-Back to phrasebook +Back to phrasebook
@@ -81,18 +84,17 @@ The source code resides in
code.haskell.org/gf/examples/phrasebook/
-Current status (20 May 2010): +Current status (26 May 2010):
http://tournesol.cs.chalmers.se/~aarne/phrasebook/phrasebook.html
+ http://www.grammaticalframework.org/demos/phrasebook/
+Numeral: resource grammar module directly inherited from the library.
+
Here is the module structure as produced in GF by
@@ -252,6 +257,6 @@ Here are the steps to follow for contributors: