From b51d35f2048aeebaeea22e20d426af107bde4cd7 Mon Sep 17 00:00:00 2001 From: Petr Baudis Date: Mon, 9 Jan 2012 02:07:26 +0100 Subject: [PATCH] pattern_bayes_gen.sh: Prune patterns with just a single occurence --- tools/pattern_bayes_gen.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/pattern_bayes_gen.sh b/tools/pattern_bayes_gen.sh index 8f8f2eb..d37f744 100755 --- a/tools/pattern_bayes_gen.sh +++ b/tools/pattern_bayes_gen.sh @@ -24,6 +24,7 @@ $p{$_} = $choices{$_} / $counts{$_}; } for (sort { $counts{$a} <=> $counts{$b} } keys %p) { + next if ($counts{$_} < 2); printf("%.3f %d %d %s\n", $p{$_}, $choices{$_}, $counts{$_}, $_); } }' -- 2.11.4.GIT