Refactoring Japanese Anki Cards


When you use Anki for a meaningful amount of time, you eventually realize that your early cards suck. Rather than suffering through poorly made cards (or worse, deleting them), it's worth spending a few seconds to update them.

The idea of updating (refactoring) old, poorly made, flashcards is nothing new. There are already plenty of articles on the subject, such as

They're good articles, and I suggest you give them a read if you want to learn more about the subject.

As someone who has been using anki for a while now...

922 day Anki streak

...this is a subject that has really stuck out to me as important. I've gone through multiple different note types, and changed my mining process many times as well. There are a lot of questional decisions I made when making earlier flashcards, and it's taken me a long time to slowly figure out all the things that do and don't work.

These mistakes have given me extra insight to which parts of your flashcards deserve extra attention, and which parts you can just automate.

Why Should I Refactor Cards in the First Place?

In my experience, poorly made cards can have 2 major side-effects: they can cause you to see the card too often, and not often enough.

A poorly made card may have unintended additional context. Or in other words, extra things on the card that can help you guess the correct answer. For example, suppose you had a picture on the front of your card. You may find that you remember the word's meaning/reading based on the picture, rather than looking at the actual word. Then, when you see it in immersion, you can't remember how to read it.

In this example, you wouldn't be seeing the card often enough -- because your interval wouldn't reflect your actual knowledge of the word (the picture would inflate your stats).

On the other hand, poorly designed cards may also be designed in a way that makes them more difficult to remember. This could be because of styling, not providing enough context on the card, having wrong context on the card (like audio that mispronounces the word), etc.

Both of these scenarios mean you're going to have to spend much more time than usual to learn the word.

While it may seem tedious and not worth the time to edit old cards, it will actually save you time in the long run because learning words will be much easier.

How Should I Refactor My Cards?

I don't know exactly what your cards look like, or what information you put on them, so I can't give you tailored advice. What I can do, is walk you through how I refactor cards with my note type, and you can abstract the relevant information that applies to your own setup.

To start, I highly recommend the Edit Field During Review (Cloze) addon. This is extremely useful because it makes it super quick and easy to edit cards while you're repping them. You don't need this addon (I spent like a year refactoring without it), but it can help a lot at speeding things up.

Depending on your card html, as well as any addons you use that might modify the card html, certain fields may not be usable with this addon, so you'll have to do some trial and error. If you're using V2.4+ of my note type, it's already built in.

As for the actual workflow:

  1. Rep your cards as usual
  2. When you see a card that has something wrong with it, ctrl+click on the field that needs to be edited, and change it there directly.
  3. If you need to update a field that isn't editable with the addon, click the "Edit" button on the bottom left of the card, and edit the field that way (this is especually useful for adding images).

That's about it.

It may be exhausting your first day or two of doing this, because you likely have a lot of cards with issues that need fixing. Since you're editing while reviewing, this means you'll spend significantly more time than usual getting through your reps.

The good news is that after a couple days of this, there will be very few cards left (per day) that still need to be edited. Because of the nature of how anki shows you cards (spread out months at a time), you'll end up only having to edit a couple of cards per day from then on (and eventually none at all).

What Should I Refactor?

It's hard to give a broad rule on what things need to be refactored, so instead I'll show you concrete examples from my own experience.

I may make recommendations for updating yomichan settings/handlebars to fix these issues from appearing on future cards. If you're using my note type, you can ignore these sections, because it's already included.

If this seems like an overwhelming number of things to edit on your cards, try doing just one at a time.

These are ordered by which thing came to my head first, not by importance.

Parenthesis

parenethesis in an anki card

Now this isn't always a problem, so for many cards you could just ignore this. However, I have found that, particularly on cards with very short sentences, having SDH subtitles in your sentence can give away the card.

It can give the sentence a certain "shape" that your eye easily recognizes -- and you can associate that shape with the meaning/reading of the word. This is espectially prevalent if you mine a "sentence" that's only 1 word long, but has parenthesis next to it.

no parenethesis in an anki card

Simply removing that part from the field of your card is a good enough fix.

You can actually take this one step further by auto-removing it from all future cards you make too. If you use yomichan you can update your anki card template handlebars to have the following:

{{#*inline "cloze-prefix"}}
{{~#if definition.cloze}}
{{#regexReplace "(.*)| \(.*\)| *|\s+" "" "g"}}
{{definition.cloze.prefix}}
{{/regexReplace}}
{{/if~}}
{{/inline}}

{{#*inline "cloze-body"}}
{{~#if definition.cloze}}
{{#regexReplace "(.*)| \(.*\)| *|\s+" "" "g"}}
{{definition.cloze.body}}
{{/regexReplace}}
{{/if~}}
{{/inline}}

{{#*inline "cloze-suffix"}}
{{~#if definition.cloze}}
{{#regexReplace "(.*)| \(.*\)| *|\s+" "" "g"}}
{{definition.cloze.suffix}}
{{/regexReplace}}
{{/if~}}
{{/inline}}

close-prefix, cloze-body, and cloze-suffix are in your template by default, but the regex replace part is what is changed here. This regex will do 2 things:

  1. Remove parenthesis from the sentence, as well as any text inside of them
  2. Remove any spaces from the sentence

This is assuming your sentence field on your Anki card format (in Yomichan) is something like {cloze-prefix}<span class="highlight">{cloze-body}</span>{cloze-suffix}.

For what it's worth, I consider excess spaces in your sentence to be the same issue as having unnecessary parenthesis -- it gives the sentence a shape that gives unintended context and can give away the answer to the card.

Multiple Spellings

multiple spellings of a word

Sometimes you may come across a word in kana, but you want to learn the kanji version. If you mine like that, you might end up with cards that look like the above image (notice the target word looks different than the highlighted word in the sentence).

I think it's pretty obvious to see where the issue is here. If the kana version of the word is highlighted right below the kanji version of the word, it's much less likely that you'll remember the reading of the word. Even if you're not trying to, your eye will often naturally see the highlighted reading and spoil the answer for you. It's incredibly hard to accurately judge if you would have gotten it right had you not seen the reading beforehand. To fix that you just need to change the word in the sentence to also be the kanji version.

same spelling

If your note type highlights the target word, it's very likely that it does so by wrapping the word in the sentence with html tags. In my case, it looks like this:

html tags in sentence field

You can see the target word is wrapped in <span class="highlight">, and the card css styles it from there. If you're using another note type, it's likely your target word will be wrapped in <b> tags.

If you are editing the card in the card browser (or if you've clicked the "Edit" button during reviews), you cannot just edit the word in the sentence to match your target word. If you do so, it will actually strip out the html tags, and the highlighting will disappear entirely.

In order to edit it properly, you need to click the <> button on the field to enable html editing, and edit the word that way.

If you use the "edit fields during review" addon, you can just edit it normally without having to worry about any of this.

Needs a Picture

missing picture

Some cards, particularly nouns, benefit greatly from adding a picture. Specifically, plants, animals, fish, foods, etc., are all great candidates for adding a picture. In these cases, the picture actually is the definition (as in, you don't even need to look at the definition on the back, only the picture).

added picture

If you're a native English speaker, it's likely you've never heard of fragrant olive (and this plant sure doesn't look like an olive). Rather than try to memorize a definition that you can't easily imagine, a picture will get the information across infinitely easier.

If you bring up the "Edit" menu during your reviews, you can simply drag an image from google images into the "Image" field of your card.

If my card already has an image on it (from anime, VN, etc.), but the image doesn't show what the word actually means, I'll add a second image to it.

two pictures

Again, don't do this for every card, it's even fine if most of your cards don't have images. But for certain words, a picture is much more useful than a definition.

Bad or Missing Audio

There's quite a few audio issues you could have on your cards. I'll start with the one you can't really fix:

Missing Sentence Audio (or wrong sentence audio if your subs were mistimed or something)

If your card comes from anime, and you just forgot to press the button to add audio, I'd just delete the card entirely (assuming that you noticed it too late to fix it, and you haven't repped the card yet).

If your card comes from a novel or something else without sentence audio, I'd just leave it as is. Adding TTS audio lowers the overall quality of the card in my opinion (this is coming from someone who used it on thousands of cards).

Missing Word Audio

Depending on the rarity of the word, audio may just not exist for it and you'll just have to deal with that. However, if audio does exist, it's fairly straightforward to add it back using the anki-forvo-dl add on.

Wrong Word Audio

It's surprisingly common that the word audio on your cards will be said with incorrect pitch (especially if you're using jpod101 audio). To fix this, you can try using the abovementioned addon to replace it with forvo audio. If you still can't find the correct pronunciation there, it's probably best to just remove the word audio entirely, and rely on your pitch graphs.

Bad Definition

There's a few issues you could have with your definitions that may need fixing up

Definition Too Long

Many people use a LOT of yomichan dictionaries -- this is a good thing. What's not a good thing is exporting all of them into the definition of 1 single card. This ends up being pretty unreadble, and will eventually bloat your anki to where it's barely usable.

definition too long

(It keeps going off screen)

To fix this, you want to try to limit your definition to 1 or 2 dictionaries.

In order to ensure future cards don't get spammed with definitions, I recommend turning grouping off in your yomichan settings.

no dictionary grouping

An alternative to turning off grouping is to change your definition field to {selection-text}. This means that whatever text you have highlighted will get sent to the definition field instead of the entire thing.

selection-text definition

If you hold down CTRL while highlighting, you can even highlight several disjoint pieces of text.

multi-select

As a final alternative to grouping and selection-text, you can use themoeway's custom handlebars which allows for exporting a single dictionary at a time.

Bilingual Definitions

You may be at a point where you want all of your definitions to be monolingual, but you have old cards with English definitions. As far as I know, the best way to go about this is just to manually copy over new definitions from yomichan. There are absolutely tools that can automate things like this (such as the Migaku Dictionary addon), but you're likely to end up with more issues than benefits from this. For that reason, I'd suggest just slowly updating bilingual cards as they come up in reviews.

Monolingual Definitions

You may have the opposite of the above problem as well -- perhaps you tried to transition to monolingual dictionaries too quickly, and then realized you can't understand what your cards mean at all. While it's true that J-J definitions will always be more accurate than J-E definitions, that's only the case if you know what they say. For this issue, it's the same fix as above.

Wrong Pitch

Perhaps you've found from OJAD, or just listening to a lot of native speech, that you have the wrong pitch accent for a word on your card.

This can be fixed in a couple ways.

First, make sure your word audio matches the correct pitch (see Bad or Missing Audio). Depending on your preferences, correct audio may be enough, and you can use that instead of pitch graphs.

If you're using my note type, it will save the info from every pitch dictionary you have in yomichan. However, it will only display the first 2 on the list (to avoid cluttering the card). If the correct pitch is in this list, but isn't one of the first 2, you can simply edit the list and remove the incorrect ones. pitch graphs

The exact same process works for the readings.

readings

You may need to edit these lists in html-mode.

If it's not on those lists, you can use a browser addon such as Copy HTML Text WE to copy the pitch graphs from OJAD, and paste the html into your card's field.

Sentence Too Long

sentence too long

This is particularly an issue when mining from VNs. If you're going through text quickly, the texthooker may put several lines of dialogue on one line, which can cause yomichan to send the entire thing over instead of just the one sentence.

The fix for this is simple, just ctrl+click the sentence (if you're using the addon), or hit "Edit" on the bottom left, and delete the lines that come before.

lines fixed

For VNs in particular, there's not really yomichan settings that can fix this, as far as I'm aware (without resulting in unwanted behavior). However in general, some settings you can mess with are:

Scanning extent, which will limit how long a sentence can be

scanning extent

and sentence termination characters, which say which punctuation symbols should mark the beginning/end of a sentence.

sentence termination characters

Kana Target Word

I'm a firm believer that kana is for losers, and if a word can be written in kanji, it should be mined in kanji. The reason for this is two-fold:

  1. If you've learned the kanji form of a word, you'll still know it when you see it written in kana. If you learn the word in kana form, you won't know it when you see it written in kanji.
  2. Everyone knows that kanji grid is the only legitimate measure of your Japanese knowledge :^)

If you mine in this way, you'll often find yourself with cards that look like this

kana form

Notice that the dictionary lists 【うわ言・譫言・囈語・囈言】as the possible ways of writing the word. Obviously うわ言 is the worst one and you'd have to be dumb to mine it that way. So instead, you should edit the target word and sentence-highlight to be one of the other 3 (or even mine the word multiple times so you can learn all 3 versions).

kanji form

This section was written tongue-in-cheek, but I actually do this, and recommend you do the same.

Conclusion

I've been using anki daily for years now. I've spent way too much time looking into how to optimize anki settings, I've read pretty much every guide on how to make effective flashcards, I've even read books on the subject, all to learn as much as I can about how to learn as much as I can.

Still, every six months or so, I'll find a new way of formulating my cards that ends up being so much better that I end up disgusted with how I was doing it before (yet, in 6 months I'll probably feel the same way about what I'm doing now!).

Learning is a continuous process, and your methods should change as your understanding of the most effective practices changes. If you're just cramming for a test or something, it's fine to make sub-par cards and discard them later. However, if you're serious about formulating knowledge that will stick for life, it's worthwhile, maybe even necessary, to continuously hone your cards to get that information into your brain in the most effective way possible.