After many abortive efforts to "clean up" before distributing this, I
realised what I should have long ago---that's never going to get done.
So there is a lot of code in here that does nothing right now.  Think of
it as junk DNA.

=== the tagger ===

To build the function tagger, make sure your ARCH variable is set (to
one of "ppc", "i686", or "sun4", or else you'll have to add a Makefile),
make sure expat is installed (see below), and then type

  make tagger

The compiled tagger will then be in $ARCH/O/, named "funcTag".  You
might want to also do 
  ln -s $ARCH/O/ exec
so that you don't have to keep typing "ppc/O/funcTag" or whatever.

To run it, you'll type

  exec/funcTag data/ infile

The provided infile (or, if none, standard input) should contain parsed
sentences in Penn Treebank s-expression format as output by the Charniak
parser.  The output will be the same parse trees with function tags
added.  To pretty-print the trees, use -P.  To print *only* the function
tags and not the parse trees, use -F.  To skip "Sentence #" and such,
use -q.  A summary of options is at

  exec/funcTag -h


=== expat ===

This code makes some use of the expat XML library, version 1.95.
(Version 2.0 should therefore work as well, but I haven't tested it.)
If it is installed to the system libraries (including /sw for Mac
users), it should be picked up automatically.  If you are doing a
quick-and-dirty local installation, you can just copy the static library
and the header files as follows:

  mkdir $ARCH/O/lib
  cp expat-1.95/libexpat.la $ARCH/O/lib
  cp expat-1.95/lib/expat.h src/
  cp expat-1.95/lib/expat_external.h src/

=== training ===

The tagger is already trained according to the function trees given in
Chapter 4 of my thesis.  If you want to play around with these, you can.
First, refresh the dead symlinks in the data directory (train.txt,
test.main, and if you like, test.final) to point to local copies of the
treebank files.  These should be a concatenation of all .mrg files in
the relevant sections.

Then, make the four executables that collectively make up the trainer:

  make train

These will now be in the $ARCH/O subdirectory (which, if you haven't
already, you should symlink to "exec/").  Then, run

  scripts/calc gr
  scripts/calc ff
  scripts/calc tp

(or just "source batch").  This should generate all the data you need
for the function tagging process.

=== contact me ===

In case anything goes horribly wrong, feel free to contact me.  My email
address is dblaheta@knox.edu .
