Skip to content

Instantly share code, notes, and snippets.

@language-engineering
Created October 24, 2012 10:22
Show Gist options
  • Select an option

  • Save language-engineering/3945353 to your computer and use it in GitHub Desktop.

Select an option

Save language-engineering/3945353 to your computer and use it in GitHub Desktop.
from nltk.stem.porter import PorterStemmer
stemmer = PorterStemmer() #Create a new stemmer
stemmed = stemmer.stem("complications") #Example usage, stemming a single word
#You will need to stem all of the words in a review,
#this will require iterating over them with a loop or list comprehension
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment