Skip to content

Instantly share code, notes, and snippets.

@shubham769
Created Apr 29, 2020
Embed
What would you like to do?
import nltk
def my_stemmer(text):
ps = nltk.porter.PorterStemmer()
text = ' '.join([ps.stem(word) for word in text.split()])
return text
my_stemmer("My system keeps crashing his crashed yesterday, ours crashes")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment