I have a csv records of sales, each record has column customer name. This column is a combination of persons name and organization name. How can I use spacy to detect if a this column is a person or organization?
Asked
Active
Viewed 1,572 times
0
-
Have you done any research? Within 3 clicks on the spacy website, they show you how to extract entities from text... – Valentin Calomme Mar 02 '18 at 15:04
-
@ValentinCalomme yes i did some research. thanks for mentioning. – Arelancelot Mar 04 '18 at 23:39
1 Answers
1
This is a 'Named Entity Recognition' task. Spacy has a pretty good documentation:
doc = nlp(u'Apple is looking at buying U.K. startup for $1 billion')
for ent in doc.ents:
print(ent.text, ent.start_char, ent.end_char, ent.label_)
Apple 0 5 ORG

Sébastien Barré
- 154
- 1
- 12