forget it
authorShawn Boyette <sboyette@esilibrary.com>
Mon, 8 Dec 2008 22:36:38 +0000 (22:36 +0000)
committerShawn Boyette <sboyette@esilibrary.com>
Mon, 8 Dec 2008 22:36:38 +0000 (22:36 +0000)
compress_fingerprints

index 26fcd05..4c815fc 100755 (executable)
@@ -14,21 +14,13 @@ my %recs = (); # fingerprints belonging to each record
 
 open FP, '<', $ARGV[0] or die "Can't open input file: $!\n";
 
-my $count = 0;
-my $i = 0;
-my ($total) = split /s+/, `wc -l $ARGV[0]`;
-$| = 1;
-
 print "Loading and ranking fingerprints\n";
 while (<FP>) {
     my @fields = split "\t", $_;
     my $fp = populate_fingerprint(@fields);
     rank_fingerprint($fp);
-    $i++;
     print "\r", ( int($i / $total) ), "% complete" unless ($i % 1000);
 }
-print "$total fingerprints processed\n";
-print "$count records set as leads\n";
 print "Writing matchset to disk\n";
 dump_records();
 
@@ -71,7 +63,6 @@ sub rank_fingerprint {
                                       score => $fp->{compact} },
                             recs => [ $id ] };
             $recs{$id}{lead} = 1;
-            $count++;
         } else {
             # have seen this fp. push record id onto matchlist
             push @{ $fps{$sha1}{recs} }, $id;