[Userscript] Keisei 形声 Semantic-Phonetic Composition

Keisei Semantic-Phonetic Composition

by acm

I am proud to release the stable version of my first script, Keisei Semantic-Phonetic Composition!

Installation Instructions

  1. Get Tampermonkey (installation instructions in this thread)
  2. Click on the installation link (Tampermonkey should auto-detect .user.js files)
  3. Install the script after you check the security (at least see that script will only change the wanikani website, all @include should be related to WK :wink:)


  • v1.7.3: Fixed issue where Keisei might interfere with other scripts on Firefox
  • v1.7.1: Layout fixed, and WK only mode!
  • Layout changes
  • beta features (enable them in the settings!)
  • Tooltips and “dakuten mode”

It is a full rewrite of the great script from ruipgpinheiro (LordGravewish) from this thread:

The script adds a phonetic compound information section to:

  • Kanji and Radical pages
  • Kanji and Radical lessons (also lesson reviews)
  • Kanji and Radical reviews

Example Screenshot

User Poll

I want to find out who is using the script, and send out @notifications I case I break something seriously in the future. Please click something!

  • I use the script and want notifications
  • I use the script but will just suffer silently
  • I just like to click on polls

0 voters


  • All new database with 2201 kanji covered, 546 tone marks, 264 of which are also WK radicals. The goal is to show something for each and every kanji in WK.
  • Two new colors for phonetic marks in the character grid (see screenshots)
  • Badges show how useful the phonetic mark is for a kanji, in four levels (天、上、中、下)
  • The character-grid style is added to lessons and reviews as well (this is basically an ugly hack by adding some styles, let me know if pages look weird)
  • Some tone marks also have cross references to derived marks (for example 溥 → 尃) and (very rarely atm) warnings for kanji that have the component but are not phonetic compositions

Data Sources

I collected the phonetic information from
http://www.kanjipedia.jp (main readings source)

That being said there are nearly always different theories for the origin a kanji, so no guarantees for the accuracy of the information provided.

More Screenshots

Click to show ...

Radical Page

Review Page

Lesson Page

Narrow Screen


GPL v3, just do what you want with it.


I am not responsible for any problems caused by this script. It currently has “works for me (most of the time)” status.

This script was developed on Chrome Version 61.0.3163.100 (Official Build) (64-bit) with Tampermonkey 4.4. It uses some fairly new features, but a recent browser version should do fine. Everything is done as strings, depending on your browser you may see some boxes instead of kanji for rare ones.
I tested it at some stage with Firefox or Greasemonkey, but just message me is you run into trouble.

Only the “meanings” of kanji are pulled from WK, readings may not fully correspond to what WK is saying.

Other Scripts

Also check out my similar kanji script!

Dear WaniKani speed demons and level 60s, how do/did you do it?
Must have scripts?
Frick Level 14
[Userscript] WaniKani Similar Kanji
Feature Request: Enhance 'visually similar kanji' section
What do you want now? (Request extensions here)
Visually similar kanji in the lessons?
獣の奏者 prologue, part 1 discussion
"Radicals" that assert sounds
The kanji "飯"
2100 KaniWani reviews
What's a realistic 3 month progression goal?
What are some patterns you've noticed in kanji?
What are some patterns you've noticed in kanji?
What do you wish you'd been taught at the beginning?
New People Questions! ~~~<3 [Lost?! Confused?! We're here to help!]
Performance analysis for Wanikani?
MIA or WaniKani
MIA or WaniKani
Tips for surviving the Death levels?
Hitting a Wall
Getting killed by leeches
About reading
Tips for surviving the Death levels?
What do you type in when you have no idea what the kanji is?
Inconsistency in radical composition and using kanji as radicals
Newbie here, give me your tips
How many of the radicals here are actual kanji?
Grrrrrrr WaniKani!
Similar Kanji implementation?
Some questions - Not Sure WaniKani is for me
[Android] Flaming Durtles - Android app with offline support
Do you write down your lessons on paper?
I am the Kanji Master™ (Lv 60 self-indulgement post)
The New And Improved List Of API and Third Party Apps
WaniKani dark theme
Do lessons get easier after level 10?
Ability to add our own 'Visually Similar Kanji'?
How to get the most out of Natalie Hamilton' "The Kanji Code"?
Moral support or guidance from experienced WaniKani users
It gets easier
[Feature/Userscript request] Compare with wrong answer
Radicals are driving me crazy. Lid and Roof look so similar
An overdue level 60 post
Level 60! Double Cake Day!
Confusion with some of the reading mnemonics
Difference 八, 入
Weirdly similar kanji
Why do you level up before you've done the vocabulary?
Same radical = same on'yomi?
Tools to learn to distinguish multiple radical patterns
Similar Kanji leech squashing
Kanji with Same Radical = Same On'yomi Reading Cases (Apparently Semantic-Phonetic Composition)
Kanji with Same Radical = Same On'yomi Reading Cases (Apparently Semantic-Phonetic Composition)
Favorite or Must Have Scripts and Apps?
Powerpunching my way to the golden badge! (AKA my level 60 thread)
Anyone else using primarily Anki for WK?
[iOS] Tsurukame - native app with offline lessons and reviews
Add note about common radical pronuncations
I won't need to remember those stories after a while right?
Update beneficial or detrimental for higher levellers?
What's the damn problem?
Do you use the Mnemonics or opt for rote memorization?
[Userscript] Hitsuji Animated Stroke Order Diagrams
[Userscript] Niai 似合い Visually Similar Kanji
Note Taking Methods
[Userscript] WaniKani Rendaku Information
Looking for generic user script to help with enhancing lesson information
[iOS] Mobile AlliCrab for WaniKani
Is there really a big jump every 10 levels?
Most lessons done at once?
Any resources to group kanji reading?
Inefficient radical combinations
I've hit the wall
Chart of Frequency of Kana used in WK Kanji readings
Using old Kanji to learn new Kanji
Sinyaven reached level 60!
Biggest Realizations / Mind Blows You've Experienced Learning Japanese: Emoji means what?!?!
Biggest Realizations / Mind Blows You've Experienced Learning Japanese: Emoji means what?!?!
Mnemonics are often Useless - Need simplifying
Notes on my WK experience
The quick or short Language Questions Thread (not grammar)
Kickstarter for Outlier Kanji dictionary is now live
Let's praise these USERSCRIPTS and their awesome CREATORS
Let's praise these USERSCRIPTS and their awesome CREATORS
Is there a resource where we can search kanji with the same Onyomi?
[Userscript] Niai 似合い Visually Similar Kanji
Worried about my accuracy?
Harder to recall
Sunflower - - 里
Wani Kani Mnemonics
About to enter the painful levels... searching for advice on how to handle the pain
Level 19, stuck forever, hating myself, rolling backward
命 versus 令
What do you want now? (Request extensions here)
Radical Priority
Most common onyomi
Learning kanji - No similar Kanji shown - Why?
Is it okay to forget mnemonics?
Is 九 a radical or a component?
Is the radical breakdown for a kanji canonical?
New to forums, not entirely new to Wanikani
Dealing with Kanji that has too many radicals
On'yomi pronuniations?
Why not all onyomi?
Does anyone feel like they're not memorizing the kanji but rather how they look?
Userscripts Help
How to find out leeches without script?
New People Questions! ~~~<3 [Lost?! Confused?! We're here to help!]
Is that one radical? Or two?
Help with Scripts please
ロウェナの学習ログ・(Rowena's Study Log)
What I wish I knew starting off
I am hating this Vocab 上 。Kind of feeling lost
Want to write Kanji?
(feature request) the visually similar kanji feature
Website for learning Japanese Etymology?
The Universal Mnemonic: Read 90% of Kanji with a simple trick
The Universal Mnemonic: Read 90% of Kanji with a simple trick
Notes about vocab/kanji
New People Questions! ~~~<3 [Lost?! Confused?! We're here to help!]
Resources for Starting to Read Japanese Content
The New And Improved List Of API and Third Party Apps
[Userscript] Niai 似合い Visually Similar Kanji
People who have reached level 60
In the long run, why should you memorise kanji once you've memorised associated vocabulary?
The Kanji Code ebook is free this weekend
The Kanji Code ebook is free this weekend
City kanji = towel +lid radical; but separate city radikal?

Ping for @gzovak, @temporaryuser381, @seanblue, @galg, @EvilTrout, @polv because they were interested in this.


Looks nice, I’ll be sure to check it out. I’m curious though, what’s the reason for including the WK radical with the phonetic component and kanji?

The examples in the screenshot accidentally are always related to a WK radical, this is not always the case. It also doesn’t need to be a kanji in WK either. This looks like this:


And I added it to the radical pages because it is easier to figure out for example “Ken the Squid”:


1 Like

How did you handle when the semantic component doesn’t exist as a character? The old script indicated that sometimes, so I’m curious.

Most of the times it does exist (I didn’t encounter one that didn’t, rather there are multiple legacy versions), but there are two problems. It’s not guaranteed that everyone can see stuff like 丩, 囟, 𢦏, and you need a page where you can copy/paste it from, I have no idea how you would enter these manually. WK does some radicals as pictures, but I figured that if you can run scripts you don’t run on a phone or something, they can display less symbols.

For the old script my guess would be that finding the symbols was the problem, it used what was already there in a thesis. For me, if there is no symbol the component is too obscure anyway, I skipped some kanji where there is only one compound in WK with a tone mark that didn’t even look like it was included in the kanji anymore.

1 Like

If you can list some or all of the kanji with a standalone component you can’t find, let me know. I found a lot of the components by trawling Chinese dictionaries, and inserted them into the old userscript that I was still using (definitely giving this a shot though, the other does have some annoyances).

They are, necessarily, Chinese characters rather than Japanese. But most devices that display Japanese will also display Chinese.

Thanks, I will let you know if I find one that would be nice because it has several compounds. I had some that won’t even display for me, but the kanji itself was simplified as well like 活 (http://dic.nicovideo.jp/a/活). But such knowledge is not helping as a shortcut to guess readings, rather it’s learning one more kanji you will never need. If you go beyond jouyou it’s of course a different thing.

@acm2010 I’m finally using the script during lessons, and I have a couple suggestions.

  1. Add some padding/margin between the bottom of the “hint” and the start of the Phonetic-Semantic Composition section.
  2. Allow section to be hidden, just like the old script. It takes up a lot of space, so being able to hide it (ideally hidden by default) would be helpful.

For reference:

The lessons part is not that tested yet because I need for lessons to come up :smile:

No problem, I already added additional space for radical pages, the layout is non-standard there.

For longer information there are already some hidden parts. You also want the character grid hidden? I’m planning to add some settings for the script, I can add a way to choose this. Just the sentences for you?

I’m referring to hiding the whole section, including the character grid (that takes up the bulk of the space after all). I guess I haven’t encountered one of the kanji that already had hidden content.

Out of curiosity, why does the squid radical look different than WK squid radical?

Other than that, looks cool, like something I’ve been wanting to create, but lack the ability to do so…

1 Like

I’m glad that the script works at least works nicely, it can easily happen that nothing appears at all. I will add a “minify” option.

If you want so see the maximum you can look at “turkey” related kanji, the number of kanji there really surprised me. It doesn’t even include 隼 and others yet.

For this one the squid is a simplified form, those kanji started out as 儉, 驗,險, etc. 僉 is something like a hieroglyph of a discussion among people. I just copied it over, WK uses a picture so maybe the squid is not available standalone.

If you are interested you can browse a bit, looking at the history and the old Chinese scripts is quite interesting.


Oh, absolutely. The script’s UI looks very nice by the way, and I think it will be very useful. Thanks for spending so much time on it. :slight_smile:

EDIT: I looked at the 稚 example. You might want to remove the hyperlink for the “not in WK” kanji, or maybe link to jisho’s kanji page instead (for example: http://jisho.org/search/堆%20%23kanji).

Good call, I will consider it for the release version. But there is a story behind it: The meanings are not gathered on demand from WK, I just used the API to get a list of kanji and meanings in advance. For some reason half of level 60 was missing at first, so “not in WK” may be wrong, and I wanted to click the links when they come along to find errors. I will fix this once the database saw more exposure. If WK adds more kanji this must be adjusted manually as well.

1 Like

I’ve been using this with my latest lessons.
Clicking on the phonetic component marked by green (even if it’s a middle-click for opening in a new tab) goes to https://www.wanikani.com/lesson/session which refreshes the session and I get a new batch of kanji for the session.

Also, on this particular kanji the url for the radical (blue) is misspelled as https://www.wanikani.com/radicals/speciality
instead of https://www.wanikani.com/radicals/specialty which opens the “We’re sorry, but something went wrong” page.

Oh and I’m using FF 56.0.2/ Tampermonkey.

@gzovak, @seanblue

I just pushed a new version, just click on the Download Link again or “Check for Userscript Updates”. If you want the newest databases you probably have to clear the Externals in Tampermonkey.


  • Added additional padding in some screens
  • Green links now do nothing (I hope, the sessions are strange beasts)
  • specialty fixed

New feature:

  • You can now toggle the visibility of the first chargrid as well, and toggle this setting globally so that it always starts hidden

Click on the eye to hide once.

Go for the cogwheel and click the “Toggle Mini Mode button” to always start out with a closed eye. This should be semi-permanent, it is stored inside Tampermonkey.

I must say that the last feature is an insane hack for review and lesson pages, adding some bootstrap features to pages that use another toolkit … I will do more tests when I get lessons or reviews with kanji and radicals :wink:

1 Like

Got undefined for a reading. During my review of 緊.

Could you add target="_blank" to the links when on the lesson page? (And possibly the review page–I don’t have any reviews right now to check.) That would be consistent with WK’s own links.

I updated the version to 0.9.7, you probably have to update manually again.


  • Changed the structure to split the main file into several, I hope nothing broke
  • @seanblue Fixed undefined readings. This happens when the kanji is not yet in the new database, I added a fallback to WKs database.
  • less links should now lead to oblivion (“not in WK” kanji)

Which version are you using, and was it for all links or just radical or something? I already added this some time ago (meaning 2 or 3 days ago**), if it doesn’t work I broke it again. I will check when new reviews come up. Can you update (just click the download link again) and see if it still happens?

** Tampermonkey only checks once per week or so, in the beginning it’s best to update manually