From: Shawn Boyette Date: Thu, 18 Dec 2008 19:20:12 +0000 (+0000) Subject: misc score added X-Git-Url: http://git.equinoxoli.org/?p=migration-tools.git;a=commitdiff_plain;h=4dd729a7f95d0954355452bd0aac908e18452f51 misc score added --- diff --git a/fingerprinter b/fingerprinter index 0f8080c..8d14ae3 100755 --- a/fingerprinter +++ b/fingerprinter @@ -65,6 +65,9 @@ sub populate_marc { my ($record, $id) = @_; my %marc = (); $marc{isbns} = []; + # reset misc score + $conf->{misc_score} = 999; + # id, stringified $marc{id} = $id->as_string($conf->{subfield}); @@ -247,11 +250,12 @@ sub score_marc { push @score, $scores_code{$_}->($marc, $record); $json .= $_ . ':' . $score[-1] . ','; } - chop($json); # get rid of the trailing comma + # add misc score + $json .= 'misc:' . $conf->{misc_score}; $json .= '}'; - my $compact = join('', @score); + my $compact = join('', @score, $conf->{misc_score}); $marc->{score} = "$compact\t$json"; }