Skip to content

Instantly share code, notes, and snippets.

@jabirjamal
Created July 23, 2021 11:50
Show Gist options
  • Save jabirjamal/6a28d3e6e75c50287cb551c69ebe6c8e to your computer and use it in GitHub Desktop.
Save jabirjamal/6a28d3e6e75c50287cb551c69ebe6c8e to your computer and use it in GitHub Desktop.
Lemmatization
import spacy
nlp = spacy.load('en_core_web_md')
doc = nlp('I joined WSP 2.5 years ago as a graduate engineer.')
for token in doc:
print(token.text, token.lemma_)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment