1. Learn
  2. /
  3. Courses
  4. /
  5. Spoken Language Processing in Python

Connected

Exercise

Named entity recognition in spaCy

Named entities are real-world objects which have names, such as, cities, people, dates or times. We can use spaCy to find named entities in our transcribed text.

In this exercise, you'll transcribe call_4_channel_2.wav (file) using transcribe_audio() and then use spaCy's language model, en_core_web_sm to convert the transcribed text to a spaCy doc.

Transforming text to a spaCy doc allows us to leverage spaCy's built-in features for analyzing text, such as, .text for tokens (single words), .sents for sentences and .ents for named entities.

Instructions 1/4

undefined XP
  • 1
    • Create a spaCy doc by passing the transcribed call 4 channel 2 text to nlp() and then check its type.
  • 2
    • Create a spaCy doc with call_4_channel_2_text then print all the token text in it using the .text attribute.
  • 3
    • Load the "en_core_web_sm" language model and then print the sentences in the doc using the .sents attribute.
  • 4
    • Access the entities in the doc using .ents and then print the text of each.