Last Updated: 30th January 2011
Current Link-Grammar Parser version supported: 4.7.2 (From the official SVN repository)
What is the Link-Grammar Parser?
The easiest way to describe it is to simply quote the original Link-Grammar Parser project’s website:
The Link Grammar Parser is a syntactic parser of English (and other languages as well), based on link grammar, an original theory of English syntax. Given a sentence, the system assigns to it a syntactic structure, which consists of a set of labelled links connecting pairs of words. The parser also produces a “constituent” (Penn tree-bank style phrase tree) representation of a sentence (showing noun phrases, verb phrases, etc.). The RelEx extension provides dependency-parse output.
What kind of functionality does this wrapper provide?
In a nut-shell, all of it! Every single method exposed by the Link-Grammar Parser’s API has been painstakingly translated into a Pascal source unit, along with many of the C-defined Structures.
The development plan for this little project involves the construction of a TLinkGrammar component to make integration of the Link-Grammar Parser as simple as it physically can be. Once this component is ready, the translated Structures (defined in the unit as Records) will be removed as they will no longer be of any use.
Download Link-Grammar Parser for Delphi now!
The package contains the following files:
- \Bin\Link-Grammar.dll – The actual Link-Grammar Parser DLL (Current version 4.7.2)
- \Bin\regex2.dll – The GnuWin32 Regular Expression binary (compiled from its C sources)
- \Bin\[de, en, it] - Folders containing the current Dictionaries (you can get others from the SVN repository)
- \Demos\1 – Test App\MainForm.dfm – The included demo’s form
- \Demos\1 – Test App\MainForm.pas - The included demo’s source
- \Demos\1 – Test App\TestApp.[cfg, dof, dpr, dproj] – The various files which compose the demo project itself
- \Demos\1 – Test App\TestApp.exe – A working build of my simple LGP for Delphi demo.
- \Lib\LinkGrammar.pas - The Link-Grammar Parser Wrapper for Delphi (the reason you’re reading this)
LGP for Delphi < Download it here (1.03MB). WARNING: THIS ZIP FILE IS OUTDATED! USE THE SVN REPOSITORY INSTEAD!
SVN Repository
URL: http://svn.lakraven.com:81/svn/OpenSource/Link-Grammar/
Username and Password: anon
Note: You might need the Microsoft Visual C++ 2008 Redistributable Package because Link-Grammar.dll was built in MSVC++ 2008.
Disclaimer: All files have been scanned with Kaspersky Internet Security 2011 (100% up-to-date) and are confirmed absolutely clean (makes sense given that I built all the binaries myself), however… I (Simon J Stuart) may not be held accountable for any losses or damages (be they physical, emotional, financial or chronological in nature) caused as a result or during the use of any of the files (including but not limited to: compiled binaries, sources, media) downloaded from this website. You download all files at your own risk. I (Simon J Stuart) do not warranty or guarantee (implicitly or otherwise) that any of the sources and/or files will be suitable for any purpose, and cannot be held liable should the sources/files not meet any of your expectations/requirements.
Useful Links:
Acknowledgements:
- Dr. Richard D. Cooper - for introducing me to the Link-Grammar Parser in the first place
- Linas Vepstas – for keeping the project alive and being so patient when the “big push” was made to simplify building LGP on the Windows (MSVC++) platform
- Borislav Iordanov – for being absolutely instrumental in getting LGP to build properly on the Windows (MSVC++) platform
- Daniel Sleator – I’m informed is the gentleman who started it all

September 23, 2010 at 3:28 pm
Wow, how long has this dll been available? I was looking for something like this
September 24, 2010 at 1:07 am
I compiled and built the DLL on Sunday 19th September 2010 (or Monday 20th depending on whether it was before or after midnight, can’t quite remember)… anyway, enjoy!
November 15, 2010 at 4:12 am
Hi, I’m looking for a wrapper so I can use the API in Microsoft VB/Access….. is this possible or available?
November 15, 2010 at 6:35 am
It is, of course, possible to produce a VB/VBA wrapper for the LGP, however I long ago left the Basic language, back in the days of DOS, and haven’t looked back. This means that I’m not the right guy to ask to produce such a thing.
If you have a rudimentary understanding of DLL Linking in Basic, you should be able to produce a wrapper simply enough! All of the functions exported by the DLL have their prototypes shown clearly in my Pascal wrapper unit, along with the parameter and return types. It may be easier to use my Pascal source as a reference than translating the function headers from their original C source (not to mention the exploratory work required to find the exported function prototypes in the original C source).
I also suggest posting your request on the official LGP mailing group, as somebody there may already have produced a VB/VBA wrapper for the LGP. The link to the mailing group is in this post above.
December 16, 2010 at 7:27 am
you should credit Daniel Sleator who originally did this work.
January 30, 2011 at 8:06 pm
I have now added this credit as I have just updated the page to reflect today’s project update (including the switch to the 4.7.1 Link-Grammar.dll file)
December 1, 2011 at 2:56 am
This looks like pretty interesting stuff. I have downloaded it, and find it a little beyond my skill set.
If I could ask two quick questions…
1). Where do I find more info?
2). I am needing a subset of this functionality. In your demo, how would I get a list of tokens and their usage? For example (word 1 = Noun, Word 2 = Verb, etc).
Awesome work. Thanks for making this available.
December 1, 2011 at 11:00 am
Hi George, you can find more info on the LGP here (http://www.abisource.com/projects/link-grammar/) and by following some of the links on that page.
There’s also a Google Group run by the current developer of the LGP itself (http://groups.google.com/group/link-grammar/topics).
There are methods in the LGP API to traverse the linkages one by one (which gives you each word’s designation – such as Noun, Verb, Adjective etc.)…. a little research on your part will be required to find the various usage demos, but they can be found through both the group and the other link I provided in this comment.
Good luck and enjoy