10 lines
315 B
Python
10 lines
315 B
Python
|
from gensim.parsing import remove_stopwords, preprocess_string
|
||
|
|
||
|
|
||
|
def filter_stopwords(df):
|
||
|
filtered_df = df.copy()
|
||
|
filters = [remove_stopwords]
|
||
|
for i in range(len(filtered_df)):
|
||
|
filtered_df.at[i, 'Input'] = ' '.join(preprocess_string(filtered_df.at[i, 'Input'], filters))
|
||
|
return filtered_df
|