I develop iOS apps as a hobby (and hopefully one day for work) and decided to make a furigana powered text-reading app that works with WaniKani. I know some people’s opinion on furigana, but I feel that it’s a motivator to read long blocks of text without feeling discouraged by all the things you don’t know.
The basic idea is that you paste Japanese text from your clipboard into it, and it will add furigana to the text on all words except your WankiKani vocab words. That way you don’t end up cheating on words you already should know.
Right now I have a (barely) working model as I’m experimenting with different methods of displaying the text but here’s what it looks like so far:
Here is where you paste your API key, and also paste text. The library feature hasn’t been implemented yet but will be used for offline storage of text files.
This is what the reader view itself looks like. The button bar at the top is ugly right now but will be improved eventually.
A long press on a word opens options like a standard iOS text view.
And currently I have it so it opens the iOS dictionary:
From a technical standpoint, I’m not using Mecab to generate Furigana, instead i’m using iOS’s built in CFStringTokenizer, which does essentially the same thing. It seems to work with decent accuracy, although I’ve found some mistakes with the readings, but not more than I’ve seen on applications that use Mecab. I think it’s pretty acceptable.
As far as displaying the text, UIKit does NOT have any convenience functions for Furigana, however the low-level CoreText API does. It’s extremely low level though and very difficult to work with. The one thing that is nice is that it supports vertical text. The issues with it are that it’s extremely slow (you can forget trying to read a book with it), and doesn’t have built in text selection. Implementing any kind of text selection is going to be an absolute nightmare.
I’m going to try an alternative textview project that I found on Github, which is based on UITextview, and therefore supports text selection right out of the box. It’s also much, much faster as it doesn’t do any custom drawing. The only real drawback I’ve found is that it doesn’t do vertical text but I think that’s a good enough compromise.
Features I plan on implementing:
-Ability to save text for offline storage
-Ability to tap on a word and get a definition, or in the case of a WaniKani word, the reading (I will purposely make this difficult so people won’t be tempted to use it constantly like Rikaichan)
I’m not sure what else but I’m posting this here because I would like some input. I usually develop apps in isolation and rarely get outside opinions/ideas.
So does it look decent? Or should I just close XCode and go back to watching anime?