Create vocabulary drill flashcards using sdcv and org-drill

 1 month ago
source link: https://numbersmithy.com/create-vocabulary-drill-flashcards-using-sdcv-and-org-drill/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Whats’ this about?

In a previous post I talked about a spaced repetition (SR) system in Emacs org-mode. I use it to keep track of my learning progress. But, such SR systems are more typically used as flashcards, for vocabulary acquisition tasks.

In Emacs, there is an org-drill package that is designed to do just that: it allows one to create flashcards from notes taken in org-mode, and offers several different algorithms to compute the "optimal" (in a sense of maximizing memory retention with minimum repetition efforts) review intervals, taking into account your recall performance feedback.

In another previous post, I showed a desktop dictionary created from sdcv and rofi. It uses the sdcv dictionary as backend and the rofi application runner as frontend.

So, a natural step ahead might be to combine these two sets of tools, and this is the topic of this post: I show how to modify the bash script in the desktop dictionary tool such that the words we look up are converted into flashcards compatible with the org-drill format, so that one can drill himself on these new words using the SR system of org-drill.

How does it work

Any time we need to look up a word, we can press a custom key-binding to open the desktop dictionary interface (which is the rofi runner interface), enter the word and hit Enter. See Figure below for a screenshot.

It sends the query to the sdcv dictionary, whose return value is then directed back to the rofi interface. See Figure below.

These above 2 steps are exactly the same as explained in the post desktop dictionary created from sdcv and rofi.

If the dictionary finds the target word, we also take the looked-up word together with the dictionary translation, and format those into a flashcard compatible with the org-drill format, and append the new flashcard to a dedicated drill file, which is an org file. This step is done by adding some extra stuff to the bash script that we used to build the desktop dictionary.

When one has collected some number of flashcards, he could perform a "drill" on those new vocabulary by calling the org-drill command in that dedicated org file inside Emacs.

In each flashcard, the question is the looked-up word, and the answer the dictionary translation, which is hidden at first, giving you some time to recall that yourself. See screenshot below.

Hitting any key then reveals the answer. Based on how well you recalled the answer, you give a rating on a scale of 0-5, with 0 meaning "Wrong, and the answer is unfamiliar when you see it", and 5 being "Correct answer, effortless". See Figure below for a screenshot. More details about the ratings are given in org-drill’s documentation.

Depending on how well you performed, org-drill computes a review interval, which would be further into the future for words given higher recall ratings, and shorter for poorly memorized words. Future drill sessions will be scheduled use thus computed intervals.

Install and config org-drill

I’m using vanilla Emacs. I don’t think the particular version matters, but I’ve used version 26, 27 and both worked. I manage my Emacs plug-ins using use-package, and below is the relevant snippet that installs org-drill and sets up some configurations. The settings should be self-explanatory, and more customization options are given in org-drill’s documentation.

About Joyk

Aggregate valuable and interesting links.
Joyk means Joy of geeK