Skip to content

Instantly share code, notes, and snippets.

@EnkrateiaLucca
Created July 24, 2020 17:28
Show Gist options
  • Save EnkrateiaLucca/bb35c342bb310d991fb613f9d1f07fde to your computer and use it in GitHub Desktop.
Save EnkrateiaLucca/bb35c342bb310d991fb613f9d1f07fde to your computer and use it in GitHub Desktop.
pos tagging
import spacy
sp = spacy.load("en_core_web_sm")
sentence = text[-7]
sent_tokens = word_tokenize(sentence)
pos_tagged = nltk.pos_tag(text)
sen = sp(u"What matters most is using it")
spacy.displacy.render(sen, style='dep', jupyter=True, options={'distance': 100})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment