Sentiment analysis on formatted text
In this exercise, you'll calculate the sentiment on the customer channel of call_2.wav
(file).
You've split the customer channel and saved it to call_2_channel_2.wav
(file).
But from your experience with sentiment analysis, you know it can change sentence to sentence.
To calculate it sentence to sentence, you split the split using NLTK
's sent_tokenize()
module.
But transcribe_audio()
doesn't return sentences. To try sentiment anaylsis with sentences, you've tried a paid API service to get call_2_channel_2_paid_api_text
which has sentences.
Diese Übung ist Teil des Kurses
Spoken Language Processing in Python
Interaktive Übung
Versuche dich an dieser Übung, indem du diesen Beispielcode vervollständigst.
from nltk.sentiment.vader import SentimentIntensityAnalyzer
# Create SentimentIntensityAnalyzer instance
sid = SentimentIntensityAnalyzer()
# Transcribe customer channel of call 2
call_2_channel_2_text = transcribe_audio(____)
# Display text and sentiment polarity scores
print(call_2_channel_2_text)
print(sid.____(call_2_channel_2_text))