Sunday, August 7, 2011

Matching Kanji to readings

I'm writing a piece of Java code to automagically match Kanji to readings, generating text similar to Japanese studying textbooks, where the yomigana is displayed on top of the corresponding Kanji.

The code I wrote uses the reading list from Kanjidic2 to find the best possible Kanji / yomigana combination. Since not all possible Kanji readings are listed, the software applies several conversions (such as Dakuten, Handakuten, irregular Okurigana, etc...).

After this reaches some level of maturity, I'd like to share it as a Java library so it can be used by other software. Below is a Demo applet (note: Java 1.6 or better required). Do not hesitate to post a comment if there are any strange conversions, so that I can use this information to improve the algorithm.

No comments:

Post a Comment