Aarne Ranta

22 December 2010 (3 September, 2007)

Grammatical Framework Quick Start

This Quick Start shows two examples of how GF can be used. We assume that you have downloaded and installed GF, so that the command gf works for you. See download and install instructions here.

Translation and generation

When you have downloaded and installed GF:
  1. Copy the files Food.gf, FoodEng.gf, and FoodIta.gf. Or go to GF/examples/tutorial/food/, if you have downloaded the GF sources.
  2. Start GF with the command
      gf FoodIta.gf FoodEng.gf
    
  3. Translation. Try your first translation by giving the GF command
      parse "this cheese is very very Italian" | tree_bank
    
  4. Generation. Random-generate sentences in two languages:
      generate_random | l -multi
    
  5. Grammar development. Add words to the Food grammars and try the above commands again. For instance, add the following lines:
      Bread : Kind ;          -- in Food.gf
      Black = {s = "bread"} ; -- in FoodEng.gf
      Black = {s = "pane"} ;  -- in FoodIta.gf
    
    and start GF again with the same command. Now you can even translate this bread is very Italian.
To lear more on GF commands and grammar development, go to the one of the tutorials: