Block 106: spaCy: Named Entity Recognition
Identify and classify named entities in text.
Concepts
- doc.ents for named entities
- Entity labels: PERSON, ORG, GPE, DATE, MONEY
- Visualizing NER with displacy
- Custom NER: adding rules with EntityRuler
Code Examples
See exercise below.
Exercise
Run NER on a news paragraph. List all PERSON and ORG entities. Visualize the entities in a sentence using displacy.render().
Homework
List 5 practical applications where named entity recognition is essential. Thursday