Files
gf-core/doc/gf-quickstart.html
hallgren 130417b541 New smoother version of the GF logo
The new logo is in the new directory doc/Logos. The old logo has been moved
there too. The documentation has been updated to refer to the new logo.

The new logo was provided in SVG format by Krasimir, but PNG files are included
as well. There are some new rules in doc/Makefile to convert from SVG to PNG,
which you can use if you edit the SVG files.
2009-12-14 16:01:47 +00:00

100 lines
3.1 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html><head><title>GF Quickstart</title></head>
<body bgcolor="#ffffff" text="#000000">
<center>
<img src="Logos/gf0.png">
<p>
Aarne Ranta
<p>
3 September, 2007
<p>
<h1>Grammatical Framework Quick Start</h1>
</center>
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 <tt>gf</tt> works for you. See download and install
instructions <a href="http://digitalgrammars.com/gf/download/">here</a>.
<h2>Translation and generation</h2>
When you have downloaded and installed GF:
<ol>
<li> Copy the files
<a href="../examples/tutorial/food/Food.gf"><tt>Food.gf</tt></a>,
<a href="../examples/tutorial/food/FoodEng.gf"><tt>FoodEng.gf</tt></a>, and
<a href="../examples/tutorial/food/FoodIta.gf"><tt>FoodIta.gf</tt></a>.
Or go to <tt>GF/examples/tutorial/food/</tt>, if you have downloaded the
GF sources.
<li> Start GF with the command
<pre>
gf FoodIta.gf FoodEng.gf
</pre>
<li> <b>Translation</b>. Try your first translation by giving the GF command
<pre>
parse "this cheese is very very Italian" | tree_bank
</pre>
<li> <b>Generation</b>. Random-generate sentences in two languages:
<pre>
generate_random | l -multi
</pre>
<li> <b>Grammar development</b>. Add words to the <tt>Food</tt>
grammars and try the above commands again. For instance, add the following lines:
<pre>
Bread : Kind ; -- in Food.gf
Black = {s = "bread"} ; -- in FoodEng.gf
Black = {s = "pane"} ; -- in FoodIta.gf
</pre>
and start GF again with the same command. Now you can even translate
<i>this bread is very Italian</i>.
</ol>
To lear more on GF commands and
grammar development, go to the
<a href="tutorial/gf-tutorial2.html">New Grammarian's Tutorial</a>.
<h2>Multilingual authoring</h2>
This demo also requires the GUI package, which makes the command
<tt>jgf</tt> work for you.
<ol>
<li> Download the file <a href="../examples/letter/Letter.gfcm"><tt>Letter.gfcm</tt></a>.
<li> Start the GF editor by the command
<pre>
gfeditor Letter.gfcm
</pre>
<li> When the editor window is open, select "Letter" from the "New" menu.
<li> Push the button "Random" in the lower end of the window.
<li> Move the pointer to some place in the text, e.g. to the first word (in any
of the languages), and click. The first word should now be highlighted and
a number of alternatives appear in the lower window part (a similar situation
is shown in the picture below).
<li> Double-click at some of the alternatives marked "ch ..." and observe how
the text changes in each of the languages.
</ol>
See the <a href="http://www.cs.chalmers.se/~aarne/GF2.0/doc/javaGUImanual/javaGUImanual.htm">Editor User Manual</a>
for more information on how to use the
editor. To change the grammars, you should not edit <tt>Letter.gfcm</tt>,
which is low-level code generated by the GF grammar compiler. Instead, you
can edit the files in <tt>examples/letter</tt> in the GF grammar package,
and compile by using the script <tt>mkLetter.gfs</tt> in the same package.
<p>
<img src="quick-editor.gif">
</body></html>