Sentence mining is the process of picking sentences from your immersion and making Anki cards. Each sentence has one unknown piece of information, which is referred to as target word.
To mine sentences from movies and TV-shows you are going to need the mpv video player, and a plugin for mpv called mpvacious.
mpv is the best video player for language learners. It is fast, minimal, extensible and compatible with all video formats. mpv is available on most distributions of GNU/Linux. To install it on Arch Linux, execute the following command:
$ sudo pacman -S mpv
Make sure you have version 0.33.0 or later. If such a version is not available on your distribution, see here for different installation options.
Start mpv at least once to create the config folder
which will be located at
To configure mpv,
create and open
This step is not strictly necessary.
Example configuration file
# Define language preferences alang=ja,jp,jpn,japanese,en,eng,english,English,enUS,en-US slang=ja,jp,jpn,japanese,en,eng,english,English,enUS,en-US # mpv will resume where you left off when you reopen a media file save-position-on-quit=yes # Automatically use external subtitle files that contain the name of the media file sub-auto=fuzzy # Additional folders for storing subtitle files. # You can drop all subs in the "subs" folder to keep files organized. sub-file-paths=ass:srt:sub:subs:subtitles # Subtitle font. Make sure the font you select is installed # and contains all characters that are included in your subtitle files. # https://archlinux.org/packages/extra/any/noto-fonts-cjk/ sub-font="Noto Sans CJK JP Regular" # Change subtitle font size. sub-font-size=40 # Uncomment this if you want mpv to override styles from SubStation Alpha (.ssa/.ass) subtitles # sub-ass-override=force # Improves audio when the playback speed is changed. af-add=scaletempo2 # Screenshots screenshot-directory="~/Pictures/Screenshots/" screenshot-template="%F_%wHh%wMm%wSs%wTms" screenshot-format=jpg screenshot-jpeg-quality=90 screenshot-high-bit-depth=yes
Always download what you watch. This way it's easier to work with the files, make Anki cards, take screenshots, cut clips, make condensed audio, and so on. Don't use "services" that spy on you such as Netflix, Hulu, VRV, Funimation or Crunchyroll.
See the Resources page to find ways to download Japanese content.
Youtube-dl is a program that can be used to download videos from YouTube and similar sites. On YouTube, you can find a wide variety of videos with built-in Japanese subtitles. An example source of immersion material on YouTube is Ted talks. Youtube-dl can also download audio tracks separately. There are many language-dense streams and podcasts on YouTube that can be used for background listening.
On Arch Linux, Youtube-dl can be installed by running this command:
$ sudo pacman -S youtube-dl
To download a video, execute:
$ youtube-dl 'https://youtube.com/<video>'
If you want to download just the audio, use this command:
$ youtube-dl --extract-audio --format bestaudio/best 'https://youtube.com/<video>'
Tip: add these commands as aliases to access them without too much typing.
Youtube-dl reads its configuration from
Example configuration file
--sub-lang 'ja,en,en-US,en-GB' --convert-subs ass --ignore-errors --continue --add-metadata -f 'bestvideo[height<=1080]+bestaudio' -o '~/Videos/%(upload_date)s-%(title)s.%(ext)s' --merge-output-format mp4 --user-agent "Mozilla/5.0 (Windows NT 10.0; rv:75.0) Gecko/20100101 Firefox/75.0"
This configuration enables Youtube-dl to automatically download
Japanese and English subtitles in
and save the downloaded files to
$ man youtube-dl for a comprehensive list of options.
To learn Japanese from visual content such as anime or jdramas you need Japanese subtitles. Subtitles can be found on Kitsunekko and on our Resources page. If you want to synchronize the subtitles, see the autosubsync-mpv page.
Don't forget that if you have English subtitles enabled, at best you're going to improve your English, but your Japanese is not going to get any better.
mpvacious is a plugin for the mpv video player that allows you to make Anki cards while watching movies and TV shows in your target language.
mpvacious can update Anki cards you add with Yomichan by filling the audio and screenshot fields. Here is a video demonstration:
mpvacious can be installed with
$ git clone 'https://github.com/Ajatt-Tools/mpvacious.git' ~/.config/mpv/scripts/subs2srs
example config file
and save it to
If you use the Note Type from the
recommended mining deck,
you don't need to change any settings at all.
If you don't, make sure to adjust at least the following variables:
- Make sure Anki is running.
- Open a video in mpv.
Ctrl+tto activate clipboard autocopy.
- Open your web browser and activate Yomichan Search by pressing
- Enable clipboard monitor in Yomichan Search.
- When there is a word you want to mine, create a card with Yomichan.
- Go back to the mpv window and press
Ctrl+m. If you want to grab a sentence that spans multiple lines, press
ato open the advanced menu. Then mark the lines you want to appear on the card by pressing
cand moving the position with
Shift+l. Finish by pressing
- The Anki Browser window should appear with the card updated.
You can save sentences for later without adding defintions.
To do so, press
To update mpvacious, run the command below:
$ cd ~/.config/mpv/scripts/subs2srs && git pull
Though you often see such recommendations, I think it unnecessarily complicates your setup. Yomichan Search can do the same thing simpler.