A user is trying to find out only the ORG tags using Spacy from a text body. How to do that?

920    Asked by EmilyColeman in Data Science , Asked on Nov 8, 2019
Answered by Nitin Solanki

 For extracting specific entities we can import Spacy and pass doc.ents to the function


But this will print all the tags present in the text.

Here, X.label_ holds the name of the entity, so all we need is add a condition to only return those tuples where X.label_ equals ORG:




Your Answer

Interviews

Parent Categories