Merge pull request #23929 from CastielWong:castielwong-patch-1

PiperOrigin-RevId: 225110544
This commit is contained in:
TensorFlower Gardener 2018-12-11 18:57:22 -08:00
commit 7b9865971e

View File

@ -91,7 +91,7 @@ vocabulary_size = 50000
def build_dataset(words, n_words):
"""Process raw inputs into a dataset."""
count = [['UNK', -1]]
count = [('UNK', -1)]
count.extend(collections.Counter(words).most_common(n_words - 1))
dictionary = dict()
for word, _ in count: