Anki is a well-known SRS program. Especially for language learning it is invaluable. Nonetheless it has a lot of drawbacks:
- You only learn the information, that the cards are going to teach you. Not more, not less. Vocabulary cards will teach you one vocabulary each, usually completely out of context.
- You usually start with a pre-constructed deck, that contains a lot of vocabulary that is not immediately interesting for you
- Many important language skills are neglected completely, like listening comprehension
- You can learn 3000 vocabulary without even understanding simple sentences
Of course, you can use sentence cards instead of vocabulary cards. But even a whole sentence doesn’t usually give enough context to really understand a sentence. What is mostly preferable is to read entire texts! As far as I know there has been no previous approach to adapt texts to spaced-repitiion software so far. In the following I will elaborate the usage of a plugin (Yomichan) for this purpose. Uninstall Yomichan if you have it and install the plugin 907186589 in Anki.
Yomichan used to be a vocabulary mining / card creation plugin. With a few modifications to the software (no worries, you don’t have to make your hands dirty, but I will discuss some of the programming!), we can make the plugin answer cards positively or negatively (if we had to look it up). The longest text I’m using myself contains about 400 vocabulary and I need around 20 minutes to read it. Answering the same amount of cards in Anki in the same time is almost impossible. And not only the vocabulary flows into my mind, but also grammar, sentence patterns and a lot more. Well, let’s have a look at my “text decks”:
Okay, that’s a lot of decks, but what’s special here? All the Yomichan subdecks are automatically generated. Yomichan creates a deck for every file that is discovered in the \collection.media\Yomichan directory. The text files in this directory not only contain the original text, but also any vocabulary that you added to it. So each file contains a vocabulary list.
According to the vocabulary list the plugin calculates how due a text is. Does it contain a lot of vocabulary that is due in Anki? Then the text is highly due. The green number next to a text deck shows that dueness. So it’s possible not only to read texts in an arbitrary order, but to read texts that are more due than other texts, one of the principles of spaced-repitition.
Okay, let’s start creating our first text deck. If you install the plugin, the default settings should already work perfectly. Just make sure to choose a proper deck in which all new created cards shall be placed. In the next screenshot it is the field that contains “Japanese::Text”.
The “+” at the end of a field’s name, like Examples+, ensures that this field doesn’t get overwritten, but new lines are attached to this field, whenever the same note is found in different texts. This is very convenient later, when you want to search the cards in your deck that come from certain text files. For example, finding all vocabulary that appears in the Reitonkyouju series can be done with Examples+:*reitonkyouju* . The other fields get overwritten when you create cards for the same vocabulary twice.
So far so good. Now we are going to do our first text. The text can have any size you want, but be aware that you have to be able to read the text in one session for this method to work. A 1000 page novel won’t do! A recommendation to start with is, of course, a Japanese folkstale. Put the text in a text file, do some editing if necessary (especially line breaks might be useful, if you have trouble reading long sentences in one line) and save it as \Anki\User 1\collection.media\Yomichan\myFirstText.txt.
Now we have to do some work. There is no software in the world yet, that is able to detect all the occurences of words perfectly in a text. That’s why we have to add the vocabulary for each text manually (but you only have to do it once for each text!). Load the file in Yomichan – or click on the text deck in the deck browser in Anki. If you have the cursor over a word and press F1 (or another lookup key that you can set in the settings), the word is looked up. Pressing Ctrl+1 (or clicking the green button next to the vocabulary) adds the first matching vocabulary to your deck. Continue like that in the whole text. If there is a blue button, you can do the same. The only difference is that such a card exists already and clicking on it overwrites(!) the existing card and adds it to the vocabulary list. In the end, do not forget to save the file under the same name! That way, the vocabulary list gets attached to the text file.
To learn a deck, re-open the file, read it in one go and click on “Learn vocabulary” at the bottom-left of Yomichan. Make sure to click only on this button when you did not just finish your vocabulary list creation (because then *all* vocabularies will be answered wrong). On opening a file, a timer starts and after completing a text, you will get a message as follows:
Happy text reading ^_^
Implementation details:
The most interesting part in programming this was the modifications that had to be done to Anki. The best entry point was the scheduler (sched.py). Because not all vocabulary in the text is completely due, but still you review such vocabulary subconsciously while reading, I wanted to allow the scheduler to answer these cards as well, but Anki by itself does a wrong calculation here: For example if you read a card today once and the interval gets changed from 3 days to 6 days, but on the same day you read the very same card in another text, the interval would be calculated too high, instead of 6 days it might become 12 days. So Anki isn’t aware of “early” reviews. If you are interested how Yomichan handles this, have a look at the function _updateRevIvl in EarlyScheduler.
This customized scheduler serves yet another purpose: Calculating the dueness of a file. data = Scheduler.deckDueList(self) gets all the original decks. And with data.append([deck, id, due, 0, 0]) we add our own text decks to the deck browser. すごいですね~



Hi David
Thanks for doing this, I tried to follow the steps but I still don’t understand how I’m supposed to use this. Can you spare 10 minutes from you on Skype or something to go through it? I’d appreciate your help, please email me directly about this.
LikeLike
So, after a conversation on Skype I came to the conclusion that using this plugin might be very confusing for first-time-users. As you suggest, Phil, I should make a proper tutorial video for this. Oh and regarding the AJATT method: Feel free to check out my guide https://dayjaby.wordpress.com/2015/10/21/broaden-and-deepen-your-vocabulary/ on how to add vocabulary in a comfortable way (instead of the AJATT-branching where you add a lot of vocabulary that you never heard of)
LikeLike
Thanks for the great learning feature! And the instructions are very thorough, I’m just starting to work with Yomichan, but I had no problem implementing everything and and it seems to work fine
At the moment I have only one question – how can I change the font of Vocabulary and Kanji panels to the right? The reading and the translation are alright, but the kanjis in the links to jisho are shown only partially, obviously, their font is not appropriate. How can I change that?
LikeLike
Hi Agnese. Thanks for your great reply. As for your problem, the stuff in the panels is simple HTML code, which can be changed in the reader_util.py file, in the case you know how to fix it yourself. If not, maybe we can go fix this together (for me it’s working – so I can’t fix it by myself without seeing it ^^).
LikeLike
Thanks for the advice, I opened the py file with NotePad and inserted the “font-family: MS Mincho;” (from my Anki cards styling section) in both places where there was “font-size” mentioned in your py file. Restarted the Anki and now everything looks correct
Thank you one more time for the great tool!
Can not wait to start using Yomichan extensively
LikeLike