Commit 05630a75 authored by Chris Waterson's avatar Chris Waterson Committed by GitHub
Browse files

Merge pull request #232 from lukelafountaine/master

remove unneeded assignment statement
parents 03790394 85722689
...@@ -111,7 +111,6 @@ def create_vocabulary(lines): ...@@ -111,7 +111,6 @@ def create_vocabulary(lines):
vocab = [(tok, n) for tok, n in vocab.iteritems() if n >= FLAGS.min_count] vocab = [(tok, n) for tok, n in vocab.iteritems() if n >= FLAGS.min_count]
vocab.sort(key=lambda kv: (-kv[1], kv[0])) vocab.sort(key=lambda kv: (-kv[1], kv[0]))
num_words = max(len(vocab), FLAGS.shard_size)
num_words = min(len(vocab), FLAGS.max_vocab) num_words = min(len(vocab), FLAGS.max_vocab)
if num_words % FLAGS.shard_size != 0: if num_words % FLAGS.shard_size != 0:
num_words -= num_words % FLAGS.shard_size num_words -= num_words % FLAGS.shard_size
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment