ComeçarComece de graça

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.

Este exercício faz parte do curso

Spoken Language Processing in Python

Ver curso

Exercício interativo prático

Experimente este exercício completando este código de exemplo.

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(___))
Editar e executar o código