link grammar (lg) is a theory of syntax by davy temperley and daniel sleator which builds relations between pairs of words, rather than constructing constituents in a tree-like hierarchy. there are two basic parameters: directionality and distance. link grammar is similar to dependency grammar, but dependency grammar includes a head-dependent relationship, as well as lacking directionality in the relations between words. colored multiplanar link grammar (cmlg) is an extension of lg allowing crossing relations between pairs of words. for example, in a subjectâverbâobject language like english, the verb would look left to form a subject link, and right to form an object link. nouns would look right to complete the subject link, or left to complete the object link. in a subjectâobjectâverb language like persian, the verb would look left to form an object link, and a more distant left to form a subject link. nouns would look to the right for both subject and object links. == syntax == rightward links are represented as a +, and leftward links with a â. optional links are contained in curly brackets {â¦}. undesirable links are contained in any number of square brackets [â¦]. multiple links are joined either by a conjunction & or a disjunction or. each rule ends with a semicolon ;. == examples == === example 1 === a basic rule file for an svo language might look like: :: &nbsp;&nbsp;&nbsp;&nbsp; d+; :: &nbsp; {dâ} & s+; :: &nbsp;&nbsp; {dâ} & oâ; :: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sâ &nbsp; & &nbsp; {o+}; thus the english sentence, âthe boy painted a pictureâ would appear as: +-----o-----+ +-d-+--s--+ +--d--+ | | | | | the boy painted a picture === example 2 === conversely, a rule file for a null subject sov language might consist of the following links: :: &nbsp; s+; :: &nbsp;&nbsp;&nbsp; o+; :: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {oâ} &nbsp; & &nbsp; {sâ}; and a simple persian sentence, man nan xordam (ÙÙ ÙØ§Ù Ø®ÙØ±Ø¯Ù) 'i ate bread' would look like: +-----s-----+ | +--o--+ | | | man nan xordam ==implementations== the link grammar syntax parser is a [[library (computing)|libr
Grammar_frameworks Natural_language_parsing