Branch Coverage

blib/lib/Text/Util/Chinese.pm
Criterion Covered Total %
branch 34 44 77.2


line true false branch
19 0 2 if defined $cb
30 5 40 unless defined $_
42 1427 1683 if not /\A\s+\z/ || /\p{General_Category=Punctuation}/
81 0 5 if (@extracted)
88 6 36 unless length $phrase >= $len * 2 and $phrase =~ /\A($re) .* ($re)\z/x
90 36 0 unless $extracted{$prefix}
91 36 0 unless $extracted{$suffix}
94 2 13 if (not $extracted{$x} and $stats{'prefix'}{$x} and $stats{'suffix'}{$x} and $stats{'prefix'}{$x} > $threshold and $stats{'suffix'}{$x} > $threshold)
110 2 3 if (@extracted)
135 0 2 if (@words)
143 58 9 if ($i > 0)
146 89 27 if ($i >= $n)
148 88 1 unless ($word{$tok})
149 88 0 if (length $tok > 1)
153 0 88 if ($threshold <= keys %{$lcontext{$tok};} and $threshold <= keys %{$rcontext{$tok};})
161 58 9 if ($i < $#c)
164 89 27 if ($i + $n <= $#c)
166 89 0 unless ($word{$tok})
167 89 0 if (length $tok > 1)
171 1 88 if ($threshold <= keys %{$lcontext{$tok};} and $threshold <= keys %{$rcontext{$tok};})
193 0 1 unless @chars
199 29 11 if ($_s eq $s) { }