Commit eb784c09 authored by Brendan Apfeld's avatar Brendan Apfeld
Browse files

Prevents TypeError:'dict_keys' object does not support indexing

parent e2fb51d1
......@@ -121,8 +121,8 @@ def _build_vocabulary(input_files):
tf.logging.info("Processed %d sentences total", num)
words = wordcount.keys()
freqs = wordcount.values()
words = list(wordcount)
freqs = list(wordcount.values())
sorted_indices = np.argsort(freqs)[::-1]
vocab = collections.OrderedDict()
......
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