csurfer / rake-nltk

Python implementation of the Rapid Automatic Keyword Extraction algorithm using NLTK.
https://csurfer.github.io/rake-nltk
MIT License
1.06k stars 150 forks source link

add limit to output #53

Closed Bruno-366 closed 3 years ago

Bruno-366 commented 3 years ago

actually this might be adding unnessary code since, instead of:

    def get_ranked_phrases_with_scores(self, max):
        return self.rank_list[0:max]

the caller could just

max=5
r.get_ranked_phrases_with_scores()[0:max]