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


Alvis-QueryFilter documentation  | view source Contained in the Alvis-QueryFilter distribution.

Index


NAME

Top

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

SYNOPSIS

Top

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

DESCRIPTION

Top

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.

METHODS

Top

$commandLine

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

$errorFile

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

$FIFO

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

$parFile

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

$taggerRoot

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

$verbose

Set for more reports to STDERR during operation.

reopen()

    &Alvis::Treetagger::reopen();

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

shut()

    &Alvis::Treetagger::shut();

Shutdown the FIFO's and the Treetagger process.

tag()

    $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.

AUTHOR

Top

Wray Buntine

COPYRIGHT AND LICENSE

Top


Alvis-QueryFilter documentation  | view source Contained in the Alvis-QueryFilter distribution.