stemmaweb bugfixes and style fixes; add 'punctuation' relationship type
[scpubgit/stemmatology.git] / lib / Text / Tradition / Analysis.pm
index 1a3e7b1..85fe90a 100644 (file)
@@ -213,6 +213,8 @@ sub run_analysis {
                        if( $rdg ) {
                                $rdghash->{'text'} = $rdg->text . 
                                        ( $rdg->rank == $rank ? '' : ' [' . $rdg->rank . ']' );
+                               $rdghash->{'is_ungrammatical'} = $rdg->grammar_invalid;
+                               $rdghash->{'is_nonsense'} = $rdg->is_nonsense;
                        }
                        # Remove lacunose witnesses from this reading's list now that the
                        # analysis is done 
@@ -753,8 +755,10 @@ sub analyze_location {
                                                $relation->{'annotation'} = $rel->annotation;
                                        }
                                }
-                       }       
-                       $rdgparents->{$p} = { 'label' => $prep, 'relation' => $relation };
+                       }
+                       my $phash = { 'label' => $prep, 'relation' => $relation };
+                       $phash->{'text'} = $pobj->text if $pobj;
+                       $rdgparents->{$p} = $phash;
                }
                        
                $rdghash->{'reading_parents'} = $rdgparents;