The Simple Language Generator
The Simple Language Generator (SLG) is a program that allows the user to
construct and manipulate stochastic context-free languages with relative ease.
Although context-free grammars are convenient for representing natural
language syntax, they do not easily support the semantic and pragmatic
constraints that make certain combinations of words or structures more likely
than others. For example, the subject of a sentence is dependent on its
verbs, or vice versa. So a given noun can only be the subject of certain
verbs, but also a given noun (dog) is more likely to be the subject of some
verbs (bit) than of others (announced). Thus, semantically, most or all of
the words in a natural sentence are interdependent.
Context-free grammars for languages involving many interacting constraints can
become extremely complex and cannot reasonably be written by hand (because
these constraints violate context-freedom). SLG allows the basic syntax of a
grammar to be specified in context-free form and constraints to be applied
atop this framework in a relatively natural fashion. This combination of
grammar and constraints is then converted into a standard stochastic
context-free grammar for use in generating sentences or in making context
dependent likelihood predictions of the sequence of words in a sentence.
SLG can be used to generate sentences, parse them, and produce optimal word
predictions at any point in the sentence.
A technical report describing SLG and providing exmaples of its use is
SLG comes precompiled for most up-to-date Linux machines. Simply download the tar file and unpack it with "tar xvzf
slg.tgz". Try running slg with no arguments. If it is correctly
compiled for your machine, you should see a help message.
If the slg executable does not work on your machine, you will need to
compile your own. This involves two steps:
First you must compile the libdrutils.a library. To do this, go to this web page and follow the instructions.
Next, assuming you have already unpacked the SLG
tar file, you should edit the first line of the Makefile to point to the
location of the DRUtils header files (drutils.h).
Now run make and with any luck it will compile nicely. There is no built-in
mechanism for installing it someplace special on your machine. But it's only
a single, stand-alone executable, so you should be able to handle that
- First one with a version number.
Comments, questions, and bug reports should be addressed to email@example.com.
Doug Rohde, firstname.lastname@example.org,
Department of Brain and Cognitive Science,
Massachusetts Institute of Technology