Link grammar

From Wikipedia, the free encyclopedia
Jump to: navigation, search

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[1]

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.


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 ;.


Example 1[edit]

A basic rule file for an SVO language might look like:

<determiner>:      D+;
<noun-subject>:   {D−} & S+;
<noun-object>:    {D−} & O−;
<verb>:               S−   &   {O+};

Thus the English sentence, “The boy painted a picture” would appear as:

 +-D-+--S--+     +--D--+
 |   |     |     |     |
The boy painted  a  picture

Example 2[edit]

Conversely, a rule file for a null subject SOV language might consist of the following links:

<noun-subject>:   S+;
<noun-object>:     O+;
<verb>:            {O−}   &   {S−};

And a simple Persian sentence, man nAn xordam (من نان خوردم) 'I ate bread' would look like:

 |     +--O--+
 |     |     |
man   nAn xordam


The link grammar syntax parser is a library for natural language processing written in C. It is available under the BSD license, which is compatible with the GNU General Public License. The parser[2] is an ongoing project. Recent versions include improved sentence coverage, various bug and security fixes, and Java language bindings.

There are also Perl, Python, Ruby, OCaml and .NET bindings available.[3]

The link-grammar program along with rules and word lists for English may be found in standard Linux distributions, e.g., as a Debian package.[4]


AbiWord checks grammar using Link Grammar

AbiWord,[5] a free word processor, uses Link Grammar for on-the-fly grammar checking. Words that cannot be linked anywhere are underlined in green.

The semantic relationship extractor RelEx,[6] layered on top of the Link Grammar library, generates a dependency grammar output by making explicit the semantic relationships between words in a sentence. Its output can be classified as being at a level between that of SSyntR and DSyntR of Meaning-Text Theory. It also provides framing/grounding, anaphora resolution, head-word identification, lexical chunking, part-of-speech identification, and tagging, including entity, date, money, gender, etc. tagging. It includes a compatibility mode to generate dependency output compatible with the Stanford parser,[7] and Penn Treebank[8]-compatible POS tagging.

Link Grammar has also been employed for information extraction of biomedical texts[9][10] and events described in news articles,[11] as well as experimental machine translation systems from English to German and Turkish.

The Link Grammar link dictionary is used to generate and verify the syntactic correctness of two different natural language generation systems: NLGen[12] and NLGen2.[13] It is also used as a part of the NLP pipeline in the OpenCog AI project.


  1. ^ .Anssi Yli-Jyrä and Matti Nykänen (2004). "A Hierarchy of Mildly Context-Sensitive Dependency Grammars". In G. P. Gerhard Jäger, Paola Monachesi and S. Wintner. Proceedings of the 9th conference on Formal Grammar 2004 "FGNancy". Pre-Proceedings. pp. 151–165. 
  2. ^ AbiWord — Link Grammar Parser
  3. ^ (Perl) (Python) (Ruby) (OCaml) (.NET)
  4. ^ Debian - Package Search Results - link-grammar
  5. ^ AbiWord — Link Grammar Parser
  6. ^ RelEx Dependency Relationship Extractor
  7. ^ The Stanford Parser: A statistical parser
  8. ^ The Penn Treebank Project
  9. ^ Jing Ding, Daniel Berleant, Jun Xu, Andy W. Fulmer (November 2003). "Extracting biochemical interactions from MEDLINE using a link grammar parser". Tools with Artificial Intelligence, 2003. Proceedings. 15th IEEE International Conference on. pp. 467–471. ISBN 0-7695-2038-3. 
  10. ^ Sampo Pyysalo, Tapio Salakoski, Sophie Aubin and Adeline Nazarenko, "Lexical Adaptation of Link Grammar to the Biomedical Sublanguage: a Comparative Evaluation of Three Approaches", BMC Bioinformatics 7(Suppl 3):S2 (2006).
  11. ^ Harsha V. Madhyastha, N. Balakrishnan, K. R. Ramakrishnan (2003). "Event Information Extraction Using Link Grammar". 13th International WorkShop on Research Issues in Data Engineering: Multi-lingual Information Management (RIDE'03). p. 16. doi:10.1109/RIDE.2003.1249841. 
  12. ^ Ruiting Lian, et al, "Sentence generation for artificial brains: a glocal similarity matching approach", Neurocomputing (Elsevier) (2009, submitted for publication).
  13. ^ Blake Lemoine, NLGen2: A Linguistically Plausible, General Purpose Natural Language Generation System (2009)

Further reading[edit]

External links[edit]

Language extensions[edit]