| 1 | package PMLTQ::PML2BASE::Relation::Treex::AEParentCIterator; | ||||||||||||
| 2 | 6 | our $AUTHORITY = 'cpan:MATY'; | |||||||||||
| 3 | 6 | $PMLTQ::PML2BASE::Relation::Treex::AEParentCIterator::VERSION = '3.0.1'; | |||||||||||
| 4 | # ABSTRACT: Different implementation of effective parent relation iterator on a-nodes for Treex treebanks | ||||||||||||
| 5 | |||||||||||||
| 6 | |||||||||||||
| 7 | 6 | ▶ | use strict; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 8 | 6 | ▶ | use warnings; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 9 | 6 | ▶ | use PMLTQ::PML2BASE; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 10 | |||||||||||||
| 11 | |||||||||||||
| 12 | 0 | ▶ | sub dump_relation { | ||||||||||
|
Subroutine
dump_relation: not called CC=6 SCAR=37.4
Pod
undocumented
| |||||||||||||
| 13 | 0 | my ($tree, $hash, $fh ) = @_; | |||||||||||
| 14 | 0 | my $name = $tree->type->get_schema->get_root_name; | |||||||||||
| 15 | 0 | ▶ | die 'Trying dump relation eparent for incompatible schema' unless $name =~ /^treex_document/; | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 16 | |||||||||||||
| 17 | 0 | ▶ | my $struct_name = $tree->type->get_structure_name || ''; | ||||||||||
|
Condition0%0/2
$tree->type->get_structure_name || ''
MC/DC0%0/1
$tree->type->get_structure_name || ''
$tree->type->get_structure_name
Truth table0%0/2
A
A= $tree->type->get_structure_name
| |||||||||||||
| 18 | 0 | ▶ | return unless $struct_name eq 'a-root'; | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 19 | |||||||||||||
| 20 | 0 | for my $node ( $tree->descendants ) { | |||||||||||
| 21 | 0 | for my $p ( PMLTQ::Relation::Treex::AGetEParentsC($node) ) { | |||||||||||
| 22 | 0 | $fh->print( PMLTQ::PML2BASE::mkdump( $hash->{$node}{'#idx'}, $hash->{$p}{'#idx'} ) ); | |||||||||||
| 23 | } | ||||||||||||
| 24 | } | ||||||||||||
| 25 | } | ||||||||||||
| 26 | |||||||||||||
| 27 | 6 | 1; | |||||||||||
| 28 | |||||||||||||
| 29 | __END__ | ||||||||||||