I've been tasked with implementing a rōmaji keyboard in a medical device. As I understand the problem, the user is to be permitted to enter katakana, hiragana, and/or kanji via the rōmaji keyboard. I have resources covering the mapping of rōmaji to katakana/hiragana symbols; however, I'm having difficulty locating resources to guide mapping of the resultant katakana to kanji symbols. Can anyone recommend a resource that would assist in mapping the katakana to kanji?

  • 5
    You mean writing a whole Japanese input method? That's quite a difficult problem if you want the end-result to be usable. You may want to look into open-source projects like Canna or WNN.
    – Zhen Lin
    Nov 28, 2012 at 21:30
  • I recognize the challenge - hence my question :) WNN appears to be a good start, but this an embedded application with resource limitations that remove WNN from consideration. Furthermore, the WNN license seems a bit murky for commercial use. Nov 28, 2012 at 21:51
  • Wow, can I have your job? I always wanted to try doing this. :) Nov 28, 2012 at 22:29
  • Absolutely! Especially since I've also discovered that the kana to kanji mapping should be considered as a suggestion. Thus, the user should be provided a means of accepting or rejecting the provided kanji. :| Nov 28, 2012 at 22:43
  • 2
    PS: as it stands, your question is too broad and includes both topics that are marginally on-topic (kana-kanji relation) with others that resolutely aren't (use of statistical text processing to solve that problem, humongous UI and software engineering task of implementing a full IME tool...) Consider breaking it down and asking the relevant parts in the relevant channels (be aware that JLU does not consider software-specific questions, such as use of IME, to be within its scope).
    – Dave
    Nov 29, 2012 at 0:37

1 Answer 1


Mostly it's just obtaining a list of kana -> kanji conversions that will solve your problem. You can find that in any freely-available dictionary database, such as EDICT. Creating your own is going to be difficult on the same order of magnitude as writing a dictionary.

However, what really determines the quality of an input method editor (IME) for Japanese is how well-sorted the results are, e.g. when I type きょう, the first result should be relevant to the other things I'm typing. There is, unfortunately, not an easy solution to this problem, and mostly I imagine it will require a lot of resources (time or effort) to reach a satisfying solution.

  • Agreed, I'm creating a dictionary, and I need this list of kana -> kanji conversions. I will check out EDICT. Since the application is a medical device with limited scope, the dictionary isn't as daunting as it might first appear. Nov 28, 2012 at 22:14
  • @cypher The text entry system is limited to processing 1-3 katakana symbols at a time, yielding ~6000 kanji symbols. The breaking up and parsing you mention are not within the current scope. EDICT appears to solve the problem nicely - although I don't yet have a method for retrieving all valid pairs and triples of katakana symbols in an convenient, timely manner. Nov 29, 2012 at 1:34
  • 5
    @Throwback1986 That's not how IMEs work. If I typed in ちゅう (and most go from hiragana to kanji, katakana doesn't come into it) I won't get 虫 as the first option - it's well down the list; if I type in ちゅうすいえん I can expect to get 虫垂炎. People type in words and convert them; they don't do it one kanji at a time. At least run a mockup of your planned system past somebody who knows Japanese - preferably a potential end user.
    – nkjt
    Nov 29, 2012 at 10:20
  • @nkjt, The selection of hiragana, katakana, and kanji symbols appearing in the narrowed IME are determined by a translation services company. All selections are vetted by ICR (in-country review). However, your comments are indeed helpful. Nov 29, 2012 at 15:25
  • 4
    The point is that it's not enough to have a list of "kanji symbols". You need to know words, which will be made of some combination of hiragana, katakana, and kanji, and you need some way of ranking the possible options. You need to deal with words which will be different from in a dictionary, e.g. a dictionary will have 痛{いた}い but an IME must recognise that いたかった is the same word in a different form. The most sensible solution: get an existing IME designed for whatever input system (keyboard, touchpad, etc) the device uses, and customise the dictionary if you need to.
    – nkjt
    Nov 29, 2012 at 16:37

Not the answer you're looking for? Browse other questions tagged .