Lingua::EN::Segmenter::Baseline - Segment text randomly for baseline purposes


Lingua-EN-Segmenter documentation Contained in the Lingua-EN-Segmenter distribution.

Index


Code Index:

NAME

Top

Lingua::EN::Segmenter::Baseline - Segment text randomly for baseline purposes

SYNOPSIS

Top

See Lingua::EN::Segmenter::TextTiling

DESCRIPTION

Top

See Lingua::EN::Segmenter::TextTiling

EXTENDING

Top

See Lingua::EN::Segmenter::TextTiling

AUTHORS

Top

David James <splice@cpan.org>

SEE ALSO

Top

Lingua::EN::Segmenter::TextTiling, Lingua::EN::Segmenter::Evaluator, http://www.cs.toronto.edu/~james

LICENSE

Top

  Copyright (c) 2002 David James
  All rights reserved.
  This program is free software; you can redistribute it and/or
  modify it under the same terms as Perl itself.


Lingua-EN-Segmenter documentation Contained in the Lingua-EN-Segmenter distribution.

# Baseline random segmenter
package Lingua::EN::Segmenter::Baseline;

$VERSION = 0.10;
use base 'Lingua::EN::Segmenter::TextTiling';    
use strict;

# Return random depth scores
sub smoothed_depth_scores {
    my ($self,$input) = @_;
    my $words = $self->{splitter}->words($input);
    my $tiles = $self->{splitter}->tile($words);
    my $num_scores = @$tiles - 2*$self->{TILES_PER_BLOCK};
    [ map { rand() } 0..$num_scores ]
}


1;