summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authoraarne <aarne@cs.chalmers.se>2005-12-16 13:32:04 +0000
committeraarne <aarne@cs.chalmers.se>2005-12-16 13:32:04 +0000
commit43f43a176b265290c7e5f4f6e0f29e6f18f0268b (patch)
tree6c63b62202bdb88fdd5af08c6b0f2fc0ffd31287 /examples
parent9e19f5ab448cd944e6e431bb3d00ba54dbb804d3 (diff)
resource mp3 document
Diffstat (limited to 'examples')
-rw-r--r--examples/mp3/mp3-resource.html117
-rw-r--r--examples/mp3/mp3-resource.txt89
2 files changed, 206 insertions, 0 deletions
diff --git a/examples/mp3/mp3-resource.html b/examples/mp3/mp3-resource.html
new file mode 100644
index 000000000..b1125d017
--- /dev/null
+++ b/examples/mp3/mp3-resource.html
@@ -0,0 +1,117 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML>
+<HEAD>
+<META NAME="generator" CONTENT="http://txt2tags.sf.net">
+<TITLE>Using the GF resource grammar library in multilingual grammars: an example</TITLE>
+</HEAD><BODY BGCOLOR="white" TEXT="black">
+<P ALIGN="center"><CENTER><H1>Using the GF resource grammar library in multilingual grammars: an example</H1>
+<FONT SIZE="4">
+<I>Author: Aarne Ranta &lt;aarne (at) cs.chalmers.se&gt;</I><BR>
+Last update: Fri Dec 16 14:30:57 2005
+</FONT></CENTER>
+
+<P></P>
+<HR NOSHADE SIZE=1>
+<P></P>
+ <UL>
+ <LI><A HREF="#toc1">Quick try</A>
+ <LI><A HREF="#toc2">Structure</A>
+ <LI><A HREF="#toc3">Resource library version</A>
+ </UL>
+
+<P></P>
+<HR NOSHADE SIZE=1>
+<P></P>
+<P>
+This document describes the contents of the directory
+<A HREF="http://www.cs.chalmers.se/~aarne/GF/examples/mp3/"><CODE>GF/examples/mp3</CODE></A>.
+</P>
+<P>
+This directory contains a small example of a dialogue system
+grammar built by using the GF resource grammar library. Its sole
+purpose is to demonstrate this usage, i.e.
+</P>
+ <UL>
+ <LI>how the resource API is used to define concrete syntax
+ <P></P>
+ <LI>how to divide the grammar into modules
+ </UL>
+
+<P>
+Thus it is not intended to be (even a part of) a really useful
+system.
+</P>
+<A NAME="toc1"></A>
+<H2>Quick try</H2>
+<P>
+To try out the grammar, do for example
+</P>
+<PRE>
+ gf mk3.gfcm -- start GF
+
+ &gt; gr | l -multi -- random generate
+
+ &gt; p -tr "which song is played ?" | l -multi -- parse and translate
+
+ &gt; gt -tr | l -lang=MP3Swe -- generate Swedish "treebank"
+
+ &gt; si -tr | p | l -multi -- translate speech input
+ [say:] I want to play Yesterday
+</PRE>
+<P>
+The last command only works if you have installed
+<A HREF="http://mi.eng.cam.ac.uk/~sjy/software.htm">ATK</A> and compiled
+<A HREF="http://www.cs.chalmers.se/Cs/Research/Language-technology/darcs/GF/doc/darcs.html">GF version 14/12/2005</A>
+or later.
+</P>
+<A NAME="toc2"></A>
+<H2>Structure</H2>
+<P>
+The directory consists of the following grammars:
+</P>
+<UL>
+<LI><A HREF="MP3.gf"><CODE>MP3.gf</CODE></A> the main abstract syntax
+<LI><A HREF="MP3I.gf"><CODE>MP3I.gf</CODE></A> functor implementation of the main abstract
+<LI><A HREF="MP3Eng.gf"><CODE>MP3Eng.gf</CODE></A> English instantiation of the functor
+<LI><A HREF="MP3Fin.gf"><CODE>MP3Fin.gf</CODE></A> Finnish instantiation of the functor (buggy)
+<LI><A HREF="MP3Fre.gf"><CODE>MP3Fre.gf</CODE></A> French instantiation of the functor
+<LI><A HREF="MP3Ger.gf"><CODE>MP3Ger.gf</CODE></A> German instantiation of the functor
+<LI><A HREF="MP3Swe.gf"><CODE>MP3Swe.gf</CODE></A> Swedish instantiation of the functor
+<LI><A HREF="Lexicon.gf"><CODE>Lexicon.gf</CODE></A> the interface on which <CODE>MP3I.gf</CODE> depends
+<LI><A HREF="LexiconEng.gf"><CODE>LexiconEng.gf</CODE></A> English instance of the interface
+<LI><A HREF="LexiconFin.gf"><CODE>LexiconFin.gf</CODE></A> Finnish instance of the interface
+<LI><A HREF="LexiconFre.gf"><CODE>LexiconFre.gf</CODE></A> French instance of the interface
+<LI><A HREF="LexiconGer.gf"><CODE>LexiconGer.gf</CODE></A> German instance of the interface
+<LI><A HREF="LexiconSwe.gf"><CODE>LexiconSwe.gf</CODE></A> Swedish instance of the interface
+</UL>
+
+<P>
+The main linguistic content is in the functor <CODE>MP3I</CODE> and the
+instances of the <CODE>Lexicon</CODE> interface.
+</P>
+<P>
+The way in which the implementation is divided to a functor
+and an interface depending on it should work as a model for
+building resource grammar applications in general.
+</P>
+<P>
+In order to compile the grammars from source, you must set the
+environment variable <CODE>GF_LIB_PATH</CODE> to point at the root
+of your GF library, e.g. in the bash shell,
+</P>
+<PRE>
+ export GF_LIB_PATH=/usr/local/lib/GF/
+</PRE>
+<P></P>
+<A NAME="toc3"></A>
+<H2>Resource library version</H2>
+<P>
+The example builds on resource v. 0.6. The reason for not building
+on a later version is that German is not yet implemented for them.
+The example will probably be migrated to v. 1.0 soon. The new resource
+version will fix the bugs in the Finnish implementation.
+</P>
+
+<!-- html code generated by txt2tags 2.0 (http://txt2tags.sf.net) -->
+<!-- cmdline: txt2tags -\-toc mp3-resource.txt -->
+</BODY></HTML>
diff --git a/examples/mp3/mp3-resource.txt b/examples/mp3/mp3-resource.txt
new file mode 100644
index 000000000..e9e26b0a9
--- /dev/null
+++ b/examples/mp3/mp3-resource.txt
@@ -0,0 +1,89 @@
+Using the GF resource grammar library in multilingual grammars: an example
+Author: Aarne Ranta <aarne (at) cs.chalmers.se>
+Last update: %%date(%c)
+
+% NOTE: this is a txt2tags file.
+% Create an html file from this file using:
+% txt2tags --toc mp3-resource.txt
+
+%!target:html
+
+
+
+This document describes the contents of the directory
+[``GF/examples/mp3`` http://www.cs.chalmers.se/~aarne/GF/examples/mp3/].
+
+This directory contains a small example of a dialogue system
+grammar built by using the GF resource grammar library. Its sole
+purpose is to demonstrate this usage, i.e.
+
+ - how the resource API is used to define concrete syntax
+
+ - how to divide the grammar into modules
+
+
+Thus it is not intended to be (even a part of) a really useful
+system.
+
+
+==Quick try==
+
+To try out the grammar, do for example
+```
+ gf mk3.gfcm -- start GF
+
+ > gr | l -multi -- random generate
+
+ > p -tr "which song is played ?" | l -multi -- parse and translate
+
+ > gt -tr | l -lang=MP3Swe -- generate Swedish "treebank"
+
+ > si -tr | p | l -multi -- translate speech input
+ [say:] I want to play Yesterday
+```
+The last command only works if you have installed
+[ATK http://mi.eng.cam.ac.uk/~sjy/software.htm] and compiled
+[GF version 14/12/2005 http://www.cs.chalmers.se/Cs/Research/Language-technology/darcs/GF/doc/darcs.html]
+or later.
+
+
+==Structure==
+
+The directory consists of the following grammars:
+
+- [``MP3.gf`` MP3.gf] the main abstract syntax
+- [``MP3I.gf`` MP3I.gf] functor implementation of the main abstract
+- [``MP3Eng.gf`` MP3Eng.gf] English instantiation of the functor
+- [``MP3Fin.gf`` MP3Fin.gf] Finnish instantiation of the functor (buggy)
+- [``MP3Fre.gf`` MP3Fre.gf] French instantiation of the functor
+- [``MP3Ger.gf`` MP3Ger.gf] German instantiation of the functor
+- [``MP3Swe.gf`` MP3Swe.gf] Swedish instantiation of the functor
+- [``Lexicon.gf`` Lexicon.gf] the interface on which ``MP3I.gf`` depends
+- [``LexiconEng.gf`` LexiconEng.gf] English instance of the interface
+- [``LexiconFin.gf`` LexiconFin.gf] Finnish instance of the interface
+- [``LexiconFre.gf`` LexiconFre.gf] French instance of the interface
+- [``LexiconGer.gf`` LexiconGer.gf] German instance of the interface
+- [``LexiconSwe.gf`` LexiconSwe.gf] Swedish instance of the interface
+
+
+The main linguistic content is in the functor ``MP3I`` and the
+instances of the ``Lexicon`` interface.
+
+The way in which the implementation is divided to a functor
+and an interface depending on it should work as a model for
+building resource grammar applications in general.
+
+In order to compile the grammars from source, you must set the
+environment variable ``GF_LIB_PATH`` to point at the root
+of your GF library, e.g. in the bash shell,
+
+``` export GF_LIB_PATH=/usr/local/lib/GF/
+
+
+==Resource library version==
+
+The example builds on resource v. 0.6. The reason for not building
+on a later version is that German is not yet implemented for them.
+The example will probably be migrated to v. 1.0 soon. The new resource
+version will fix the bugs in the Finnish implementation.
+