Work & Projects

  |  Thor Galle
In 2021, while living in Stockholm, I was learning Swedish with some zeal. Once I got the basics done (using Duolingo, among others), I started reading books in Swedish to accelerate my learning.

I first read _Harry Potter och de vises sten_, the Swedish translation of the first Harry Potter book on my 2015 Kindle. I found a [Folkets lexicon](https://folkets-lexikon.csc.kth.se/folkets/folkets.en.html) Swedish-English dictionary that worked on my Kindle, so that if I didn't know a word, I could just long-tap it to see a definition and translation. This was great!

However, I wanted to keep practicing the words I didn't know using the spaced repetition flash card tool [Anki](https://apps.ankiweb.net/).

I made a custom Anki card template that would show the surrounding sentence from a word that I looked up, but omit the word itself, and show its translation too. The other side then filled in the correct word. Another template showed the word with full sentence context on one side, and the translation on the other.

Finally, I automated the creation of these cards by writing a tool that extracted the Kindle dictionary lookups, and converted them into Anki CSVs corresponding to my card templates (as I had learned from a previous [dictionary-related project](/projects/vocabulary-com-tools/), the Kindle's dictionary lookups were stored in a SQLite database that was transparently accessible through the Kindle's USB storage view).

After some usage, I liked this system, and I extended the tool with ways to ingest words and sentences from various other places with Swedish content:
- One function pulled dictionary saves from the Lingoal/SVT Språkplay API (a learning-focused app with subtitled Swedish television content available at the time).
- In another workflow, I selected sentences on the web on my iPhone, and shared them with an iOS Shortcut. The Shortcut then prompted me to select a word of interest, after which it HTTP-posted the context (url, sentence, and word) to an Airtable database. The Anki tool could also ingest this.

The Språkplay integration gave this project its name: Språkplay + Anki = Spranki.

Spranki

In 2021, while living in Stockholm, I was learning Swedish with some zeal. Once I got the basics done (using Duolingo, among others), I started reading books in Swedish to accelerate my learning.

I first read Harry Potter och de vises sten, the Swedish translation of the first Harry Potter book on my 2015 Kindle. I found a Folkets lexicon Swedish-English dictionary that worked on my Kindle, so that if I didn’t know a word, I could just long-tap it to see a definition and translation. This was great!

However, I wanted to keep practicing the words I didn’t know using the spaced repetition flash card tool Anki.

I made a custom Anki card template that would show the surrounding sentence from a word that I looked up, but omit the word itself, and show its translation too. The other side then filled in the correct word. Another template showed the word with full sentence context on one side, and the translation on the other.

Finally, I automated the creation of these cards by writing a tool that extracted the Kindle dictionary lookups, and converted them into Anki CSVs corresponding to my card templates (as I had learned from a previous dictionary-related project, the Kindle’s dictionary lookups were stored in a SQLite database that was transparently accessible through the Kindle’s USB storage view).

After some usage, I liked this system, and I extended the tool with ways to ingest words and sentences from various other places with Swedish content:

  • One function pulled dictionary saves from the Lingoal/SVT Språkplay API (a learning-focused app with subtitled Swedish television content available at the time).
  • In another workflow, I selected sentences on the web on my iPhone, and shared them with an iOS Shortcut. The Shortcut then prompted me to select a word of interest, after which it HTTP-posted the context (url, sentence, and word) to an Airtable database. The Anki tool could also ingest this.

The Språkplay integration gave this project its name: Språkplay + Anki = Spranki.

Factsheet

StatusArchived
Created June 2020 → October 2020 — 4 months
Licensed CC-BY-NC-ND 4.0 · 2024 · Contact · RSS