diff --git a/book/examples/chapter2/Copy.gf b/gf-book/examples/chapter2/Copy.gf similarity index 100% rename from book/examples/chapter2/Copy.gf rename to gf-book/examples/chapter2/Copy.gf diff --git a/book/examples/chapter2/CopyAbs.gf b/gf-book/examples/chapter2/CopyAbs.gf similarity index 100% rename from book/examples/chapter2/CopyAbs.gf rename to gf-book/examples/chapter2/CopyAbs.gf diff --git a/book/examples/chapter2/Food.gf b/gf-book/examples/chapter2/Food.gf similarity index 100% rename from book/examples/chapter2/Food.gf rename to gf-book/examples/chapter2/Food.gf diff --git a/book/examples/chapter2/Food.probs b/gf-book/examples/chapter2/Food.probs similarity index 100% rename from book/examples/chapter2/Food.probs rename to gf-book/examples/chapter2/Food.probs diff --git a/book/examples/chapter2/FoodEng.gf b/gf-book/examples/chapter2/FoodEng.gf similarity index 100% rename from book/examples/chapter2/FoodEng.gf rename to gf-book/examples/chapter2/FoodEng.gf diff --git a/book/examples/chapter2/FoodHin.gf b/gf-book/examples/chapter2/FoodHin.gf similarity index 100% rename from book/examples/chapter2/FoodHin.gf rename to gf-book/examples/chapter2/FoodHin.gf diff --git a/book/examples/chapter2/FoodIta.gf b/gf-book/examples/chapter2/FoodIta.gf similarity index 100% rename from book/examples/chapter2/FoodIta.gf rename to gf-book/examples/chapter2/FoodIta.gf diff --git a/book/examples/chapter2/Letters.gf b/gf-book/examples/chapter2/Letters.gf similarity index 100% rename from book/examples/chapter2/Letters.gf rename to gf-book/examples/chapter2/Letters.gf diff --git a/book/examples/chapter2/LettersCnc.gf b/gf-book/examples/chapter2/LettersCnc.gf similarity index 100% rename from book/examples/chapter2/LettersCnc.gf rename to gf-book/examples/chapter2/LettersCnc.gf diff --git a/book/examples/chapter2/Strings.gf b/gf-book/examples/chapter2/Strings.gf similarity index 100% rename from book/examples/chapter2/Strings.gf rename to gf-book/examples/chapter2/Strings.gf diff --git a/book/examples/chapter2/StringsBW.gf b/gf-book/examples/chapter2/StringsBW.gf similarity index 100% rename from book/examples/chapter2/StringsBW.gf rename to gf-book/examples/chapter2/StringsBW.gf diff --git a/book/examples/chapter2/StringsFW.gf b/gf-book/examples/chapter2/StringsFW.gf similarity index 100% rename from book/examples/chapter2/StringsFW.gf rename to gf-book/examples/chapter2/StringsFW.gf diff --git a/book/examples/chapter2/Ticket.gf b/gf-book/examples/chapter2/Ticket.gf similarity index 100% rename from book/examples/chapter2/Ticket.gf rename to gf-book/examples/chapter2/Ticket.gf diff --git a/book/examples/chapter2/TicketEng.gf b/gf-book/examples/chapter2/TicketEng.gf similarity index 100% rename from book/examples/chapter2/TicketEng.gf rename to gf-book/examples/chapter2/TicketEng.gf diff --git a/book/examples/chapter2/foodEng.cf b/gf-book/examples/chapter2/foodEng.cf similarity index 100% rename from book/examples/chapter2/foodEng.cf rename to gf-book/examples/chapter2/foodEng.cf diff --git a/book/examples/chapter2/foodIta.cf b/gf-book/examples/chapter2/foodIta.cf similarity index 100% rename from book/examples/chapter2/foodIta.cf rename to gf-book/examples/chapter2/foodIta.cf diff --git a/book/examples/chapter3/Arabic.gf b/gf-book/examples/chapter3/Arabic.gf similarity index 100% rename from book/examples/chapter3/Arabic.gf rename to gf-book/examples/chapter3/Arabic.gf diff --git a/book/examples/chapter3/Discont.gf b/gf-book/examples/chapter3/Discont.gf similarity index 100% rename from book/examples/chapter3/Discont.gf rename to gf-book/examples/chapter3/Discont.gf diff --git a/book/examples/chapter3/DiscontEng.gf b/gf-book/examples/chapter3/DiscontEng.gf similarity index 100% rename from book/examples/chapter3/DiscontEng.gf rename to gf-book/examples/chapter3/DiscontEng.gf diff --git a/book/examples/chapter3/Foods.gf b/gf-book/examples/chapter3/Foods.gf similarity index 100% rename from book/examples/chapter3/Foods.gf rename to gf-book/examples/chapter3/Foods.gf diff --git a/book/examples/chapter3/FoodsEng.gf b/gf-book/examples/chapter3/FoodsEng.gf similarity index 100% rename from book/examples/chapter3/FoodsEng.gf rename to gf-book/examples/chapter3/FoodsEng.gf diff --git a/book/examples/chapter3/FoodsIta.gf b/gf-book/examples/chapter3/FoodsIta.gf similarity index 100% rename from book/examples/chapter3/FoodsIta.gf rename to gf-book/examples/chapter3/FoodsIta.gf diff --git a/book/examples/chapter3/ResIta.gf b/gf-book/examples/chapter3/ResIta.gf similarity index 100% rename from book/examples/chapter3/ResIta.gf rename to gf-book/examples/chapter3/ResIta.gf diff --git a/book/examples/chapter4/Clothes.gf b/gf-book/examples/chapter4/Clothes.gf similarity index 100% rename from book/examples/chapter4/Clothes.gf rename to gf-book/examples/chapter4/Clothes.gf diff --git a/book/examples/chapter4/ClothesEng.gf b/gf-book/examples/chapter4/ClothesEng.gf similarity index 100% rename from book/examples/chapter4/ClothesEng.gf rename to gf-book/examples/chapter4/ClothesEng.gf diff --git a/book/examples/chapter4/ClothesIta.gf b/gf-book/examples/chapter4/ClothesIta.gf similarity index 100% rename from book/examples/chapter4/ClothesIta.gf rename to gf-book/examples/chapter4/ClothesIta.gf diff --git a/book/examples/chapter4/Comment.gf b/gf-book/examples/chapter4/Comment.gf similarity index 100% rename from book/examples/chapter4/Comment.gf rename to gf-book/examples/chapter4/Comment.gf diff --git a/book/examples/chapter4/Comments.gf b/gf-book/examples/chapter4/Comments.gf similarity index 100% rename from book/examples/chapter4/Comments.gf rename to gf-book/examples/chapter4/Comments.gf diff --git a/book/examples/chapter4/CommentsEng.gf b/gf-book/examples/chapter4/CommentsEng.gf similarity index 100% rename from book/examples/chapter4/CommentsEng.gf rename to gf-book/examples/chapter4/CommentsEng.gf diff --git a/book/examples/chapter4/CommentsI.gf b/gf-book/examples/chapter4/CommentsI.gf similarity index 100% rename from book/examples/chapter4/CommentsI.gf rename to gf-book/examples/chapter4/CommentsI.gf diff --git a/book/examples/chapter4/CommentsIta.gf b/gf-book/examples/chapter4/CommentsIta.gf similarity index 100% rename from book/examples/chapter4/CommentsIta.gf rename to gf-book/examples/chapter4/CommentsIta.gf diff --git a/book/examples/chapter4/Computers.gf b/gf-book/examples/chapter4/Computers.gf similarity index 100% rename from book/examples/chapter4/Computers.gf rename to gf-book/examples/chapter4/Computers.gf diff --git a/book/examples/chapter4/ComputersEng.gf b/gf-book/examples/chapter4/ComputersEng.gf similarity index 100% rename from book/examples/chapter4/ComputersEng.gf rename to gf-book/examples/chapter4/ComputersEng.gf diff --git a/book/examples/chapter4/ComputersIta.gf b/gf-book/examples/chapter4/ComputersIta.gf similarity index 100% rename from book/examples/chapter4/ComputersIta.gf rename to gf-book/examples/chapter4/ComputersIta.gf diff --git a/book/examples/chapter4/DefArtGer.gf b/gf-book/examples/chapter4/DefArtGer.gf similarity index 100% rename from book/examples/chapter4/DefArtGer.gf rename to gf-book/examples/chapter4/DefArtGer.gf diff --git a/book/examples/chapter4/Foods.gf b/gf-book/examples/chapter4/Foods.gf similarity index 100% rename from book/examples/chapter4/Foods.gf rename to gf-book/examples/chapter4/Foods.gf diff --git a/book/examples/chapter4/FoodsEng.gf b/gf-book/examples/chapter4/FoodsEng.gf similarity index 100% rename from book/examples/chapter4/FoodsEng.gf rename to gf-book/examples/chapter4/FoodsEng.gf diff --git a/book/examples/chapter4/FoodsIta.gf b/gf-book/examples/chapter4/FoodsIta.gf similarity index 100% rename from book/examples/chapter4/FoodsIta.gf rename to gf-book/examples/chapter4/FoodsIta.gf diff --git a/book/examples/chapter4/Shopping.gf b/gf-book/examples/chapter4/Shopping.gf similarity index 100% rename from book/examples/chapter4/Shopping.gf rename to gf-book/examples/chapter4/Shopping.gf diff --git a/book/examples/chapter4/ShoppingEng.gf b/gf-book/examples/chapter4/ShoppingEng.gf similarity index 100% rename from book/examples/chapter4/ShoppingEng.gf rename to gf-book/examples/chapter4/ShoppingEng.gf diff --git a/book/examples/chapter4/ShoppingIta.gf b/gf-book/examples/chapter4/ShoppingIta.gf similarity index 100% rename from book/examples/chapter4/ShoppingIta.gf rename to gf-book/examples/chapter4/ShoppingIta.gf diff --git a/book/examples/chapter4/SmallShopping.gf b/gf-book/examples/chapter4/SmallShopping.gf similarity index 100% rename from book/examples/chapter4/SmallShopping.gf rename to gf-book/examples/chapter4/SmallShopping.gf diff --git a/book/examples/chapter5/Foods.gf b/gf-book/examples/chapter5/Foods.gf similarity index 100% rename from book/examples/chapter5/Foods.gf rename to gf-book/examples/chapter5/Foods.gf diff --git a/book/examples/chapter5/FoodsCat.gf b/gf-book/examples/chapter5/FoodsCat.gf similarity index 100% rename from book/examples/chapter5/FoodsCat.gf rename to gf-book/examples/chapter5/FoodsCat.gf diff --git a/book/examples/chapter5/FoodsEng.gf b/gf-book/examples/chapter5/FoodsEng.gf similarity index 100% rename from book/examples/chapter5/FoodsEng.gf rename to gf-book/examples/chapter5/FoodsEng.gf diff --git a/book/examples/chapter5/FoodsFin.gf b/gf-book/examples/chapter5/FoodsFin.gf similarity index 100% rename from book/examples/chapter5/FoodsFin.gf rename to gf-book/examples/chapter5/FoodsFin.gf diff --git a/book/examples/chapter5/FoodsGer.gf b/gf-book/examples/chapter5/FoodsGer.gf similarity index 100% rename from book/examples/chapter5/FoodsGer.gf rename to gf-book/examples/chapter5/FoodsGer.gf diff --git a/book/examples/chapter5/FoodsI.gf b/gf-book/examples/chapter5/FoodsI.gf similarity index 100% rename from book/examples/chapter5/FoodsI.gf rename to gf-book/examples/chapter5/FoodsI.gf diff --git a/book/examples/chapter5/FoodsIta.gf b/gf-book/examples/chapter5/FoodsIta.gf similarity index 100% rename from book/examples/chapter5/FoodsIta.gf rename to gf-book/examples/chapter5/FoodsIta.gf diff --git a/book/examples/chapter5/FoodsSwe.gf b/gf-book/examples/chapter5/FoodsSwe.gf similarity index 100% rename from book/examples/chapter5/FoodsSwe.gf rename to gf-book/examples/chapter5/FoodsSwe.gf diff --git a/book/examples/chapter5/LexFoods.gf b/gf-book/examples/chapter5/LexFoods.gf similarity index 100% rename from book/examples/chapter5/LexFoods.gf rename to gf-book/examples/chapter5/LexFoods.gf diff --git a/book/examples/chapter5/LexFoodsCat.gf b/gf-book/examples/chapter5/LexFoodsCat.gf similarity index 100% rename from book/examples/chapter5/LexFoodsCat.gf rename to gf-book/examples/chapter5/LexFoodsCat.gf diff --git a/book/examples/chapter5/LexFoodsEng.gf b/gf-book/examples/chapter5/LexFoodsEng.gf similarity index 100% rename from book/examples/chapter5/LexFoodsEng.gf rename to gf-book/examples/chapter5/LexFoodsEng.gf diff --git a/book/examples/chapter5/LexFoodsFin.gf b/gf-book/examples/chapter5/LexFoodsFin.gf similarity index 100% rename from book/examples/chapter5/LexFoodsFin.gf rename to gf-book/examples/chapter5/LexFoodsFin.gf diff --git a/book/examples/chapter5/LexFoodsGer.gf b/gf-book/examples/chapter5/LexFoodsGer.gf similarity index 100% rename from book/examples/chapter5/LexFoodsGer.gf rename to gf-book/examples/chapter5/LexFoodsGer.gf diff --git a/book/examples/chapter5/LexFoodsIta.gf b/gf-book/examples/chapter5/LexFoodsIta.gf similarity index 100% rename from book/examples/chapter5/LexFoodsIta.gf rename to gf-book/examples/chapter5/LexFoodsIta.gf diff --git a/book/examples/chapter5/LexFoodsSwe.gf b/gf-book/examples/chapter5/LexFoodsSwe.gf similarity index 100% rename from book/examples/chapter5/LexFoodsSwe.gf rename to gf-book/examples/chapter5/LexFoodsSwe.gf diff --git a/book/examples/chapter6/Aggregation.gf b/gf-book/examples/chapter6/Aggregation.gf similarity index 100% rename from book/examples/chapter6/Aggregation.gf rename to gf-book/examples/chapter6/Aggregation.gf diff --git a/book/examples/chapter6/AggregationEng.gf b/gf-book/examples/chapter6/AggregationEng.gf similarity index 100% rename from book/examples/chapter6/AggregationEng.gf rename to gf-book/examples/chapter6/AggregationEng.gf diff --git a/book/examples/chapter6/Arithm.gf b/gf-book/examples/chapter6/Arithm.gf similarity index 100% rename from book/examples/chapter6/Arithm.gf rename to gf-book/examples/chapter6/Arithm.gf diff --git a/book/examples/chapter6/Bin.gf b/gf-book/examples/chapter6/Bin.gf similarity index 100% rename from book/examples/chapter6/Bin.gf rename to gf-book/examples/chapter6/Bin.gf diff --git a/book/examples/chapter6/Classes.gf b/gf-book/examples/chapter6/Classes.gf similarity index 100% rename from book/examples/chapter6/Classes.gf rename to gf-book/examples/chapter6/Classes.gf diff --git a/book/examples/chapter6/ClassesEng.gf b/gf-book/examples/chapter6/ClassesEng.gf similarity index 100% rename from book/examples/chapter6/ClassesEng.gf rename to gf-book/examples/chapter6/ClassesEng.gf diff --git a/book/examples/chapter6/DShopping.gf b/gf-book/examples/chapter6/DShopping.gf similarity index 100% rename from book/examples/chapter6/DShopping.gf rename to gf-book/examples/chapter6/DShopping.gf diff --git a/book/examples/chapter6/DShoppingEng.gf b/gf-book/examples/chapter6/DShoppingEng.gf similarity index 100% rename from book/examples/chapter6/DShoppingEng.gf rename to gf-book/examples/chapter6/DShoppingEng.gf diff --git a/book/examples/chapter6/Nat.gf b/gf-book/examples/chapter6/Nat.gf similarity index 100% rename from book/examples/chapter6/Nat.gf rename to gf-book/examples/chapter6/Nat.gf diff --git a/book/examples/chapter6/Smart.gf b/gf-book/examples/chapter6/Smart.gf similarity index 100% rename from book/examples/chapter6/Smart.gf rename to gf-book/examples/chapter6/Smart.gf diff --git a/book/examples/chapter6/Verbs.gf b/gf-book/examples/chapter6/Verbs.gf similarity index 100% rename from book/examples/chapter6/Verbs.gf rename to gf-book/examples/chapter6/Verbs.gf diff --git a/book/examples/chapter6/VerbsEng.gf b/gf-book/examples/chapter6/VerbsEng.gf similarity index 100% rename from book/examples/chapter6/VerbsEng.gf rename to gf-book/examples/chapter6/VerbsEng.gf diff --git a/book/examples/chapter7/Map.gf b/gf-book/examples/chapter7/Map.gf similarity index 100% rename from book/examples/chapter7/Map.gf rename to gf-book/examples/chapter7/Map.gf diff --git a/book/examples/chapter7/MapEng.gf b/gf-book/examples/chapter7/MapEng.gf similarity index 100% rename from book/examples/chapter7/MapEng.gf rename to gf-book/examples/chapter7/MapEng.gf diff --git a/book/examples/chapter7/Query.gf b/gf-book/examples/chapter7/Query.gf similarity index 100% rename from book/examples/chapter7/Query.gf rename to gf-book/examples/chapter7/Query.gf diff --git a/book/examples/chapter7/QueryEng.gf b/gf-book/examples/chapter7/QueryEng.gf similarity index 100% rename from book/examples/chapter7/QueryEng.gf rename to gf-book/examples/chapter7/QueryEng.gf diff --git a/book/examples/chapter7/QueryFin.gf b/gf-book/examples/chapter7/QueryFin.gf similarity index 100% rename from book/examples/chapter7/QueryFin.gf rename to gf-book/examples/chapter7/QueryFin.gf diff --git a/book/examples/chapter8/Calculator.gf b/gf-book/examples/chapter8/Calculator.gf similarity index 100% rename from book/examples/chapter8/Calculator.gf rename to gf-book/examples/chapter8/Calculator.gf diff --git a/book/examples/chapter8/CalculatorC.gf b/gf-book/examples/chapter8/CalculatorC.gf similarity index 100% rename from book/examples/chapter8/CalculatorC.gf rename to gf-book/examples/chapter8/CalculatorC.gf diff --git a/book/examples/chapter8/CalculatorJ.gf b/gf-book/examples/chapter8/CalculatorJ.gf similarity index 100% rename from book/examples/chapter8/CalculatorJ.gf rename to gf-book/examples/chapter8/CalculatorJ.gf diff --git a/book/examples/chapter8/CalculatorP.gf b/gf-book/examples/chapter8/CalculatorP.gf similarity index 100% rename from book/examples/chapter8/CalculatorP.gf rename to gf-book/examples/chapter8/CalculatorP.gf diff --git a/book/examples/chapter8/CalculatorS.gf b/gf-book/examples/chapter8/CalculatorS.gf similarity index 100% rename from book/examples/chapter8/CalculatorS.gf rename to gf-book/examples/chapter8/CalculatorS.gf diff --git a/book/examples/chapter8/Geometry.gf b/gf-book/examples/chapter8/Geometry.gf similarity index 100% rename from book/examples/chapter8/Geometry.gf rename to gf-book/examples/chapter8/Geometry.gf diff --git a/book/examples/chapter8/GeometryEng.gf b/gf-book/examples/chapter8/GeometryEng.gf similarity index 100% rename from book/examples/chapter8/GeometryEng.gf rename to gf-book/examples/chapter8/GeometryEng.gf diff --git a/book/examples/chapter8/GeometryEngb.gf b/gf-book/examples/chapter8/GeometryEngb.gf similarity index 100% rename from book/examples/chapter8/GeometryEngb.gf rename to gf-book/examples/chapter8/GeometryEngb.gf diff --git a/book/examples/chapter8/Geometryb.gf b/gf-book/examples/chapter8/Geometryb.gf similarity index 100% rename from book/examples/chapter8/Geometryb.gf rename to gf-book/examples/chapter8/Geometryb.gf diff --git a/book/examples/chapter8/Graftal.gf b/gf-book/examples/chapter8/Graftal.gf similarity index 100% rename from book/examples/chapter8/Graftal.gf rename to gf-book/examples/chapter8/Graftal.gf diff --git a/book/examples/chapter8/Logic.gf b/gf-book/examples/chapter8/Logic.gf similarity index 100% rename from book/examples/chapter8/Logic.gf rename to gf-book/examples/chapter8/Logic.gf diff --git a/book/examples/chapter8/LogicBEng.gf b/gf-book/examples/chapter8/LogicBEng.gf similarity index 100% rename from book/examples/chapter8/LogicBEng.gf rename to gf-book/examples/chapter8/LogicBEng.gf diff --git a/book/examples/chapter8/LogicEng.gf b/gf-book/examples/chapter8/LogicEng.gf similarity index 100% rename from book/examples/chapter8/LogicEng.gf rename to gf-book/examples/chapter8/LogicEng.gf diff --git a/book/examples/chapter8/Logicb.gf b/gf-book/examples/chapter8/Logicb.gf similarity index 100% rename from book/examples/chapter8/Logicb.gf rename to gf-book/examples/chapter8/Logicb.gf diff --git a/book/examples/chapter8/Sierpinski.gf b/gf-book/examples/chapter8/Sierpinski.gf similarity index 100% rename from book/examples/chapter8/Sierpinski.gf rename to gf-book/examples/chapter8/Sierpinski.gf diff --git a/book/examples/chapter9/Anaphora.gf b/gf-book/examples/chapter9/Anaphora.gf similarity index 100% rename from book/examples/chapter9/Anaphora.gf rename to gf-book/examples/chapter9/Anaphora.gf diff --git a/book/examples/chapter9/AnaphoraIta.gf b/gf-book/examples/chapter9/AnaphoraIta.gf similarity index 100% rename from book/examples/chapter9/AnaphoraIta.gf rename to gf-book/examples/chapter9/AnaphoraIta.gf diff --git a/book/examples/chapter9/Grammar.gf b/gf-book/examples/chapter9/Grammar.gf similarity index 100% rename from book/examples/chapter9/Grammar.gf rename to gf-book/examples/chapter9/Grammar.gf diff --git a/book/examples/chapter9/GrammarIta.gf b/gf-book/examples/chapter9/GrammarIta.gf similarity index 100% rename from book/examples/chapter9/GrammarIta.gf rename to gf-book/examples/chapter9/GrammarIta.gf diff --git a/book/examples/chapter9/Logic.gf b/gf-book/examples/chapter9/Logic.gf similarity index 100% rename from book/examples/chapter9/Logic.gf rename to gf-book/examples/chapter9/Logic.gf diff --git a/book/examples/chapter9/LogicIta.gf b/gf-book/examples/chapter9/LogicIta.gf similarity index 100% rename from book/examples/chapter9/LogicIta.gf rename to gf-book/examples/chapter9/LogicIta.gf diff --git a/book/examples/chapter9/LogicSymb.gf b/gf-book/examples/chapter9/LogicSymb.gf similarity index 100% rename from book/examples/chapter9/LogicSymb.gf rename to gf-book/examples/chapter9/LogicSymb.gf diff --git a/book/examples/chapter9/ParadigmsIta.gf b/gf-book/examples/chapter9/ParadigmsIta.gf similarity index 100% rename from book/examples/chapter9/ParadigmsIta.gf rename to gf-book/examples/chapter9/ParadigmsIta.gf diff --git a/book/examples/chapter9/ResIta.gf b/gf-book/examples/chapter9/ResIta.gf similarity index 100% rename from book/examples/chapter9/ResIta.gf rename to gf-book/examples/chapter9/ResIta.gf diff --git a/book/examples/chapter9/Semantics.gf b/gf-book/examples/chapter9/Semantics.gf similarity index 100% rename from book/examples/chapter9/Semantics.gf rename to gf-book/examples/chapter9/Semantics.gf diff --git a/book/examples/chapter9/SemanticsIta.gf b/gf-book/examples/chapter9/SemanticsIta.gf similarity index 100% rename from book/examples/chapter9/SemanticsIta.gf rename to gf-book/examples/chapter9/SemanticsIta.gf diff --git a/book/examples/chapter9/Syntax.gf b/gf-book/examples/chapter9/Syntax.gf similarity index 100% rename from book/examples/chapter9/Syntax.gf rename to gf-book/examples/chapter9/Syntax.gf diff --git a/book/examples/chapter9/SyntaxIta.gf b/gf-book/examples/chapter9/SyntaxIta.gf similarity index 100% rename from book/examples/chapter9/SyntaxIta.gf rename to gf-book/examples/chapter9/SyntaxIta.gf diff --git a/book/examples/chapter9/Test.gf b/gf-book/examples/chapter9/Test.gf similarity index 100% rename from book/examples/chapter9/Test.gf rename to gf-book/examples/chapter9/Test.gf diff --git a/book/examples/chapter9/TestIta.gf b/gf-book/examples/chapter9/TestIta.gf similarity index 100% rename from book/examples/chapter9/TestIta.gf rename to gf-book/examples/chapter9/TestIta.gf diff --git a/book/examples/chapter9/TestSemantics.gf b/gf-book/examples/chapter9/TestSemantics.gf similarity index 100% rename from book/examples/chapter9/TestSemantics.gf rename to gf-book/examples/chapter9/TestSemantics.gf diff --git a/book/examples/chapter9/TestSemanticsIta.gf b/gf-book/examples/chapter9/TestSemanticsIta.gf similarity index 100% rename from book/examples/chapter9/TestSemanticsIta.gf rename to gf-book/examples/chapter9/TestSemanticsIta.gf diff --git a/gf-book/index.html b/gf-book/index.html new file mode 100644 index 000000000..9c7a805fe --- /dev/null +++ b/gf-book/index.html @@ -0,0 +1,127 @@ + + +
+ ++This is the web page of the book +
++Grammars of natural languages are complex systems, and their +computer implementation requires both programming skills and +linguistic knowledge, especially when dealing with other languages +than English. This book makes such tasks accessible for a wide +range of programmers. It introduces GF (Grammatical Framework), +which is a programming language designed for writing grammars, which +may moreover address several languages in parallel. +The book shows how to write grammars in GF and use them in applications +such as tourist phrasebooks, spoken dialogue systems, and natural +language interfaces. The examples and exercises address several +languages, and the readers are guided to look at their own languages +from the computational perspective. +
++With an emphasis on good engineering, the book promotes modularity +and division of labour - in particular, the use of libraries. It +introduces the GF Resource Grammar Library, which currently addresses +16 languages. This number is constantly growing due to contributions +from the international GF community. The library makes it painless to +build applications and to port them to new languages. The book +introduces a wide range of such applications, which run on platforms +ranging from web servers to mobile phones. But the book also gives +guidance for those readers who want to understand the underlying +linguistics and implement resource grammars for new languages. +
++The book starts with a hands-on tutorial, continues with a selection +of advanced topics, and ends with a complete reference manual +of GF. Requiring very little background knowledge, it is accessible +for second-year students that have experience with computers and an +interest for languages. At the same time, its novel and advanced +material makes it interesting for senior researchers in computer science, +linguistics, and related fields. +
++Forthcoming at http://www-csli.stanford.edu/pubs/ +
+
+ @Book{ranta-2011,
+ author = {Aarne Ranta},
+ title = {{Grammatical Framework:
+ Programming with Multilingual Grammars}},
+ publisher = {{CSLI Publications}},
+ year = {2011},
+ note = "to appear"
+ }
+
+
++Preliminary Table of Contents +
++Slides for teaching the book chapter by chapter are forthcoming. +The following should be useful before that. +
++Demos +
++Works mentioned in references, +download links to more works forthcoming. +
++Resource Grammar Library API +
++Sources and binaries +for GF 3.2, which exactly matches the book. +
++GF Home Page: http://www.grammaticalframework.org/ +
++Author's email: aarne'at'chalmers'dot'se +
++Author's home page: http://www.cse.chalmers.se/~aarne/ +
+ + + + diff --git a/gf-book/index.txt b/gf-book/index.txt new file mode 100644 index 000000000..a53ae9882 --- /dev/null +++ b/gf-book/index.txt @@ -0,0 +1,101 @@ +Grammatical Framework: Programming with Multilingual Grammars +Aarne Ranta +**Web page work in progress** + + +This is the web page of the book +- Aarne Ranta, + //Grammatical Framework: Programming with Multilingual Grammars//, + CSLI Publications, + Stanford, + 2011 (to appear). + + +==Book description== + +Grammars of natural languages are complex systems, and their +computer implementation requires both programming skills and +linguistic knowledge, especially when dealing with other languages +than English. This book makes such tasks accessible for a wide +range of programmers. It introduces GF (Grammatical Framework), +which is a programming language designed for writing grammars, which +may moreover address several languages in parallel. +The book shows how to write grammars in GF and use them in applications +such as tourist phrasebooks, spoken dialogue systems, and natural +language interfaces. The examples and exercises address several +languages, and the readers are guided to look at their own languages +from the computational perspective. + +With an emphasis on good engineering, the book promotes modularity +and division of labour - in particular, the use of libraries. It +introduces the GF Resource Grammar Library, which currently addresses +16 languages. This number is constantly growing due to contributions +from the international GF community. The library makes it painless to +build applications and to port them to new languages. The book +introduces a wide range of such applications, which run on platforms +ranging from web servers to mobile phones. But the book also gives +guidance for those readers who want to understand the underlying +linguistics and implement resource grammars for new languages. + +The book starts with a hands-on tutorial, continues with a selection +of advanced topics, and ends with a complete reference manual +of GF. Requiring very little background knowledge, it is accessible +for second-year students that have experience with computers and an +interest for languages. At the same time, its novel and advanced +material makes it interesting for senior researchers in computer science, +linguistics, and related fields. + + +==Publisher's information== + +Forthcoming at http://www-csli.stanford.edu/pubs/ + +==How to cite== + +``` +@Book{ranta-2011, + author = {Aarne Ranta}, + title = {{Grammatical Framework: + Programming with Multilingual Grammars}}, + publisher = {{CSLI Publications}}, + year = {2011}, + note = "to appear" +} +``` + +==Table of Contents== + +[Preliminary Table of Contents toc-gf-book.txt] + + +==Supporting material== + +Slides for teaching the book chapter by chapter are forthcoming. +The following should be useful before that. +- [GF Tutorial ../doc/tutorial/gf-tutorial.html]: programmer-oriented, + covering parts of chapters 2-8 +- [GF Resource Tutorial ../doc/gf-lrec-2010.pdf]: linguist-oriented, + covering parts of chapters 2-5, 9-10 + + +[Code examples ./examples] + +Demos +- [on-line translator http://www.grammaticalframework.org:41296/minibar/minibar.html] (Section 7.12) +- [syntax editor http://www.grammaticalframework.org/demos/resource-api/editor.html] (Section 7.13) +- [multimodal dialogue system http://www.youtube.com/watch?v=1bfaYHWS6zU] (Section 7.15) + + +[Works mentioned in references http://www.grammaticalframework.org/doc/gf-bibliography.html], +download links to more works forthcoming. + +[Resource Grammar Library API http://www.grammaticalframework.org/lib/doc/synopsis.html] + +[Sources and binaries http://www.grammaticalframework.org/download] +for GF 3.2, which exactly matches the book. + +GF Home Page: http://www.grammaticalframework.org/ + +Author's email: aarne'at'chalmers'dot'se + +Author's home page: http://www.cse.chalmers.se/~aarne/ diff --git a/gf-book/toc-gf-book.txt b/gf-book/toc-gf-book.txt new file mode 100644 index 000000000..b46165de7 --- /dev/null +++ b/gf-book/toc-gf-book.txt @@ -0,0 +1,263 @@ +1 Introduction +1.1 What this book is about +1.2 How to use this book +1.3 The role of grammars in language processing +1.4 The cost of grammars +1.5 Multilinguality +1.6 Semantic actions and interoperability +1.7 Application grammars and resource grammars +1.8 History of GF and its applications +1.9 Related work + +part I A GF Tutorial + +2 Basic concepts of multilingual grammars +2.1 The BNF grammar format +2.2 Using the GF system +2.3 Testing a grammar in the GF system +2.4 A BNF grammar for Italian +2.5 BNF grammars and translation +2.6 Abstract and concrete syntax +2.7 Translating in GF +2.8 The structure of grammar modules +2.9 On the limitations of BNF grammars +2.10 Suppression and metavariables +2.11 Free variation +2.12 Ambiguity +2.13 Remaining problems +2.14 Graph-based visualization and shell escapes +2.15 Lexing and unlexing +2.16 Character encoding + +3 Parameters, tables, and records +3.1 The problem of morphological variation +3.2 Parameters and tables +3.3 Variable vs. inherent features +3.4 Records and record types +3.5 Linearization types and agreement +3.6 Functional programming in GF: operation definitions +3.7 The Food grammar revisited +3.8 Testing inflection and operations in GF +3.9 Partial application +3.10 Discontinuous constituents +3.11 Non-concatenative morphology + +4 Modular and scalable grammar writing +4.1 Reusable resource modules +4.2 Data abstraction +4.3 Case expressions and string matching +4.4 Smart paradigms +4.5 Arabic morphology revisited +4.6 Separating operation types and definitions +4.7 Overloading of operations +4.8 Module extension and inheritance +4.9 Inheritance and opening +4.10 Dependency graphs +4.11 Algebraic datatypes for parameters +4.12 Record extension and subtyping +4.13 Tuples and product types +4.14 Prefix-dependent choices and pattern macros +4.15 Strings at compile time vs. run time + +5 Using the Resource Grammar Library +5.1 The purpose and coverage of the library +5.2 Lexical vs. phrasal rules +5.3 Lexical categories and rules +5.4 Phrasal categories and rules +5.5 The resource API +5.6 The library path +5.7 Example: English +5.8 Functor implementation of multilingual grammars +5.9 Interfaces and instances +5.10 A design pattern for multilingual grammars +5.11 Division of labour revisited +5.12 Overriding a functor +5.13 Compile-time transfer +5.14 The resource grammar as a linguistic ontology +5.15 A tour of the resource API +5.16 Flattening of constructions +5.17 Tense and polarity +5.18 Browsing the library + +6 Semantic actions and conditions in abstract syntax +6.1 GF as a logical framework +6.2 Dependent types +6.3 Selectional restrictions +6.4 Polymorphism +6.5 Dependent types in concrete syntax +6.6 Proof objects +6.7 Proof-carrying documents +6.8 Restricted polymorphism +6.9 Variable bindings and higher-order abstract syntax +6.10 Anaphoric expressions +6.11 Semantic definitions +6.12 Intensional and extensional equality +6.13 Semantic actions and run-time transfer +6.14 Predefined categories +6.15 Probabilistic GF grammars + +part II Larger Grammars and Applications + +7 Embedded grammars and code generation +7.1 The portable grammar format +7.2 The embedded interpreter and its API +7.3 Embedded GF applications in Haskell +7.4 The module PGF +7.5 A stand-alone translator +7.6 A translator loop +7.7 A question-answer system +7.8 Exporting GF datatypes +7.9 Putting it all together +7.10 Web server applications +7.11 Embedded grammars in other host languages +7.12 Multilingual syntax editing +7.13 Language models for speech recognition +7.14 Statistical language models +7.15 Multimodal dialogue systems + +8 Interfacing formal and natural languages +8.1 Arithmetic expressions +8.2 Code generation as linearization +8.3 Programs with variables +8.4 The concrete syntax of assignments +8.5 A liberal syntax of variables +8.6 Is GF useful for defining formal languages? +8.7 Natural language generation from logic +8.8 Logical semantics of natural language +8.9 Grammars for fractals + +9 Getting started with resource grammar programming +9.1 Overview +9.2 The miniature resource grammar +9.3 Feature design +9.4 Predication +9.5 Complementation +9.6 Determination +9.7 Modification +9.8 Lexical insertion +9.9 The miniature resource in Italian +9.10 Implementing morphology +9.11 Implementing modification and determination +9.12 Implementing verb phrases and complementation +9.13 Implementing predication +9.14 Implementing the rest +9.15 Coordination and extraction + +10 Extending the Resource Grammar Library +10.1 The module structure of a resource grammar +10.2 Effort statistics +10.3 Workflow for a new language +10.4 Reusing code from the miniature resource +10.5 The development-test cycle +10.6 Non-ASCII alphabets and transliterations +10.7 Coding discipline +10.8 Functors in the resource grammar +10.9 Widening the coverage for parsing text +10.10 Bootstrapping a resource lexicon + +A A miniature resource grammar +A.1 Abstract syntax +A.2 Auxiliary resource module for Italian +A.3 Italian concrete syntax +A.4 Morphological paradigms API for Italian +A.5 Test lexicon +A.6 Syntax API + +B A glossary of linguistic terms + +part III GF Reference Manual + +C The GF Programming Language + +C.1 Overview of GF +C.2 The module system +C.2.1 Top-level and supplementary module structure +C.2.2 Compilation units +C.2.3 Names +C.2.4 The structure of a module +C.2.5 Module types, headers, and bodies +C.2.6 Digression: the logic of module types +C.2.7 Inheritance +C.2.8 Opening +C.2.9 Name resolution +C.2.10 Functor instantiations +C.2.11 Completeness +C.3 Judgements +C.3.1 Overview of the forms of judgement +C.3.2 Category declarations, cat +C.3.3 Hypotheses and contexts +C.3.4 Function declarations, fun +C.3.5 Function definitions, def +C.3.6 Data constructor declarations, data +C.3.7 The semantic status of an abstract syntax function +C.3.8 Linearization type definitions, lincat +C.3.9 Linearization definitions, lin +C.3.10 Linearization default definitions, lindef +C.3.11 Printname definitions, printname cat/fun +C.3.12 Parameter type definitions, param +C.3.13 Parameter values +C.3.14 Operation definitions, oper +C.3.15 Operation overloading +C.3.16 Flag definitions, flags +C.4 Types and expressions +C.4.1 Overview of expression forms +C.4.2 The functional fragment: expressions in abstract syntax +C.4.3 List categories +C.4.4 Conversions +C.4.5 Syntax trees +C.4.6 Predefined types in abstract syntax +C.4.7 Overview of expressions in concrete syntax +C.4.8 Values, canonical forms, and run-time variables +C.4.9 Token lists, tokens, and strings +C.4.10 Records and record types +C.4.11 Subtyping +C.4.12 Tables and table types +C.4.13 Pattern matching +C.4.14 Free variation +C.4.15 Local definitions +C.4.16 Function applications in concrete syntax +C.4.17 Reusing top-level grammars as resources +C.4.18 Predefined concrete syntax types +C.4.19 Predefined concrete syntax operations +C.5 Flags and pragmas +C.5.1 Some flags and their values +C.5.2 Compiler pragmas +C.6 The grammar of GF +C.6.1 The lexical structure of GF +C.6.2 The syntactic structure of GF + +D The GF Resource Grammar Library +D.1 The category system +D.1.1 Phrasal and closed lexical categories +D.1.2 Open lexical categories +D.2 Syntax rules +D.2.1 Suprasentential level: texts and utterances +D.2.2 Sentential level: polarity, tense, and mood +D.2.3 Predication, complementation, and extraction +D.2.4 Question and relative clause formation +D.2.5 Interrogative and relative pronouns +D.2.6 Noun phrases and determiners +D.2.7 The numeral system +D.2.8 Common nouns, adjectives, and adverbs +D.2.9 Coordination +D.2.10 Structural words +D.3 Lexical Paradigms +D.3.1 Paradigms for regular words +D.3.2 Paradigms for verb, adjective, and noun subcategories +D.4 Other library modules +D.4.1 The Prelude module +D.4.2 The Formal module +D.4.3 The Symbolic module +D.4.4 The Combinators module + +E The GF Software System +E.1 The GF shell +E.2 The GF batch compiler + +F Bibliography +F.1 Publications on GF +F.2 Background and related work + +Index + +