Monolingual Japanese offline dictionaries for Android

Several times within the last year, maybe two, I ventured into the depths of the interwebs in search of a monolingual Japanese dictionary app that could be used offline. What I found was JE-EJ dictionaries, 広辞苑第七版 for €89.99 and people in forums suggesting apps that wouldn't work offline. On my most recent desperate search I even came across a geoblocked dictionary app—to top it all off by a company deriving their name from the words "big" and "globe". m(

At this point I thought about just solving the problem myself. Looking at some dictionary websites, I found one where the entries were nicely enumerated from 1 to 297,199, so I wrote a small crawling script. In the meantime I used scholarly search engines to see if there happened to be some open data sets that could be used. I would've just thrown terms and definitions in an SQLite DB and installed some SQLite viewer on my phone.

In the end I found a better solution. One that's accessible and doesn't require technical skill—which is why I'm writing this. Watching this video (by this guy) I learned about EPWING, a JIS standardized format for digital dictionaries. Now, looking at aforementioned video you might get your hands on some such dictionaries. All you then need is an app to interface with them: I quickly found DroidWing, which I happily link here because the author also distributes a paid version where the only difference is the icon color. <3

So yeah, not bound to any service provider, platform independent, offline ... 国語辞典 case solved for good. :3

(This is just to feed the Google, in case someone else also looks for a solution to this: アンドロイド アプリ 国語辞典 国語 辞典 辞書 オフライン 無料.)

tags: japanese


Japanese books on a Kindle 4

Five years ago I realized Amazon deems Japanese books incompatible with the Kindle 4 and suggested using 青空文庫 as an alternative source for e-books. While I wholeheartedly suggest you always search for DRM free sources for your e-books first, there are cases where Amazon simply seems to be the only available source.

In the following I'm going to show a viable way to handle Japanese e-books from Amazon, for people still holding on to a Kindle 4.

what does work

  • vertical writing with PDFs
  • Japanese file names

what doesn't seem to work

  • vertical writing with AZW3 files
  • highlighting text in vertical writing
  • links (e.g. from the TOC) in vertical writing
  • proper dictionary function

Before jumping right into the technical stuff, be reminded that if you're okay with reading on your PC or phone, the easy solution is to just get the Kindle app and have your e-book delivered to that. If it is to be the Kindle, here's how that works:

If you're on Linux, get a Windows 10 VM, install the Kindle app and load the books you want to transfer to your kindle from your library. Now, word has it there are ways to free books you bought from Amazon from their DRM. For the purpose of this explanation we're just going to assume you have a DRM free AZW3 file. If you prefer to read your book in horizontal writing, you're basically done at this point. Copy the file to your Kindle and curse Amazon for not allowing you to send it to the device directly. For verical writing there are a few more steps to go through.

If you haven't already done so, download Calibre and add a book (probably a AZW3-file) to your collection. To generate a PDF with vertical writing we're going to use 青空キンドル which takes plain text as input. Unfortunately, exporting a book as TXT in Calibre will mess with furigana (append them as normal text). To get proper furigana, export the book as HTMLZ and from the resulting archive extract the file index.html. To convert the HTML file into plain text while preserving furigana in a format 青空キンドル understands, use the script from this repository. Running python3 index.html will give you a file out.txt. Use this as your input for 青空キンドル (you will most likely want to edit the first few lines of the text to get a proper cover page).

Now, PDF file names. Five years ago I noticed problems with book names when just copying over PDF files with Japanese names. The Kindle takes the author's name from a PDF's metadata, but doesn't do this for the title. The title is taken from the file name and non Latin characters in file names can be a mess to deal with on FAT file systems. To get Japanese file names for PDFs properly displayed, mount your kindle with the parameter -o uni_xlate=1* and use the script from this repository generate an encoded file name. Example: running python3 使用例 will give you :4f7f:7528:4f8b. Meaning if you name a PDF file on your Kindle :4f7f:7528:4f8b.pdf while mounted with the parameter mentioned above, it will show up as 使用例 on the device.

And with that you can enjoy Japanese books from Amazon in vertical writing on a Kindle 4. No need to abandon a device that's still working perfectly fine. :)

*See man page of mount (search for "unhandled Unicode") for details.



Nine months in Japan — last review:

Given I already felt like on my way back towards the end of last month, my last weeks felt pretty relaxed. Rather than squeezing a lot of activities into the short time left I was able to pretty much go with an everyday pace. Nevertheless I ended up doing some stuff I'm really happy I was able to do before I left.

  • general
    • I decided to write a German Wikipedia article on flick input. Given the corresponding Japanese article, which I used as a base, was lacking references, I went on a hunt through Japanese papers on the topic. Several works on specific related matters cited a paper with the title タッチパネル搭載ケータイにおける入力方式の評価 for their general explanation of what flick input is. Unfortunately, the paper was nowhere to be found online. Given that CiNii, the bibliographic database where I at least found the paper mentioned online outside of the reference sections of other papers, is a service by the very institute I was working at, I decided to check out our library. Even one of the library personnel checked for any trace, but to no avail. No printed matter available and no online access in any of the subscriptions of the NII. What do you do at that point? Easy: hop on your bike and pay a short visit to one of the largest libraries in the world. (Tokyo's awesome in some aspects.) So after finding out the シンポジウムモバイル研究論文集 2010 (the journal containing the paper) wasn't available through NII, I looked again online and found out the 国立国会図書館 had a copy. So, go there, get a library card made, file a viewing request for the journal, finally get my hands on the thing, read the paper to make sure it's actually something I can use as a reference, file a copying request, get the copy, take a sneaky blurry picture to commemorate my success and return the journal.
    • met a friend from Matsuyama who was awesome enough to come all the way to Tokyo
    • played some Shadow Tactics: Blades of the Shogun
    • finally found a case/bag for my Vortex CORE — it's for lenses and thus has a circle profile but apart from that fits the size perfectly
    • found a ギザ十
    • visited a Escher exhibition where the audio guide was spoken by バカリズム
    • was surprised to reach the gate and find out I was going to fly home in the BB-8 ANA JET
  • at the institute
    • had some meetings that, for a change, were in Japanese
    • was able to help with the technical setup for a art history class at 東大
    • got my certificate for completing the internship

All in all a really enjoyable finish to a, looking back, invaluable 9 months. From a professional perspective: great. Japanese progress: surprisingly satisfactory. Sports: outright neglect on my part. Note for next time: establish a sports routine early on.

On to the ... well, I'm sure I'll be back in the foreseeable future. :3


27  26  25  24  23  22  21  20  19  18  17  16  15  14  13  12  11  10  9  8  7  6  5  4  3  2  1