[Userscript] Keisei 形声 Semantic-Phonetic Composition

It’s amazing isn’t it? Twice in the last few weeks I’ve had a WaniKani vocab lesson say “you haven’t seen this reading before” even though I was sure I had. Turns out I just subconsciously recognized the phonetic component even though I hadn’t seen that specific kanji read that way before.

1 Like

I’ve just had a couple times in the last review session a new kanji I learnt do the shake thing because I entered the on’yomi when it wanted the kun’yomi - but I’d actually only been taught the kun’yomi!

2 Likes

Hi all,

short personal background:
As I reset from level20 to level1, I started to seriously annotate the lessons with details found from multiple sites or books. First I looked at ideogram (bone script, etc) etymology from books, then understood implicitly from wikipedia.org that kanji can be a phono-semantic compounds.
Then I realized a WK script existed with some “semantic-something” name, and it was certainly connected … but i am not done yet, because I still need to read 222 comments to hopefully understand how it works and how phono-semantic has emerged.

What I am coming to : this phono-semantic method is very refined, and WK is never clearly referring to it. Maybe that’s why people who commented here reached LVL 40+.
I think the script would get more visibility, and find a larger audience, if you could please enhance the 1st post with :

  • introduction on what is phono-semantic composition, and how it works
  • guidelines on how to use the script, and to make the best learning of the printed information.

I am at about comment #100, and it is still very obscure. So I can imagine WK newcomers will skip this method.

Thanks for all this development effort!

ps: found 1 piece of the puzzle:

today, I got incompatibilities between this script and all my setup. None of the script would work until I disabled Keisei and Nial scripts :frowning:


I am using Firefox 66.0.3

Any recent changes to your system? The current version of Keisei is four months old, so either FF or Tampermonkey added the usual regression in their updates.

I know that Tampermonkey crashes rarely for FF users, but I never found out what the actual problem is. I suspect that some Tampermonkey sophisticated features I’m using like “saving a textfile” or “appending style tags” crash Tampermonkey and stop the execution of all scripts because FF security model is sub-well implemented.

Hi acm2010, thanks for the quick reply.

Could it be related to a limit (size, duration, etc) which is enforced by FF or TamperMonkey?

I met this issue on 2 different systems (win10, FF 66.0.3), which have different antivirus software.
My list of installed scripts slightly differ. In the latter case, only the Keisei script was installed.

In each case, the script fails to apply on the dashboard, as well as review/lesson pages. I confirmed I control the issue by enabling/disabling Keisei in the TamperMonkey menu, then reloading the WK page.

When working properly the “Web developer > Network” panel of FF shows a series of call to api.wanikani.com, which does not happen in case of failure.

ps : In TM, I changed the “script order” setting from “auto” to “position”, but it did make a difference.

I never got hold of a system that has this problem, so I can only suspect what is wrong. I think that Tampermonkey is crashing when using one of its special functions (caching files, adding styles, …). When TM crashes it takes down all the other scripts with it, so the problem is independent from what other scripts are there or the execution order, it just nukes everything.

If that is the case error messages won’t show up in the console, what has to be done is to run TM (or even the whole FF) in a debugger and see what is going on under the surface. The cause could be anything; I think there are quite a few people using the latest FF and TM versions and it works, and you also said that it suddenly started, right? It could be related to some security setting, antivirus interfering somehow, browser extensions interfering with each other, …

I’m pretty sure I didn’t use any unstable features and the script execution is linear, so it would be best that TM finds the error (not sure if it’s common, though). Another solution would be a rewrite of the script to use the WK Open Framework, but that would be a big change, more like Keisei2, and I’m not fully convinced that it will help because the problem could be caused by something totally different in the end.

@acm2010 So it appears that the new radical naming has caused some mismatches with the script? I reset to level 1 a couple of weeks ago, and when I was looking at the radical task (用) which used to be elephant, I got a completely different set of components. Looking into it, I then went to the current elephant radical (象) which used to be task. The result is because of the swap the phonetic components of the two are pointing at the other one for the script. Any chance of an update to the names of the radicals so they match the new ones? I think wanikani has a list of which ones changed somewhere?

2 Likes

I tried fixing the radical names but I missed some it seems. I will fix them when I’m back home today.

2 Likes

I added the remaining new radical names, the new database will automatically arrive when your current one times out (like one day or so).

Hi,
today, I have read that the TamperMonkey extension is requesting an additional permission from Firefox’s add-on framework : permission to store unlimited amount of offline data.
So it is possible that TamperMonkey was previously failing because I am using multiple WK add-ons. I will try to reenable Keisei, and do some testing.

Why did noone tell me this script exists? :frowning:

2 Likes

I’ve heard so many people talk about this script in the “visually similar” thread…

… And I think mainly I need this over that (which gives so many options, often many that aren’t similar because of the algorithm it uses by looking at which pixels are used, instead of actual radicals/kanji parts…)

… I was wondering two things before I download and add this to my scripts…

  1. Can I place it where I want on the item page (ie: THE TOP, right with the original item)
  2. When in that position (or whenever/always) can I edit/delete some entries and/or add my own? (or at the very least, put a limit on how many are shown?)

Basically, I’m thinking of using this as a replacement for the Visually Similar script, but with the added bonus of learning something, and it being more helpful to me in that area in the first place.

Thanks!

2 Likes

Hi, I was going to make more modifications, but the job is more busy than expected.

I had an idea to make a version of Keisei and Niai that contains all code in the same file. That way editing the code is easy, and at least the placement on the page can be modified quickly.

[Or you could fork the GitHub project to easier merge new versions if I start updating again.]

Niai includes the kanji from Keisei already, you could edit it there to use only that database. Only Niai can edit the list and limit the number of kanji shown currently.

I think I have Niai too…

… Hmm…

I’ve never used github and don’t know what forking actually entails.
Hmm…

No rush.

But where does it show up on the page at the moment? Your screenshot does not reveal all…

It’s not our place to explain the berds and the biis.

Since the latest update, I dont observe any more problem with this app.
Thanks for the fix, and congratulation for this nice app!

This seems a little strange, especially given that 反 is apparently a valid component for this as well. (The reading doesn’t line up as nice, but that happens sometimes)

Yeah, the way of the kanji is not perfectly systematic. For 仮 the Japanese government decided what 假 was not to their liking, so they took a simplified form into their kanji list in 1948 (it seems that 暇 was acceptable anyhow).

There is a list of more if you are interested: Kyūjitai - Wikipedia

[I also fixed the 反 radical, it was renamed from devil to anti so the listing was not working properly.]

1 Like

Did you complete and/or release your “kanji matrix” project? Thanks