--the porter stemmera widely used collection of heuristics (here imported from the nltk package)--to lemmatization as implemented in the spacy package: in[ ]import spacy import nltk load spacy' english-language models en_nlp spacy load('en'instantiate nltk' porter stemmer stemmer nltk stem porterstemmer(define function to compare lemmatization in spacy with stemming in nltk def compare_normalization(doc)tokenize document in spacy doc_spacy en_nlp(docprint lemmas found by spacy print("lemmatization:"print([token lemma_ for token in doc_spacy]print tokens found by porter stemmer print("stemming:"print([stemmer stem(token norm_ lower()for token in doc_spacy]we will compare lemmatization and the porter stemmer on sentence designed to show some of the differencesin[ ]compare_normalization( "our meeting today was worse than yesterday" ' scared of meeting the clients tomorrow "out[ ]lemmatization['our''meeting''today''be''bad''than''yesterday'','' ''be''scared''of''meet''the''client''tomorrow''stemming['our''meet''today''wa''wors''than''yesterday'','' '"' "'scare''of''meet''the''client''tomorrow''stemming is always restricted to trimming the word to stemso "wasbecomes "wa"while lemmatization can retrieve the correct base verb form"besimilarlylemmatization can normalize "worseto "bad"while stemming produces "worsanother major difference is that stemming reduces both occurrences of "meetingto "meetusing lemmatizationthe first occurrence of "meetingis recognized as for details of the interfaceconsult the nltk and spacy documentation we are more interested in the general principles here advanced tokenizationstemmingand lemmatization