Branch Coverage

blib/lib/Lingua/Norms/SUBTLEX.pm
Criterion Covered Total %
branch 103 174 59.2


line true false branch
146 0 23 ref $class ? :
172 0 10 unless open my $fh, '<', $self->{'_PATH'}
174 10 217 if $Lingua::Norms::SUBTLEX::INPUT_LINE_NUMBER == 1
177 0 217 if nocontent($file_str)
178 6 211 if ($self->{'_EQ'}->($str, $file_str))
184 0 10 unless close $fh
284 0 0 defined $args{'size_corpus'} ? :
288 0 0 defined $args{'n_wordtypes'} ? :
296 0 0 is_numeric($args{'frq_opm'}) ? :
0 0 is_numeric($args{'frq_count'}) ? :
298 0 0 if ($Lingua::Norms::SUBTLEX::EVAL_ERROR or not is_numeric($frq_count))
300 0 0 if (not $Lingua::Norms::SUBTLEX::EVAL_ERROR and is_numeric($frq_opm))
323 0 5 defined $args{'frq_opm'} ? :
327 0 5 defined $args{'size_corpus'} ? :
423 3 10 $args{'conform'} ? :
447 2 7 $args{'conform'} ? :
477 3 0 if (ref $args{'values'})
514 0 1 unless ref $args{'strings'}
517 1 0 if (ref $args{'measures'})
521 0 3 if (nocontent($idx))
600 0 7 unless $args{'strings'}
603 7 0 ref $args{'strings'} ? :
609 4 3 hascontent($args{'scale'}) ? :
661 1 6 if (hascontent($args{'regex'}))
664 5 2 if (hascontent($args{'cv_pattern'}))
668 19 17 $_ eq 'C' ? :
674 0 7 unless open my $fh, '<', $self->{'_PATH'}
677 7 211 if $Lingua::Norms::SUBTLEX::INPUT_LINE_NUMBER == 1
679 54 157 unless _in_range(length $line[0], @{$args{'length'};})
681 121 10 unless unidecode($line[0]) =~ /$patterns{$_}/u
684 32 120 if (ref $args{$_} and hascontent($self->{'_FIELDS'}->datum($self->{'_LANG'}, $_ . '_idx')))
699 20 12 unless _in_range(_clean_value($line[$self->{'_FIELDS'}->datum($self->{'_LANG'}, $_ . '_idx')]), @{$args{$_};})
703 0 16 if (ref $args{'pos'})
709 0 0 if &none(sub { $_ eq $line[$self->{'_FIELDS'}->datum($self->{'_LANG'}, 'pos_dom_idx')]; } , @{$args{'pos'};})
713 0 7 unless close $fh
732 0 1 unless open my $fh, '<', $self->{'_PATH'}
734 1 6 if $Lingua::Norms::SUBTLEX::INPUT_LINE_NUMBER == 1
737 0 1 unless close $fh
756 0 2 if $Lingua::Norms::SUBTLEX::EVAL_ERROR
763 1 1 wantarray ? :
780 0 3 unless open my $fh, '<', $self->{'_PATH'}
782 3 91 if $Lingua::Norms::SUBTLEX::INPUT_LINE_NUMBER == 1
783 0 91 if nocontent($_)
786 0 3 unless close $fh
802 1 0 if ($count_all > 0)
823 1 24 if nocontent($args{'lang'})
826 0 24 unless ref $self->{'_FIELDS'}->record($args{'lang'})
830 24 0 if (hascontent($args{'path'})) { }
831 0 24 if (not -e $args{'path'}) { }
841 0 0 if ($args{'dir'}) { }
843 0 0 unless -d $args{'dir'}
850 0 0 if (/(?:SUBTLEX[\-_])?\Q$lang\E/imsux)
855 0 0 if (nocontent($path) or not -T $path) { }
881 8 0 hascontent($self->{'_LANG'}) ? :
907 0 5 unless my $var = delete $args{'measure'}
944 0 118 if nocontent($str)
968 0 103 if nocontent($str)
971 0 103 if nocontent($col_i)
975 0 103 unless open my $fh, '<', $path
977 103 1419 if $Lingua::Norms::SUBTLEX::INPUT_LINE_NUMBER == 1
980 0 1419 if nocontent($file_str)
981 102 1317 if (&$eq_fn($str, $file_str))
986 0 103 unless close $fh
1014 0 3 if nocontent($str)
1018 0 3 if &any(sub { nocontent($_); } , @{$col_i_aref;})
1023 0 3 unless open my $fh, '<', $path
1025 3 34 if $Lingua::Norms::SUBTLEX::INPUT_LINE_NUMBER == 1
1028 0 34 if nocontent($file_str)
1029 3 31 if (&$eq_fn($str, $file_str))
1037 0 3 unless close $fh
1047 3 0 $n_vals > 1 ? :
0 0 scalar @{$col_i_aref;} > 1 ? :
3 0 $n_vals ? :
1057 0 1 unless open my $fh, '<', $path
1059 1 4 if $Lingua::Norms::SUBTLEX::INPUT_LINE_NUMBER == 1
1062 0 4 if nocontent($file_str)
1063 2 2 if (my $found = &first(sub { &$eq_fn($_, $file_str); } , @usr_strings))
1069 1 1 if scalar keys %string_vals == scalar @{$str_aref;}
1075 0 1 unless close $fh
1097 0 243 if (not is_numeric($n)) { }
1101 48 195 if (hascontent($min) and $n < $min)
1104 26 169 if ($res and (hascontent($max) and $n > $max))
1113 0 146 if nocontent($val)
1120 12 0 unless ref $pos_aref
1122 0 12 unless scalar @test_str
1127 45 2 if hascontent($fields->datum($lang, 'pos_' . $_))
1141 45 1 is_numeric($val) ? :