Skip to content

Instantly share code, notes, and snippets.

@celestialized
Forked from prateekjoshi565/kg_dep_parse_eg1.py
Created January 24, 2021 06:37
Show Gist options
  • Save celestialized/462646d6c26b63eed86c96a151fdb66d to your computer and use it in GitHub Desktop.
Save celestialized/462646d6c26b63eed86c96a151fdb66d to your computer and use it in GitHub Desktop.
import spacy
nlp = spacy.load('en_core_web_sm')
doc = nlp("The 22-year-old recently won ATP Challenger tournament.")
for tok in doc:
print(tok.text, "...", tok.dep_)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment