From 620becb7e834724b62106a450c408f0e18c95d29 Mon Sep 17 00:00:00 2001 From: Joshua Chin Date: Fri, 17 Jul 2015 15:14:06 -0400 Subject: [PATCH] removed uncessary if statement --- wordfreq_builder/wordfreq_builder/word_counts.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/wordfreq_builder/wordfreq_builder/word_counts.py b/wordfreq_builder/wordfreq_builder/word_counts.py index 6e3fec2..380abf9 100644 --- a/wordfreq_builder/wordfreq_builder/word_counts.py +++ b/wordfreq_builder/wordfreq_builder/word_counts.py @@ -66,11 +66,10 @@ def freqs_to_cBpack(in_filename, out_filename, cutoff=-600): cBpack = [] for token, freq in freqs.items(): cB = round(math.log10(freq) * 100) - if cB >= cutoff: - neg_cB = -cB - while neg_cB >= len(cBpack): - cBpack.append([]) - cBpack[neg_cB].append(token) + neg_cB = -cB + while neg_cB >= len(cBpack): + cBpack.append([]) + cBpack[neg_cB].append(token) for sublist in cBpack: sublist.sort()