From: tla Date: Thu, 7 Jun 2012 11:57:49 +0000 (+0200) Subject: fix glaring bug in relationship logic X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6295d215efd9499c285b09a544cd268db8bc4506;p=scpubgit%2Fstemmatology.git fix glaring bug in relationship logic --- diff --git a/script/orth_case_links.pl b/script/orth_case_links.pl index a2ddbf1..c86ec5c 100755 --- a/script/orth_case_links.pl +++ b/script/orth_case_links.pl @@ -18,7 +18,7 @@ my $dir = Text::Tradition::Directory->new( $connect_args ); foreach my $text ( $dir->traditionlist ) { my $id = $text->{'id'}; - next unless $text->{'name'} =~ /Virtutes/; + next unless $text->{'name'} =~ /punctuat/; my $scope = $dir->new_scope; my $tradition = $dir->lookup( $id ); print STDERR "Processing tradition " . $tradition->name . "\n"; @@ -38,7 +38,7 @@ foreach my $text ( $dir->traditionlist ) { . $r->text . ")\n"; $merged{$om->id} = 1; $c->merge_readings( $r, $om ); - } elsif ( $c->get_relationship( $r, $om ) ) { + } elsif ( !$c->get_relationship( $r, $om ) ) { print STDERR sprintf( "Adding orthographic link for %s and %s (%s / %s)\n", $r->id, $om->id, $r->text, $om->text ); $c->add_relationship( $r, $om,