PML2BASE/Relation/PDT/AEParentIterator.pm

filter: Statementstmt 71.4% 15 / 21 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 80.0% 4 / 5 Podpod 0.0% 0 / 1 totaltotal 65.5% 19 / 29 CC 4 SCAR 23.5
CC
4
Cov
65%
dump_relation
20.0
BEGIN
1.0
BEGIN
1.0
CRAP 10.5
« PML2BASE/Relation/Treex/TEParentIterator.pm ↑ Summary PML2BASE/Relation/PDT/TEParentIterator.pm »
1 package PMLTQ::PML2BASE::Relation::PDT::AEParentIterator;
2 6 our $AUTHORITY = 'cpan:MATY';
3 6 $PMLTQ::PML2BASE::Relation::PDT::AEParentIterator::VERSION = '3.0.1';
4 # ABSTRACT: Effective parent relation iterator on a-nodes for PDT like treebanks
5  
6 6 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 6 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 6 ▶use PMLTQ::PML2BASE;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 6 ▶use PMLTQ::Relation::PDT;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 0 ▶sub dump_relation {
Subroutine dump_relation: not called CC=4 SCAR=30.0
Pod undocumented
12 0 my ($tree,$hash,$fh)=@_;
13  
14 0 my $name = $tree->type->get_schema->get_root_name;
15 0 ▶ die 'Trying dump relation eparent for incompatible schema' unless $name =~ /^adata/;
Branch: 1 branch
BranchTrueFalseTotal
unless $name =~ /^adata/ 0 0 0
16  
17 0 for my $node ($tree->descendants) {
18 0 for my $p (PMLTQ::Relation::PDT::AGetEParents($node,\&PMLTQ::Relation::PDT::ADiveAuxCP)) {
19 0 $fh->print(PMLTQ::PML2BASE::mkdump($hash->{$node}{'#idx'},$hash->{$p}{'#idx'}));
20 }
21 }
22 }
23  
24  
25 6 1;
26  
27 __END__
« PML2BASE/Relation/Treex/TEParentIterator.pm ↑ Summary PML2BASE/Relation/PDT/TEParentIterator.pm »