Merge branch 'master' of github.com:tla/stemmatology
Tara L Andrews [Sat, 16 Jun 2012 20:59:46 +0000 (22:59 +0200)]
lib/Text/Tradition/Language/Latin.pm
script/orth_case_links.pl

index 5643351..df87505 100644 (file)
@@ -140,7 +140,7 @@ sub morphology_tags {
                _morph_connect();
                return unless $morph;
                # Simple morph DB lookup, and return the results.
-               my $result = $morph->lookup( $orig );
+               my $result = $morph->lexicon_lookup( $orig );
                return map { _wordform_from_row( $_ ) } @{$result->{'objects'}};
        }
        
@@ -158,4 +158,4 @@ sub _wordform_from_row {
        return $wf;
 }
        
-1;
\ No newline at end of file
+1;
index c86ec5c..efde97c 100755 (executable)
@@ -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'} =~ /punctuat/;
+       next unless $text->{'name'} =~ /Heinrichi/;
        my $scope = $dir->new_scope;
        my $tradition = $dir->lookup( $id );
        print STDERR "Processing tradition " . $tradition->name . "\n";
@@ -38,11 +38,12 @@ foreach my $text ( $dir->traditionlist ) {
                                                . $r->text . ")\n";
                                        $merged{$om->id} = 1;
                                        $c->merge_readings( $r, $om ); 
-                               } elsif ( !$c->get_relationship( $r, $om ) ) {
+                               } else {
                                        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, 
-                                               { 'type' => 'orthographic', 'scope' => 'global' } );
+                                       eval { $c->add_relationship( $r, $om, 
+                                               { 'type' => 'orthographic', 'scope' => 'global' } ); };
+                                       print STDERR $@ if $@;
                                }
                        }
                }