Я обновил свой ответ, потому что он должен быть короче.
Вы можете получить 500 самых распространенных слов по этой ссылке
input_text = list('In the End, we will remember not the words of our enemies, but the silence of our friends.'.split())
stop_words = ['the', 'of', 'we', 'will', 'our', 'but', 'in']
removed_special_characters = ["".join(list(filter(str.isalnum, line.lower()))) for line in input_text]
non_stop_words = ([item for item in removed_special_characters if item not in stop_words])
print (non_stop_words)
# OUTPUT
#####################################################################
['end', 'remember', 'not', 'words', 'enemies', 'silence', 'friends']
Этот код дает вам частоту non_stop_words.
input_text = list('In the End, we will remember not the words of our enemies, but the silence of our friends.'.split())
stop_words = ['the', 'of', 'we', 'will', 'our', 'but', 'in']
removed_special_characters = ["".join(list(filter(str.isalnum, line.lower()))) for line in input_text]
non_stop_words = common_words_identified.update((Counter(([item for item in removed_special_characters if item not in stop_words])).most_common()))
sorted_by_word_occurrence = sorted(common_words_identified.items(), key=lambda kv: kv[1])
print (sorted_by_word_occurrence)
# OUTPUT
#####################################################################
[('end', 1), ('remember', 1), ('not', 1), ('words', 1), ('enemies', 1), ('silence', 1), ('friends', 1)]