[Added description of how to use the translator GUI and the API to the docs. bringert@cs.chalmers.se**20050509184222] { hunk ./doc/gf-java.html 120 -> pm -utf8 -printer=header | wf test.gfcm +> pm -utf8 -utf8id -printer=header | wf test.gfcm hunk ./doc/gf-java.html 122 -

-Note that you might get an error message saying that header is not -a valid value for the -printer flag. Ignore this message. This is -a bug in GF's error reporting which will be fixed. -

hunk ./doc/gf-java.html 128 -> pm -utf8 -printer=cfgm | wf test.cfgm +> pm -utf8 -utf8id -printer=cfgm | wf test.cfgm hunk ./doc/gf-java.html 130 -

-Note that you might get an error message saying that cfgm is not -a valid value for the -printer flag. Ignore this message. This is -a bug in GF's error reporting which will be fixed. -

hunk ./doc/gf-java.html 151 +

Using the translation GUI

+ + +

The +build-translet +script will create a JAR-file which runs the translation GUI.

+ +

To run the translation GUI on files you have +created manually, as in the description above, run:

+ +
+$ java -cp gfc2java.jar:. se.chalmers.cs.gf.translategui.TranslateApp test.properties
+
+ +

Note that the current directory must be included in the classpath, +since properties file is loaded as a Java resource from the classpath.

+ +

Writing a program using the Java API

+ +

+Have a look at the +simple +demo program. Given the files created above, you can run the +program with:

+ +
+$ java -cp gfc2java.jar:. se.chalmers.cs.gf.translategui.Test test.properties TestSwe TestEng
+
+ +

Note that the current directory must be included in the classpath, +since properties file is loaded as a Java resource from the classpath.

+ hunk ./doc/gf-java.html 217 -se.chalmers.cs.gf.parse.level=FINE -se.chalmers.cs.gf.linearize.level=FINE +se.chalmers.cs.gf.parse.level=FINEST +se.chalmers.cs.gf.linearize.level=FINEST hunk ./doc/gf-oaa.html 6 -GF OAA interface +GF OAA Agent hunk ./doc/gf-oaa.html 37 -$ java -cp $CLASSPATH:gfc2java.jar:. se.chalmers.cs.gf.oaa.GFAgent /test.properties -oaa_connect "tcp('${FAC_HOST}',${FAC_PORT})" +$ java -cp $CLASSPATH:gfc2java.jar:. se.chalmers.cs.gf.oaa.GFAgent test.properties -oaa_connect "tcp('${FAC_HOST}',${FAC_PORT})" hunk ./doc/gf-oaa.html 43 + hunk ./doc/gf-oaa.html 46 -The path to the properties file is loaded as a java resource, so -the leading slash means to look look at the root of the package -hierarchy to find the file in the current directory. -

- -
  • - -

    hunk ./doc/gf-oaa.html 49 -

  • OAA 2.3.0 and all its requirements
  • -
  • The Trindikit Java library (for the OAAAgent class)
  • +
  • OAA 2.3.0 and all its requirements.
  • +
  • The Trindikit Java library (for the OAAAgent class).
  • +
  • The directory where the properties file is located.
  • hunk ./doc/gf-oaa.html 53 - hunk ./doc/gf-oaa.html 54 + }