Y.S
Y.S

Reputation: 11

How to apply spacy to extract organisation name, location from any text?

Text : "PATANJALT MEGA SoRE
AUND PUNE411007
AROGYADAYI
MOB: :7507489862
GST NO : 27ABcFA1565H1ZM"

How to use spacy to extract such information?

nlp = spacy.load('en_core_web_sm')  
for entity in doc.ents:    
    print(entity.text, entity.label_)   
I did this but the ans is :  
(u'27ABcFA1565H1ZM', u'CARDINAL')

Upvotes: 1

Views: 2714

Answers (1)

El karoui Hamza
El karoui Hamza

Reputation: 29

Try creating your own train set, to have better results like explained here. You can use this tool to create your dataset here

Upvotes: 1

Related Questions