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.
This exercise is part of the course
Spoken Language Processing in Python
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
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))