next up previous contents
Next: Defining Input for Regression Up: Modular Organization of Grammars: Previous: Modular Definition of FDs

Drawing the Map of a Grammar

Interestingly, the new syntax highlights the similarity between FUGs and the systems of systemic linguistic. FUF includes a tool that draws a graphical map of the grammar by displaying the tree of the named features with their dependents (function draw-grammar). A high-level map of the SURGE grammar is shown below. Note how similar this map is to a system in systemic linguistics. The def-alt syntax has made this level of organization clearly visible in the grammar without requiring any change to the FUF formalism.

The functions which produce this type of grammar maps in either character mode or in postscript format are described below:

          
DRAW-GRAMMAR (&optional (root *u-grammar*))
	Draw the map of a grammar, starting at level root (by default the
 	root of the whole grammar).

FUF-POSTSCRIPT (root filename &key (shrink t)) Produces a postscript file depicting the map of a grammar. If shrink is t, the map is forced to fit on a single page.

Example of output:

> (draw-grammar 'det) |- DET + |- PRE-DET |- DEICTIC2 |- ORDINAL |- QUANTIFIER | + | |- QUANT-COUNT-PLURAL | | + | | |- QUANT-PARTITIVE | | |- QUANT-PARTITIVE | | | |- QUANT-MASS | | + | |- QUANT-PARTITIVE | | |- DET-TYPE + |- ARTICLE-DET |- POSSESSIVE-DET |- QUESTION-DET |- DEMONSTRATIVE-DET |- QUANTIFIER-DET

>

   


grammar-map
Figure: Map of the SURGE grammar using the def-alt




next up previous contents
Next: Defining Input for Regression Up: Modular Organization of Grammars: Previous: Modular Definition of FDs
Michael Elhadad - elhadad@cs.bgu.ac.il