HejSwedish

25 May, 2020

code

2 min read

Quick story

Few years ago I went to Finland. I really loved it and from there, i fell in love with nordic countries and scandinavian way of life. The part of the country was speaking Swedish. I plan to live in Scandinavia later but I should be able to speak or at least to understand people there. (And finally understand Greta Thunberg's sign !).

greta

So I picked Swedish because I know people speaking Swedish and it seems to be kind of similar at some point to other languages, so why not !

I started using an app, then I put some post-it in my student apartment on objects (like skrivboard on my desktop). But I love coding (I think you already guessed it in this blog) so I wanted my skills to help me getting other skills !

Here comes the idea

A Twitter bot that allows me to learn words. To learn the words easily, I think it's better to associate it to an image. So I started thinking about it...

The idea is simple, every two hours it would tweet a random word (in english and in swedish) with a picture related.

Development

As you might know, I'm a fan of javascript, so of course I used NodeJS for my bot. In most of classes I use my computer, so when I had nothing to do, I was working on it a little bit. It was working "ok" in 3 days and It was fully done after a week.

Words

I needed a database with A LOT of usefull words because it's going to tweet 12 times a day. I don't care if there is multiple times the same one, it helps to learn it. So I found one with the 2000 most used swedish words according to movie subtitles. I had to remove some because they were not really convenient.

Images

I couldn't find images for each words, so I used the API of Unsplash. The request asks for a random image with the english word as a keyword. Sometimes the images makes no sense but it's kind of funny. Some people followed it only for that non-sens.

tweet non sens

Name

Finding a cool available name is a bit hard, but HejSwedish came out because Hej means Hey and it mixes up english and swedish at the same time.

Follow the bot

If you want to learn Swedish or you are just curious, go check it out and follow it there : @HejSwedish.