Japanese Support

furi.png

To enable automatic reading generation and other Japanese-specific features, you need to install a plugin.

Installing the plugin

  1. Open Anki, and use File>Download>Shared Plugin

  2. Search for "Japanese Support", select it, and click Ok.

Adding support files

In addition to the plugin, you will need some support files to perform the reading generation.

MacOS

The MacOS support files are included in the plugin package, so there are no additional files to install once you have installed the plugin.

PowerPC Users: Most features of the plugin work on both x86 and PowerPC based macs, but the automatic reading generation only works on x86.

Windows

  1. Install http://anki.googlecode.com/files/anki-reading.exe

  2. Go to Start > Control Panel > Regional Settings > Languages tab, and choose to install files for east-Asian languages.

Linux

If you're on Linux, install Mecab, Mecab's IPADIC in euc-jp format, and Kakasi. If you want to use the UTF-8 IPADIC, you'll need to edit the plugin's source. You must make sure juman is not installed.

If you would like save about ~44MB of disk space, you can run the following command on a terminal:

rm -r $HOME/.anki/plugins/japanese/osx

This will remove libraries only needed on Mac OS X.

Ubuntu

(This procedure was tested on Ubuntu 9.04 and 8.10)

When you try to install "mecab" it will also install mecab-jumandic which interferes with Anki. A simple solution is to install "mecab-ipadic" first. For example, by running the following command in a terminal you can install mecab and kakasi correctly:

sudo apt-get install mecab-ipadic mecab kakasi

The output should look like this if you don't have kakasi installed yet:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  kakasi-dic libmecab1 mecab-utils
The following NEW packages will be installed:
  kakasi kakasi-dic libmecab1 mecab mecab-ipadic mecab-utils
0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded.
Need to get 964kB/13.5MB of archives.
After this operation, 58.8MB of additional disk space will be used.
Do you want to continue [Y/n]?

Note that this command is not going to install mecab-jumandic.

If this procedure doesn't work (i.e. the reading generation doesn't use mecab) try uninstalling Anki making sure that all the system files related to it are deleted (you should have a /usr/share/anki/ directory) and then installing again. Please make sure to make the necessary backups before removing any files.

Fedora 13

yum install mecab-ipadic-EUCJP mecab kakasi kakasi-dict

Entering Japanese

To start adding a Japanese card:

  1. Edit>Add Items

  2. Click the spanner icon
  3. Click add
  4. Choose Japanese
  5. Click close and close again.

To enter the Japanese text, you will need to install and use the input method of your OS. There are plenty of other sources which explain how to do this, such as these instructions for Windows XP, or this page for MacOS.

Reading Generation

Anki uses MeCab, one of the best Japanese morphological analyzers available. It is not able to correctly guess the reading 100% of the time, however.

The automatic reading generation is to save you the effort of typing everything twice. Please do double-check the output before adding cards, and please don't use it to determine the reading of words you have not seen before - a dictionary is a better choice for that.

You may find it easier to check the reading by looking at furigana - to do that, press F2 in the editor, or click the 'preview' button.

Changes

Anki used to use Kakasi for reading generation. Kakasi was not very good at guessing the correct reading, and so in cases where more than one reading was possible, all of them would be shown, requiring you to double click on the correct one.

As MeCab is more accurate and it's possible to look at the readings with furigana now, listing of all possible readings has been disabled. This places a larger onus on you to make sure the readings are correct, but also saves you time.

If you prefer the old behaviour:

  1. Settings>Plugins>Open Plugins Folder

  2. Open the 'japanese' directory
  3. Open 'reading.py' in a text editor.
  4. Change 'USE_MECAB=True' to 'USE_MECAB=False'

To enable the old double-click-to-select-reading, download 'basic Chinese support' in the plugin browser - the double click support is shared with Chinese.

Furigana Display

The plugin will show only the reading in the question by default, for people who want to study from reading>kanji. If you want both the kanji and the reading displayed, follow the instructions above but edit 'furigana.py' instead. You can also choose to have furigana only displayed when hovering over the kanji.

Note that furigana will only work with cards generated in 0.9.9.8.1 or later. If you have cards generated with older versions of Anki, they will be displayed as they used to be. If you want to use furigana with your new cards, select them in the editor and use Actions>Regenerate Readings. You may want to think twice about doing this however, as not all of the readings will be correct, and fixing the mistakes manually may take you some time.

The furigana display is not compatible with colours. If you apply colours or other formatting to your reading field, the furigana will break.

Kanji Stats

The plugin also adds a Kanji statistics panel (Tools -> Kanji Stats) to tell you how well your cards cover the standard kanji. The statistics give you information on:

  1. Total kanji
  2. Coverage of Jouyou Kanji (by grade)
  3. Coverage of Jinmeiyou kanji
  4. Other

The stats panel also provides the complete lists of "seen" and "missing" kanji, linked to WWWJDIC so you can look up the meaning and example words for the ones you're missing.

In order for a given kanji to be counted, it must be:

On a USB drive

Copy the mecab and kakasi directories from c:\program files\anki to the Anki folder on your flash drive.

Anki looks for the folders in the directory it's being run from. If you're using a batch file, make sure you cd to the Anki folder first. Alternatively you can adjust WIN32_READING_DIR in reading.py in the Japanese plugin.

AnkiWiki: JapaneseSupport (last edited 2010-07-22 05:35:36 by DamienElmes)