So im trying to remove all the stop-words from a text file. The problem is, it is removing the stopwords each in every word.
def remove_stopwords(input):
stop_words = set(stopwords.words('english'))
filtered_words = [word for word in input if not word in stop_words]
return filtered_words
Sample Input: Damage from Typhoon Lando soars to P6B
Output: Dge fr Tphn Ln r P6B