Rikaikyun – a reader app for Japanese text on Android

On desktop computer there are such wonderful browser plugins like Rikaichan, Rikaikun and Rikaisama that will translate Japanese words for you if you move your mouse over them.

Apparently Rikaichan might have (or have not) worked in an older version of FireFox for Android, but currently your best bet, when it comes to dictionary supported reading of Japanese on your Android device of choice is Jade Reader (it even works on a E Ink Android device like Onyx Boox T68 Lynx). However, this app haven’t seen an update in ages and is missing quite a few functions. The source code is available on the internet here. I tried my luck altering the code, but I only managed to make small alterations to an older version of the app. The never version uses different external libraries and it’s not well documented, so I had issues even compiling it…

I was trying to make an app that uses Rikaichan (Rikaikun to be exact) in Node-Webkit and by accident I found out that the Rikaichan core code runs even if I run it directly on a html page. This made me believe that it might be possible to run Rikaichan in PhoneGap. As it turned out, it can be used inside PhoneGap (I suspect it won’t work on any Android younger than 4.0.4 due to the amount of RAM it requires)!

Above I mentioned core code, what I meant by that is that I didn’t manage to make Rikaichan work as a whole, but just the dictionary module (data.js). Thankfully the dictionary module can be used on it’s own and the fancy display can be always recreated from scratch. Using it is actually quite simple, though I had hard time telling what is what inside Rikaikun plugin. Maybe I’ll make another post about that.

So, I started a new project name Rikaikyun. Currently it’s not very impressive as it just loads first chapter of Genji Monogatari (you can’t pick a specific file yet) while offering no customization whatsoever, but the point is the basic functionality is there. By basic functionality I mean, you can tap a word and it will open a dictionary popup. I have big plans for this app (furigana, word stats etc.), but I’m not sure how far I can push the thing performance-wise (PhoneGap isn’t the most efficient platform, though newer Android devices seem to handle it well enough).

Anyway, the project is still in a very early stage and it can be found at https://github.com/jahu00/Rikaikyun. It should be possible to even test it without putting it on your Android device. Both Chrome (with –allow-file-access-from-files option) and FireFox should be able to handle the file (though touch events and zoom won’t work in FireFox). To test it on desktop just run the index.html found in www folder. For android, you would have to make PhoneGap build it for you, or use the PhoneGap developer app.

If there is any progress with this app, I’ll try posting info about it here.

Advertisements

2 thoughts on “Rikaikyun – a reader app for Japanese text on Android

    • Haven’t done a whole lot with it in months. I did start a few other projects in the meantime and one of them (a Bookworm clone) could possibly contribute to the reader. Well, all I did was, implement simple ordering of dictionary entries based on word frequency from Japanese Wikipedia. The most meaningful other improvements to the app would be adding vertical text support, epub support, ability to change fonts and fixing the way clicking works on newer Android devices (text keeps deselecting and copy\paste popup keeps showing up randomly). Other than that, the app works pretty well right now (which sadly contributes to me not improving it further). Though the last few releases had some major preformace improvements (you can grab the latest one from here).

      P.S. My other project is an attempt to write an OCR that can tackle Japanese LN scans (I know there are some good commercial OCRs, but having used one of the best I saw plenty room for improvement). It is still in its infancy and I haven’t really decided if I should write it in C# or JavaScript (so I’ve got a bit of both).

      Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s