Link Grammar

From AGIRI.org

Jump to: navigation, search

Contents

Relevance for AGI

Probably the best open-source dependency grammar out there is the link grammar, which you can try out online at

http://www.link.cs.cmu.edu/link/

Introduction

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. grammar_Dependency grammar is similar to link grammar, but dependency grammar includes a head-dependent relationship, as well as lacking directionality in the relations between words.

For example, in an 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 an 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:

<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:

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

Example 2

While 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:

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

Applications

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

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

Implementations

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 is an ongoing project, located here. Recent versions include improved sentence coverage, various bug and security fixes, and Java language bindings.

There are also Perl, Ruby, and OCaml bindings available.[2] [3] [4]

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.


Further reading

[edit]

External links

Language Extensions

Personal tools