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 ? :
173 0 10 unless open my $fh, '<', $self->{'_PATH'}
175 10 217 if $Lingua::Norms::SUBTLEX::INPUT_LINE_NUMBER == 1
178 0 217 if nocontent($file_str)
179 6 211 if ($self->{'_EQ'}->($str, $file_str))
185 0 10 unless close $fh
285 0 0 defined $args{'size_corpus'} ? :
289 0 0 defined $args{'n_wordtypes'} ? :
297 0 0 is_numeric($args{'frq_opm'}) ? :
0 0 is_numeric($args{'frq_count'}) ? :
299 0 0 if ($Lingua::Norms::SUBTLEX::EVAL_ERROR or not is_numeric($frq_count))
301 0 0 if (not $Lingua::Norms::SUBTLEX::EVAL_ERROR and is_numeric($frq_opm))
324 0 5 defined $args{'frq_opm'} ? :
328 0 5 defined $args{'size_corpus'} ? :
424 3 10 $args{'conform'} ? :
448 2 7 $args{'conform'} ? :
478 3 0 if (ref $args{'values'})
515 0 1 unless ref $args{'strings'}
518 1 0 if (ref $args{'measures'})
522 0 3 if (nocontent($idx))
601 0 7 unless $args{'strings'}
604 7 0 ref $args{'strings'} ? :
610 4 3 hascontent($args{'scale'}) ? :
662 1 6 if (hascontent($args{'regex'}))
665 5 2 if (hascontent($args{'cv_pattern'}))
669 19 17 $_ eq 'C' ? :
675 0 7 unless open my $fh, '<', $self->{'_PATH'}
678 7 211 if $Lingua::Norms::SUBTLEX::INPUT_LINE_NUMBER == 1
680 54 157 unless _in_range(length $line[0], @{$args{'length'};})
682 121 10 unless unidecode($line[0]) =~ /$patterns{$_}/u
685 32 120 if (ref $args{$_} and hascontent($self->{'_FIELDS'}->datum($self->{'_LANG'}, $_ . '_idx')))
700 20 12 unless _in_range(_clean_value($line[$self->{'_FIELDS'}->datum($self->{'_LANG'}, $_ . '_idx')]), @{$args{$_};})
704 0 16 if (ref $args{'pos'})
710 0 0 if &none(sub { $_ eq $line[$self->{'_FIELDS'}->datum($self->{'_LANG'}, 'pos_dom_idx')]; } , @{$args{'pos'};})
714 0 7 unless close $fh
733 0 1 unless open my $fh, '<', $self->{'_PATH'}
735 1 6 if $Lingua::Norms::SUBTLEX::INPUT_LINE_NUMBER == 1
738 0 1 unless close $fh
757 0 2 if $Lingua::Norms::SUBTLEX::EVAL_ERROR
764 1 1 wantarray ? :
781 0 3 unless open my $fh, '<', $self->{'_PATH'}
783 3 91 if $Lingua::Norms::SUBTLEX::INPUT_LINE_NUMBER == 1
784 0 91 if nocontent($_)
787 0 3 unless close $fh
803 1 0 if ($count_all > 0)
824 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) ? :