Branch Coverage

blib/lib/AI/Categorizer/KnowledgeSet.pm
Criterion Covered Total %
branch 30 76 39.4


line true false branch
80 1 11 if ($args{'tfidf_weighting'})
91 0 12 if ($$self{'load'})
92 0 0 ref $$self{'load'} ? :
102 1 18 if (@_)
104 0 1 if $$self{'features'}
106 16 3 if $$self{'features'}
118 24 0 wantarray ? :
123 32 3 wantarray ? :
136 0 0 if @_
152 0 0 unless $self->verbose
153 0 0 unless eval 'use Time::Progress; 1'
155 0 0 $collection->can('count_documents') ? :
162 0 0 if $i % 25
207 0 0 if $self->verbose
220 0 0 unless @cats
237 0 0 if ($$self{'features_kept'}) { }
0 0 elsif ($$self{'scan_first'}) { }
263 0 0 if $self->verbose
268 1 10 if $$self{'finished'}++
278 8 2 if ($$self{'term_weighting'} =~ /^(t|x)$/) { }
0 2 elsif ($$self{'term_weighting'} eq 'l') { }
1 1 elsif ($$self{'term_weighting'} eq 'n') { }
1 0 elsif ($$self{'term_weighting'} eq 'b') { }
294 26 0 $_ ? :
300 9 1 if ($$self{'collection_weighting'} eq 'x') { }
1 0 elsif ($$self{'collection_weighting'} =~ /^(f|p)$/) { }
303 1 0 $1 eq 'f' ? :
314 10 0 if ($$self{'normalize_weighting'} eq 'x') { }
0 0 elsif ($$self{'normalize_weighting'} eq 'c') { }
326 1 3 unless (exists $$self{'doc_freq_vector'})
327 0 1 unless $self->documents
336 3 1 exists $$self{'doc_freq_vector'}{$term} ? :
396 0 0 unless my $f = $$self{'features'} || {$self->delayed_object_params('document')}->{'use_features'}
399 0 0 unless open my $fh, "> $file"
412 0 0 unless open my $fh, "< $file"
416 0 0 if /^#/
417 0 0 unless /^(.*)\t([\d.]+)$/
419 0 0 if defined $n and $. >= $n