Last active
October 17, 2022 15:31
-
-
Save Abhayparashar31/1e5920a4c077db680e0fea352f83e4a6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_key(val): | |
for key, value in sentences_score.items(): | |
if val == value: | |
return key | |
key = get_key(max(sentences_score.values())) | |
summary = heapq.nlargest(n,sentences_score,key=sentences_score.get) ## n=3 | |
print(" ".join(summary)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment