Created
July 13, 2020 16:09
-
-
Save lisanka93/73d0dcd3ef1b52cf5b45413611541a40 to your computer and use it in GitHub Desktop.
lemmatisation and stemming with NLTK
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from nltk.stem import WordNetLemmatizer, PorterStemmer, SnowballStemmer | |
stemmer = PorterStemmer() | |
lemmatizer = WordNetLemmatizer() | |
word = "considering" | |
stemmed_word = stemmer.stem(word) | |
lemmatised_word = lemmatizer.lemmatize(word) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment