False Promise
I’ll admit right away that I used the cultural gravitas and clickability of Taylor Swift to get your attention and made you open the link and read this article.
I can’t help but be a symbolic leech and piggyback on a pop culture giant like Swift for clicks.
Guilty as charged.
I guess it should be obvious: I’m a 47-year-old man. I’m not exactly the target audience of Taylor Swift and her music.
So, why the hell would I write about her?
First, you have to understand one thing: I’m also a girl dad. My daughter loves her and plays her songs day after day. So, whether I wanted to or not, I’ve been exposed to a lot of Taylor Swift over the past few years.
A lot.
Second, this is where my professional deformation kicks in and explains the Taylor Swift angle of this article. Being a philosopher and professor of critical thinking, I couldn’t help but wonder: What does the popularity of certain singers and songwriters really say about us as a society?
At its core, popular culture may be entertainment, but it’s not just entertainment. It’s also a mirror to our deepest psyche; a window to our collective soul.
So, I decided to do something fun. I collected more than two hundred of Taylor’s songs and analyzed their lyrics in detail.
What I found was interesting and revealing about American culture over the past two decades.
In this article, I’ll show you what I found.
But I’m not just gonna do that. I’ll also teach you how to think about language and song lyrics in a computationally, free of subjective bias and preference, using only facts.
This is not an entertainment article. It’s a lesson that will sharpen your thinking skills and help you understand much more than just Taylor Swift.
So, in a way, the title is more than just an annoying clickbait. I will actually talk about both Taylor Swift and Machine Learning.
Machine Learning?
Music is one of those things that is highly sensitive to individual taste. You either like it or you don’t. As somebody who grew up on the grunge and punk rock of the 1990s, I have no emotional reaction to girly pop; I always thought of it as empty and meaningless entertainment. I consider it “shopping mall” music, nothing more than that.
But I also know that anything dependent on taste and preference can cloud our judgment and prevent us from seeing the truth.
Perhaps there is some deeper meaning behind Taylor’s music? Perhaps if we dig down, we can uncover something not just about Taylor as a songwriter, but also about us as a society?
There’s a slight problem, though.
How can I do that if her lyrics don’t touch my heart at all? If I don’t understand and can’t relate to her songs?
Fortunately, human language is not just a carrier of meaning and emotion. It’s also a highly structured system that has mathematical properties. And those properties allow us to analyze it on a deeper level, independent of our subjective experiences.
One of these properties is its statistical nature. Language is profoundly statistical. Its elements, from letters to words, phrases, and sentences, follow clear patterns we can describe and analyze with statistics.
Those patterns can reveal more about who we are, what we long for, and what we fear. Things we might otherwise miss.
I was not always aware of this. As a philosopher, my mind was trained to think of language in another way: as a container of meaning that should be analyzed qualitatively, not quantitatively.
But once I learned about computational approaches to language analysis, my mind was opened to a completely new perspective. One that allows us to surpass our subjectively rooted presumptions and preferences, and see things below the surface.
This is especially important for any kind of cultural analysis. As creatures of culture, we’re constantly immersed in it (like fish in water), and we rarely have the ability to reflect on it objectively. Not to mention that cultural content is intertwined with our emotional apparatus: we can’t help but feel (one way or another) about culture, including girly pop singers like Taylor Swift.
So, to go beyond me being emotionally equivalent to a brick when it comes to Taylor’s art, I decided to analyze her lyrics with these tools. I collected 215 of her songs and performed a simple computational analysis to see what lies beneath.
This analysis uses concepts that are at the root of the modern Machine Learning approaches to understanding language, from basic word counting to Large Language Models. If you’ve never read about it, you’re in for a treat. Once you learn about this, you’ll never want to go back to your old ways of thinking about how we use language.
Language as Data
The first thing to understand about computational analysis of language is that any piece of text we’re focusing on needs to be prepared for analysis.
Language is like a beautiful embroidery: there’s a structure beneath it, but many elements are just decoration. That is, language is not fully transparent. It does not immediately reveal everything we need to know. More often than not, it is messy, both in the ways we use it and the way we record it using text.
In other words, there’s a lot of noise in language.
So, in order to get to the underlying structure, we have to strip language down to essentials.
Let’s focus on an example. Here’s a part of a popular Taylor Swift song, “Love Story:”
There are four key steps in preparing this text for computational analysis:
First, take the lyrics and remove all clutter: punctuation, symbols, capitalization.
Then, we split the text into individual words. This is called “tokenization”, and it makes all sentences disappear. What’s left is a bag of words, each one now like a little Lego block we can count.
Second, reduce each word to its basic root form, called a lemma. For example, “waiting” is reduced to “wait,” and “knowing” to “know.” Lemmatization unifies all similar forms.
Finally, since not all words are equally meaningful, we remove the very common ones, the so-called stopwords like “a,” “to”, “the,” “is,” and “of.” What remains are the words that carry the most meaning and tell us what the text is really about.
Now, we can treat those words as mathematical objects that can be counted, averaged, and understood using basic tools of statistics.
Counting Words
As I mentioned earlier, I collected 215 Taylor songs, and I performed this same preparatory task on all of them.
Of course, I did not do it by hand. This is where knowing a bit of Python helps a lot: there are numerous Python libraries specifically designed for this task.
But, honestly, ChatGPT (or any other LLM) can help a lot here, too. It can do this cleaning for you if you prompt it properly. Still, I used Python (in a Google Colab notebook) because I wanted to track and check every step of the process.
So, what can we do with such cleaned and prepared text?
One of the simplest things we can do is measure how rich Taylor’s vocabulary has been over time. We count how many unique words appear in her albums over the years.
Here’s what we see:
As we can see, in the early years, her vocabulary was modest. As she grew, it expanded, peaking in 2012 with the album Red.
Critics agree here, too: that album was a turning point, where she experimented across genres and styles, and transitioned from an adolescent to a grown woman. At least that’s what I found when I researched this a bit:
But since then, her vocabulary has shrunk. We can speculate why this is. Likely not because she “forgot words,” but because she adapted her writing to pop: lean, hook-heavy, simple songs, engineered for streams and short attention spans.
It seems that her lyrics map nicely onto the cultural economy of our time: complexity gave way to simplicity. Our culture traded depth for virality. The TikTokization of pop coincides with Taylor’s vocabulary returning to something closer to her teenage years.
Measuring Emotions
Another thing we can measure is sentiment: the emotional tone of her lyrics. Before learning about NLP (Natural Language Processing, the fancy name for what we’re doing here), it would never have occurred to me that emotions can be measured in any quantitative way (they seem qualitative by definition). But thanks to folks who developed NLP algorithms, we can actually do that and gain meaningful insight into any piece of writing.
This method is called sentiment analysis, and it uses a lexicon of words scored between –1 and +1, where negative words like “hate” lower the score and positive words like “love” raise it. The algorithm relies on this lexicon (which contains all English words and their emotional score) and measures the sentimental valence of a given text. It outputs a score in this range [-1, 1].
When we apply this method to Taylor’s lyrics over the years, we see something interesting.
First of all, none of her songs are really negative. There is no anger, rage, hate, or anything like that. Overall, she’s a nice gal, singing about mostly positive things.
But we can see some nuance over time.
Her early years were bright and optimistic, and then we see a sudden dip in 2012 and 2014 (I’m sure devout Swifties would know why this happened), followed by a rebound a few years later, only to nosedive again during the pandemic, when we all felt the blues.
What is interesting here is to see how the emotional rollercoaster is not just a personal thing (dependent on one’s age and life experiences) but a cultural phenomenon too. We all go through certain emotional stages as we grow up, but when we share a culture, we also go through larger societal ups and downs.
So, Taylor’s lyrics are not just her sentiments: they are an emotional barometer for America as a whole.
How Algorithms Discover Meaning
By far one of the coolest things you can do with quantitative analysis of language is let a statistical algorithm try to find the predominant topics in any piece of writing, including Taylor’s songs.
This has long been a challenge for computers, because they’re not human and can’t really understand language. But they can do something else really well: they can compute correlations between words. They can detect which words tend to appear together and which ones tend to appear apart. By clustering those co-occurrences, a computer can actually infer what any piece of writing is “about.”
The algorithm I used is called Latent Dirichlet Allocation, or LDA. Don’t let the name scare you off. Conceptually, it’s quite elegant. It reminds me of the that old Indian parable of the blind men and the elephant: one feels the trunk and says it’s like a snake, another feels the tusk and says it’s like a spear, another feels the leg and says it’s like a tree. Each man is partly right, but wholly incomplete.
Now imagine not a handful of blind men, but a hundred thousand of them, all groping at the elephant from different angles. And instead of insisting on their own partial truths, they average their impressions over and over again. Slowly, out of their noisy guesses, a stable picture emerges: this is an elephant. That’s what LDA does with words and topics.
It assumes that every text (in our case, a song) is a mixture of topics, and each topic is a mixture of words. At first, it assigns words to topics at random, using nothing but pure guesswork. But then, using repeated sampling, it refines those guesses. At each iteration, it asks: “Given what I know so far, how likely is it that this word belongs to this topic?” With each pass, the assignments stabilize. The chaos collapses into structure, and coherent themes begin to crystallize.
What’s striking is that this process doesn’t require meaning in the human sense. The algorithm doesn’t know that “prince” and “princess” are fairy-tale words. It just notices they co-occur and groups them together. Out of randomness and repetition, order emerges.
When I applied LDA to Taylor’s songs over the years, eight distinct themes crystallized:
Nostalgia and longing
Conflict and betrayal
Desire
Empowerment
Heartbreak
Nightlife and casual love
Fun and playful hooks
Romantic beginnings
These are the building blocks of her songwriting. Every album mixes them in different proportions, but the recipe changes with time. Some albums lean heavily on heartbreak, others on empowerment, and others on playful hooks. The shifts tell us as much about cultural moods as they do about Taylor herself.
Check out this year-to-year analysis:
We see here, for example, how romantic beginnings used to be an important topic in her early years, only to be supplanted by other ones, like desire, heartbreak, and empowerment. We also see a gradual levelling of topics, as if she strategically decided not to be a single-issue songwriter, but rather spread her thematic reach a bit wider, covering a range of issues and, by doing so, appealing to a broader audience.
This also explains why 47-year-old dudes are not her target demographic: we’re just not interested in these things.
Changing Perspectives
Honestly, I only scratched the surface here (if even that) when it comes to computational analysis of language. There is so much more to do, and we have so many tools at our disposal. I can’t help but consider myself extremely happy to be alive at this time in history, when we have access to so much knowledge and so many ways to acquire even more.
Exercise 1: Find another musician (of your choice) and perfom a similar analysis for either their entire opus (if you can find the datasets) or on a couple of songs. Ask your favorite LLM to guide you through these stages and teach you the Python code for it: preparing the text, counting words, analyzing sentiments, and determining topics.
Feel free to share the findings in the comments below
But what I find really fascinating about this kind of analysis is that it allows you to get a bird’s-eye view of any piece of culture. This is a perspective we don’t usually have access to. Most of the time, we’re immersed in culture; language is something we use to think with, rarely to think about, especially in a quantitative and computational way.
But changing your perspective from time to time can lead to useful insights. Language looks messy, but it’s statistical and patterned. Meaning can be discovered by being immersed in language, but also by stepping back and looking at it not as a piece of culture or identity, but as an ordered mathematical pattern.
This pattern might contain insights you’d otherwise be completely unaware of. It can sift through noise and help you understand more than is immediately available. With the right tools, you can uncover hidden signals in any piece of text.
So, Taylor’s lyrics say something about her, yes. Even somebody like me, an old fart uninterested in girly pop, can see that with the right tools.
But they also say something about us. About what it felt like to grow up in the early 2000s in America, to live through disillusionment, to survive the pandemic, and to enter the age of irony.
So next time you hear a Taylor Swift song (while strolling through a shopping mall or working out in the gym), don’t just think about the melody and the lyrics as they are presented to you. Think of them as patterns: as the data hiding in the words. Because language is not just how we sing: it’s how culture leaves traces of itself.
Thanks for reading!
Feel free to share your thoughts below.
You always write so clearly and with humor! This is interesting. I am forever grateful for your accessible article on Bayesian thinking. All the best!
This was an interesting read! I love seeing "subjective" or "unscientific" things like music or art being broken down and analyzed mathematically. There's math behind everything, we just don't see it ...
Analyzing Taylor Swift's vocabulary over time is tricky, though, since she doesn't write everything herself and there are different people working with her at different times. I will say that the 2012 spike comes as a complete surprise to me. I don't actually listen to her music, but a lot of her fans seem to argue that her lyricism was the best around 2020.
Songwriting ability defies math a bit. This metric accounts for the diversity of words used, but using lots of words doesn't mean you're using them well. Some people feel like they need to have a crazy big vocabulary to create meaningful songs/literature (which is what happened with TTPD) but sometimes a clear, spare style can be just as impactful, if not more.