line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package HTML::Feature::Engine::TagStructure; |
2
|
3
|
|
|
3
|
|
11
|
use strict; |
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
68
|
|
3
|
3
|
|
|
3
|
|
9
|
use warnings; |
|
3
|
|
|
|
|
3
|
|
|
3
|
|
|
|
|
69
|
|
4
|
3
|
|
|
3
|
|
8
|
use base qw(HTML::Feature::Engine); |
|
3
|
|
|
|
|
3
|
|
|
3
|
|
|
|
|
1077
|
|
5
|
3
|
|
|
3
|
|
1700
|
use HTML::TreeBuilder; |
|
3
|
|
|
|
|
66912
|
|
|
3
|
|
|
|
|
26
|
|
6
|
3
|
|
|
3
|
|
1396
|
use Statistics::Lite qw(statshash); |
|
3
|
|
|
|
|
3159
|
|
|
3
|
|
|
|
|
196
|
|
7
|
3
|
|
|
3
|
|
1023
|
use HTML::Feature::Result; |
|
3
|
|
|
|
|
8
|
|
|
3
|
|
|
|
|
16
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub run { |
10
|
8
|
|
|
8
|
1
|
16
|
my $self = shift; |
11
|
8
|
|
|
|
|
7
|
my $c = shift; |
12
|
8
|
|
|
|
|
8
|
my $html_ref = shift; |
13
|
8
|
|
|
|
|
12
|
$self->_tag_cleaning($c, $html_ref); |
14
|
8
|
|
|
|
|
15
|
return $self->_score($c, $html_ref); |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub _tag_cleaning { |
18
|
8
|
|
|
8
|
|
7
|
my $self = shift; |
19
|
8
|
|
|
|
|
8
|
my $c = shift; |
20
|
8
|
|
|
|
|
4
|
my $html_ref = shift; |
21
|
8
|
50
|
33
|
|
|
41
|
return unless $html_ref && $$html_ref; |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
# preprocessing |
24
|
8
|
|
|
|
|
28
|
$$html_ref =~ s{}{}xmsg; |
25
|
8
|
|
|
|
|
20
|
$$html_ref =~ s{ |