Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sentence = str(news_df.iloc[1].full_text)
- sentence_nlp = nlp(sentence)
- # print named entities in article
- print([(word, word.ent_type_) for word in sentence_nlp if word.ent_type_])
- # visualize named entities
- displacy.render(sentence_nlp, style='ent', jupyter=True)
Add Comment
Please, Sign In to add comment