Link Grammar Parser - Patched Version ------------------------------------- Version 4.3.3 This directory contains a *patched* version of the final original release of the Link Grammer Parser. It has been patched to fix a few bugs, add a few enhancements, and, in general, make the Link Grammar Parser easier to use. This version includes Java bindings. It is released under the BSD license (which is GPL compatible), making it freely available for private and commercial use, with few restrictions. The terms of the license are given in the LICENSE file included with this software, and also available at http://www.link.cs.cmu.edu/link/license.html. Please see the web page http://www.abisource.com/projects/link-grammar/ for more information. The original website, including documetation, is located at http://www.link.cs.cmu.edu/link CONTENTS of this directory: LICENSE The license describing terms of use link-grammar/*.c The program. (Written in ANSI-C) data/en/4.0.dict The file containing the dictionary definitions. data/en/4.0.knowledge The post-processing knowledge file. data/en/4.0.constituents The constituent knowledge file. data/en/4.0.affix The affix file. data/en/tiny.dict A small sample dictionary. data/en/words/* A directory full of word lists. data/en/4.0.batch This is a batch file of sentences (both grammatical and ungrammatical ones) that are handled correctly by this release of the system. Feed this into the parser with "./grammar-parse < 4.0.batch" configure The GNU configuration script CREATING the system: To compile the link-grammar shared library and demonstration program, at the command line, type: ./configure make To install, change user to "root" and say make install This will install the lib-link-grammar.so libarary into /usr/local/lib the header files in /usr/local/include/link-grammar and the dictionaries into /usr/local/share/link-grammar. The /usr/local install target can be over-ridden using the standard GNU configure --prefix option, so for example: ./configure --prefix=/opt/link-grammar By using pkg-config (see below), non-standard install locations can be automatically detected. RUNNING the program: To run the program issue the unix command: ./grammar-parse This starts the program. Help is available there with "!help". A number of user-settable variables control what happens. "!var" shows these variables and their current values. The program can run in batch mode for testing the system on a large number of sentences. The following command runs the parser on a file called 4.0.batch ./grammar-parse < 4.0.batch The line "!batch" near the top of 4.0.batch turns on batch mode. In this mode sentences labeled with an initial "*" should be rejected and those not starting with a "*" should be accepted. Any deviation from this behavior is reported as an error. USING the parser in your own applications: There is a API (application program interface) to the parser. This makes it easy to incorporate it into your own applications. The API documented on the web site. USING pkg-config: To make compling and linking easier, the current release uses the pkg-config system. To determine the location of the link-grammar header files, say `pkg-config --cflags link-grammar` To obtain the location of the libraries, say `pkg-config --libs link-grammar` Thus, for example, a typical makefile might include the targets: .c.o: cc -O2 -g -Wall -c $< `pkg-config --cflags link-grammar` $(EXE): $(OBJS) cc -g -o $@ $^ `pkg-config --libs link-grammar` JAVA bindings: This release includes a very simple Java binding. Its use is optional. It can be accessed by copying the file LinkGrammar.java into your java project. The bindings will be built automatically if jni.h can be found. Some common java jvm distributions (most notably, the ones from Sun) place this file in unusual locations, where it cannot be found. To remedy this, specify the location with the CPPFLAGS variable: so, for example, export CPPFLAGS="-I/opt/jdk1.5/include/:/opt/jdk1.5/include/linux" or export CPPFLAGS="-I/c/java/jdk1.6.0/include/ -I/c/java/jdk1.6.0/include/win32/" Please note that the use of /opt is non-standard, and most system tools will fail to find packages installed there. COMMERCIAL use: The original authors would be pleased to discuss alternate licensing terms and/or additional research work, with those wanting to use this system under a paid contract. Academic products or papers should reference the verious link grammar publications. ADDRESSES If you have any questions, or find any bugs, please feel free to send a note to the current maintainers: Dom Lachowicz - Linas Vepstas - The original authors of the Link Grammar parser are: Daniel Sleator sleator@cs.cmu.edu Computer Science Department 412-268-7563 Carnegie Mellon University www.cs.cmu.edu/~sleator Pittsburgh, PA 15213 Davy Temperley dtemp@theory.esm.rochester.edu Eastman School of Music 716-274-1557 26 Gibbs St. www.link.cs.cmu.edu/temperley Rochester, NY 14604 John Lafferty lafferty@cs.cmu.edu Computer Science Department 412-268-6791 Carnegie Mellon University www.cs.cmu.edu/~lafferty Pittsburgh, PA 15213