1. Learn
  2. /
  3. Courses
  4. /
  5. Advanced NLP with spaCy

Connected

Exercise

Predicting named entities in context

Models are statistical and not always right. Whether their predictions are correct depends on the training data and the text you're processing. Let's take a look at an example. The small English model is available as the variable nlp.

Instructions 1/2

undefined XP
    1
    2
  • Process the text with the nlp object.
  • Iterate over the entities with the iterator ent and print the entity text and label.