Commit 20ec4bba authored by Andreas Mueller's avatar Andreas Mueller

copy dict keys on python3

parent 52be5a9c
......@@ -62,7 +62,7 @@ def unigrams_and_bigrams(words, normalize_plurals=True):
counts_unigrams[word1] -= counts_bigrams[bigram_string]
counts_unigrams[word2] -= counts_bigrams[bigram_string]
counts_unigrams[bigram_string] = counts_bigrams[bigram_string]
words = counts_unigrams.keys()
words = list(counts_unigrams.keys())
for word in words:
# remove empty / negative counts
if counts_unigrams[word] <= 0:
......
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