From: Tara L Andrews Date: Tue, 16 Jul 2013 16:44:21 +0000 (+0200) Subject: a little script cleanup X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=db80d3ec75a5a6af122e4319b80fe7e0624db4f7;p=scpubgit%2Fstemmatology.git a little script cleanup --- diff --git a/base/script/vectors.pl b/base/script/vectors.pl index b3efd7b..717f90b 100755 --- a/base/script/vectors.pl +++ b/base/script/vectors.pl @@ -13,7 +13,7 @@ binmode STDERR, ':utf8'; # Get our arguments my( $traditionfile, $threshold ) = @ARGV; -$threshold = 0.9 unless $threshold; +$threshold = 0.99 unless $threshold; # Load up a tradition my $t; @@ -29,7 +29,7 @@ my $c = $t->collation; my ( $matrix ) = make_matrix( $t ); # For each relationship in the graph, see how it compares to other node pairs -# rated > .9 +# rated > $threshold foreach my $pair ( $c->relationships ) { my $rel = $c->get_relationship( $pair ); @@ -173,13 +173,3 @@ sub make_matrix { return $cosine_values; } - -sub calc_similarity { - my( $matrix, $vecindex ) = @_; - - my $values = {}; - foreach my $val ( sort { $a <=> $b } keys %$values ) { - my $pairlist = join( ', ', @{$values->{$val}} ); - say "$val: $pairlist"; - } -} \ No newline at end of file