I moved to Sweden six months ago with my girlfriend. It is a great country for expats like us because almost everyone speaks really good English. But we’d still like to learn some Swedish to understand a bit more of the daily conversations and about the country’s culture.
This is going to be a hobby for me, so I don’t want to put too much effort into it. I’d like to spend 10 to 20 hours tops, and my target is to understand 80 percent of the daily chitchat.
Is it doable? We’ll see! Here’s my approach to learning a new language through beginner-level data science.
The concept
This is, I think, a pretty unorthodox method. But sometimes, being creative makes things easier, right?
What I did:
- I picked two popular TV shows: Friends and How I Met Your Mother (HIMYM).
- I got the Swedish subtitles for all episodes.
- I analyzed the most common words and sorted the words by the number of occurrences.
- I cut off at the top 1,000 words.
The question is: How far can I go if I learn only the top 1,000 words in a language? Or being more pragmatic: What percent of Swedish conversations are covered by the language’s top 1,000 words? I set up a short data script to find out.
By the end of this article, I’ll share it with you as well. But first, I’ll show you how I got my answers for these questions.
(Note: My method works with every European language.)
The code
The first step is to get the Swedish subtitles. It can be for any and as many series or movies as you want. I picked Friends and HIMYM because I’d already watched both in English before, and I liked their vocabulary. But if you want to speak like Rocky, get the subtitles of the Rocky movies.
(An important note about subtitles: As far as I know, using subtitles for non-profit research projects like this one is not illegal. But to be safe, do what I did: Ask a native-speaking friend to type down the whole script for you. ;))
Once you have the subtitles, you’ll need a tool to do the text analysis.
I’ve outlined how to get, install, and start with data coding tools like Python, R, SQL, and bash in this article. You could use any of those for this project.
I chose bash. It’s so simple, that the whole analysis needed only one line of code. On the screenshot below, I broke it down into 14 lines just to make it more readable.
So here’s my exact bash code:
Line by line
The results
Back to my code
The next steps
Disclaimers
Conclusion
Stay updated on the go with our mobile app.
Get latest insights with smoother, more personalized experience through TIA mobile app.





