Skip to content

Commit d9297c1

Browse files
authored
Merge pull request #13423 from reyoung/feature/fix_sentimental_dataset
Fix sentiment dataset
2 parents 6149052 + 480c7c4 commit d9297c1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python/paddle/dataset/sentiment.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def get_word_dict():
6767
for field in movie_reviews.fileids(category):
6868
for words in movie_reviews.words(field):
6969
word_freq_dict[words] += 1
70-
words_sort_list = six.iteritems(word_freq_dict)
70+
words_sort_list = list(six.iteritems(word_freq_dict))
7171
words_sort_list.sort(cmp=lambda a, b: b[1] - a[1])
7272
for index, word in enumerate(words_sort_list):
7373
words_freq_sorted.append((word[0], index))

0 commit comments

Comments
 (0)