[Userscript] Keisei 形声 Semantic-Phonetic Composition


The table was not the best idea, I just wanted to have a layout quickly :slight_smile:

I will split the layout into two lists, the layout could be pretty simple because the left one should just take it’s space with nowrap …

When I have the time :slight_smile:


The changed radical names and the new radicals are now in the Keisei database, 3 were renamed and 11 go from “not in WK” to having a name.


That was quick!


Seems like I missed some (looks like you relearn only a part of the radicals based on your burns), but most changes in WK are to the “real” radicals not the phonetic part.


Would it be possible to add a setting option for the placement? I’d would like to display it after “Reading Note” and not before. I went to Tampermonkey to see the code to try to tweak it but it it seems it is calling several java scripts and I don’t know .js


I love the script, I have not heard of “semantic phonetic composition” until yesterday. It all makes sense, somehow.

It might be a stupid question, but what do the colorized bubbles mean on the top left of the various kanji?


I can add it to the options, or maybe make it drag-able to change the position and store it. I’m currently on a trip, but it’s simple to add when I’m back.

It shows how useful the phonetic mark for a kanji is. Both the phonetic components and kanji can have several readings, so it’s hard to see how useful the phonetic components is for a kanji.

For example, let’s say we have a phonetic component that reads ほう and a kanji that includes it.


  • 天: The kanji is also read ほう (and nothing else).
  • 上: The kanji is read ほう and (say) ぼう. ほう is still the main reading, so the phonetic mark helps, but rarely it’s wrong.
  • 中: The main reading is not ほう, but rarely it can appear as ほう. The phonetic component is not very helpful.
  • 下: This kanji is never read as ほう. You have to remember this kanji as a “phonetic exception”.

There is also a “dakuten mode” that is more lenient what is considered a good match. Maybe you noticed that readings like ほう, ぼう, もう or き, ぎ often appear as readings together. This is because they were almost interchangeable in the past, and with some intuition you can reconstruct the reading from the phonetic component even if it doesn’t literally match.


  • Green – good match
  • Red – bad match
  • Yellow – “obscure” kanji, the phonetic component got changed somehow, or even replaced. The kanji looks different, but the reading comes from the phonetic component. (After WW2 the Japanese government did some script reforms to “simplify” kanji usage, but made everything less regular and intuitive).

You can also click the circle to manually change the color to yellow (like a personal marker).


Thanks a bunch. You probably should add this information as docs to the original post. It’s really helpful.


this is great

I’ve just started using userscripts. is there no way to add this to any of the wanikani apps? I use allicrab normally and under settings it only provides 5 userscripts as options unfortunately!


Unfortunately the app creator has to add each script manually. I requested a way to load arbitrary scripts, but it hasn’t happened yet.


Ah that’s a shame. As a primarily mobile user it would be great to have more scripts on there!


I also wanted to be able to add more scripts to Allicrab and after a few months of using my own Allicrab build (which I can’t do anymore since my Apple Developer license expired) I ended up with: Running userscripts on iOS: a workaround

Coincidentally, I tried adding the Semantic-Phonetic Composition script to my iOS app today. Unfortunately it seems like it uses a couple of userscript specific features and it would need a bit more adjustments than the other scripts I included so far. I’m planning on doing that eventually but it seems like no one else is interested in going through the trouble of deploying their own app (which I can understand, of course).


I was considering to rewrite some parts to make “Keisei2”, using the open framework and getting rid of the GM_x parts because they have compatibility issues despite doing simple operations, but I’m a bit unmotivated lately :slight_smile:

I could also generate a one-file version with everything included to make the integration easier.


:exploding_head: never knew this!



If that was super duper easy and quick for you then I would appreciate it but otherwise I don’t want to waste your time on this. At the moment it seems that no one else is interested in deploying their own app so if it was just me using it, it wouldn’t really be worth it.

I would love to improve my little workaround app and make it easily available for everyone via the app store, including the Keisei script. However, I can not do that without an apple developer license and since I had some negative experiences with the app store approval process so I don’t really want to pay for the license anymore. That leaves only the option of people installing XCode and deploying the app to their own devices (and updating it weekly) but it seems like that is too much trouble for most people to go through.


There are also people who want to edit the script on their machine, which is currently not possible because everything is included as files.

Installing xcode alone is already a hassle without editing some files, I can understand why people rather pass :slight_smile:


Oh, I can completely understand that too. I usually don’t have XCode installed either and during the installation process I was close to just cancelling and giving up at that point already.

I’m still tempted to buy a license again and try and make my little userscript app available as least as a Beta version… I’ll keep an eye on this thread and see if motivation has snuck up on you and there is a merged version of the script available.


New version 1.7.6, finally I came around to fix the layout a bit (at least make it more sane).

@jbradleyc @valeth Unfortunately the dark theme still looks a bit off because it forces wrap for all character grids, but it should be easier to fix now because it is just two uls side-by-side now.


Awesome, thanks! This script is honestly one of WK’s biggest advantages over using alternatives like Anki IMO. Learning all the phonetic components and their exceptions, and being able to see them at a glance brings a massive shortcut to the learning process.


@acm2010 Looks like the latest update messed up the expanded view.