'Is there a way I can find which row the Rake function returned the values?
I have the below code, where the code is returning the output as list, how can I tweak the code to get know which rows the code returned the results. For example: as it shows in the attached picture, I want to know where the code get the 9 'supervisory bodies chapter'??? Thanks
from rake_nltk import Rake
# set the parameteres (length of keyword phrase):
r = Rake(include_repeated_phrases=False, min_length=2, max_length=3)
text_to_rake = data['five_gram']
r.extract_keywords_from_sentences(text_to_rake)
# filter out only the top keywords:
words_ranks = [keyword for keyword in r.get_ranked_phrases_with_scores() if keyword[0] > 5]
words_ranks
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|

