Alvis::Treetagger - Perl module providing FIFO interface to Treetagger


     $tagginglines = &Alvis::Treetagger::tag($linetotag);


Interface to TreeTagger so it can be run efficiently via FIFOs. Thus the Treetagger executable is already started up and loaded so the &Alvis::Treetagger::tag() function can operate with a minimum of effort. TreeTagger needs to have already been installed separately. Note all input and output is assumed to be UTF-8, so character set conversion required if something else is in use.



Command line arguments for TreeTagger. Defaults to "-token -lemma -sgml".


Where to place Treetaggers STDERR. Goes to STDERR by default, but otherwise set to a filename prior to opening.


Stem for the read/write FIFOs running Treetagger. Defaults to "/tmp".


Name of parameter file to use in the Treetagger "lib/" directory. Defaults to English, "english.par".


Location of Treetagger directory with executables ("bin/"), libraries ("lib/"), configure files, etc. Should be set during installation.


Set for more reports to STDERR during operation.



Open the FIFO's and start and warm up the Treetagger process.



Shutdown the FIFO's and the Treetagger process.


    $tagginglines = &Alvis::Treetagger::tag($linetotag);

Input text should have been tokenised, and is assumed space delimited. So "End." is one token with a "." being the fourth character. Output text is one token per line, with its parts tab delimited giving the original token, its part of speech, and then its lemmatised form. Shuts down treetagger and returns undef if an error occurs.


Wray Buntine


Copyright (C) 2006 Wray Buntine

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.