line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Lingua::JA::Summarize::Extract::Plugin::Sentence::Tiny; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
4
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
33
|
|
4
|
1
|
|
|
1
|
|
6
|
use base qw( Lingua::JA::Summarize::Extract::Plugin ); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
200
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
sub sentence { |
7
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
8
|
0
|
|
|
|
|
|
my $text = $self->text; |
9
|
|
|
|
|
|
|
|
10
|
0
|
|
|
|
|
|
$text =~ s/[ \x{3000}]+/ /g; |
11
|
0
|
|
|
|
|
|
$text =~ s/[\x{3001}\x{3002}]/\n/g; |
12
|
0
|
|
|
|
|
|
$text =~ s/[\r\n]+/\n/g; |
13
|
|
|
|
|
|
|
|
14
|
0
|
|
|
|
|
|
my $i = 1; |
15
|
0
|
|
|
|
|
|
my @sentence = map { { line => $i++, text => $_ } } split /\n/, $text; |
|
0
|
|
|
|
|
|
|
16
|
0
|
|
|
|
|
|
\@sentence; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
1; |