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.

Revisions

  1. @prateekjoshi565 prateekjoshi565 revised this gist Oct 8, 2019. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions kg_dep_parse_eg1.py
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,6 @@
    import spacy
    nlp = spacy.load('en_core_web_sm')

    doc = nlp("The 22-year-old recently won ATP Challenger tournament.")

    for tok in doc:
  2. @prateekjoshi565 prateekjoshi565 created this gist Oct 8, 2019.
    4 changes: 4 additions & 0 deletions kg_dep_parse_eg1.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,4 @@
    doc = nlp("The 22-year-old recently won ATP Challenger tournament.")

    for tok in doc:
    print(tok.text, "...", tok.dep_)