next up previous contents
Next: Dependency parser heuristic rules Up: Using the sample main Previous: Relaxation Labelling constraint grammar   Contents


Chart parser CFG file

This file contains a CFG grammar for the chart parser, and some directives to control which chart edges are selected to build the final tree. Comments may be introduced in the file, starting with ``%'', the comment will finish at the end of the line.

Grammar rules have the form: x ==> y, A, B.

That is, the head of the rule is a non-terminal specified at the left hand side of the arrow symbol. The body of the rule is a sequence of terminals ans nonterminals separated with commas and ended with a dot.

Empty rules are not allowed, since they dramatically slow chart parsers. Nevertheless, any grammar may be written without empty rules (assuming you are not going to accept empty sentences).

Rules with the same head may be or'ed using the bar symbol, as in: x ==> A, y | B, C.

The grammar is case-sensitive, so make sure to write your terminals (PoS tags) exactly as they are output by the tagger. Also, make sure that you capitalize your non-terminals in the same way everywhere they appear.

Terminals are PoS tags, but some variations are allowed for flexibility:

The grammar file may contain also some directives to help the parser decide which chart edges must be selected to build the tree. Directive commands start with the directive name (always prefixed with ``@''), followed by one or more non-terminal symbols, separated with spaces. The list must end with a dot.


next up previous contents
Next: Dependency parser heuristic rules Up: Using the sample main Previous: Relaxation Labelling constraint grammar   Contents
2006-04-26