Björn Bringert, bringert@cs.chalmers.se
The Grammatical Framework (GF) is a grammar formalism well suited to writing multilingual grammars for natural languages. The system presented in this document implements parsing and linearization using GF grammars.
Get the source code for the latest version of the GF interpreter here.
There is also a gfc2java darcs repo with the development version. Get darcs here.
The README file describes how to build the library and included demo applications.
JavaDoc for the API can also be built using make javadoc.
See "GF OAA Agent".
The GF interpreter needs two representations of the grammar to do linearization and parsing. These two representations can be generated from a GF source grammar by using the GF system. This example assumes that we have the concrete syntax modules TestEng and TestSwe.
Load all the source modules into GF:
> i TestEng.gf > i TestSwe.gf
Create a GFCM file:
> pm -utf8 -printer=header | wf test.gfcm
Create a CFGM file:
> pm -utf8 -printer=cfgm | wf test.cfgm
Create a properties file (here test.properties) so that the interpreter can find these files:
$ cat > test.properties <<PROP name: test gfcm: test.gfcm cfgm: test.cfgm PROP
See the build-gramlet script for an example of how to do this automatically.
The Numerals translator is a demo applet which uses the Java GF interpreter and the GF numerals grammar to translate numerals between a number of languages.
Tramdemo demonstrates the use of multimodal grammars as a method of implementing multimodal dialog systems.
The standard parsing and linearization functions use untyped abstract syntax trees. The Grammar2API program in the gfc2java distribution generates Java classes which can represent an abstract syntax tree using typed trees.
Struct names are case-insensitive in OAA. This means that we cannot handle functions whose names differ only in case.