From 4dd729a7f95d0954355452bd0aac908e18452f51 Mon Sep 17 00:00:00 2001 From: Shawn Boyette Date: Thu, 18 Dec 2008 19:20:12 +0000 Subject: [PATCH 1/1] misc score added --- fingerprinter | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) 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"; } -- 1.7.2.5