use vars qw/ @EXPORT_OK $VERSION /;
@EXPORT_OK = qw/ run_analysis group_variants analyze_variant_location wit_stringify /;
-$VERSION = "1.0";
+$VERSION = "1.1";
my $SOLVER_URL = 'http://byzantini.st/cgi-bin/graphcalc.cgi';
'name' => 'this is a text',
'input' => 'TEI',
'file' => '/path/to/tei_parallel_seg_file.xml' );
- $t->enable_stemmata;
$t->add_stemma( 'dotfile' => $stemmafile );
my $variant_data = run_analysis( $tradition );
my $tradition = Text::Tradition->new( 'input' => 'TEI',
'name' => 'test0',
'file' => $datafile );
-$tradition->enable_stemmata;
my $s = $tradition->add_stemma( 'dotfile' => 't/data/florilegium.dot' );
is( ref( $s ), 'Text::Tradition::Stemma', "Added stemma to tradition" );
if( $rdg ) {
$rdghash->{'text'} = $rdg->text .
( $rdg->rank == $rank ? '' : ' [' . $rdg->rank . ']' );
- $rdghash->{'is_ungrammatical'} = $rdg->grammar_invalid;
- $rdghash->{'is_nonsense'} = $rdg->is_nonsense;
+ if( $rdg->does( 'Text::Tradition::Morphology' ) ) {
+ $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
}
# Get the attributes of the parent object while we are here
$phash->{'text'} = $pobj->text if $pobj;
- $phash->{'is_nonsense'} = $pobj->is_nonsense;
- $phash->{'is_ungrammatical'} = $pobj->grammar_invalid;
+ if( $pobj && $pobj->does('Text::Tradition::Morphology') ) {
+ $phash->{'is_nonsense'} = $pobj->is_nonsense;
+ $phash->{'is_ungrammatical'} = $pobj->grammar_invalid;
+ }
} elsif( $p eq '(omitted)' ) {
$phash->{relation} = { type => 'addition' };
}