Sitemap
Geek Culture

A new tech publication by Start it up (https://medium.com/swlh).

Data Science & Pop Music

Determining Song Sentiment with Text Mining

8 min readJul 19, 2022

--

Press enter or click to view image in full size

Do you ever feel “happy, free, confused, and lonely at the same time?” Well, Taylor Swift does. (Or she did, at 22.)

There’s a lot of emotion in this song-some positive, some negative, and some neutral. And this got me thinking: can I determine the overall mood of her albums with data? With text mining and sentiment analysis, it turns out I can. And since Taylor Swift has written songs since she was 16, I can also look at how her songwriting sentiment has changed.

…Are you ready for it?

Data Pre-processing

I downloaded the lyrics data from Github. The data was structured with one record per lyric, labeled with the song and album. Additionally, each record has the previous and next lyrics in…

--

--

Megan Bowers
Megan Bowers

Written by Megan Bowers

Sr. Content Manager @ Alteryx. I mostly write about data science and career advice. Occasionally I’m funny. Find me on LinkedIn!

Responses (2)