Created
May 31, 2019 05:54
-
-
Save shubham-singh-ss/c9c531e711c5452ff1911bcdffadf424 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
corpus1 = [] | |
for i in range(0, 8375): | |
review = re.sub('[^a-zA-Z]', ' ', df_description['description'][i]) | |
review = review.lower() | |
review = review.split() | |
ps = PorterStemmer() | |
review = [ps.stem(word) for word in review if not word in set(stopwords.words('english'))] | |
review = ' '.join(review) | |
corpus1.append(review) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment