Skip to content

Commit 8572268

Browse files
author
Luke LaFountaine
committed
remove unneeded assignment
1 parent 0379039 commit 8572268

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

swivel/prep.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ def create_vocabulary(lines):
111111
vocab = [(tok, n) for tok, n in vocab.iteritems() if n >= FLAGS.min_count]
112112
vocab.sort(key=lambda kv: (-kv[1], kv[0]))
113113

114-
num_words = max(len(vocab), FLAGS.shard_size)
115114
num_words = min(len(vocab), FLAGS.max_vocab)
116115
if num_words % FLAGS.shard_size != 0:
117116
num_words -= num_words % FLAGS.shard_size

0 commit comments

Comments
 (0)