calculate common readings when we parse
[scpubgit/stemmatology.git] / lib / Text / Tradition / Parser / TEI.pm
index afea435..3d5fd03 100644 (file)
@@ -188,6 +188,13 @@ sub parse {
     # Now that we have ranks, see if we have distinct nodes with identical
     # text and identical rank that can be merged.
     $tradition->collation->flatten_ranks();
+    
+    # And now that we've done that, calculate the common nodes.
+    $tradition->collation->calculate_common_readings();
+    
+    # Save the text for each witness so that we can ensure consistency
+    # later on
+       $tradition->collation->text_from_paths();       
 }
 
 sub _clean_sequence {