[Userscript] Niai 似合い Visually Similar Kanji

Some bad interaction happens for a few people, mostly Windows with Firefox. I don’t really know what is causing it, I usually test it on both Windows 10 and OS X with different browsers and I don’t see the problems.

I managed to fix it in Keisei a few times because some functions in Tampermonkey are bugged, but can be quite easily replaced. (But I was testing more funky stuff there.)

I think there is some hidden bug in Tampermonkey that strikes occasionally, maybe only when other browser extensions or anti-virus software or something is in place.

So I think I can do something about it, I will be back from a trip beginning of next week. I have to replace a few things more aggressively.

Do you use the WK open framework or can you install it?

Yea I already use it for some others.

One small problem…
today’s newly added kanji: WaniKani / Kanji / 濡

濡 is very similar to 需.

Also: WaniKani / Kanji / 噂
噂 is very similar to 尊.

These kanji now have no similar kanji. Normally this wouldn’t be a problem, just add one, but it seems like if there are no existing similar kanji in the database, one cannot be added.

2 Likes

Thanks for the notice, I didn’t see that WK added more kanji. That wasn’t really considered by me, so in the end Niai got stuck completely. I updated to version 1.2.1, it should be a bit more graceful now with content updates and missing kanji.

I actually added all Joyo kanji to the DB from the start, even those that were not covered by WK like the new 膝, so you already get similar kanji displayed there.

New kanji in Jinmeiyo like 噂 are not compared to other kanji yet, I will check how much work it is to extend the DB a bit, but the manual adding works now at least.

1 Like

Excellent! I can confirm your script update works perfectly. Thank you for responding so quickly.

One question - if I’ve customized the similar kanji lists, where is this data stored? I might need to get my IT department to wipe my machine due to another issue and I want to make sure we copy over all the effort I took to set this up perfectly.

The script has been extremely helpful since I took so long to get through the material, my primary problem has been dealing with similar looking kanji. I resurrect lots of burned kanji to go through them a second time with more speed and it has exposed some holes in my learning process.

1 Like

The data is stored with a function of Tampermonkey. If you use the original Tampermonkey, go to the Dashboard of Tampermonkey, then click on Wanikani Niai Similar Kanji, then the appearing tab Storage. There is a text field with {“debug”: false, …}, just copy the whole thing in the field, store it with a text editor, and paste it on another machine. Your personal changes are in the override_db.

If you use ViolentMonkey or something else you might have to search a bit, in an extreme case I can help you to get it via the console.

1 Like

Thanks for this script, it helps a lot when going through the lessons. It seems like you pull the english meaning from the first entry in Jisho.org, which sometimes differs from what WK uses (like the 3rd or 4th meaning from Jisho). When going through the first time learning a Kanji, for me anyways, it helps to just learn one reading at a time. Any chance you could have it just use the WK meaning on the cards?

Here’s an example, WK 1st meaning is Give Up, Jisho 1st meaning is Truth (4th meaning is Give Up).

I pulled the information from WK where it is possible, the rest is from Jisho. For some reason I wrote over 諦, it appears twice in the DB. I will search if there are more inconsistencies.

Another thing is that the information pulled from WK is static, it doesn’t reflect changes. I will try to change Niai that WK is queried as well for updated readings and meanings. I already pull which kanji are locked, so it’s a small change.

The problem was that some kanji were added a few days ago, but Niai was still using the old definition from jisho. I fixed the values in the DB.

If you have WK Open Framework installed, Niai will now also try to get the kanji meaning from WK using the API.

1 Like

Thanks! It works for me. Glad it was easy.

I’m having some slowdown issues when I enter a wrong input.

When I input a wrong answer, it lags for a second, and then shows a “loading assignments” pop-up, every single time a wrong answer is inputted. Gets kind of annoying and laggy!

I’ve narrowed it down to this userscript. It keeps loading lessons and assignments or something. I’m using Brave browser, which runs on Chromium but is designed to block cookies/tracking/etc. I’ve turned off those features.

After turning off this script the problem seems fixed. I really like the script and want to continue using it though!

I changed the script recently to fetch the actual unlock status and meanings/readings if you have WK Open Framework installed.

I thought it caches the data and loads it like once per day or so, I will check if I missed setting up the caching nicely.

Quick fix for now is to move Niai to execute before WKOF in the Tampermonkey settings until it’s fixed.

Thanks for looking into it. Will give it a try.

Didn’t solve it. I’ll turn it off for now.

Are you sure you disabled the privacy settings for WaniKani? If you go to the dashboard (assuming you use something like timeline) does a progress bar appear and stay up for a while every time you refresh?

Hmm that’s strange, without WKOF there should be no access to the “loading assignments” screen. I’m definitely not doing pop-ups from Niai itself.

Maybe the scripts are cached somehow and just changing the position is not enough to make Niai stop seeing WKOF.

Quick question: API v1 or v2? Or no API necessary?

I see no WKOF, so I’m assuming v1 or none?

EDIT: Just installed, wow it was so fast I thought it didn’t happen and was going to do it again 'til I noticed the button said “reinstall”.

Anyway, for a future feature, it would be nice if the top buttons image
had tooltips for each one explaining/stating what they did (or both). I don’t fully understand how to use this by your description in the OP alone. Going to read through the thread to see if it’s explained. Currently want to delete at least half of the similar items for one of the kanji immediately. Also, why is one green?

Okay, thanks!

EDIT 2: I figured out edit mode at least.

The script doesn’t use the API, it ships with its own kanji DB and similar DBs. But, if you have WKOF installed, it will try to fix errors (because the DB contains old data).

For editing you click the circle, then some X appear in the corner of kanji, and clicking it removes it. If you deleted too much you can make everything for that kanji reappear with the back circle.

The green one is the kanji the current page is about, for comparison.