[Userscript] ConfusionGuesser

@Sinyaven Do you mind if I add your script to the API thread? Many users are directed there for an index of many of the best and most popular scripts. Afaik, yours isn’t there, and I’m sure a lot of users are missing out (or will be, once this thread disappears into the ether).


Oh yes, please add it :slight_smile:
I had forgotten that this thread exists. Thanks for checking if my script is in there. I guess I could also add it myself, but the list seems overwhelmingly long, so it would probably take me some time to find the place where it belongs.


My pleasure. I had to disconnect your name (@ Sinyaven) in the mentions because there’s some bug going on with the 10 mention limit. The thread is easier to navigate when you find the table of contents (albeit well hidden).

The worst part is having to scroll to the bottom to find the edit button :rofl:


It’s not a bug, so sadly we have to do that with the wikis. There’s a list at the top of that post (only visible in the editor) which details which users have the most entries in the list, so we mention only the 10 most frequent users.

Yeah, if you can think of a better way to display the ToC that would be great

You can also click the edit history button first, and then there’s a more accessible edit button in that popup.

1 Like

I literally forgot to download this last time, and only started using this now. It is absolutely amazing. It just tackled like three of my big leeches in the first few minutes. 10/10

1 Like

And here I thought you didn’t like it since I couldn’t find it in the list of your userscripts that you have posted in your level 60 post XD
I hope that it is helpful to you :slight_smile: Even if the IDS-based kanji similarity rating is still pretty bad. I should probably think up a better algorithm when I get time.


The answer I was confusing it with has so far always been in the list, so it’s perfect still :slight_smile:
Sorry I caused you to think I didn’t like it :cold_sweat:

EDIT: Gave you some much deserved publicity boost. :yum:


I’m just surprised the 10 user limit isn’t disabled for Wiki’s. That’s a pretty glaring oversight on Discourse’s part it seems. Thanks for the tips. I’ll have a think on the ToC.

1 Like

I’m wondering :thinking:
Can this script not suggest the same thing I had typed? This case is for a kanji that has more than one reading.

For example, this one, can I have “goku” as the suggestion instead of “kyoku” because that’s the same thing as I typed.

The guesses are not suggestions - the script tries to display the WK item that led you to giving this answer. In this case, you thought of 極 with the きょく reading, so this is what you are shown.

In addition to this reasoning, I also think きょく is more informative than ごく would be here: it tells you that きょく was indeed a valid reading for 極. ごく on the other hand would just duplicate the information already available through WaniKani’s Item Info button, where it shows you that the correct vocab reading would have been ごくらく.

And last but not least, it might also be more fun to not immediately get the correct answer displayed. When you see on⬄on きょく, you realize that you have thought of the wrong on’yomi and then might recall the correct reading for this vocab on your own, leaving you with some sense of accomplishment even though you failed the review.


Loving it so far but any chance you can add a font size setting? I often do my reviews from across a room, certainly no way I can read them. While I’m certainly willing to change my behavior, others have difficulty with their eyes and font size options can be a godsend.

I have added a dropdown menu in the settings dialog to choose a font size (script version 1.1). I hope these presets are good enough - if not please let me know.

1 Like

They work well for me, thanks a lot for adding them.

1 Like

Version 1.2 patch-notes:

WaniKani's hidden whitelist can now be considered for guesses (deactivated by default)

Some WK items have additional meanings in a hidden whitelist. For example 矛 was once translated as “halberd” which is still in the whitelist. This also applies to the radical names that were changed in the big overhaul - 廴 for example still has “big bird” whitelisted. ConfusionGuesser can now guess 殳 if you somewhere wrongly answer with “ikea”, and also show you what the thing is that Koichi likes so much that he had named three radicals after it:

Your own added synonyms can now be considered for guesses (deactivated by default)

WK allows users to enter their own synonyms. ConfusionGuesser can now base guesses on these user synonyms.

Adaptions to mapping of reading to kanji

examples: 挿絵 - さし|え instead of さ|しえ; 巻尺 - まき|じゃく instead of ま|きじゃく

  • until now the mapping was prioritized from left to right; for vocab where okurigana was “pulled into the kanji”, this led to wrong mappings
    example: 挿絵 was split up さ|しえ - 挿 has kun’yomi さ, and しえ was assumed to be a special reading for 絵
    changed so that it now prioritizes shorter matches on the right:
    挿絵 is now split up さし|え - 絵 has on’yomi え, and さし is assumed to be a special reading for 挿
Adaptions to similarity rating
  • increased rating if two consecutive kanji are swapped
    example 1: 栄光 and 光栄 are now rated 0.85 instead of 0.5
    example 2: 過疎 and 疎開 are now rated 0.4 instead of 0.1
    Reason for this change: I wanted 疎開 to win against 避難 in their similarity to 過疎
  • manually defined two component pairs as equal (IDS similarity)
    囗 is defined equal to 口
    厶 is defined equal to ム
    example: 公 and ム now have IDS similarity 0.38 instead of 0.1 (minimum similarity)
Prevent removal of important guesses that happened in rare cases

example: until now, when answering with へいじ for 幽閉, no top guess for the wrong じ was displayed; it would have been 閉, but 閉 was already a guess for へい with an equally high rating, and duplicate guesses are deleted

If I broke something please let me know.
Link to previous script version for downgrading in case version 1.2 doesn’t work for you


This script is amazing, thank you!


Version 1.3 patch-notes:

Changed guess duplicate removal

In version 1.2 I’ve changed the duplicate removal function to remove fewer guesses. Of course I overshot and now left in too many guesses. Example: 那 has two valid reading answers: な and だ; if I answered with ぐん, the script guessed 郡 for the な version as well as for the だ version of the question, and the duplicate removal wasn’t allowed to remove either of them as they were the top guesses for each version.

This patch changes the duplicate removal to only consider guesses as equal if they match in item AND reading (so answering へいじ for 幽閉 still shows you (へい) as well as ()), but it is now again allowed to remove top guesses (so that in the 那 case described above, you only get (ぐん) displayed once).

If I broke something please let me know.
Link to previous script version for downgrading in case version 1.3 doesn’t work for you

1 Like

Just wanted to let you know that this user script is amazing. This has heavily improved my studying. This script is a must-have in my opinion.

1 Like

Version 1.4 patch-notes:

Duplicate removal bugfix

I’m surprised that I haven’t gotten any complaints yet, because the bug that I had introduced with my last patch was pretty severe: for wrong meanings, the duplicate removal deleted all guesses except for one. Oops.

If I broke something again please let me know.
Link to script version 1.2 for downgrading in case version 1.4 doesn’t work for you

Also thank you all again for the nice comments! :slight_smile:


Gotta ask this because I can’t figure out which script of mine is doing it. :laughing:

Does this script warn you if you enter the correct reading for a word when WK is asking for meaning?

No, that’s probably the Double-Check script, which added this functionality recently. Why? Is there some problem with this functionality? Coincidentally, it was me who was involved in the making of this Double-Check script feature.

1 Like