Back

Typhon: eBook reader with Rikai dictionary lookup for Android

#1
This is a project that I have been sitting on for a long time. I initially wrote it for myself with no intention on publishing it but then I thought it would be nice to share.

The original idea comes from JadeReader and I actually got some code from it. I used PageTurner for the ebook reading features so it can have all the features of a full-blown  eReader and it can read ePub. So it is free and open source (GPLv3) Smile

It is also designed with the users of RTK in mind so you can lookup kanjis and quickly see the frame number and usually the first meaning in Kanjidic is the keyword from the 4th edition. Also, you can save a word in AnkiDroid in one click. It will create a new note for you with all the information about the word and the context sentence in the book in a default deck (I'll make that configurable later on).

You can access the beta here : https://play.google.com/apps/testing/net...lub.typhon

Tablet example, day mode with explanations:

[Image: fp8o52.png]

Phone example, night mode:
[Image: 314xes6.png]

Here is the description I submitted for the Play Store for more details:

Quote:Typhon is an e-book reader with the added capability of dictionary lookup for the Japanese language. If you ever used Rikaichan or Perapera-kun, you know what this is about.

Here are a list of the features:
- Vocabulary lookup based on Edict
- Japanese Names lookup based on Enamdict
- Kanji lookup based on Kanjidic (slightly modified to accommodate Heisig index from the 6th version as well)
- Entries displayed in colors
- Kanji lookup of an edict entry (short click on it)
- Automatic import of an entry as a flashcard in AnkiDroid if installed. It adds also the context sentence in the flashcard. (long click on the entry)
- Kanji entries display the Heisig frame number so that you know if you learned a kanji or not (surprisingly useful if you used the excellent remembering the kanji book)
- Possibility to switch between Heisig 4th and 6th numbering
- Possibility to zoom in on the entries (pinch the entries drag window)

If you're wondering why I added a kanji lookup on an edict entry, I think it is useful when you get a match with a hiragana word in the text but in kanji in Edict and you're wondering what is this kanji that you saw previously somewhere.

Credits:
-----------
Typhon is a fork of PageTurner integrating some elements of JadeReader which in turns has ported some of its features from rikaichan. And rikaichan uses Jim breen's Edict, Enamdict and Kanjidic. So it makes also use of rikaichan's deinflector data and logic without which you would not be able to search an inflected verb in a text.

- PageTurner: http://www.pageturner-reader.org/
- JadeReader: https://bitbucket.org/rayzhou/jaderead-restart
- Polarcloud: http://www.polarcloud.com/
- Jim breen's page: http://nihongo.monash.edu/japanese.html

Since I modified quite a lot the original dictionary code from JadeReader, I decided to publish it as a Java library called JRikai adding support for Kanjidic amongst other things. 

This work is published under the GPLv3 license following the compatibility rules with the licenses used by the software Typhon is based on.

Source code:
Typhon : https://biboomig@bitbucket.org/biboomig/typhon.git
JRikai : https://biboomig@bitbucket.org/biboomig/jrikai.git
Edited: 2016-03-19, 9:56 am
Reply
#2
It scanned my device for epub files and found none. Fine, I will open it manually from my Google drive. I go to menu "Open ePub file". I navigate to google drive and find my epub file, but it is grayed out and I am not allowed to open it.  ???
Reply
#3
There is no support for Google drive for now, you need to have the ePub files on your storage. For now, I just focused on adding the dictionary feature to PageTurner so I have not modified the reader in itself. If I see that it seems to be a popular request, I might take a look at extending the reader part.

Are you sure there are any ePub file on your device? It will not pick up any other format.
Edited: 2016-03-19, 11:48 am
Reply
(March 20-31) All Access Pass: 25% OFF Basic, Premium & Premium PLUS! 
Coupon: ALLACCESS2017
JapanesePod101
#4
Ooh, it would be great if it could use EPWING dics, or connect with EBPocket somehow, so I could use monolingual dics with it. Or even 日本語 Wordnet would be cool. It looks really impressive so far though! Great job!
Edited: 2016-03-19, 9:36 pm
Reply
#5
Thanks!

I have looked into EPWING as a began this project but it seemed like a headache because not only the format is poorly documented but it is also mainly abandoned for what I saw.  

But I will have another look for sure. 

For Wordnet, I did not know it, but that seem pretty doable! Is this the last version? I saw there is a link saying that they maintain on this other website but it does not work for me.
Reply
#6
Glad that Wordnet is doable! It's not as large as a professional dictionary, but it's probably the best open source monolingual Japanese one. Also, yeah that's the latest version. Thanks for all your hard work!
Edited: 2016-03-20, 2:58 pm
Reply
#7
I actually made a test with EPWING with my Kenkyusha wadai5:

[Image: 2ym8wno.png]

I am still not sure if that is going to do the trick for all types of dictionary though. And the formatting is going to be a challenge.
Reply
#8
I published a new Alpha version in closed testing. This means that the people who already downloaded the beta can normally see the update but if you want to install the alpha from scratch shoot me an e-mail.
So this version adds a configuration interface where you can add, remove, configure and reorder dictionaries.
Nihongo wordnet is there now. Remember that with this configuration interface you can add several times the same dictionary with different configurations. This means that you can have an instance of wordnet that shows in English and another in Japanese. Wordnet supports showing examples sentences and synynoms and deinflection as well! I plugged rikai's deinflection with it and it turns out to work pretty well thanks to the available and necessary "part of speech" in the word entries! You can disable those in the configuration if they do not interest you.
A new interface allows you to swipe between dictionaries in the order you configured your dictionaries.
And that's all folks!
I expect this version to be a little bit more experimental, there's a huge refactoring behind this new version, so please consider that before upgrading because it might be frustrating for you, that's why I closed the list of testers… I will release it soon enough anyway and EPWING is on the way. It already works but I would like to polish it a little more, I am just missing some time.

[Image: SSdyT73.png]
[Image: b02LdWD.png]
[Image: GyAsb8e.png]
[Image: eaBFghI.png]
Reply
#9
Author of JadeReader here.

By the time I published JadeReader, I have since abandoned learning Japanese (for better or worse) and had little to no intention of ever updating JadeReader. It's nice to see the code are still useful for others.

Really nice app!
Reply
#10
I am happy you like it! Without your project, I would probably never made this. So thank you for having it published open source.
 I basically started by just hacking Jade reader to add Kanjidic. Then I wanted to be able to read ePub ebooks so I evaluated the possibility of integrating the lookup code into an open source ebook reader and I looked at PageTurner and FBReader. 
I did it with PageTurner because I like the fact the it does not require any native code and that it was also designed to be compatible with the Nook e-ink reader. Though, now, I am not sure I didn't break compatibility. 
Then I used it for a while without publishing it because it was not really production ready… No automatic download, hardcoded configuration, etc…
This coming version underwent a big refactoring effort so I think you will have a hard time recognizing your code but some of it is still there!
Reply
#11
Sounds like an awesome project! I signed up for the Beta, but the Google Play Store link on the Beta sign-up page seems to be broken. Can you post a new link to the current Beta in the store?
Reply
#12
Ah, it works again. Cool!
Reply
#13
Here we go, the new version with EPWING support is on the beta channel.
I published the first version in production already but I expect to be able to put this one very soon.

To use the EPWING feature, just go into the settings, add an dictionary of type EPWING and select the directory where the CATALOGS file of your EPWING content is located. It is a directory, not a file that the dialog is expecting.

There is also an enhancement compared to the previous on how long processing dictionary are handled. They will no longer block the UI but display a round progress circle. This was necessary for the EPWING dictionaries that can be quite slow.

If you already have another version, you will have to uninstall it before you can go back on the play store and reinstall it. If you did not leave the beta tester program then you should be able to download the new version.
When you want to switch to the production version, just uninstall the app and go back to the link given up there to unsubscribe from the tester's list. At that point you will be able to see the production version in the play store. That can be useful if you are not satisfied with the stability of the beta version for everyday use. Just remember that uninstalling the app means losing all you settings including your book progresses.

[Image: E1wmU8u.png]
[Image: hxgA2ar.png]
Edited: 2016-04-04, 7:16 pm
Reply
#14
I just closed the beta and pushed a new version to the Play Store.

It is not very different from the one that was available in beta but the EPWING dictionary now has gaiji support (those characters that are not available in UTF-8 but are embedded as bitmaps in the dictionary)

[Image: cm5P67H.png]
Reply
#15
Any chances of releasing a version with vertical text?
Reply
#16
(2016-04-13, 1:44 am)risu_ Wrote: Any chances of releasing a version with vertical text?

I looked into it a little bit and for now I don't see an obvious solution. But if that is a popular demand I look further.

Though there are also design consideration like :
- Where does the dictionary panel go?
- How the scrolling strategy will work?
Reply
#17
Hey ZorgBlub, I'm really liking what you've done here, thanks a bunch! Typhon does almost exactly what I want for mobile reading - dictionary lookup and Anki card creation. I registered just to say this.

Books (ePub) load extremely slowly for me currently. Can this be sped up (caching, simpler parsing)? It can take 30-40 seconds to load a book, and my phone is mostly unresponsive in the meantime. This is the case on both the old and new (1.22) version.

Plus on the new version (which I just installed), I get a dialog saying that I need to download a Japanese dictionary to look up words in this book. Dictionary lookup doesn't work. Is this a bug? Should I have uninstalled before updating from 1.0 to 1.22?

Again, great work and I look forward to the future iterations of Typhon!
Edited: 2016-04-20, 7:21 am
Reply
#18
(2016-04-20, 7:17 am)creamyhorror Wrote: Hey ZorgBlub, I'm really liking what you've done here, thanks a bunch! Typhon does almost exactly what I want for mobile reading - dictionary lookup and Anki card creation. I registered just to say this.

Books (ePub) load extremely slowly for me currently. Can this be sped up (caching, simpler parsing)? It can take 30-40 seconds to load a book, and my phone is mostly unresponsive in the meantime. This is the case on both the old and new (1.22) version.

Plus on the new version (which I just installed), I get a dialog saying that I need to download a Japanese dictionary to look up words in this book. Dictionary lookup doesn't work. Is this a bug? Should I have uninstalled before updating from 1.0 to 1.22?

Again, great work and I look forward to the future iterations of Typhon!


Thanks for the feedback!

For the load time, I have already noticed long load times though not to that level and very randomly. 
Can you tell me what phone you use, what version of android and what ebook you are trying to open? (You can reply through private messages if you prefer)

What I was working on lately was more to optimize the launch of the app itself because it is too slow in my opinion. 

For the dictionary download, it is possible that you had an old dictionary base that needs an update. I store the dictionaries myself because I modify them. I trimmed wordnet of some unused data and added the 6th version of Heisig index to kanjidic.
Or it might be a bug…
Edited: 2016-04-20, 10:24 am
Reply
#19
I already like this app a lot. But I'm having some issues.

All of the EPUBs I have, have some furigana and it's showing right after the kanji as if it where another word.
Like this "俺は呟つぶやき、どういうわけだか俺は鳴ってもいない携帯けいたい電話を..." Where 呟つぶやき and 携帯けいたい are not ok. Furigana probably makes little sense when you have the integrated dictionary thing, but it's confusing if it appears like that (right after the kanji). I don't lnow if there is something wrong with my files or something, though.

Another thing is that the only way I can go to the next page is by the icon located at the end of all the text in one page. I've noticed there is a section of navigation prefferences in the settings, but I cant change them (all the options are unavailable, in a light grey font, only in this section). I'm using a Galaxy Tab 2.

And here is a question, Can I change the Anki card type and the deck where the cards are added? or will it mess something?
Reply
#20
(2016-04-20, 10:22 am)ZorgBlub Wrote: Thanks for the feedback!

For the load time, I have already noticed long load times though not to that level and very randomly. 
Can you tell me what phone you use, what version of android and what ebook you are trying to open? (You can reply through private messages if you prefer)

What I was working on lately was more to optimize the launch of the app itself because it is too slow in my opinion. 

For the dictionary download, it is possible that you had an old dictionary base that needs an update. I store the dictionaries myself because I modify them. I trimmed wordnet of some unused data and added the 6th version of Heisig index to kanjidic.
Or it might be a bug…
Thanks for the suggestions, and sorry I forgot to reply earlier. I solved the dictionary-download problem by uninstalling & reinstalling the app.

The long load times (40+ sec for a long book) are still there, though. Samsung Galaxy S5, Android 4.4.2. The "Loading text..." notification appears for maybe 10s, then it disappears and the screen turns unresponsive, and finally the text appears. I tried deleting and re-importing the book (performing copy-to-library folder), but there's no difference.

Maybe what would work is partial loading (5000 characters at a time?) + a more efficient loading function?

Thanks for any suggestions, and hope you'll be able to keep improving the app Smile If you have suggestions on somewhere in the code to look at, I can give it a try.
Reply
#21
This is great! I have been looking for exactly something like this for a long time.

The only usability problem for me is that my phone doesn't support Japanese as a language option and Typhon displays the Chinese variant of Kanji instead of the Japanese.
Would it be possible for you to add a Japanese font as an extra font option, or maybe an option to use a user provided font file?
Reply
#22
(2016-04-23, 4:17 am)ToumeiNingen Wrote: I already like this app a lot. But I'm having some issues.

All of the EPUBs I have, have some furigana and it's showing right after the kanji as if it where another word.
Like this "俺は呟つぶやき、どういうわけだか俺は鳴ってもいない携帯けいたい電話を..." Where 呟つぶやき and 携帯けいたい are not ok. Furigana probably makes little sense when you have the integrated dictionary thing, but it's confusing if it appears like that (right after the kanji). I don't lnow if there is something wrong with my files or something, though.

Another thing is that the only way I can go to the next page is by the icon located at the end of all the text in one page. I've noticed there is a section of navigation prefferences in the settings, but I cant change them (all the options are unavailable, in a light grey font, only in this section). I'm using a Galaxy Tab 2.

And here is a question, Can I change the Anki card type and the deck where the cards are added? or will it mess something?

I'll look into the furigana problem. In the meantime, I believe you can strip them out with calibre if you want to continue reading normally.

For the navigation, it's normal, if you activate the lookup it has to be that way. Indeed the lookup is designed to work with scrolling. The reason for that is that when you use a page strategy, the control are made by tapping the borders of the screen and that conflicts with the dictionary lookup tap.

Now we can argue that I could change that to a swipe left and right but I didn't do that because I think that anyway it does not really fit the dictionary lookup UI. Indeed, the dictionary pane always occupies the bottom of the screen so to read the bottom of the page, you would have to close it every time you have to search a word.

Now what I believe is missing is a "next/previous chapter" control to skip the whole chapter without having to scroll down. But you can also do that in a less user-friendly way by browsing the table of content.
Reply
#23
(2016-04-25, 11:20 am)creamyhorror Wrote:
(2016-04-20, 10:22 am)ZorgBlub Wrote: Thanks for the feedback!

For the load time, I have already noticed long load times though not to that level and very randomly. 
Can you tell me what phone you use, what version of android and what ebook you are trying to open? (You can reply through private messages if you prefer)

What I was working on lately was more to optimize the launch of the app itself because it is too slow in my opinion. 

For the dictionary download, it is possible that you had an old dictionary base that needs an update. I store the dictionaries myself because I modify them. I trimmed wordnet of some unused data and added the 6th version of Heisig index to kanjidic.
Or it might be a bug…
Thanks for the suggestions, and sorry I forgot to reply earlier. I solved the dictionary-download problem by uninstalling & reinstalling the app.

The long load times (40+ sec for a long book) are still there, though. Samsung Galaxy S5, Android 4.4.2. The "Loading text..." notification appears for maybe 10s, then it disappears and the screen turns unresponsive, and finally the text appears. I tried deleting and re-importing the book (performing copy-to-library folder), but there's no difference.

Maybe what would work is partial loading (5000 characters at a time?) + a more efficient loading function?

Thanks for any suggestions, and hope you'll be able to keep improving the app Smile If you have suggestions on somewhere in the code to look at, I can give it a try.

Ok, good to know it worked in the end.

For the load time, I need to know what book you use because I suspect that its content is all in one chapter. I'll have a look and see if there is room for optimization but it will take a while since this is a part of the ebook reader app that I did not touch previously. But I agree that it does not matter the size of the book ~40sec load should not happen.

If my guess about the structure of the book is correct, you can always try to detect the structure of the book with calibre and rewrite it with chapters.
Reply
#24
(2016-04-26, 1:30 pm)AzureBlue Wrote: This is great! I have been looking for exactly something like this for a long time.

The only usability problem for me is that my phone doesn't support Japanese as a language option and Typhon displays the Chinese variant of Kanji instead of the Japanese.
Would it be possible for you to add a Japanese font as an extra font option, or maybe an option to use a user provided font file?

I'll see if I can add a Japanese font, it should not be too hard though it will have to wait a little bit.
Reply
#25
(2016-04-27, 9:39 am)ZorgBlub Wrote:
(2016-04-25, 11:20 am)creamyhorror Wrote:
(2016-04-20, 10:22 am)ZorgBlub Wrote: Thanks for the feedback!

For the load time, I have already noticed long load times though not to that level and very randomly. 
Can you tell me what phone you use, what version of android and what ebook you are trying to open? (You can reply through private messages if you prefer)

What I was working on lately was more to optimize the launch of the app itself because it is too slow in my opinion. 

For the dictionary download, it is possible that you had an old dictionary base that needs an update. I store the dictionaries myself because I modify them. I trimmed wordnet of some unused data and added the 6th version of Heisig index to kanjidic.
Or it might be a bug…
Thanks for the suggestions, and sorry I forgot to reply earlier. I solved the dictionary-download problem by uninstalling & reinstalling the app.

The long load times (40+ sec for a long book) are still there, though. Samsung Galaxy S5, Android 4.4.2. The "Loading text..." notification appears for maybe 10s, then it disappears and the screen turns unresponsive, and finally the text appears. I tried deleting and re-importing the book (performing copy-to-library folder), but there's no difference.

Maybe what would work is partial loading (5000 characters at a time?) + a more efficient loading function?

Thanks for any suggestions, and hope you'll be able to keep improving the app Smile If you have suggestions on somewhere in the code to look at, I can give it a try.

Ok, good to know it worked in the end.

For the load time, I need to know what book you use because I suspect that its content is all in one chapter. I'll have a look and see if there is room for optimization but it will take a while since this is a part of the ebook reader app that I did not touch previously. But I agree that it does not matter the size of the book ~40sec load should not happen.

If my guess about the structure of the book is correct, you can always try to detect the structure of the book with calibre and rewrite it with chapters.

Yes, it's one long chapter I believe. I'll try splitting it into small chapters, thanks for the suggestion.

Really appreciate your work on this!!
Reply