Rikaisama

Rikaisama is a modification of the rikaichan Japanese-English popup dictionary that adds many features and customization options. Supports Windows, Ubuntu, and newer versions of OSX.

Contents

Features

Screenshots

Download

The latest version can be found on the Rikaisama download page hosted by SourceForge. Source code is included.

How to Install

  1. Download the latest version of Rikaisama.
  2. From the Firefox menu, select "File | Open File..." and select the .xpi file that you just downloaded.
  3. Click the "Install Now" button.
  4. Restart Firefox.
  5. Install the official rikaichan dictionaries if you don't already have them.

General Usage

Setting up the Anki Real-Time Import Feature

  1. In Anki, install the Real-Time Import add-on using code 2512410601 (Tools > Add-ons > Browse&Install...).
  2. In Firefox, fill in Rikaisama Options > Clipboard & Save > Tags. These are the tags that will be added to new cards. You may leave this field blank if you do not want add a tag to your cards
  3. In Firefox, fill in Rikaisama Options > Anki > Save format. This is the save format to use. Map the tokens in the save format to the field names that you enter in the Field names box (see next step). You must separate the mapped fields with a tab token ($t).
  4. In Firefox, fill in Rikaisama Options > Anki > Field names. Enter the field names that correspond to the desired fields in your deck's current Note Type. Make sure that the field names match the the tokens in the save format (see previous step). You must separate the fields names with a space.
  5. Open your Anki deck. The Real-Time Import plugin will automatically load itself.
  6. Back in Firefox, highlight a word and press the "R" key. If you setup everything correctly, you should see a "Note Added" popup in Anki.

It might be easiest to follow an example:

These are the fields in our Anki "Japanese" Note Type:


Notice that there are 5 fields in this Note Type: "Expression", "Reading", "Meaning", "Hint", and "Examples".

For this example, we want Rikaisama to add cards with the "Expression", "Reading", and "Meaning" fields filled in whenever the Real-Time Import key ("R") is pressed. We also want to leave the "Hint" and "Examples" fields blank when adding cards.

In Rikaisama Options > Anki, here is how we would configure the "Save format" and "Field names" to accomplish this:

As you can see, we have entered the field names that we care about into the "Field names" box. We have separated the field names with spaces like this: "Expression Reading Meaning".

In the "Save format" box, we have entered "$d$t$r$t$n". The "$d" token maps to the "Expression" field, the "$r" token maps to the "Reading" field, and the "$n" token maps to the "Meaning" field. Notice how these tokens are separated by a "$t" token. Whenever Rikaisama sees a "$t" token, it will start mapping to the next field.

Troubleshooting:

The most common issue is using a "Note Type" in Anki that doesn't contain the necessary fields. To change the current "Note Type":

  1. Open Anki.
  2. Select your deck from the deck chooser.
  3. Click "Add" (it's between "Decks" and "Browse").
  4. Click the "Type" button and select the correct "Note Type".
If something isn't working you may be able to figure out why by opening the Anki add-ons folder and then opening the Real-Time Import log file: real_time_import.log. You can email the log to the author via 'cb4960 at gmail dot com' to receive additional help.

Notes:

This feature has been tested with Windows XP, Windows 7 and Linux Mint.

By default, Real-Time Import will not add a duplicate note. To change this behavior, open the Anki add-ons folder and edit "Real-Time_Import_for_use_with_the_Rikaisama_Firefox_Extension.py". Find the line "ALLOW_DUPLICATES = False" and change it to "ALLOW_DUPLICATES = True". Now restart Anki.

You can change the UDP port assignment in both Rikaisama and Real-Time Import if it is already being used by some other program.

Hidden Options

The following options can only be enabled via the about:config page:

extensions.rikaisama.epwingusewine On Linux, if EPWING mode isn't working correctly, you may try enabling this option. When enabled, Rikaisama will use Wine with the Windows EPWING executable instead of using the native Linux EPWING executable. Rikaisama will assume that you have both Wine and Bash installed.
extensions.rikaisama.epwingshowtitle Set this to false to hide the dictionary title in EPWING mode.
extensions.rikaisama.epwingshowshorttitle Set this to false to show the full dictionary title in EPWING mode instead of the shortened title.
extensions.rikaisama.epwingforceparse Set this to true to force parsing of unsupported EPWING dictionaries.
extensions.rikaisama.epwing_apply_remove_regex_when_saving Set this to false to prevent the EPWING regex from being used when either saving or when using Real-Time Import.

Abbreviations

Part of Speech Marking
adj-iadjective (keiyoushi)
adj-naadjectival nouns or quasi-adjectives (keiyodoshi)
adj-nonouns which may take the genitive case particle `no'
adj-pnpre-noun adjectival (rentaishi)
adj-t`taru' adjective
adj-fnoun or verb acting prenominally (other than the above)
adjformer adjective classification (being removed)
advadverb (fukushi)
adv-nadverbial noun
adv-toadverb taking the `to' particle
auxauxiliary
aux-vauxiliary verb
aux-adjauxiliary adjective
conjconjunction
ctrcounter
expExpressions (phrases, clauses, etc.)
intinterjection (kandoushi)
ivirregular verb
nnoun (common) (futsuumeishi)
n-advadverbial noun (fukushitekimeishi)
n-prefnoun, used as a prefix
n-sufnoun, used as a suffix
n-tnoun (temporal) (jisoumeishi)
numnumeric
pnpronoun
prefprefix
prtparticle
sufsuffix
v1Ichidan verb
v2a-sNidan verb with 'u' ending (archaic)
v4hYodan verb with `hu/fu' ending (archaic)
v4rYodan verb with `ru' ending (archaic)
v5Godan verb (not completely classified)
v5aruGodan verb - -aru special class
v5bGodan verb with `bu' ending
v5gGodan verb with `gu' ending
v5kGodan verb with `ku' ending
v5k-sGodan verb - iku/yuku special class
v5mGodan verb with `mu' ending
v5nGodan verb with `nu' ending
v5rGodan verb with `ru' ending
v5r-iGodan verb with `ru' ending (irregular verb)
v5sGodan verb with `su' ending
v5tGodan verb with `tsu' ending
v5uGodan verb with `u' ending
v5u-sGodan verb with `u' ending (special class)
v5uruGodan verb - uru old class verb (old form of Eru)
v5zGodan verb with `zu' ending
vzIchidan verb - zuru verb - (alternative form of -jiru verbs)
viintransitive verb
vkkuru verb - special class
vnirregular nu verb
vsnoun or participle which takes the aux. verb suru
vs-csu verb - precursor to the modern suru
vs-isuru verb - irregular
vs-ssuru verb - special class
vttransitive verb

Field of Application
BuddhBuddhist term
MAmartial arts term
compcomputer terminology
foodfood term
geomgeometry term
gramgrammatical term
linglinguistics terminology
mathmathematics
milmilitary
physicsphysics terminology

Miscellaneous Markings
Xrude or X-rated term
abbrabbreviation
archarchaism
atejiateji (phonetic) reading
chnchildren's language
colcolloquialism
derogderogatory term
eKexclusively kanji
ekexclusively kana
famfamiliar language
femfemale term or language
gikungikun (meaning) reading
honhonorific or respectful (sonkeigo) language
humhumble (kenjougo) language
ikword containing irregular kana usage
iKword containing irregular kanji usage
ididiomatic expression
ioirregular okurigana usage
m-slmanga slang
malemale term or language
male-slmale slang
oKword containing out-dated kanji
obsobsolete term
obscobscure term
okout-dated or obsolete kana usage
on-mimonomatopoeic or mimetic word
poetpoetical term
polpolite (teineigo) language
rarerare (now replaced by "obsc")
senssensitive word
slslang
uKword usually written using kanji alone
ukword usually written using kana alone
vulgvulgar expression or word

Pitch Accents

What are pitch accents?

The following was taken from Wikipedia.

In standard Japanese (標準語 hyōjungo), pitch accent has the following effect on words spoken in isolation:
  1. If the accent is on the first mora, then the pitch starts high, drops suddenly on the second mora, then levels out. The pitch may fall across both moras, or mostly on one or the other (depending on the sequence of sounds)—that is, the first mora may end with a high falling pitch, or the second may begin with a (low) falling pitch, but a native speaker will hear the first mora as accented regardless.
  2. If the accent is on a mora other than the first or the last, then the pitch has an initial rise from a low starting point, reaches a near-maximum at the accented mora, then drops suddenly on the next.
  3. If the word doesn't have an accent, the pitch rises from a low starting point on the first mora or two, and then levels out in the middle of the speaker's range, without ever reaching the high tone of an accented mora. Japanese describe the sound as "flat" (平板 heiban) or "accentless".
Japanese accent is presented with a two-pitch-level model. In this representation, each mora (syllable) is either high (H) or low (L) in pitch, with the shift from high to low of an accented mora transcribed H*L.
  1. If the accent is on the first mora, then the first syllable is high-pitched and the others are low: H*L, H*L-L, H*L-L-L, H*L-L-L-L, etc.
  2. If the accent is on a mora other than the first, then the first mora is low, the following moras up to and including the accented one are high, and the rest are low: L-H, L-H*L, L-H-H*L, L-H-H-H*L, etc.
  3. If the word is heiban (doesn't have an accent), the first mora is low and the others are high: L-H, L-H-H, L-H-H-H, L-H-H-H-H, etc. This high pitch spreads to unaccented grammatical particles that attach to the end of the word, whereas these would have a low pitch when attached to an accented word. Although only the terms "high" and "low" are used, the high of an unaccented mora is not as high as an accented mora.
Format of Rikaisama's pitch accents:

<blank> - Example: 単眼鏡 たんがんきょう
No pitch accent information available for this word.

0 – Example: 洗う あらう 0
Zero means no accent. From Wikipedia: "Word doesn't have an accent, the pitch rises from a low starting point on the first mora or two, and then levels out in the middle of the speaker's range, without ever reaching the high tone of an accented mora. Japanese describe the sound as "flat" (平板 heiban) or "accentless". "

2 – Example: 願う ねがう 2
The "2" indicates that the accent is on the 2nd mora (the が).

32 – Example: 著作権 ちょさくけん 32
The "32" indicates that the accent can be on either the 3rd mora (く) or 2nd mora (さ). This is in frequency order, meaning that it is more common for the accent to be on the 3rd mora than the 2nd mora.

{11} – Example: 超越論的観念論 ちょうえつろんてきかんねんろん {11}
Curly braces are placed around pitch accents that are in the double digits. The "11" indicates that the accent is on the 11th mora.

21,0 – Example: 飛車 しゃ 21,0
For some words, the pitch accent dictionary contains multiple sub-definitions in an entry. Sometimes each sub-definition can have a different pitch. A comma separates the pitch accents for the multiple sub-definitions. The "21,0" means that in the 1st sub-definition of the word, the accent is on either the 2nd mora (しゃ) or 1st mora (ひ), and that in the 2nd sub-definition of the word, no accent is present.

1|Ø – Example: 朝日 あさひ 1|Ø
For some words, the pitch accent dictionary contains multiple entries that have identical expressions and readings. The "|" separates the pitch found in each entry. The "1" indicates that in the first entry, the pitch accent was on the first mora. The "Ø" symbol indicates that the other entry contained no pitch accent information.

1-2 – Example: 思案投げ首 しあんなげくび 1-2
I'm not sure what the "-" is supposed to represent. It is present in the pitch accent dictionary so I left it in.

3? – Example: 手投弾 てなげだん 3?
A trailing question mark is added to pitch accents that have a small chance of being inaccurate and have not yet been checked by a human.

(part-of-speech) – Example: 道道 みちみち (副)0,(名)2
Sometimes pitch accent changes depending on the word's part-of-speech. The part-of-speech is placed inside of parenthesis. The above example shows that the pitch accent is "0" when the word is used as an adverb and "2" when the word is used as a noun.

Valid part-of-speech options:

(名)名詞
(代)代名詞
(動五)動詞五段活用
(動五[四])動詞口語五段活用・文語四段活用
(動四)動詞四段活用
(動上一)動詞上一段活用
(動上二)動詞上二段活用
(動下一)動詞下一段活用
(動下二)動詞下二段活用
(動カ変)動詞カ行変格活用
(動サ変)動詞サ行変格活用
(動ナ変)動詞ナ行変格活用
(動ラ変)動詞ラ行変格活用
(動特活)動詞特別活用
(形)形容詞
(形ク)形容詞ク活用
(形シク)形容詞シク活用
(形動)形容動詞
(形動ナリ)形容動詞ナリ活用
(形動タリ)形容動詞タリ活用
(ト|タル)「~と」(副)「~たる」(連体詞)の形で用いられるもの
(連体)連体詞
(副)副詞
(接続)接続詞
(感)感動詞
(助動)助動詞
(格助)格助詞
(接助)接続助詞
(副助)副助詞
(係助)係助詞
(終助)終助詞
(間投助)間投助詞
(並立助)並立助詞
(準体助)準体助詞
(接頭)接頭語
(接尾)接尾語
(連語)連語
(枕詞)枕詞

Tips

  • Use JNovel Formatter to convert .txt files to nicely formatted HTML files.
    Great for those who want to read Japanese novels with the help of Rikaisama. It supports Aozora formatting (eg. furigana, emphasis, gaiji, etc.), bookmark anchors, various style options, batch processing, etc. It is free and open source and does not require installation. Be sure to install the HTML Ruby add-on to show the furigana in Firefox.