0

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?

Arelancelot
  • 491
  • 3
  • 14

1 Answers1

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