Skip to content

Instantly share code, notes, and snippets.

@GeorgeSeif
Last active December 28, 2019 16:16
Show Gist options
  • Save GeorgeSeif/17843c2401f05d604e9512a2eb8be7d0 to your computer and use it in GitHub Desktop.
Save GeorgeSeif/17843c2401f05d604e9512a2eb8be7d0 to your computer and use it in GitHub Desktop.
import nltk
snowball_stemmer = nltk.stem.SnowballStemmer('english')
s_1 = snowball_stemmer.stem("cook")
s_2 = snowball_stemmer.stem("cooks")
s_3 = snowball_stemmer.stem("cooked")
s_4 = snowball_stemmer.stem("cooking")
# s_1, s_2, s_3, s_4 all have the same result
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment