Branch Coverage

blib/lib/NanoB2B/NER/Arffman.pm
Criterion Covered Total %
branch 0 204 0.0


line true false branch
69 0 0 if ref $class
100 0 0 unless defined $params
116 0 0 if (defined $debugoption)
117 0 0 if (defined $diroption)
118 0 0 if (defined $indexoption)
119 0 0 if (defined $stopwordoption)
120 0 0 if (defined $iscuioption)
121 0 0 if (defined $sparsematrixoption)
122 0 0 if (defined $prefixoption)
123 0 0 if (defined $suffixoption)
124 0 0 if (defined $wcsoption)
125 0 0 if (defined $bucketsNumoption)
126 0 0 if (defined $ftsoption)
155 0 0 unless open $FILE, "$program_dir/$file"
239 0 0 if ($featHash{$text})
255 0 0 if (not $hash_ref or $hash_ref->{'cui'} or $hash_ref->{'sem'})
267 0 0 if ($hash_ref->{'cui'}) { }
273 0 0 if ($hash_ref->{'sem'}) { }
294 0 0 if ($hash{'cui'})
297 0 0 if ($hash{'sem'})
316 0 0 if ($bucketsNum > 1) { }
345 0 0 if ($hash{'pos'})
348 0 0 if ($hash{'cui'})
351 0 0 if ($hash{'sem'})
381 0 0 if ($charact) { }
382 0 0 if ($word =~ //) { }
389 0 0 if ($word =~ //) { }
469 0 0 unless open $META, '<', "$program_dir/$subdir/" . $name . '_meta'
502 0 0 if ($charact) { }
503 0 0 if ($word =~ //) { }
510 0 0 if ($word =~ //) { }
592 0 0 unless ($featHash{$word})
599 0 0 if ($hash{$type})
631 0 0 if ($bucketId == $bucketNum) { }
665 0 0 if (defined $stopwords_file)
678 0 0 if ($wcs)
692 0 0 if ($wcs and not $wcs_found and $abbrev ne $wcs_feature)
700 0 0 if ($wcs and not $wcs_found and $bucket != $wcs_bucket) { }
709 0 0 if ($bucketsNum > 1) { }
719 0 0 if ($curItem eq 'ortho') { }
753 0 0 if ($bucketsNum > 1)
771 0 0 if ($curItem eq 'ortho') { }
797 0 0 if ($bucketsNum > 1)
827 0 0 if ($program_dir ne '') { }
832 0 0 unless open $ARFF, '>', "$program_dir/$subdir/$arffdir/$featdir/$typeDir/" . $name . "_$type-" . $bucket . '.arff'
837 0 0 unless open $ARFF, '>', "$arffdir/$featdir/$typeDir/" . $name . "_$type-" . $bucket . '.arff'
907 0 0 if (length $word > 8)
912 0 0 if ($word =~ /$entId/o) { }
923 0 0 if ($stopwords_file and $word =~ /$stopRegex/o or $is_cui and $word_cuis[0] eq '')
925 0 0 unless ($word =~ /[a-zA-Z0-9\_\-]+$entId/)
931 0 0 if (length $word eq 1 and $word =~ /[^a-zA-Z0-9\_\-]/)
936 0 0 if ($a > 0)
937 0 0 if ($a < $wordLen - 1)
950 0 0 if ($item eq 'ortho') { }
0 0 elsif ($item eq 'morph') { }
0 0 elsif ($item eq 'text') { }
0 0 elsif ($item eq 'pos') { }
0 0 elsif ($item eq 'cui') { }
0 0 elsif ($item eq 'sem') { }
963 0 0 if ($sparse_matrix)
970 0 0 $wordOrig =~ /\b[\S]+($entId)\b/ ? :
973 0 0 if ($sparse_matrix)
979 0 0 if ($word ne '')
999 0 0 $word =~ /\b([A-Z])\w+\b/o ? :
1003 0 0 length $word == 1 ? :
1007 0 0 $word =~ /\b[A-Z]+\b/o ? :
1011 0 0 $word =~ /[0-9]+/o ? :
1015 0 0 $word =~ /\b[0-9]+\b/o ? :
1019 0 0 $word =~ /-/o ? :
1023 0 0 $word =~ /[^a-zA-Z0-9\s]/o ? :
1046 0 0 if ($a eq $preWord) { }
0 0 elsif ($a eq $sufWord) { }
1083 0 0 $w eq $a ? :
1084 0 0 $pw eq $a || $nw eq $a ? :
1119 0 0 $w eq $a ? :
1120 0 0 $pw eq $a || $nw eq $a ? :
1154 0 0 $uniSub->inArr($a, \@wArr) ? :
1155 0 0 $uniSub->inArr($a, \@pwArr) || $uniSub->inArr($a, \@nwArr) ? :
1193 0 0 $uniSub->inArr($a, \@wArr) ? :
1194 0 0 $uniSub->inArr($a, \@pwArr) || $uniSub->inArr($a, \@nwArr) ? :
1211 0 0 if ($curVal eq '1')
1236 0 0 if ($feature eq 'ortho') { }
0 0 elsif ($feature eq 'morph') { }
1257 0 0 if ($bucketsNum > 1) { }
1288 0 0 if ($bucketsNum > 1) { }
1326 0 0 if ($uniSub->inArr($bucket, \@bucketRange))
1349 0 0 if ($word eq '')
1354 0 0 if ($type eq 'text')
1360 0 0 unless ($featHash{$word})
1367 0 0 if ($hash{$type})
1392 0 0 if ($f eq 'pos') { }
0 0 elsif ($f eq 'sem') { }
1401 0 0 unless ($uniSub->inArr($word, \@attrDelux))
1422 0 0 if ($uniSub->inArr($bucket, \@bucketRange))
1481 0 0 unless open STP, $stopfile
1487 0 0 if (/\@stop.mode\s*=\s*(\w+)\s*$/)
1489 0 0 unless ($stop_mode =~ /^(AND|and|OR|or)$/)
1501 0 0 if (/^\s*$/)
1504 0 0 unless (m[^/])
1508 0 0 unless (m[/$])
1521 0 0 if (length $stop_regex <= 0)
1529 0 0 unless (defined $stop_mode)