Branch Coverage

blib/lib/Text/Ngramize.pm
Criterion Covered Total %
branch 54 100 54.0


line true false branch
113 310 1 if exists $Parameters{'typeOfNgrams'}
114 0 311 unless ($typeOfNgrams =~ /^(a|c|w)/)
127 310 1 if exists $Parameters{'sizeOfNgrams'}
128 0 311 if $sizeOfNgrams < 1
133 0 311 if exists $Parameters{'ngramWordSeparator'}
229 130 0 if (exists $Parameters{'text'}) { }
0 0 elsif (exists $Parameters{'listOfTokens'}) { }
247 30 100 if $#$listOfTokens == -1 or $sizeOfNgrams == 1
251 0 100 if $$Self{'typeOfNgrams'} =~ /^w/
320 130 0 if (exists $Parameters{'text'}) { }
0 0 elsif (exists $Parameters{'listOfTokens'}) { }
338 30 100 if $#$listOfTokens == -1 or $sizeOfNgrams == 1
342 0 100 if $$Self{'typeOfNgrams'} =~ /^w/
423 180 0 if (exists $Parameters{'text'}) { }
0 0 elsif (exists $Parameters{'listOfTokens'}) { }
445 30 150 if ($totalTokens == 0 or $sizeOfNgrams == 1)
547 180 0 if (exists $Parameters{'text'}) { }
0 0 elsif (exists $Parameters{'listOfTokens'}) { }
569 30 150 if ($totalTokens == 0 or $sizeOfNgrams == 1)
617 0 310 unless @Text
621 120 190 if ($$Self{'typeOfNgrams'} =~ /^a/) { }
120 70 elsif ($$Self{'typeOfNgrams'} =~ /^c/) { }
70 0 elsif ($$Self{'typeOfNgrams'} =~ /^w/) { }
647 0 310 unless exists $Parameters{'text'}
651 120 190 if ($$Self{'typeOfNgrams'} =~ /^a/) { }
120 70 elsif ($$Self{'typeOfNgrams'} =~ /^c/) { }
70 0 elsif ($$Self{'typeOfNgrams'} =~ /^w/) { }
681 0 120 if ($$Self{'normalizeText'}) { }
719 0 190 if ($$Self{'normalizeText'}) { }
740 0 0 if ($type eq '') { }
0 0 elsif ($type eq 'SCALAR') { }
783 0 190 unless defined $Offset
803 0 120 unless defined $Offset
839 0 0 if ($$charPos[0] =~ /^\p{IsAlphabetic}$/o) { }
849 0 0 if ($newChar ne ' ') { }
0 0 elsif (not $previousCharIsSpace) { }
887 0 120 if ($$Self{'normalizeText'})
939 0 120 if ($$Self{'normalizeText'})
974 0 70 if ($$Self{'normalizeText'})
1012 0 0 if ($$Self{'normalizeText'})
1044 307250 68880 if ($$charPosLen[0] =~ /^\p{IsAlphabetic}$/) { }
53700 15180 elsif (@currentWord) { }
1069 60 10 if (@currentWord)
1098 310 620 if ($type eq '') { }
310 310 elsif ($type eq 'SCALAR') { }
310 0 elsif ($type eq 'ARRAY') { }
0 0 elsif ($type eq 'REF') { }
1155 0 311 if exists $Parameters{'randomSeed'}
1183 0 19904 if --$maxIterations < 1
1192 4031 0 if $_[2]