Lingua::EN::Segmenter::Evaluator - Evaluate a segmenting method
my $tiling_segmenter = Lingua::EN::Segmenter::TextTiling->new(); foreach (@ARGV) { my $input = read_file($_); print "\nFile name: $_\n"; printf "Results from TextTiling algorithm: Strict scoring: %2d%% recall, %2d%% precision Relaxed scoring: %2d%% recall, %2d%% precision V. relaxed scoring: %2d%% recall, %2d%% precision ", calc_stats(evaluate_segmenter($tiling_segmenter,20,$input)); }
See synopsis.
Also check out segmenter.pl in the eg directory.
This module only works correctly when the segmenter has a MIN_SEGMENT_SIZE >= 2.
David James <splice@cpan.org>
Lingua::EN::Segmenter::TextTiling, Lingua::EN::Segmenter::Evaluator, http://www.cs.toronto.edu/~james
To install Lingua::EN::Segmenter, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Lingua::EN::Segmenter
CPAN shell
perl -MCPAN -e shell install Lingua::EN::Segmenter
For more information on module installation, please visit the detailed CPAN module installation guide.