line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package KinoSearch1::Search::Scorer; |
2
|
18
|
|
|
18
|
|
114
|
use strict; |
|
18
|
|
|
|
|
69
|
|
|
18
|
|
|
|
|
589
|
|
3
|
18
|
|
|
18
|
|
91
|
use warnings; |
|
18
|
|
|
|
|
37
|
|
|
18
|
|
|
|
|
425
|
|
4
|
18
|
|
|
18
|
|
93
|
use KinoSearch1::Util::ToolSet; |
|
18
|
|
|
|
|
32
|
|
|
18
|
|
|
|
|
2485
|
|
5
|
18
|
|
|
18
|
|
103
|
use base qw( KinoSearch1::Util::CClass Exporter ); |
|
18
|
|
|
|
|
45
|
|
|
18
|
|
|
|
|
5239
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
BEGIN { |
8
|
18
|
|
|
18
|
|
253
|
__PACKAGE__->init_instance_vars( |
9
|
|
|
|
|
|
|
# constructor params |
10
|
|
|
|
|
|
|
similarity => undef, |
11
|
|
|
|
|
|
|
); |
12
|
|
|
|
|
|
|
} |
13
|
|
|
|
|
|
|
our %instance_vars; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
our @EXPORT_OK = qw( %score_batch_args ); |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub new { |
18
|
736
|
|
|
736
|
1
|
1128
|
my $class = shift; |
19
|
736
|
|
|
|
|
2383
|
verify_args( \%instance_vars, @_ ); |
20
|
736
|
|
|
|
|
2358
|
my %args = ( %instance_vars, @_ ); |
21
|
|
|
|
|
|
|
|
22
|
736
|
|
33
|
|
|
3240
|
$class = ref($class) || $class; |
23
|
736
|
|
|
|
|
3578
|
my $self = _construct_parent($class); |
24
|
|
|
|
|
|
|
|
25
|
736
|
50
|
|
|
|
2174
|
if ( defined $args{similarity} ) { |
26
|
0
|
|
|
|
|
0
|
$self->set_similarity( $args{similarity} ); |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
736
|
|
|
|
|
2488
|
return $self; |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
our %score_batch_args = ( |
33
|
|
|
|
|
|
|
hit_collector => undef, |
34
|
|
|
|
|
|
|
start => 0, |
35
|
|
|
|
|
|
|
end => 2**31, |
36
|
|
|
|
|
|
|
); |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=begin comment |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
my $explanation = $scorer->explain($doc_num); |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
Provide an Explanation for how this scorer rates a given doc. |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=end comment |
45
|
|
|
|
|
|
|
=cut |
46
|
|
|
|
|
|
|
|
47
|
0
|
|
|
0
|
0
|
|
sub explain { shift->abstract_death } |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
1; |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
__END__ |