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.
Diese Übung ist Teil des Kurses
Spoken Language Processing in Python
Interaktive Übung
Versuche dich an dieser Übung, indem du diesen Beispielcode vervollständigst.
import spacy
# Transcribe call 4 channel 2
call_4_channel_2_text = transcribe_audio("call_4_channel_2.wav")
# Create a spaCy language model instance
nlp = spacy.load("en_core_web_sm")
# Create a spaCy doc with call 4 channel 2 text
doc = nlp(____)
# Check the type of doc
print(type(___))