Skip to content

Instantly share code, notes, and snippets.

Created Apr 29, 2020
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