Created
December 7, 2017 10:25
-
-
Save rajeshmr/ee4869c7a2a3fc800bc4942f5620f645 to your computer and use it in GitHub Desktop.
This file contains 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
def preprocess(text): | |
text= text.strip().lower().split() | |
text = filter(lambda word: word not in STOPWORDS, text) | |
return " ".join(text) | |
for dataset in datasets: | |
dataset['title'] = dataset['title'].apply(preprocess) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment