D2.1 GF Grammar Compiler API


Contract No.: FP7-ICT-247914
Project full title: MOLTO - Multilingual Online Translation
Deliverable: D2.1. GF Grammar Compiler API
Security (distribution level): Public
Contractual date of delivery: M13
Actual date of delivery: March 2010
Type: Prototype
Status & version: Draft (evolving document)
Author(s): A. Ranta, T. Hallgren, et al.
Task responsible: UGOT
Other contributors:


Abstract

The present paper is the cover of deliverable D2.1 as of M13.

1. Introduction

GF, Grammatical Framework, is a programming language for multilingual grammars. GF is used in the MOLTO project to build translation systems. How to write GF grammars is specified in the numerous tutorials and manuals available via http://grammaticalframework.org. The compiler API is a document that explains aspects of the compiler of the GF language:

  • how GF source code is compiled to various formats usable in runtime systems
  • how the developers can test their grammars
  • how other formats (such as lexica and example sentences) can be converted to GF code
  • how to call the compiler in various ways:
    • GF shell commands and scripts
    • Haskell programs
    • web applications

2. Installation

The GF API can be downloaded from the MOLTO svn server at svn://molto-project.eu/compiler-api and compiled by running make. For compilation to succeed, and produce an HTML file readable in the browser, it is necessary to have the txt2tags software (from http://txt2tags.org) and the graphviz software (http://www.graphviz.org).

A version maintained by the GF developers is also available online at http://www.grammaticalframework.org/compiler-api.