• 16 March 2023Small and not so small fixes

    A few fixes from recent weeks:

    • Progress Chart fix for Old Edition RTK Supplement
      When using RTK Old Edition, the RTK Supplement lesson is now displayed correctly (Lesson 58 with 23 characters index #3008-3030). Thanks to Vinickw for issue #295 on github!

    • Minor tweak to RTK Edition selection
      The RTK Edition selection screen (in Account Settings) now displays frame number ranges so it's more obvious how the RTK indexes add up to 3030 / 3000 characters.

    • Fixed misspelled keyword
      Fixed a typo for keyword #1296 "facsimile". Thanks to peytontucker for issue #292 on github.

    From here on this will be mostly developer stuff, so feel free to skip. If you like the gory details though let's dive in :)

    Updates to the source code repository

    Fixing the keyword wasn't as easy as I hoped. I ended up refreshing an old script that has not been run in years. The script essentially combine data for RTK1+3, along with KANJIDIC2 and UNIHAN - and then output the kanjis table for the database.

    To be fair since the indexes for 5th/6th edition do not change, and data sources like KANJIDIC2 do not change that much over the years - the script kinda fell out of my radar.

    So here's a recap of some of the steps for those who are interested in the nitty gritty:

    • We need a "source of truth" for RTK1/3 data, so as not to lose any fixes that accumulate over time. To simplify this process I deleted old data files rtk1_data, and rtk3_keywords and consolidated this data into a single spreadsheet called "RTK Editions Compared".

    • This very useful spreadsheet was originally created by Chris/Katsuo (of the now closed RevTK Forums). Chris put the old & new edition indexes side by side, along with the old & new edition keywords. It was really helpful as a reference. The updated spreadsheet now has lesson numbers for both OLD and NEW editions, on every line - so it's easier to parse regardless of sorting order.

    • Since the spreadsheet is now input for all RTK-related data, it is now included in the repository. You can find it in src/data/datafiles/ (the .ods file can be opened in eg. LibreOffice).

    • Updated & fixed the kanjis_table.php script and added it to the repo.

    • The script was re-run on an up to date version of KANJIDIC2 and UNIHAN. Unihan is used to provide the stroke order for all the CJK Unified Ideograph characters that are not part of KANJIDIC2. KANJIDIC2 covers Japanese characters which is approx. 12K characters - while UNIHAN covers the entire CJK Unified range which is ~21K characters - which is what goes in Kanji Koohii database (as a reminder Koohii intentionally includes all the Chinese characters from the RSH/RTH books - all of them are part of CJK Unified Ideographs).

    • To make sure that the script works as intended and does not introduce new errors - I ran a diff between an export of the last live data and the script's output. The diff is viewable here. You'll see the first entry is the keyword typo fix. Interestingly there aren't many changes, even though I haven't run the script in years. There is like 25-ish characters, which are not part of RTK. Most of these have either had their stroke count updated (from Unihan), or the first/principal Onyomi was updated in KANJIDIC.

    So even though it was not terribly exciting work I am glad that it is done. My commitment to the community, as I have stated on the Patreon page, is that I maintain the open source repository github.com/fabd/kanji-koohii.

    While the open source repo was technically complete in that it includes a sample database, with the full kanjis table - it did not include some of the older scripts that I was either too embarrassed to share, or that were broken in some ways. So I am happy that the script was fixed and is now part of the repository.

    Since you read thus far I'll share with you a song by one of my favorite electronic music bands from the late 90's ... here is Stereomission from the Iaora Tahiti album by Mouse on Mars!

By Month