Skip to content

Instantly share code, notes, and snippets.

@rehrumesh
Created April 14, 2015 07:27
Show Gist options
  • Save rehrumesh/7af8a2e0004a4305716a to your computer and use it in GitHub Desktop.
Save rehrumesh/7af8a2e0004a4305716a to your computer and use it in GitHub Desktop.
SCS4011 Lab3 Stemmer
def stem(word):
for suffix in ['ing','ly','ed','ious','ies','ive','es','s']:
if word.endswith(suffix):
return word[:-len(suffix)]
return word
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment