1. เรียนรู้
  2. /
  3. Courses
  4. /
  5. Feature Engineering for NLP in Python

Connected

Exercises

Named entities in a sentence

In this exercise, we will identify and classify the labels of various named entities in a body of text using one of spaCy's statistical models. We will also verify the veracity of these labels.

คำแนะนำ

100 XP
  • Use spacy.load() to load the en_core_web_sm model.
  • Create a Doc instance doc using text and nlp.
  • Loop over doc.ents to print all the named entities and their corresponding labels.