Branch Coverage

blib/lib/Text/Util/Chinese.pm
Criterion Covered Total %
branch 26 32 81.2


line true false branch
20 2 17 unless defined $_
32 1404 1681 if not /\A\s+\z/ || /\p{General_Category=Punctuation}/
73 2 12 unless length $phrase >= $len * 2 and $phrase =~ /\A($re) .* ($re)\z/x
75 12 0 unless $extracted{$prefix}
76 12 0 unless $extracted{$suffix}
79 1 4 if (not $extracted{$x} and $stats{'prefix'}{$x} and $stats{'suffix'}{$x} and $stats{'prefix'}{$x} > $threshold and $stats{'suffix'}{$x} > $threshold)
107 0 9 unless /\A\p{Han}+\z/
112 58 9 if ($i > 0)
115 89 27 if ($i >= $n)
117 89 0 if (length $tok > 1)
123 58 9 if ($i < $#c)
126 89 27 if ($i + $n <= $#c)
128 89 0 if (length $tok > 1)
142 147 1 unless $threshold <= keys %{$lcontext{$x};} and $threshold <= keys %{$rcontext{$x};}
153 0 1 unless @chars
159 29 11 if ($_s eq $s) { }