Branch Coverage

blib/lib/Lingua/Identify/Blacklists.pm
Criterion Covered Total %
branch 70 144 48.6


line true false branch
158 0 605 if (exists $options{'langs'})
165 605 0 unless exists $options{'assumed'}
170 603 2 if (exists $confusable{$options{'assumed'}})
204 6 0 defined $file ? :
208 3 3 if ($options{'every_line'})
222 600 0 unless (exists $options{'langs'} or exists $options{'assumed'})
223 72 528 if (length $text < $CLD_TEXT_SIZE)
233 0 600 if ($options{'text_size'})
234 0 0 if ($total > $options{'text_size'})
235 0 0 if $VERBOSE
243 3 0 unless (exists $options{'langs'})
245 3 0 unless (exists $options{'assumed'})
247 3 0 unless exists $options{'assumed'}
250 3 0 if (exists $confusable{$options{'assumed'}})
256 3 0 if (exists $options{'langs'})
336 0 3 exists $options{'min_high'} ? :
337 0 3 exists $options{'min_low'} ? :
338 0 3 exists $options{'min_diff'} ? :
346 3 0 if ($options{'outfile'})
347 0 3 unless -d dirname($options{'outfile'})
353 53549 1320 if !exists($dic1{$w}) || $dic1{$w} < $min_high and !exists($dic2{$w}) || $dic2{$w} < $min_high
355 2765 458 if exists $dic1{$w} and $dic1{$w} > $max_low and (exists $dic2{$w} and $dic2{$w} > $max_low)
358 926 0 exists $dic1{$w} ? :
359 661 265 exists $dic2{$w} ? :
365 468 458 if (abs $diff > $min_diff)
366 468 0 if ($options{'outfile'}) { }
376 21183 48705 if exists $dic1{$w}
377 48276 429 if $dic2{$w} < 10
378 0 429 exists $dic1{$w} ? :
379 429 0 exists $dic2{$w} ? :
380 429 0 if ($options{'outfile'}) { }
387 3 0 if $options{'outfile'}
397 0 0 unless (keys %blacklists)
422 0 4 unless (keys %blacklists)
429 24 0 unless defined $pairs{$lang2} and defined $pairs{$lang2}{$lang1}
451 0 0 ref $_[0] eq 'HASH' ? :
454 0 0 ref $trainfiles eq 'ARRAY' ? :
456 0 0 ref $evalfiles eq 'ARRAY' ? :
459 0 0 unless @langs
460 0 0 unless $#traindata == $#evaldata or $#traindata == $#langs
468 0 0 if ($#traindata == $#langs)
480 0 0 if ($#evaldata == $#langs)
500 0 0 if ($guess eq $langs[$i])
560 2 606 if ($id eq 'en')
561 1 1 langof($_[0]) ? :
569 0 606 unless $options{'langs'}
572 606 0 ref $options{'langs'} eq 'ARRAY' ? :
574 0 606 unless @langs
576 0 606 if $options{'use_margin'}
589 4 1208 unless (exists $blacklists{"$lang1-$lang2"})
598 32881 415377 if (exists $$list{$w})
600 0 32881 if $VERBOSE
603 389 823 if ($score < 0)
606 0 1212 if $VERBOSE
626 0 0 unless (exists $blacklists{"$lang1-$lang2"})
635 0 0 if (exists $$list{$w})
637 0 0 if $VERBOSE
641 0 0 if abs $score < $margin
642 0 0 if ($score < 0) { }
645 0 0 if $VERBOSE
650 0 0 if $VERBOSE
666 0 4 unless opendir my $dh, $dir
668 24 8 if (/^(.*)-(.*).txt$/)
688 4 24 unless (-e "$dir/$lang1-$lang2.txt")
697 28308 320032 $inverse ? :
706 0 12 if ($file =~ /\.gz$/) { }
728 0 1200 if ($max)
729 0 0 if ($total > $max)
743 2403 0 if $LOWERCASE
744 2403 0 if $TOKENIZE
746 2403 0 $ALPHA_ONLY ? :
751 0 2403 if $_[3]