simplify Directory and add exceptions;
[scpubgit/stemmatology.git] / lib / Text / Tradition / Parser / CollateX.pm
index 7123d4d..0d9db22 100644 (file)
@@ -79,7 +79,7 @@ my $TRANSKEY = 'identical';
 
 sub parse {
     my( $tradition, $opts ) = @_;
-    my $graph_data = graphml_parse( $opts );
+    my( $graph_data ) = graphml_parse( $opts );
     my $collation = $tradition->collation;
 
        # First add the readings to the graph.
@@ -92,7 +92,6 @@ sub parse {
         }
         my %node_data = %$n;
         my $gnode_args = { 
-               'collation' => $collation,
                'id' => delete $node_data{$IDKEY},
                'text' => delete $node_data{$CONTENTKEY},
         };
@@ -158,6 +157,10 @@ sub parse {
     
     # Rank the readings.
     $collation->calculate_ranks() if $collation->linear;
+
+    # Save the text for each witness so that we can ensure consistency
+    # later on
+       $tradition->collation->text_from_paths();       
 }
     
 =head1 BUGS / TODO