Open-source project
opencog/link-grammar avatar
opencog/link-grammar

Link Grammar 5.13.0: the CMU parser whose overview shows less than it promises

The CMU Link Grammar natural language parser

428 stars120 forksCLGPL-2.1

At a glance

What is it?
The CMU parser in C builds typed links for English, Thai, Russian, Arabic and Persian; its own overview stops mid-diagram, prints 0.000 for every disjunct cost, and leaves the sentence generator to a man page.
Who is it for?
The typed link graph, the run-time dictionary path and the stated thread safety between parsing and dictionary edits are the parts worth building on, and they are also the parts the overview explains in the fewest words. Before budgeting a deployment, read ChangeLog, NEWS and the man directory, since the version number exists only as one line of prose and no GitHub release backs it.
Can I use it commercially?
Yes, with conditions. LGPL-2.1 is a weak copyleft licence: you can use it inside commercial and closed-source software, but if you distribute changes to its own files, you must publish those changes under the same licence.
Is it still maintained?
Yes. The repository last received commits 12 days ago.
What is it written in?
Mainly C, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 15, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • opencog/link-grammar428 ★ · +9
Star history
Repository2026-09-172026-11-15
opencog/link-grammar419428

9 Stars in the last 59 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

The Thai sample ends one line into its linkage drawing

Three worked examples open the project overview, and the third one stops. The Thai sample starts with a four-word sentence and a header reading `Linkage 1, cost vector = (UNUSED=0 DIS= 2.00 LEN=2)`, then prints the top row of the ASCII linkage plus the left margin of the row below it, and nothing further. The English sample above it ends cleanly, with a disjunct listing for all five words and both walls.

That same header is worth comparing across the samples. The English sentence reports `DIS= 0.00 LEN=6`, the Russian one `DIS= 0.00 LEN=4`, the Thai one `DIS= 2.00 LEN=2`. Three component names appear in the vector and none of them is expanded anywhere in the overview, so a reader cannot tell from the project's own text what a nonzero DIS value buys, or why the Thai sentence needs twice the length cost of the English one.

The Thai dictionary, meanwhile, is described as fully developed and as effectively covering the entire language. That claim sits directly next to a drawing that never finishes. Coverage in general is stated as English, Thai, Russian, Arabic, Persian and limited subsets of a half-dozen other languages, and the half-dozen is never named.

Version 5.13.0 lives in a header while GitHub has no releases

The project header states Version 5.13.0, and the repository exposes no GitHub releases. That makes a single line of prose the only place a reader can find the current version, with no tag list or release page to check it against. A `ChangeLog` and a `NEWS` file both sit at the top level, so the history does exist in the tree even when it is not published as a release.

The same kind of gap shows up in the build history. The tree carries `.travis-xxx-disable-failing.yml`, a CI file whose own name records that the Travis run was switched off because it kept failing, and a `.github/` directory beside it. Two CI locations, one of them renamed to say it is not running.

Version numbering is the only other dating evidence available. The sentence generator is announced as new as of 5.9.0, so four version steps separate it from the header number, and the project text gives no release dates to check that interval against. The most recent push recorded for the repository is 22 September 2026.

Disjuncts act like part of speech, and the worked example prices every row at 0.000

The bottom half of the English sample is a per-word listing of disjuncts, which the overview calls an extremely fine-grained form of a part of speech. Here is the whole sample as the project prints it:

code
linkparser> This is a test!
	Linkage 1, cost vector = (UNUSED=0 DIS= 0.00 LEN=6)

    +-------------Xp------------+
    +----->WV----->+---Ost--+   |
    +---Wd---+-Ss*b+  +Ds**c+   |
    |        |     |  |     |   |
LEFT-WALL this.p is.v a  test.n !

(S (NP this.p) (VP is.v (NP a test.n)) !)

            LEFT-WALL    0.000  Wd+ hWV+ Xp+
               this.p    0.000  Wd- Ss*b+
                 is.v    0.000  Ss- dWV- O*t+
                    a    0.000  Ds**c+
               test.n    0.000  Ds**c- Os-
                    !    0.000  Xp- RW+
           RIGHT-WALL    0.000  RW-

Reading the listing, `is.v` carries `Ss- dWV- O*t+`, and the overview decodes that as a transitive verb that took a singular subject and served as the head verb of the sentence. The `Ss*b` link to the subject and the `Ost` link to the object both mark singular, `Wd` points at the head noun, `WV` points at the head verb, `Xp` reaches the trailing punctuation, and `Ds**c` says the noun is singular and also begins with a consonant. `PH` is named as the link that forces phonetic agreement between `a` and `an`, and it is not used in this sample.

What the listing never shows is the cost system making a choice. The floating point column reads 0.000 on all seven rows, even though the overview says that value very roughly captures the log probability of that particular grammatical usage. One sentence, one linkage, and no parse where the cost had to reject an alternative.

Constituent and dependency output is described just as indirectly: those more conventional parses may be obtained by applying a collection of rules to convert to them, and no rule name or invocation is offered.

Dictionaries change at run time, and parsing is meant to survive the edit

Dictionary files can be updated while the parser is running, which is what makes systems that learn grammar from corpora parse and learn at the same time. The overview states that dictionary updates and parsing are mutually thread safe, and calls the package fully multi-threaded and fully UTF-8 enabled.

Smaller claims sit around that one. Classes of words can be recognized with regexes, dialects are supported, and the weight system is described as fine grained in a way that allows vector-embedding-like behaviour. There is a tokenizer tailored for morphology, and it can offer alternative splittings for morphologically ambiguous words rather than committing to one segmentation.

One sentence has no numbers behind it. The overview says performance has improved by several orders of magnitude since the original Carnegie-Mellon code base, and gives no corpus, no sentence count, no hardware and no before-and-after figure. A team planning to put this parser on a hot path has to produce that comparison itself, which is normal, but it also means the speed claim cannot be used as a planning input as written.

In Russian the suffix carries the syntax and the stem does not

Morphological analysis is demonstrated with a plain two-word Russian input and a linkage drawn with only two links:

code
linkparser> это теста
	Linkage 1, cost vector = (UNUSED=0 DIS= 0.00 LEN=4)

             +-----MVAip-----+
    +---Wd---+       +-LLCAG-+
    |        |       |       |
LEFT-WALL это.msi тест.= =а.ndnpi

The output line shows what the tokenizer did before any grammar work: the phrase became three tokens, `это.msi`, `тест.=` and `=а.ndnpi`. The `LL` link joins the stem `тест` to the suffix `а`. The `MVA` link attaches only to the suffix, and the reason given is that in Russian it is the suffixes that carry all of the syntactic structure and not the stems. That is a claim about the language rather than about the parser, and it explains why a linkage for this sentence has so little drawn in it. The English sample by contrast spreads a wide graph over five words and prints a disjunct line for every one of them.

Russian also gets its own lexis documentation on the project website, separate from the English link documentation, so a team working outside English has somewhere to start.

The build surface is autotools with branches for CMake, RPM, MinGW and MSVC

The project overview names no install command. Nothing in it can be copied into a terminal, so the build has to be assembled from what the tree exposes: `configure.ac`, `Makefile.am`, `autogen.sh` and `m4/` for autotools, `FindLinkGrammar.cmake` for CMake, plus `link-grammar.pc.in` for the pkg-config file and `link-grammar.spec.in` for an RPM spec, both templates filled in at build time.

Platform support shows up as directories rather than as instructions. `mingw/` and `msvc/` sit next to `link-grammar/` and `link-parser/`, and `docker/` sits next to `bindings/`, `data/`, `debug/`, `systest/` and `tests/`. There is a `diary/` directory at the top of a C parser, which is an unusual name to find in a language codebase, and nothing in the overview explains what belongs in it.

The language bindings are promised without a list. The overview says the parser includes APIs in various different programming languages along with a command-line tool, then stops there, so a team picking a binding has to read `bindings/` to find out which languages exist.

The sentence generator is documented only by its man page

As of version 5.9.0 the package carries an experimental sentence generator, and every detail of it is pushed into a man page. The mechanism is a fill in the blanks API where words are substituted into wild card locations whenever the result is a grammatically valid sentence. The documentation pointer is `man link-generator`, and the page sits in the `man` subdirectory.

The known consumer of that API is another repository. The generator is used by OpenCog Language Learning, which aims to learn Link Grammars from corpora automatically using information theoretic techniques that the overview compares to those found in artificial neural nets, while keeping explicitly symbolic representations. The comparison is the project's own wording, not an independent assessment.

What the overview does not carry is any flag, no example invocation and no description of the wild card syntax. A reader has to install the package and open the man page before finding out what a blank looks like, and the feature is still labelled experimental at a header version four steps past its introduction.

Uniform sampling of planar graphs is announced with no entry point

One feature is stated as fully supported with no way to reach it from the project text: random planar graph parsing, which the overview says allows uniform sampling of the space of planar graphs. No command, no API name, no example, and no citation for the method. It reads as a research result reported in passing rather than as something a caller can use today.

The license is the cleanest part of the story. The package is released under the LGPL, making it freely available for both private and commercial use with few restrictions, and the terms are in the LICENSE file at the root. Repository metadata records LGPL-2.1, so the metadata and the overview agree on the license family even though the overview says only LGPL and does not name a version.

Documentation is split by language and by era. Link types for English have their own documentation page, Russian has one, and the project website is given as the main web page. The original Carnegie-Mellon code base is linked separately, and the project is described as a continuation of that parser rather than the same software, which matters for anyone still following older papers and expecting today's behaviour.

Editorial conclusion

The typed link graph, the run-time dictionary path and the stated thread safety between parsing and dictionary edits are the parts worth building on, and they are also the parts the overview explains in the fewest words. Before budgeting a deployment, read ChangeLog, NEWS and the man directory, since the version number exists only as one line of prose and no GitHub release backs it. Treat the language coverage claim as unverified until your own sentence parses in that language. The LGPL-2.1 grant is the friendly part; the missing build and rollback instructions are not.

Frequently asked questions

What does the opencog Link Grammar parser actually output?

A graph of typed links, meaning edges between the words of a sentence. Its own worked example also prints a bracketed form such as (S (NP this.p) (VP is.v (NP a test.n)) !), plus a per-word disjunct listing with a floating point cost for each row.

Which languages does the Link Grammar parser cover?

The overview names English, Thai, Russian, Arabic and Persian, and then mentions limited subsets of a half-dozen further languages without naming any of them. English link types and the Russian lexis have documentation pages; the overview links nothing for Arabic or Persian.

Can Link Grammar be used in a commercial product?

Yes on the project's own account. The overview says the code is released under the LGPL license, making it freely available for both private and commercial use with few restrictions, and the terms are in the LICENSE file at the repository root. Repository metadata records the license as LGPL-2.1.

Does a Link Grammar dictionary have to be rebuilt into the parser when it changes?

No. Dictionaries can be updated at run time, which is what lets a system learn grammar from a corpus and parse at the same time, and the overview states that dictionary updates and parsing are mutually thread safe. Classes of words can also be recognized with regexes.

Where is the current Link Grammar version number published?

In the project overview header, which reads Version 5.13.0. The repository has no GitHub releases, so there is no release page or tag list to compare it against. ChangeLog and NEWS are both present at the top level of the tree, and the last recorded push was 22 September 2026.

How do you generate sentences with Link Grammar?

An experimental generator arrived in version 5.9.0. It works as a fill in the blanks API where words are substituted into wild card locations whenever the result is grammatically valid, and the overview sends readers to `man link-generator` in the man subdirectory for the details.

Official sources

  1. Issues
  2. License: LGPL-2.1
  3. opencog/link-grammar on GitHub
  4. README
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/opencog-link-grammar.svg)](https://hysenlabs.com/projects/opencog-link-grammar)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/opencog-link-grammar.svg)](https://hysenlabs.com/projects/opencog-link-grammar)

Was this useful?