Branch Coverage

lib/Text/Summarizer.pm
Criterion Covered Total %
branch 64 106 60.3


line true false branch
187 0 0 unless open my $stopwords_file, '<', $self->stopwords_path
199 0 75 unless open my $permanent_file, '<', $self->permanent_path
204 0 75 unless open my $stopwords_file, '<', $self->stopwords_path
215 0 37 unless open my $stopwords_file, '>', $self->stopwords_path
217 0 37 if $self->store_scanner
231 36 1 if (ref $text)
256 0 36 unless open my $file, '<:encoding(UTF-8)', $file_path
274 36 1 if (ref $text)
299 0 36 unless open my $file, '<:encoding(UTF-8)', $file_path
355 53042 49768 unless $self->stopwords->{$word}
357 32382 2522 if $freq_hash{$_} < $min_freq_thresh
376 9136 93674 if (exists $self->freq_hash->{$sen_words[$position]})
410 9046 90 if scalar @{$phrase[-1];} > $self->phrase_thresh + 1
435 92800 0 if $dist >= 0
442 0 9136 unless my $pop_size = scalar @{$dist_list{$c_word};}
476 50392 35944 unless $sums_hash{$word_hash->{'ordered'}{$index}} > 1
490 27568 8376 if $i < scalar @word_keys - 1
492 27474 8470 if ($next == $curr + 1 or $curr == $prev + 1) { }
493 6550 20924 unless ($curr == $prev + 1)
494 6086 464 if keys %L_scrap <= keys %R_scrap
498 13200 14274 unless $self->stopwords->{$R_scrap{$curr}}
500 7508 962 if keys %L_scrap <= keys %R_scrap
505 5672 3374 if keys %L_scrap <= keys %R_scrap
507 6300 2746 if $real and scalar keys %L_scrap >= $self->phrase_thresh
539 807 1724 if $self->stopwords->{$_}
544 0 4198 unless $score_hash{$b} <=> $score_hash{$a}
565 482 158 if $_ > $lower
568 33 4 if ($n > 4)
592 11 612 if $score >= $lower and $score < $score_hash{$word_keys[$index - 1]}
597 0 33 if ($self->print_scanner)
601 0 0 if $self->file_name
613 0 0 if ($score > $lower and $score < $upper) { }
614 0 0 if $_ <= $score
616 0 0 if $_ == int $upper
617 0 0 if $_ <= int $score
618 0 0 if $_ > int $score
619 0 0 if $_ == int $lower
668 92339 1887 if scalar @bare
687 0 9247 unless $inter_hash{$b} <=> $inter_hash{$a}
691 119009 1840 if ($test ne $scrap)
692 611 118398 if ($test =~ /$compare/) { }
3116 115282 elsif (not scalar &singleton(@{$bare_phrase{$test};}, @{$bare_phrase{$scrap};})) { }
694 611 0 if delete $inter_hash{$scrap}
696 2888 228 unless scalar @{$bare_phrase{$test};} > 1
701 228 0 if delete $inter_hash{$scrap}
730 0 6330 unless $self->inter_hash->{$b} <=> $self->inter_hash->{$a}
731 0 3129 unless $sort_list{$b} <=> $sort_list{$a}
738 0 37 if ($self->print_summary)
742 0 0 if $self->file_name
750 0 0 unless $sentences->{$b} <=> $sentences->{$a}
758 0 0 unless $fragments->{$b} <=> $fragments->{$a}
766 0 0 unless $words->{$b} <=> $words->{$a}
772 0 0 if $score > 2