Grail Tutorial - Main Page
These pages are a tutorial to writing (multimodal) categorial grammars
using Grail. This tutorial begins by covering the basics of multimodal categorial grammars, especially in the form of the graphs (called proof nets in the literature) used by Grail during analysis of a phrase, then moves on to covering the more advanced features.
Grammar writers familiar with neither proof nets nor multimodal categorial grammars are recommended to read the first two sections carefully. People familiar with proof nets and/or multimodal categorial grammars can skip those sections with which the already feel familiar. The section on graphs and formulas is a good starting point for people familiar with multimodal categorial grammars but not with the proofs nets for them.
This tutorial is still under construction and some of the later sections are still either incomplete or missing altogether. However, feel free to send me a message about any inaccuracies in the current document.
Section 1 - Getting Started
This section covers the basics of Grail, introducing the lexical
graphs used by Grail during the analysis, the parser, the
facilities for inspecting and editing grammars while illustrating each
of these features with examples.
- Installation Instructions teaches you
how to install Grail and its optional components.
- Loading, Saving and Inspecting
Grammars teaches you the basics of loading and saving in Grail,
as well as showing you how to inspect your own grammars or the example
- AB grammars teaches you the basics of the
lexical trees used by Grail.
- Parsing AB grammars teaches you the basics of
parsing and grammar editing for AB grammars.
- NL grammars introduced you to the new
elements of NL grammars and parsing them.
- Editing teaches you how to use the
user interface provided by the lexicon window to add lexical entries
to a grammar.
Section 2 - Multimodal Grammars
The second section introduces new features to the basic
engine. Though these are powerful features which give a lot of additional flexibility with respect to NL, they are easily
understood to be simple extensions of the features discussed in
- Extensions gives an overview of
the different extensions to NL which Grail supports.
- Modes introduces different modes of composition to NL.
- Structural Rules shows how modes and structural rules can give a grammar controlled access to structural rules.
- Unary Connectives shows how unary connectives, corresponding to unary branches in the trees can be used to implement linguistic features.
- Modes, Unary Connectives and
Structural Rules gives a worked-out example of how all these extensions can be used together.
Section 3 - Advanced Features
This third main section is for users who want to get maximum mileage
out of Grail. It introduces manual file editing, the many parameters which the astute user
can use to enhance the performance of his grammars. Note that care has to be taken using the optimization parameters, since they can prevent valid proofs from being found if used without care. The section on debugging grammars helps you with identifying problems with your grammar. Finally, the section on semantics shows how to add lambda term semantics to Grail's lexical entries.
- Graphs and Formulas explains the correspondence between, which is necessary to edit grammar files directly.
- Grammar File Format shows how to edit the grammar file directly.
- Grammar Optimization specifies the optimization parameters which Grail allows a user to specify in his grammars.
- Debugging Grammars is there to help you in case Grail doesn't parse a sentence you believe to be correct according to your grammar.
- Semantics explains the features Grail provides for adding lambda term semantics to your grammar.
The Bibliography lists
foundational texts, textbooks, background reading and papers written about the
algorithmic side of Grail.
Appendices - Selected Topics
- Definitions and Vocabulary gives
short definitions of the terms used in different parts of this
tutorial and links to the context where they are defined.
- Grail command line options lists
the different ways of evoking Grail from the command line. Many of
Grail's more delicate and advanced features can only be accessed
through the command line.
- Differences between Grail 2 and Grail 3
grammar files helps you migrate your Grail 2 grammars to Grail 3
and gives advice on how to write grammars which work well for both
Last modified: Tue Feb 24 01:20:00 CET 2009