[Userscript] Niai 似合い Visually Similar Kanji

Thanks for this plugin.

I was doing my kanji lessons, and opened the settings and I couldn’t change that number. how come that happens?

By the way… why 次 doesn’t come up in similar kanji list when I learned 欠 ?? Probably the most obvious… I had to add it myself. We just learned it a lesson before!

What happens when you try to change the number? Just no difference, or some more serious problem? You can try to open the console (Ctrl+Alt+I in Chrome, maybe F12 elsewhere, then “Console”) and look for red error messages while changing the number.

For 欠+次 you have to enable the “Original Sources” in the settings, it is included there. The problem of the new method is that it measures how many pixels are shared, and in your example the main part is compressed a bit to make space for the water (ice?) radical. In the end there are not so many mutual pixels to consider it similar …

The original sources contain more things that are of questionable similarity, but they cover interesting things like that pair.

1 Like

Oh, really? That’s the algorithm? Wow. Now I understand why I get so many “non” similar kanjis… mmm. I guess using the radicals they use would add more similars, but well, thanks!!

Version 1.1.3, adjusted the sorting of elements a bit, especially elements from Keisei should now appear more prominently.

1 Like

I used to be able to delete all but the one or two kanji that I felt were similar but as of recently only a handful will delete before the delete buttons just stop working. Assuming this is a bug?

1 Like

Fixed now in 1.1.4, under some circumstances kanji at the end could survive any elimination attempt (by a regression in 1.1.3).

Amazing! Just tested myself and all looks to be working. Really appreciate it.

Is there any chance a similar radicals feature could be added? I just came across 亜, and it was a bit of a faff to compare it with 覀 because they’re not actually connected in any way. I don’t know if it’s a common issue, but I do seem to confuse radicals enough times that it would be useful (夂 and 久 caused me a lot of pain). Even if they had to be manually added by the user, I wouldn’t mind (it might actually be beneficial to have to add them manually…) :slight_smile:

You want to add the similar kanji section also to radical pages, right? I was considering something similar to improve the kanji suggestions (first divide the kanji into two parts, then check the similarity or each part/radical), but not for the radicals itself yet.

I will think about it, but I’m not sure if it is a big enough deal to generate a list. Adding an option to show an empty list to add stuff manually might be the better option.

Some things:

  1. Many radicals are kanji themselves, so you can already see similar kanji if you go to the corresponding kanji page of a radical
  2. 久 appears exactly once, how can it cause trouble? :slight_smile: When in doubt it is guaranteed to be 夂. [Btw, 夂 is related to 攴, I imagine it to be something like “beating stuff with a stick”.]
  3. 亜 is a full-size kanji (and has only one compound in WK, 悪), 覀 is very likely crammed somewhere in-between. When in doubt, 覀 :slight_smile:
2 Likes

If you use + to add the original kanji again, this happens, and it’s not removable.

Capture

(happened by accident)

Thanks, fixed now in version 1.1.6, there was no check for adding the same thing, but it got the same treatment as the head item.

Note that there is no automatic fix for an existing DB at the moment, you need to reset it (reset the item only with the undo-looking button) to get rid of the double city :slight_smile:

Yeah I reset it immediately, it’s not a big issue, thanks.

I’ve been seeing kanji from lower levels still being marked as locked. Is this a bug?

Screenshot

CropperCapture%5B85%5D

^ 想 and 暗 are both level 13, but I’m on level 16 and they’re still locked.

The script is very simple, it tries to read the number in the level bubble on top of the page and remembers it. Now, I tried to restrict the script to load only when necessary; so the only chance to grab a new level is when you visit a kanji page, like https://www.wanikani.com/kanji/一. If you never go there the level will be stuck :slight_smile:

You have to go to a kanji page once per level in the current implementation. The items marked as locked are on your current level and above. :upside_down_face:

I can change the script to load on more pages like the dashboard as well, it is more robust anyway. I’m also considering to use the WK framework (for example the kanji meanings are taken from a private database, not WK, so if WK changes something it will differ), at least optionally.

New version 1.2.0!

Changelog:

  • The level detection should now actually work, it was only updating occasionally before. The locked items should be more accurate (but still based on the current WK level).
  • Optional WK Open Framework support. If wkof is installed, the information whether a kanji is already unlocked is provided directly from WK instead of guessed.
2 Likes

Does anyone else has the problem that Niai doesn’t work anymore or blocks other scripts in Firefox?

I got a report on Github that there are problems; I fixed a similar problem for Keisei but it must be a different reason this time.

I’ve had to stop using this script as of last night due to it breaking all scripts in review sessions. Has there been any recent modifications to the script?

That’s strange, the last modification is from three months ago. Do you have version 1.2.0?

Maybe there was a change in your browser or Tampermonkey, I will check if I can remove some calls to functions provided by Tampermonkey itself, they are usually to blame (despite not really doing exceptional things).

1 Like

I do have the latest version. I did so a Windows 10 update before it happened. I’m not sure about Google Chrome but I don’t think it updated

I’m on my latest Windows 10 & chrome right now. And I’ve no problem.