fixed the end of line bug

This commit is contained in:
Kamyar Dabiri
2021-02-02 22:54:16 -08:00
parent d1b7eca7d8
commit 9a7f21e3c0
2 changed files with 2 additions and 2 deletions

View File

@@ -21,7 +21,7 @@ def scan(str_data, func):
def remove_stop_words(word_list, func):
with open('../stop_words.txt') as f:
stop_words = f.read().split(',')
stop_words = f.read().strip('\n').split(',')
# add single-letter words
stop_words.extend(list(string.ascii_lowercase))
func([w for w in word_list if not w in stop_words], sort)