sub index :Path :Args(1) {
my( $self, $c, $textid ) = @_;
my $m = $c->model('Directory');
+ my $am = $c->model('Analysis');
my $tradition = $m->tradition( $textid );
if( $tradition->stemma_count ) {
my $stemma = $tradition->stemma(0);
$c->stash->{'show_type1'} = $use_type1;
$c->stash->{'ignore_variant'} = $ignore_sort;
# TODO Run the analysis as AJAX from the loaded page.
- my %analysis_options;
+ my %analysis_options = ( calcdir => $am );
$analysis_options{'exclude_type1'} = !$use_type1;
if( $ignore_sort eq 'spelling' ) {
$analysis_options{'merge_types'} = [ qw/ spelling orthographic / ];
foreach my $rhash ( @{$loc->{'readings'}} ) {
my $gst = wit_stringify( $rhash->{'group'} );
$rhash->{'group'} = $gst;
- my $roots = join( ', ', @{$rhash->{'independent_occurrence'}} );
- $rhash->{'independent_occurrence'} = $roots;
+ _stringify_element( $rhash, 'independent_occurrence' );
+ _stringify_element( $rhash, 'reversions' );
unless( $rhash->{'text'} ) {
$rhash->{'text'} = $rhash->{'readingid'};
}
}
}
+sub _stringify_element {
+ my( $hash, $key ) = @_;
+ my $str = join( ', ', @{$hash->{$key}} );
+ $hash->{$key} = $str;
+}
+
=head2 graphsvg
POST stexaminer/graphsvg