This directory contains a simple implementation of a recognizer, parser and probabilistic parser for Tree Insertion Grammars (TIGs).
You need Perl (ver 5) to run these programs.
To download the scripts, shift click on the following links to save them to your directory. Look at the sample runs given below for how to run the programs.
ckytig_simple.pl -- Simplified CKY recognizer for TIGs in `Chomsky Normal Form' ckytig.pl -- CKY recognizer for TIGs ckytig_parse.pl -- CKY parser for TIGs ckytig_prob.pl -- CKY parser for Probabilistic TIGs: reports best parse grammar.pl -- A slightly more interesting grammar grammar2.pl -- Even more interesting grammar grammar3.pl -- Same grammar with empty input list viewtree -- Adwait Ratnaparkhi's tree viewer huge_val.c -- reports value of HUGE_VAL for a machineA default simple grammar and input string is contained within the scripts.
Sample run:
% ckytig.pl % ckytig_parse.pl | viewtree % ckytig_prob.pl | viewtree
Alternatively, you can try these programs on more interesting grammars:
For example:
% ckytig_parse.pl grammar.pl | viewtree % ckytig_prob.pl grammar.pl | viewtreeOr try:% ckytig_parse.pl grammar2.pl | viewtree % ckytig_prob.pl grammar2.pl | viewtree
If you set the
@inputlist ingrammar.plto the empty list, you can enter sentences in the stdin of the program.For example:
% ckytig_parse.pl grammar3.pl | viewtree John plays soccer
Anoop Sarkar anoop at linc.cis.upenn.edu