Sunday, November 9, 2008

Link Grammar

I found this syntactic parser (site) the other day and I also found there is a Ruby binding called Ruby LinkParser (site). The instruction on the Ruby LinkParser looked pretty simple and I thought I would be able to install it and start using Link Grammar from Ruby in no time.

Well, I was wrong. Maybe because the instruction was written for Unix/Linux users, it didn't work on Mac OS X Leopard. I spend half of the day to somehow manage to install it on my Mac. But the process is ugly. I don't recommend it to someone who is not so familiar with Mac OS X system. I hope the original authors could fix the problem and/or write a patch for the latest version of Link Grammar.

Anyway, I put the step-by-step instruction with a lot of screen captures on the CasualConc site. If you are interested, please check this page. If you know or figure out a better way to install them, please, please let me know. In fact, I'm not sure if it's working as it should.

In the future, I want to add a function to CasualTagger to do some simple syntactic parsing using Link Grammar/Ruby LinkParser. But first I need to figure out which functions to add and how. Yoichiro Hasebe wrote a program (port of phpSyntaxTree), RSyntaxTree, that draws a tree diagram from a syntactically parsed sentence (check this page), such as [S [NP RSyntaxTree][VP [V generates][NP multilingual syntax trees]]]. So I want to add a function to output this format (I'm not even sure if Ruby LinkParser does it or not).

By the way, for those who are not sure what syntactic parser is, here's the sample.

The origial sentence is:

Ruby is a dynamic, open source programming language.



If you try to install this, please let me know if it works for you.

3 comments:

Linas said...

link-grammar version 4.4.2 should not require any patching to run with the Ruby bindings.

Yasu said...

Thank you for the information, but unfortunately, it looks like link-grammar 4.4.2 doesn't install on Mac OS X 10.5 without some modification or installing some software. I don't have enough knowledge about Unix to handle this. Do you have any idea?

the silent reader said...

Any development on this Yasu? I got it working with no problems on Snow Leopard, but need it to work on Leopard as well. . .