Created
October 17, 2022 15:28
-
-
Save Abhayparashar31/b0bb0f1b83c8fd5d424654ce23a51546 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
sentences_score = {} | |
for sentence in sent_tokens: | |
for word in word_tokenize(sentence): | |
if word in word_frequency.keys(): | |
if (len(sentence.split(" "))) <30: | |
if sentence not in sentences_score.keys(): | |
sentences_score[sentence] = word_frequency[word] | |
else: | |
sentences_score[sentence] += word_frequency[word] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment