Pytech Resources

Learn Chinese with Emacs

May 18, 2024

Posted in:

  • Emacs

How to learn Chinese using Emacs

Learn how to use the Emacs editor for a most effective way of learning Chinese. The same principles can be applied for learning any other subject where you need to memorize a significant amount of new information, for example as in definitions for a medical or biology course.

The technique used is an implementation of a spaced-repetition algorithm, known as Org-Drill, which is an extension of the very popular org mode for Emacs. You can read more about it at org-drill.el – flashcards and spaced repetition for org-mode.

I am assuming that you are already an Emacs user and know how to use org mode.

Spaced-Repetition - Helps you remember things

Org-Drill uses a drill file which is like a set of flash cards. When you first run org drill, it collects all the "cards" and present each card to you. Initially this is done randomly. But as you review the material, the spaced interval may become longer depending on correctly you answered.

How to use Org-Drill to Learn Chinese

Installing Org-Drill

First you should set up the Melpa repository (See Getting Started with Melpa). It is recommended that you should use Emacs 26.3 or greater to avoid having to work around some known issues.

Add the following lisp code into your Emacs init file. Commonly the init file is .emacs in the user home directory.

1
2
3
(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
(package-initialize)

Run M-x package-list-packages to make sure Emacs fetched the MELPA package list. Then run M-x package-install and enter org-drill.

Running Org-Drill

An important point to note is that when learning a language you should generally test your ability to translate into the language more often than translating from the language. To enable that I specified the hide1_firstmore drill card type. There are two clozed areas (delimited by [ . . . ]), the first one is for Chinese text and the second one is for the English translation. hide1_firstmore guarantees that the first clozed area (in this case the Chinese text) is hidden 75% of the time.

Download this file hsk_vocab.org and open it in Emacs. Run M-x org-drill to start the drill session.

Org-Drill will collect all the drill items and present one to you like this :

M-x org-drill

At the bottom of the window in the mode line you will be asked Press key for answer, e=edit, t=tags, s=skip, q=quit.

Pressing any key will ask you to rate your recall of the item by pressing a key between 0 and 5. The meaning of these numbers are :

0 - Fail - Wrong, and the answer is unfamiliar when you see it

1 -- Fail - Wrong answer.

2 -- Fail - Almost, but not quite correct.

3 -- Pass - Correct answer, but with much effort.

4 -- Pass (Good) - Correct answer, with a little thought.

5 -- Pass (Bright) - Correct answer, effortless.

A correct answer will result in scheduling the next review of that item at a longer interval. The next item will then be presented and the process continues until you press q.

One of the best feature of using Emacs is that you can easily edit the drill file by entering e. That way you can modify the entries and also add additional examples under the heading for Pinyin. You can enter Chinese as well as pinyin characters using the chinese-py and chinese-sisheng input methods.

It is also quite easy to use a Python script to convert text files into org drill files. See my blog Building org-drill files for learning Chinese on how to do this.