Sentence Mining With Yomichan & Animebook

Sentence Mining With Yomichan & Animebook

A tutorial on how to set up Yomichan and Animebook to create one of the most powerful sentence mining setups available. Create high quality flashcards in only 2 clicks.

Updated 1/22/2022

I’ve tried several different setups for immersing in Japanese, but animebook continues to be the best in my opinion. It’s incredibly simple and easy to use, it makes lookups quick and easy, and it only takes a few seconds to re-time subtitles with it. Oh, and it’s also faster than just about anything else for sentence mining.

Sentence mining demo

Software Installation

To use Animebook you just need to go to the website in any web browser. Drag a video file and a subtitle file into the window, and you’re all set up.

However, different browsers support different codecs, which means you might find yourself very limited by what video files are actually playable. For the most support, you should follow the instructions on the animebook github page to install a browser with the most codec support. Be sure to follow along with the instructions very carefully, because there are plenty of places where you could go wrong and things won’t work

I use this browser as my dedicated immersion browser, which means I can tweak my Yomichan settings in ways that would normally be too intrusive for my main web browser (such as lookups without hotkey). More on Yomichan settings later.

Install Yomichan. This could also be a good time to install uBlock Origin, but that’s not necessary if you’re only going to be using this browser for Animebook.

Next you’ll want some dictionaries for Yomichan. If you don’t have your own dictionaries that you prefer, a good set to start with is JMdict, JMnedict, KANJIDIC, and Kanjium. You can also find frequency lists here and here.

In the Yomichan settings, click on “Configure installed and enabled dictionaries”, and then click “Import” on the window that pops up. Import the dictionaries still in the .zip form.

Yomichan dictionaries

Feel free to fiddle with the Yomichan settings. I’ll also give some recommendations a bit later, and even provide my own Yomichan settings which you can download and import.

If you get stuck with any of the Yomichan setup, I found this video to be pretty good.

For mining you’ll need to install the AnkiConnect Anki addon. This will allow external apps (Yomichan and Animebook) to make and edit cards.

Finally you’ll need the Animebook Chrome Extension.

Fast Lookups Make Immersion More Fun

Before getting into the actual mining setup, I wanted to talk about the general immersing setup.

I’ve personally found that dictionary lookups are one of the most annoying parts of trying to immerse. It interrupts the flow of whatever you’re watching, and is just kind of an all around headache. They’re always gonna be a bit awful, but I’ve found a couple ways to make them a little less so.

Like I mentioned before, you should set Yomichan to show definitions upon hover (without having to hold any kind of hotkey). This will provide both the fastest and least strenuous way of getting to a definition. This isn’t really practical to do on your main web browser, but since we’re using a browser just for immersion, it’s totally fine.

Set Yomichan to auto-play audio upon lookup. This is useful because you can hear native audio of the pronunciation and pitch for each word you look up. Possibly even more important than that though, is it allows you to skip reading the furigana a lot of the time. Normally when you look up a word, you have to read the furigana to know how it’s read, and then you have to read the definition to know what it means. Having the audio auto-play means you can hear how it’s said, and then just read the definition.

Use a frequency list, or maybe even 2-3. This is because knowing the rarity of a word can sort of give you an indication of how much mental energy to put towards remembering a word. If it’s super common, it might be worth focusing a bit and trying to make it stick. If it’s incredibly rare though, it probably doesn’t matter even if you forget it immediately after the lookup window closes. I personally use 3 frequency lists: slice of life, VNs, and syosetu. All of those are available from the download links in the previous section.

Don’t pause for your lookups. Quickly hover the word you’re curious about, then go back to watching without ever pausing the video. The lookup process should only take 2ish seconds, and you can probably finish getting an idea of the word before the next subtitle line hits. Worst case scenario, you miss 1 sentence of dialogue. This doesn’t apply to mining however, you should probably pause for that.

At the bottom right of the window in Animebook there will be a section that says “Offset Subtitles”.

Offset Subtitles

If you happen to know the offset of the subtitles, you can just type a number into that box. However, you can also automatically re-time the subs by clicking the “Offset Subtitles” button (yes it’s a button, even though it doesn’t look like one). Using this method, it shouldn’t take more than 15-20 seconds to re-time subtitles.

Mining Quick Start

There’s a little bit of set up, and a lot of possible config that can be done to mine with Yomichan and Animebook. However, if you want to skip all of that and get to mining, I’ve provided my settings and Anki note type so that you can get started straight away.

First download the Eminent Note Type V2 which was made especially for this mining set up.

Next download my Yomichan settings and Animebook settings.

In Yomichan, go to the “Backup” section and import settings.

Yomichan import settings

In your settings for the Animebook Chrome Extension, scroll to the bottom of the page and there will be a import button.

Animebook import settings

One last step!

You need to tell Yomichan and Animbook which deck to put your cards in (since it’ll be different from mine). In the Yomichan settings, go to the Anki section and click “Configure Anki card format”. From there, select your deck from the drop down.

Yomichan select a deck

At the top of the page for your Animebook Chrome Extension settings there should also be a drop down for selecting your deck. Make sure it matches the one you put in Yomichan.

Animebook select a deck

With that, all the setup is complete, and you can get to mining!

To mine a card simply hover a word, and hit the green + button in the Yomichan popup window. This will create a new card in your deck, but it will be missing the sentence, picture, and audio. Next click the + button on the subtitle line in Animebook. This will automatically edit the card that Yomichan made and add in those missing fields. If you did everything right, it should only take around 2 seconds to make a card.

Detailed Mining Setup

If, for some reason, the quick start method didn’t work for you, or if you’d rather set things up manually with your own card type, I’ll provide some additional information here.

First, in your Yomichan Anki settings, you’ll need to fill out what data you want to go in what fields of your card.

Anki note fields in yomichan

There are a lot of different kinds of things Yomichan can send to your card. If you don’t know what one of them means, Yomichan conveniently lets you test it out and see. In the Anki section of the settings, click on “Configure Anki card templates”, and you can select an option from the drop down and hit “Test” to see what the output is.

Anki templates in yomichan

While some of the results are just text (such as Expression), others will return html. If you want to see what that looks like, you can try pasting that into your note style within Anki.

Additionally, you have the ability to edit that giant block of code in the templates settings to customize the data even further. I actually edited it in quite a few places for my template. If you’re interested in my edited version, you can get that from this github gist.

Next you’ll need to edit the fields of your note type in your Animebook Chrome extension settings.

Animebook anki fields

An important detail to consider here, is how to handle the forvo-word-audio. Personally, I don’t think forvo audio is as good as the audio that comes from Yomichan. That’s why I have Yomichan import word audio, and Animebook will only add audio if that field is empty (if Yomichan had no audio for it). This is a good way of providing backup audio when there otherwise would be none.

If you want to use forvo audio, make sure you set the “Vocab Field” on the top right.

Further down in the settings, make sure you select “No” for autoplaying audio after creating a card, otherwise… it will auto play audio every time you create a card.

autoplay audio animebook

Pitch Accent Colors

As of an update on 7/10/2021, my Yomichan settings will now export information necessary to color-code the target word similar to Migaku Japanese. However, my implementation does so using 0 javascript.

If you downloaded my settings, then you already have this functionality. If you want to add it manually (or use your own note type), you can get the template code for this from this github gist.

By default, the words won’t be colored at all (unless you are using my note type). This is to give the user the most flexibility over how they want to style words based on pitch. By default, the target word will be wrapped in a span element with a class signifying what pitch pattern it is. The possible classes are:

For more details on how to style these, check out the pitch accent color section in Eminent Note Type V2.

Troubleshooting

Bad card formatting that looks different from the demo gif

If the card format looks misaligned or just weird in general, it could be due to the custom Anki Card Template from Yomichan not transferring properly when importing my Yomichan settings.

Yomichan template code

If this is the case, then you can replace that code with the code from this github gist.

Can’t get word to be colored by pitch accent

This uses a feature that is somewhat new in Yomichan, so if you have an older version you might need to update in order to get this to work properly.

Changelog