Extract/Plugin/Sentence/Tiny.pm untested

filter: Statementstmt 0.0% 0 / 15 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 3 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 19 CC 1 SCAR 6.9
CC
1
Cov
0%
sentence
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 package Lingua::JA::Summarize::Extract::Plugin::Sentence::Tiny;
2  
3 use strict;
4 use base qw( Lingua::JA::Summarize::Extract::Plugin );
5  
6 sub sentence {
7 my $self = shift;
8 my $text = $self->text;
9  
10 $text =~ s/[ \x{3000}]+/ /g;
11 $text =~ s/[\x{3001}\x{3002}]/\n/g;
12 $text =~ s/[\r\n]+/\n/g;
13  
14 my $i = 1;
15 my @sentence = map { { line => $i++, text => $_ } } split /\n/, $text;
16 \@sentence;
17 }
18  
19 1;