RAKE
RAKE copied to clipboard
Python 3 incompatible
It looks like some parts of the code are not able to work with the latest releases of Python.
below code is used in rake.py sorted_keywords = sorted(keyword_candidates.iteritems(), key=operator.itemgetter(1), reverse=True)
However, iteritems() is no longer supported in python 3, this makes that the code cannot be used in the latest releases of Python.
To ensure it will work with python 3 you will need to write the line as shown in the example below:
sorted_keywords = sorted(iter(keyword_candidates.items()), key=operator.itemgetter(1), reverse=True)
#11 should fix this.