When I try to run the project on Python 3, I got : 'dict_keys' object is not subscriptable.
Actually, after some research I have found out that in the following methods list should be added to dictionary keys call.
def __repr__(self):
return ' '.join(list(self.words_count.keys())[:10])
and
def words_generator(self, stop_words):
for word in list(self.words_count.keys()):
if word not in stop_words or len(word) > 5:
yield word