Branch Coverage

blib/lib/AI/Categorizer/Document.pm
Criterion Covered Total %
branch 40 64 62.5


line true false branch
87 1 93 if (exists $$self{'parse'}) { }
0 93 elsif (exists $$self{'parse_handle'}) { }
88 5 elsif (defined $$self{'content'}) { }
95 88 0 unless ref $$self{'content'}
98 89 5 if $$self{'content'}
106 27 67 if UNIVERSAL::isa($$self{'stopwords'}, 'ARRAY')
112 67 27 unless keys %$s
113 2 25 unless $$self{'stopword_behavior'} eq 'stem'
114 24 1 if not defined $$self{'stemming'} or $$self{'stemming'} eq 'none'
115 0 1 if $$s{'___stemmed'}
141 0 3 unless my $fh = $args{'handle'}
152 0 198 if (@_)
160 140 0 wantarray ? :
171 0 92 unless $$self{'stopword_behavior'} =~ /^stem|no_stem|pre_stemmed$/
177 1 91 if $$self{'stopword_behavior'} eq 'no_stem'
179 91 1 if $$self{'stopword_behavior'} =~ /^stem|pre_stemmed$/
180 0 92 exists $$weights{$name} ? :
186 16 0 ref $_[1] ? :
197 0 670 unless $word =~ /[a-z]/
206 89 4 unless $$self{'stemming'}
207 0 4 if $$self{'stemming'} eq 'none'
208 0 4 unless $$self{'stemming'} eq 'porter'
211 0 4 unless eval { do { require Lingua::Stem; 1 } }
220 0 92 if ($$self{'use_features'}) { }
27 65 elsif ($$self{'stopwords'} and keys %{$$self{'stopwords'};}) { }
234 0 92 if (my $b = 0 + $$self{'front_bias'}) { }
235 0 0 unless -1 < $b and $b < 1
259 0 92 if ($$self{'stem_stopwords'})
269 0 3 unless my $path = delete $args{'path'}
273 0 3 unless open my $fh, "< $path"
283 0 0 unless my $path = $args{'path'}
284 0 0 unless open my $fh, "> $path"