-
+foreach my $l ( 0 .. 9 ) { # 0.9 - 0.7 -- 0.6 is too lax
+ my $limit = 0.9 - "0.$l";
+warn "XXX limit $limit\n";
print "# total = ",scalar keys %{ $stat->{_} }, $/;
foreach my $id ( sort keys %{ $stat->{_} } ) {
if ( $#u_v < 3 ) { # single, double
my ( $num, $key_id ) = split(/-/,$id,2);
- my @candidates = candidates $num => $key_id; #, 0.7; # XXX 0.9 too high, 0.8 better, 0.7 too lax
+ my @candidates = candidates $num => $key_id, $limit; #, 0.7; # XXX 0.9 too high, 0.8 better, 0.7 too lax
if ( @candidates ) {
print "MERGE $num $key_id ", dump( @candidates ), ' val=', dump( \@val ), $/;
my @keys = map { $_->{key} } @candidates;
}
}
-print "# total after merge = ",scalar keys %{ $stat->{_} }, $/;
+print "# total after merge $limit = ",scalar keys %{ $stat->{_} }, $/;
foreach my $id ( sort keys %{ $stat->{_} } ) {
my @val; # = @{ $stat->{_}->{$id} };
print "SKIP[$id]";
next;
}
- $stat->{B_count}->{ scalar @val }++;
- $stat->{B_count_total}++;
+ $stat->{"B${limit}_count"}->{ scalar @val }++;
+ $stat->{"B${limit}_count_total"}++;
- #$stat->{B_count_val_dup}->{ join(' ', @val) }++; # with duplicates
+ #$stat->{"B${limit}_count_val_dup"}->{ join(' ', @val) }++; # with duplicates
my $u;
$u->{$_}++ foreach @val;
my @u_v = sort keys %$u;
- $stat->{B_count_val}->{ join(' ', @u_v ) }++; # without duplicates
+ $stat->{"B${limit}_count_val"}->{ join(' ', @u_v ) }++; # without duplicates
}
+} # for $limit
+
print "# stat = ",dump( $stat );
#print "# keys = ",dump( $keys );