diff --git a/examples/phrasebook/DiffPhrasebook.gf b/examples/phrasebook/DiffPhrasebook.gf deleted file mode 100644 index 27076323b..000000000 --- a/examples/phrasebook/DiffPhrasebook.gf +++ /dev/null @@ -1,9 +0,0 @@ -interface DiffPhrasebook = open Syntax in { - -oper - want_V2 : V2 ; - like_V2 : V2 ; - cost_V2 : V2 ; -- it costs five euros - cost_V : V ; -- how much does it cost - -} diff --git a/examples/phrasebook/DiffPhrasebookEng.gf b/examples/phrasebook/DiffPhrasebookEng.gf deleted file mode 100644 index 40c802459..000000000 --- a/examples/phrasebook/DiffPhrasebookEng.gf +++ /dev/null @@ -1,12 +0,0 @@ -instance DiffPhrasebookEng of DiffPhrasebook = open - SyntaxEng, - ParadigmsEng, - IrregEng -in { - -oper - want_V2 = mkV2 (mkV "want") ; - like_V2 = mkV2 (mkV "like") ; - cost_V2 = mkV2 IrregEng.cost_V ; - cost_V = IrregEng.cost_V ; -} diff --git a/examples/phrasebook/DiffPhrasebookFin.gf b/examples/phrasebook/DiffPhrasebookFin.gf deleted file mode 100644 index c90820e06..000000000 --- a/examples/phrasebook/DiffPhrasebookFin.gf +++ /dev/null @@ -1,14 +0,0 @@ -instance DiffPhrasebookFin of DiffPhrasebook = open - SyntaxFin, - ParadigmsFin -in { - -flags coding = utf8 ; - -oper - want_V2 = mkV2 (mkV "haluta") ; - like_V2 = mkV2 (mkV "pitää") elative ; - - cost_V2 = mkV2 (mkV "maksaa") ; - cost_V = mkV "maksaa" ; -} diff --git a/examples/phrasebook/DiffPhrasebookFre.gf b/examples/phrasebook/DiffPhrasebookFre.gf deleted file mode 100644 index 7a83a4f88..000000000 --- a/examples/phrasebook/DiffPhrasebookFre.gf +++ /dev/null @@ -1,16 +0,0 @@ -instance DiffPhrasebookFre of DiffPhrasebook = open - SyntaxFre, - IrregFre, - ParadigmsFre -in { - -flags coding = utf8 ; - -oper - want_V2 = vouloir_V2 ; - like_V2 = mkV2 (mkV "aimer") ; - - cost_V2 = mkV2 (mkV "coûter") ; - cost_V = mkV "coûter" ; - -} diff --git a/examples/phrasebook/DiffPhrasebookIta.gf b/examples/phrasebook/DiffPhrasebookIta.gf deleted file mode 100644 index f1d608fde..000000000 --- a/examples/phrasebook/DiffPhrasebookIta.gf +++ /dev/null @@ -1,14 +0,0 @@ -instance DiffPhrasebookIta of DiffPhrasebook = open - SyntaxIta, - BeschIta, - ParadigmsIta -in { - -oper - want_V2 = mkV2 (mkV (volere_96 "volere")) ; - like_V2 = mkV2 (mkV "amare") ; ---- - - cost_V2 = mkV2 (mkV "costare") ; - cost_V = mkV "costare" ; - -} diff --git a/examples/phrasebook/DiffPhrasebookRon.gf b/examples/phrasebook/DiffPhrasebookRon.gf deleted file mode 100644 index 61e928b72..000000000 --- a/examples/phrasebook/DiffPhrasebookRon.gf +++ /dev/null @@ -1,17 +0,0 @@ -instance DiffPhrasebookRon of DiffPhrasebook = open - SyntaxRon, - BeschRon, - ParadigmsRon -in { - -flags coding = utf8 ; - -oper - want_V2 = dirV2 (lin V want_VV) ; -- mkVV (v_besch74 "vrea") - like_V2 = dirV2 (v_besch71 "plăcea") ; - - cost_V2 = dirV2(v_besch18 "costa") ; - - cost_V = v_besch18 "costa" ; - -} diff --git a/examples/phrasebook/DiffPhrasebookSwe.gf b/examples/phrasebook/DiffPhrasebookSwe.gf deleted file mode 100644 index 14fbd7bbc..000000000 --- a/examples/phrasebook/DiffPhrasebookSwe.gf +++ /dev/null @@ -1,12 +0,0 @@ -instance DiffPhrasebookSwe of DiffPhrasebook = open - SyntaxSwe, - ParadigmsSwe -in { - -oper - want_V2 = mkV2 (mkV "önska") ; ---- vill ha - like_V2 = mkV2 (mkV "tycker") (mkPrep "om") ; - - cost_V2 = mkV2 (mkV "kosta") ; - cost_V = mkV "kosta" ; -} diff --git a/examples/phrasebook/Sentences.gf b/examples/phrasebook/Sentences.gf index a5249d3ca..18bf88144 100644 --- a/examples/phrasebook/Sentences.gf +++ b/examples/phrasebook/Sentences.gf @@ -85,8 +85,6 @@ abstract Sentences = Numeral ** { The, Thes : Kind -> Item ; -- the pizza, the pizzas AmountCurrency : Numeral -> Currency -> Price ; -- five euros - HowMuchCost : Item -> Question ; -- how much does the pizza cost - ItCost : Item -> Price -> Proposition ; -- the pizza costs five euros ThePlace : PlaceKind -> Place ; -- the bar diff --git a/examples/phrasebook/SentencesEng.gf b/examples/phrasebook/SentencesEng.gf index f71b14c6f..caaf9daca 100644 --- a/examples/phrasebook/SentencesEng.gf +++ b/examples/phrasebook/SentencesEng.gf @@ -1,5 +1,4 @@ concrete SentencesEng of Sentences = NumeralEng ** SentencesI with - (DiffPhrasebook = DiffPhrasebookEng), (Syntax = SyntaxEng), (Symbolic = SymbolicEng), (Lexicon = LexiconEng) ; diff --git a/examples/phrasebook/SentencesFin.gf b/examples/phrasebook/SentencesFin.gf index 6e7e5c9de..72eacca5f 100644 --- a/examples/phrasebook/SentencesFin.gf +++ b/examples/phrasebook/SentencesFin.gf @@ -1,5 +1,4 @@ concrete SentencesFin of Sentences = NumeralFin ** SentencesI with - (DiffPhrasebook = DiffPhrasebookFin), (Syntax = SyntaxFin), (Symbolic = SymbolicFin), (Lexicon = LexiconFin) ; diff --git a/examples/phrasebook/SentencesFre.gf b/examples/phrasebook/SentencesFre.gf index 201db3323..ae85f126d 100644 --- a/examples/phrasebook/SentencesFre.gf +++ b/examples/phrasebook/SentencesFre.gf @@ -3,7 +3,6 @@ concrete SentencesFre of Sentences = NumeralFre ** SentencesI - [ IFemale, YouFamFemale, YouPolFemale ] with - (DiffPhrasebook = DiffPhrasebookFre), (Syntax = SyntaxFre), (Symbolic = SymbolicFre), (Lexicon = LexiconFre) ** diff --git a/examples/phrasebook/SentencesI.gf b/examples/phrasebook/SentencesI.gf index 0b26cff41..1dbaf7861 100644 --- a/examples/phrasebook/SentencesI.gf +++ b/examples/phrasebook/SentencesI.gf @@ -1,6 +1,5 @@ incomplete concrete SentencesI of Sentences = Numeral ** open - DiffPhrasebook, Syntax, Lexicon, Symbolic, -- for names as strings @@ -57,9 +56,6 @@ incomplete concrete SentencesI of Sentences = Numeral ** PropAction a = a ; - HowMuchCost item = mkQS (mkQCl how8much_IAdv (mkCl item cost_V)) ; - ItCost item price = mkCl item cost_V2 price ; - AmountCurrency num curr = mkNP curr ; ObjItem i = i ; diff --git a/examples/phrasebook/SentencesIta.gf b/examples/phrasebook/SentencesIta.gf index 1646d8819..83af8cc82 100644 --- a/examples/phrasebook/SentencesIta.gf +++ b/examples/phrasebook/SentencesIta.gf @@ -2,7 +2,6 @@ concrete SentencesIta of Sentences = NumeralIta ** SentencesI - [ IFemale, YouFamFemale, YouPolFemale ] with - (DiffPhrasebook = DiffPhrasebookIta), (Syntax = SyntaxIta), (Symbolic = SymbolicIta), (Lexicon = LexiconIta) ** diff --git a/examples/phrasebook/SentencesRon.gf b/examples/phrasebook/SentencesRon.gf index 5103d2d59..7043d7982 100644 --- a/examples/phrasebook/SentencesRon.gf +++ b/examples/phrasebook/SentencesRon.gf @@ -1,5 +1,4 @@ concrete SentencesRon of Sentences = NumeralRon ** SentencesI with - (DiffPhrasebook = DiffPhrasebookRon), (Syntax = SyntaxRon), (Symbolic = SymbolicRon), (Lexicon = LexiconRon) ; diff --git a/examples/phrasebook/SentencesSwe.gf b/examples/phrasebook/SentencesSwe.gf index a57749668..a1eaf975c 100644 --- a/examples/phrasebook/SentencesSwe.gf +++ b/examples/phrasebook/SentencesSwe.gf @@ -1,5 +1,4 @@ concrete SentencesSwe of Sentences = NumeralSwe ** SentencesI with - (DiffPhrasebook = DiffPhrasebookSwe), (Syntax = SyntaxSwe), (Symbolic = SymbolicSwe), (Lexicon = LexiconSwe) ; diff --git a/examples/phrasebook/Words.gf b/examples/phrasebook/Words.gf index 6d5cf91b0..0be56f24e 100644 --- a/examples/phrasebook/Words.gf +++ b/examples/phrasebook/Words.gf @@ -45,4 +45,7 @@ abstract Words = Sentences ** { PropOpenDay : Place -> Day -> Proposition ; PropClosedDay : Place -> Day -> Proposition ; + HowMuchCost : Item -> Question ; -- how much does the pizza cost + ItCost : Item -> Price -> Proposition ; -- the pizza costs five euros + } diff --git a/examples/phrasebook/WordsEng.gf b/examples/phrasebook/WordsEng.gf index 0b854c814..ab0d6ce99 100644 --- a/examples/phrasebook/WordsEng.gf +++ b/examples/phrasebook/WordsEng.gf @@ -78,6 +78,9 @@ concrete WordsEng of Words = SentencesEng ** PropOpenDay p d = mkCl p.name (mkVP (mkVP open_Adv) d.habitual) ; PropClosedDay p d = mkCl p.name (mkVP (mkVP closed_Adv) d.habitual) ; + HowMuchCost item = mkQS (mkQCl how8much_IAdv (mkCl item IrregEng.cost_V)) ; + ItCost item price = mkCl item (mkV2 IrregEng.cost_V) price ; + oper mkNat : Str -> Str -> {lang : NP ; prop : A ; country : NP} = \nat,co -> {lang = mkNP (mkPN nat) ; prop = mkA nat ; country = mkNP (mkPN co)} ; diff --git a/examples/phrasebook/WordsFin.gf b/examples/phrasebook/WordsFin.gf index 1bd93d940..f37b9b45b 100644 --- a/examples/phrasebook/WordsFin.gf +++ b/examples/phrasebook/WordsFin.gf @@ -3,7 +3,7 @@ concrete WordsFin of Words = SentencesFin ** open SyntaxFin, ParadigmsFin, (L = LangFin), - DiffPhrasebookFin, Prelude, (E = ExtraFin) in { + Prelude, (E = ExtraFin) in { lin Wine = mkCN (mkN "viini") ; Beer = mkCN (mkN "olut" "oluita") ; @@ -61,7 +61,7 @@ concrete WordsFin of Words = SentencesFin ** Saturday = let d = "lauantai" in mkDay (mkPN d) (d + "sin") ; Sunday = let d = "sunnuntai" in mkDay (mkPN d) (d + "sin") ; - AWant p obj = mkCl p.name want_V2 obj ; + AWant p obj = mkCl p.name (mkV2 "haluta") obj ; ALike p item = mkCl p.name L.like_V2 item ; ASpeak p lang = mkCl p.name (mkV2 (mkV "puhua") partitive) lang ; ALove p q = mkCl p.name (mkV2 (mkV "rakastaa") partitive) q.name ; @@ -86,6 +86,9 @@ concrete WordsFin of Words = SentencesFin ** PropOpenDay p d = mkCl p.name (mkVP (mkVP open_Adv) d.habitual) ; PropClosedDay p d = mkCl p.name (mkVP (mkVP closed_Adv) d.habitual) ; + HowMuchCost item = mkQS (mkQCl how8much_IAdv (mkCl item (mkV "maksaa"))) ; + ItCost item price = mkCl item (mkV2 (mkV "maksaa")) price ; + oper mkNat : PN -> PN -> A -> {lang : NP ; prop : A ; country : NP} = \nat,co,pro -> diff --git a/examples/phrasebook/WordsFre.gf b/examples/phrasebook/WordsFre.gf index b61afdb14..6f0e7f152 100644 --- a/examples/phrasebook/WordsFre.gf +++ b/examples/phrasebook/WordsFre.gf @@ -2,7 +2,6 @@ concrete WordsFre of Words = SentencesFre ** open SyntaxFre, - DiffPhrasebookFre, IrregFre, (E = ExtraFre), ParadigmsFre, @@ -59,7 +58,7 @@ Good = prefixA (mkA "bon" "bonne" "bons" "bien") ; Saturday = mkDay "samedi" ; Sunday = mkDay "dimanche" ; - AWant p obj = mkCl p.name want_V2 obj ; + AWant p obj = mkCl p.name vouloir_V2 obj ; ALike p item = mkCl item plaire_V2 p.name ; ASpeak p lang = mkCl p.name (mkV2 (mkV "parler")) lang ; ALove p q = mkCl p.name (mkV2 (mkV "aimer")) q.name ; @@ -86,6 +85,9 @@ Good = prefixA (mkA "bon" "bonne" "bons" "bien") ; PropOpenDay p d = mkCl p.name (mkVP (mkVP open_A) d.habitual) ; PropClosedDay p d = mkCl p.name (mkVP (mkVP closed_A) d.habitual) ; + HowMuchCost item = mkQS (mkQCl how8much_IAdv (mkCl item (mkV "coûter"))) ; + ItCost item price = mkCl item (mkV2 (mkV "coûter")) price ; + oper mkNat : Str -> Str -> {lang : NP ; prop : A ; country : NP} = \nat,co -> {lang = mkNP (mkPN nat) ; prop = mkA nat ; country = mkNP (mkPN co)} ; diff --git a/examples/phrasebook/WordsIta.gf b/examples/phrasebook/WordsIta.gf index be120355d..a2fb1c882 100644 --- a/examples/phrasebook/WordsIta.gf +++ b/examples/phrasebook/WordsIta.gf @@ -2,7 +2,6 @@ concrete WordsIta of Words = SentencesIta ** open SyntaxIta, - DiffPhrasebookIta, BeschIta, (E = ExtraIta), (L = LexiconIta), @@ -60,7 +59,7 @@ Good = prefixA (mkA "buono" "buona" "buoni" "buone" "bene") ; Saturday = mkDay "sabato" ; Sunday = mkDay "domenica" ; - AWant p obj = mkCl p.name want_V2 obj ; + AWant p obj = mkCl p.name (mkV2 (mkV (volere_96 "volere"))) obj ; ALike p item = mkCl item (mkV2 (mkV (piacere_64 "piacere")) dative) p.name ; ASpeak p lang = mkCl p.name (mkV2 (mkV "parlare")) lang ; ALove p q = mkCl p.name (mkV2 (mkV "amare")) q.name ; @@ -87,6 +86,9 @@ Good = prefixA (mkA "buono" "buona" "buoni" "buone" "bene") ; PropOpenDay p d = mkCl p.name (mkVP (mkVP open_A) d.habitual) ; PropClosedDay p d = mkCl p.name (mkVP (mkVP closed_A) d.habitual) ; + HowMuchCost item = mkQS (mkQCl how8much_IAdv (mkCl item (mkV "costare"))) ; + ItCost item price = mkCl item (mkV2 (mkV "costare")) price ; + oper mkNat : Str -> Str -> {lang : NP ; prop : A ; country : NP} = \nat,co -> {lang = mkNP (mkPN nat) ; prop = mkA nat ; country = mkNP (mkPN co)} ; diff --git a/examples/phrasebook/WordsRon.gf b/examples/phrasebook/WordsRon.gf index edf27ad11..997848125 100644 --- a/examples/phrasebook/WordsRon.gf +++ b/examples/phrasebook/WordsRon.gf @@ -3,8 +3,7 @@ concrete WordsRon of Words = SentencesRon ** open SyntaxRon, ParadigmsRon, - BeschRon, - DiffPhrasebookRon in + BeschRon in { flags coding=utf8 ; @@ -42,8 +41,8 @@ Good = mkA "bun" "bună" "buni" "bune" "bine" ; -- Romanian = SyntaxRon.mkNP (mkPN "română") ; ---- ? -- Swedish = mkNP (mkPN "suédois") ; - AWant p obj = mkCl p.name want_V2 obj ; - ALike p item = mkCl p.name like_V2 item ; + AWant p obj = mkCl p.name (dirV2 (lin V want_VV)) obj ; + ALike p item = mkCl p.name (dirV2 (v_besch71 "plăcea")) item ; ASpeak p lang = mkCl p.name (dirV2 (mkV "vorbi")) lang ; ALove p q = mkCl p.name (dirV2 (mkV "iubi")) q.name ; AUnderstand p = mkCl p.name (v_besch83 "înÅ£elege") ; @@ -53,7 +52,6 @@ Good = mkA "bun" "bună" "buni" "bune" "bine" ; -- ATired p = mkCl p (mkA "stanco") ; -- AScared p = mkCl p (E.ComplCN have_V2 (mkCN (mkN "paura" feminine))) ; - {- GImHungry = ss "mi-e foame" ; GImThirsty = ss "mi-e sete" ; @@ -61,6 +59,9 @@ Good = mkA "bun" "bună" "buni" "bune" "bine" ; GImScared = ss "mi-e frică" ; -} + HowMuchCost item = mkQS (mkQCl how8much_IAdv (mkCl item (v_besch18 "costa"))) ; + ItCost item price = mkCl item (dirV2 (v_besch18 "costa")) price ; + oper mkPlace : N -> Prep -> {name : CN ; at : Prep ; to : Prep} = \p,i -> { name = mkCN p ; diff --git a/examples/phrasebook/WordsSwe.gf b/examples/phrasebook/WordsSwe.gf index e70deeec0..02672f541 100644 --- a/examples/phrasebook/WordsSwe.gf +++ b/examples/phrasebook/WordsSwe.gf @@ -77,6 +77,9 @@ concrete WordsSwe of Words = SentencesSwe ** PropOpenDay p d = mkCl p.name (mkVP (mkVP open_A) d.habitual) ; PropClosedDay p d = mkCl p.name (mkVP (mkVP closed_A) d.habitual) ; + HowMuchCost item = mkQS (mkQCl how8much_IAdv (mkCl item (mkV "kosta"))) ; + ItCost item price = mkCl item (mkV2 (mkV "kosta")) price ; + oper mkNat : Str -> Str -> {lang : NP ; prop : A ; country : NP} = \nat,co -> {lang = mkNP (mkPN (nat + "a")) ; diff --git a/examples/phrasebook/pgraph.png b/examples/phrasebook/pgraph.png index c7be64c86..72f294297 100644 Binary files a/examples/phrasebook/pgraph.png and b/examples/phrasebook/pgraph.png differ diff --git a/examples/phrasebook/phrasebook.html b/examples/phrasebook/phrasebook.html index 3a37aadfe..e77a12d46 100644 --- a/examples/phrasebook/phrasebook.html +++ b/examples/phrasebook/phrasebook.html @@ -17,10 +17,10 @@ History

@@ -117,9 +117,6 @@ Separate concrete syntaxes. Separate concrete syntaxes.

-DiffPhrasebook: the (so far small) interface for Sentences. -

-

DisambPhrasebook: disambiguation grammars generating feedback phrases if the input language is ambiguous.

@@ -128,7 +125,7 @@ Here is the module structure as produced by

     > i -retain DisambPhrasebookEng.gf
-    > dg -only=Phrasebook*,Sentences*,Words*,Greetings*,DiffP*,DisambPhrasebookEng
+    > dg -only=Phrasebook*,Sentences*,Words*,Greetings*,DisambPhrasebookEng
     > ! dot -Tpng _gfdepgraph.dot >pgraph.png
 

diff --git a/examples/phrasebook/phrasebook.txt b/examples/phrasebook/phrasebook.txt index 73b3efe73..dd9ac82f2 100644 --- a/examples/phrasebook/phrasebook.txt +++ b/examples/phrasebook/phrasebook.txt @@ -13,10 +13,10 @@ Aarne Ranta #BSMALL History -- 26 March 2010. Version 0.1: Eng, Fin, Fre, Ron; dedicated minibar UI. -- 28 March. Version 0.2: Swe, Ita; cat Action; small phrases. -- 30 March. Version 0.3: disambiguation grammar for English - 6 April. Version 0.4: weekdays, nationalities +- 30 March. Version 0.3: disambiguation grammar for English +- 28 March. Version 0.2: Swe, Ita; cat Action; small phrases. +- 26 March 2010. Version 0.1: Eng, Fin, Fre, Ron; dedicated minibar UI. [Missing constructs missing.txt] @@ -99,15 +99,13 @@ Separate concrete syntaxes. ``Phrasebook``: the top module putting everything together. Separate concrete syntaxes. -``DiffPhrasebook``: the (so far small) interface for ``Sentences``. - ``DisambPhrasebook``: disambiguation grammars generating feedback phrases if the input language is ambiguous. Here is the module structure as produced by ``` > i -retain DisambPhrasebookEng.gf - > dg -only=Phrasebook*,Sentences*,Words*,Greetings*,DiffP*,DisambPhrasebookEng + > dg -only=Phrasebook*,Sentences*,Words*,Greetings*,DisambPhrasebookEng > ! dot -Tpng _gfdepgraph.dot >pgraph.png ```