Puneet Varma (Editor)

Range concatenation grammars

Updated on
Edit
Like
Comment
Share on FacebookTweet on TwitterShare on LinkedInShare on Reddit

Range concatenation grammar (RCG) is a grammar formalism developed by Pierre Boullier in 1998 as an attempt to characterize a number of phenomena of natural language, such as Chinese numbers and German word order scrambling, which are outside the bounds of the Mildly context-sensitive languages.

Contents

From a theoretical point of view, any language that can be parsed in polynomial time belongs to the subset of RCG called positive range concatenation grammars, and reciprocally.

Though intended as a variant on Groenink's Literal movement grammars, RCGs treat the grammatical process more as a proof than as a production. Whereas LMGs produce a terminal string from a start predicate, RCGs aim to reduce a start predicate (which predicates of a terminal string) to the empty string, which constitutes a proof of the terminal strings membership in the language.

Formal definition

A Positive Range Concatenation Grammar (PRCG) is a tuple G = ( N ,   T ,   V ,   S ,   P ) , where:

  • N , T and V are disjoint finite sets of (respectively) predicate names, terminal symbols and variable names. Each predicate name has an associated arity given by the function dim : N N { 0 } .
  • S N is the start predicate name and verify dim ( S ) = 1 .
  • P is a finite set of clauses of the form ψ 0 ψ 1 ψ m , where the ψ i are predicates of the form A i ( α 1 , , α dim ( A i ) ) with A i N and α i ( T V ) .
  • A Negative Range Concatenation Grammar (NRCG) is defined like a PRCG, but with the addition that some predicates occurring in the right-hand side of a clause can have the form A i ( α 1 , , α dim ( A i ) ) ¯ . Such predicates are called negative predicates.

    A Range Concatenation Grammar is a positive or a negative one. Although PRCGs are technically NRCGs, the terms are used to highlight the absence (PRCG) or presence (NRCG) of negative predicates.

    A range in a word w T is a couple l , r w , with 0 l r n , where n is the length of w . Two ranges l 1 , r 1 w and l 2 , r 2 w can be concatenated iff r 1 = l 2 , and we then have: l 1 , r 1 w l 2 , r 2 w = l 1 , r 2 w .

    For a word w = w 1 w 2 w n , with w i T , the dotted notation for ranges is: l , r w = w 1 w l 1 w l w r 1 w r w n .

    Recognition of strings

    Like LMGs, RCG clauses have the general schema A ( x 1 , . . . , x n ) α , where in an RCG, α is either the empty string or a string of predicates. The arguments x i consist of strings of terminal symbols and/or variable symbols, which pattern match against actual argument values like in LMG. Adjacent variables constitute a family of matches against partitions, so that the argument x y , with two variables, matches the literal string a b in three different ways: x = ϵ ,   y = a b ;   x = a ,   y = b ;   x = a b ,   y = ϵ .

    Predicate terms come in two forms, positive (which produce the empty string on success), and negative (which produce the empty string on failure/if the positive term does not produce the empty string). Negative terms are denoted the same as positive terms, with an overbar, as in A ( x 1 , . . . , x n ) ¯ .

    The rewrite semantics for RCGs is rather simple, identical to the corresponding semantics of LMGs. Given a predicate string A ( α 1 , . . . , α n ) , where the symbols α i are terminal strings, if there is a rule A ( x 1 , . . . , x n ) β in the grammar that the predicate string matches, the predicate string is replaced by β , substituting for the matched variables in each x i .

    For example, given the rule A ( x , a y b ) B ( a x b , y ) , where x and y are variable symbols and a and b are terminal symbols, the predicate string A ( a , a b b ) can be rewritten as B ( a a b , b ) , because A ( a , a b b ) matches A ( x , a y b ) when x = a ,   y = b . Similarly, if there were a rule A ( x , a y b ) A ( x , x )   A ( y , y ) , A ( a , a b b ) could be rewritten as A ( a , a )   A ( b , b ) .

    A proof/recognition of a string α is done by showing that S ( α ) produces the empty string. For the individual rewrite steps, when multiple alternative variable matches are possible, any rewrite which could lead the whole proof to succeed is considered. Thus, if there is at least one way to produce the empty string from the initial string S ( α ) , the proof is considered a success, regardless of how many other ways to fail exist.

    Example

    RCGs are capable of recognizing the non-linear index language { w w w : w { a , b } } as follows:

    Letting x, y, and z be variable symbols:


    S ( x y z ) A ( x , y , z )

    A ( a x , a y , a z ) A ( x , y , z )

    A ( b x , b y , b z ) A ( x , y , z )

    A ( ϵ , ϵ , ϵ ) ϵ


    The proof for abbabbabb is then

    S ( a b b a b b a b b ) A ( a b b , a b b , a b b ) A ( b b , b b , b b ) A ( b , b , b ) A ( ϵ , ϵ , ϵ ) ϵ

    Or, using the more correct dotted notation for ranges:

    S ( a b b a b b a b b ) A ( a b b a b b a b b , a b b a b b a b b , a b b a b b a b b ) A ( a b b a b b a b b , a b b a b b a b b , a b b a b b a b b ) A ( a b b a b b a b b , a b b a b b a b b , a b b a b b a b b ) A ( ϵ , ϵ , ϵ ) ϵ

    References

    Range concatenation grammars Wikipedia