Head grammar

Head grammar (HG) is a grammar formalism introduced in Carl Pollard (1984)[1] as an extension of the context-free grammar class of grammars. Head grammar is therefore a type of phrase structure grammar, as opposed to a dependency grammar. The class of head grammars is a subset of the linear context-free rewriting systems.

One typical way of defining head grammars is to replace the terminal strings of CFGs with indexed terminal strings, where the index denotes the "head" word of the string. Thus, for example, a CF rule such as might instead be , where the 0th terminal, the a, is the head of the resulting terminal string. For convenience of notation, such a rule could be written as just the terminal string, with the head terminal denoted by some sort of mark, as in .

Two fundamental operations are then added to all rewrite rules: wrapping and concatenation.

Operations on headed strings

Wrapping

Wrapping is an operation on two headed strings defined as follows:

Let and be terminal strings headed by x and y, respectively.

Concatenation

Concatenation is a family of operations on n > 0 headed strings, defined for n = 1, 2, 3 as follows:

Let , , and be terminal strings headed by x, y, and z, respectively.

And so on for . One can sum up the pattern here simply as "concatenate some number of terminal strings m, with the head of string n designated as the head of the resulting string".

Form of rules

Head grammar rules are defined in terms of these two operations, with rules taking either of the forms

where , , ... are each either a terminal string or a non-terminal symbol.

Example

Head grammars are capable of generating the language . We can define the grammar as follows:

The derivation for "abcd" is thus:

And for "aabbccdd":

Formal properties

Equivalencies

Vijay-Shanker and Weir (1994)[2] demonstrate that linear indexed grammars, combinatory categorial grammar, tree-adjoining grammars, and head grammars are weakly equivalent formalisms, in that they all define the same string languages.

gollark: You can be okay with something without also wanting it to be advertised constantly in kind of spammy ways, it's a self-consistent position.
gollark: I'm not sure what the point of adding one is.
gollark: I actually have a signed version of How To, because Waterstones happened to be selling signed copies when it was released. It's very good.
gollark: If they're very big during planetary formation they pick up hydrogen and become gas giants, I think.
gollark: It probably depends on how you define "planet", since it's just going to be "slightly smaller brown dwarf star" or something.

References

  1. Pollard, C. 1984. Generalized Phrase Structure Grammars, Head Grammars, and Natural Language. Ph.D. thesis, Stanford University, CA.
  2. Vijay-Shanker, K. and Weir, David J. 1994. The Equivalence of Four Extensions of Context-Free Grammars. Mathematical Systems Theory 27(6): 511-546.
This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.