forked from GitHub/gf-core
updated quick start
This commit is contained in:
@@ -9,7 +9,7 @@
|
|||||||
<p>
|
<p>
|
||||||
Aarne Ranta
|
Aarne Ranta
|
||||||
<p>
|
<p>
|
||||||
20 May, 2005
|
3 September, 2007
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
|
|
||||||
@@ -19,7 +19,8 @@ Aarne Ranta
|
|||||||
|
|
||||||
This Quick Start shows two examples of how GF can be used.
|
This Quick Start shows two examples of how GF can be used.
|
||||||
We assume that you have downloaded and installed GF, so that
|
We assume that you have downloaded and installed GF, so that
|
||||||
the command <tt>gf</tt> works for you.
|
the command <tt>gf</tt> works for you. See download and install
|
||||||
|
instructions <a href="../tmp-download.html">here</a>.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -29,34 +30,36 @@ When you have downloaded and installed GF:
|
|||||||
|
|
||||||
<ol>
|
<ol>
|
||||||
<li> Copy the files
|
<li> Copy the files
|
||||||
<a href="tutorial/old/Paleolithic.gf"><tt>Paleolithic.gf</tt></a>,
|
<a href="../examples/tutorial/food/Food.gf"><tt>Food.gf</tt></a>,
|
||||||
<a href="tutorial/old/PaleolithicEng.gf"><tt>PaleolithicEng.gf</tt></a>, and
|
<a href="../examples/tutorial/food/Food.gf"><tt>FoodEng.gf</tt></a>, and
|
||||||
<a href="tutorial/old/PaleolithicIta.gf"><tt>PaleolithicIta.gf</tt></a>.
|
<a href="../examples/tutorial/food/Food.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
|
<li> Start GF with the command
|
||||||
<pre>
|
<pre>
|
||||||
gf PaleolithicIta.gf PaleolithicEng.gf
|
gf FoodIta.gf FoodEng.gf
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<li> <b>Translation</b>. Try your first translation by giving the GF command
|
<li> <b>Translation</b>. Try your first translation by giving the GF command
|
||||||
<pre>
|
<pre>
|
||||||
t PaleolithicEng PaleolithicIta "the boy eats the snake"
|
parse "this cheese is very very Italian" | tree_bank
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<li> <b>Generation</b>. Random-generate sentences in two languages:
|
<li> <b>Generation</b>. Random-generate sentences in two languages:
|
||||||
<pre>
|
<pre>
|
||||||
gr | l -multi
|
generate_random | l -multi
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<li> <b>Grammar development</b>. Add words to the <tt>Paleolithic</tt>
|
<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:
|
grammars and try the above commands again. For instance, add the following lines:
|
||||||
<pre>
|
<pre>
|
||||||
Black : A ; -- in Paleolithic.gf
|
Bread : Kind ; -- in Food.gf
|
||||||
Black = {s = "black"} ; -- in PaleolithicEng.gf
|
Black = {s = "bread"} ; -- in FoodEng.gf
|
||||||
Black = {s = "nero"} ; -- in PaleolithicIta.gf
|
Black = {s = "pane"} ; -- in FoodIta.gf
|
||||||
</pre>
|
</pre>
|
||||||
and start GF again with the same command. Now you can even translate
|
and start GF again with the same command. Now you can even translate
|
||||||
<i>the boy eats the black snake</i>.
|
<i>this bread is very Italian</i>.
|
||||||
</ol>
|
</ol>
|
||||||
To lear more on GF commands and
|
To lear more on GF commands and
|
||||||
grammar development, go to the
|
grammar development, go to the
|
||||||
|
|||||||
15
src/INSTALL
15
src/INSTALL
@@ -63,13 +63,17 @@ To make and install GF (Updated for version 2.4).
|
|||||||
9. For a quick test:
|
9. For a quick test:
|
||||||
Start gf, load a grammar and parse a string:
|
Start gf, load a grammar and parse a string:
|
||||||
|
|
||||||
cd GF/grammars/basic
|
cd $GFHOME/examples/tutorial/food
|
||||||
gf English.gf
|
gf FoodIta.gf FoodEng.gf
|
||||||
|
|
||||||
-- when gf has started and shows the prompt >:
|
-- when gf has started and shows the prompt >:
|
||||||
> p "every number is even or odd"
|
|
||||||
|
> parse "this cheese is very very Italian" | tree_bank
|
||||||
|
|
||||||
-- this is the response from GF:
|
-- this is the response from GF:
|
||||||
PredA1 (Every Number) (DisjA1 Even Odd)
|
Is (This Cheese) (Very (Very Italian))
|
||||||
|
this cheese is very very Italian
|
||||||
|
questo formaggio è molto molto italiano
|
||||||
|
|
||||||
10. If you want to run the Java GUI, go back to $GFHOME/src directory
|
10. If you want to run the Java GUI, go back to $GFHOME/src directory
|
||||||
and also do
|
and also do
|
||||||
@@ -84,5 +88,6 @@ To make and install GF (Updated for version 2.4).
|
|||||||
|
|
||||||
When the window opens, push the Random button.
|
When the window opens, push the Random button.
|
||||||
|
|
||||||
Author: Aarne Ranta, Björn Bringert 8/11/2004 -- 26/01/2006
|
Author: Aarne Ranta, Björn Bringert 8/11/2004 -- 26/01/2006 -- 3/9/2007
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -5,20 +5,32 @@ GF Version 2.8, released 8 July 2007.
|
|||||||
<ul>
|
<ul>
|
||||||
<li> <a href="download/GF-2.8.tgz"><tt>GF-2.8.tgz</tt></a>,
|
<li> <a href="download/GF-2.8.tgz"><tt>GF-2.8.tgz</tt></a>,
|
||||||
Haskell and Java sources, grammar library sources, examples, documentation.
|
Haskell and Java sources, grammar library sources, examples, documentation.
|
||||||
|
To compile and install: read <a href="src/INSTALL"><tt>src/INSTALL</tt></a>.
|
||||||
|
|
||||||
<li> <a href="download/GF-2.8-lib.tgz"><tt>GF-2.8-lib.tgz</tt></a>,
|
<li> <a href="download/GF-2.8-lib.tgz"><tt>GF-2.8-lib.tgz</tt></a>,
|
||||||
Compiled grammar libraries</a>; open this in your <tt>$GF_LIB_PATH</tt>.
|
Compiled grammar libraries</a>. To install:
|
||||||
|
unpack this in the directory pointed by <tt>GF_LIB_PATH</tt>.
|
||||||
|
|
||||||
<li> <a href="download/GF-2.8-i386-pc-linux-gnu.tgz"><tt>GF-2.8-i386-pc-linux-gnu.tgz</tt></a>,
|
<li> <a href="download/GF-2.8-i386-pc-linux-gnu.tgz"><tt>GF-2.8-i386-pc-linux-gnu.tgz</tt></a>,
|
||||||
Linux binary, with precompiled grammar libraries.
|
Linux binary, with precompiled grammar libraries. To install:
|
||||||
|
<pre>
|
||||||
|
tar xvfz GF-2.8-i386-pc-linux-gnu.tgz
|
||||||
|
cd GF-2.8-i386-pc-linux-gnu
|
||||||
|
./configure
|
||||||
|
make install
|
||||||
|
</pre>
|
||||||
|
You may need <tt>sudo make install</tt>; if you cannot write in
|
||||||
|
<tt>/usr/local/</tt>, you can change the target directory
|
||||||
|
by <tt>./configure --prefix=MYDIR</tt>.
|
||||||
|
|
||||||
|
|
||||||
<li> <a href="download/GF-2.8-i386-apple-darwin8.9.1.tgz"><tt>GF-2.8-i386-apple-darwin8.9.1.tgz</tt></a>, Mac OS X binary (Intel), with precompiled grammar libraries. Requires Readline from
|
<li> <a href="download/GF-2.8-i386-apple-darwin8.9.1.tgz"><tt>GF-2.8-i386-apple-darwin8.9.1.tgz</tt></a>, Mac OS X binary (Intel), with precompiled grammar libraries. Requires Readline from
|
||||||
<a href="http://www.macports.org/">MacPorts</a>.
|
<a href="http://www.macports.org/">MacPorts</a>. To install, see above item.
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
The <a href=
|
The <a href=
|
||||||
"http://sourceforge.net/project/showfiles.php?group_id=132285">Sourceforge GF site</a>
|
"http://sourceforge.net/project/showfiles.php?group_id=132285">Sourceforge GF site</a>
|
||||||
will be soon updated, but has currently only v 2.7 and older versions.
|
has currently only v 2.7 and older versions.
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
|
|
||||||
@@ -31,7 +43,8 @@ and subsequent times
|
|||||||
<pre>
|
<pre>
|
||||||
darcs pull -a
|
darcs pull -a
|
||||||
</pre>
|
</pre>
|
||||||
|
Then compile and install as described in
|
||||||
|
<a href="src/INSTALL"><tt>GF/src/INSTALL</tt></a>.
|
||||||
|
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
Reference in New Issue
Block a user