[Userscript] Niai 似合い Visually Similar Kanji

Speaking to this, could you tell me how to put it back at the top, directly under the main kanji? (Where tomboy’s script use to have it?)

I don’t mind copy+pasting myself and fiddling with the script a bit. I can move things, but I do not know how to code things at this time. (I was considering teaching myself Ruby over the Summer, but currently my Summer is too short (I still have too much schoolwork).)

Thank you!

EDIT: I should also say that I don’t care whether or not WK’s officially “similar” kanji section stays at the bottom on it’s own or winds up disappearing. Either is fine with me.

I want to make it not green… so they’re more similar so I have to find the differences. ^^;

Ah… will “fixing the database” ruin anything? I do have WKOF installed.

I added “fixing the DB” a few weeks/months ago, I don’t know if more people have problems or if it happens with certain settings in the browser only, you can just use it as it is until I fixed it (maybe tomorrow).

I load the script files individually, it’s not so easy for the user to edit it. If you don’t see a positioning option under the settings I can add it, I once wanted to do it anyway.

1 Like

Yeah, it’s not in your settings. Just “edit mode” and “mini mode” um… I’ll grab a screen:

image

That’s it.

I will look into it on the weekend, I think some of rfindley’s scripts support variable placement, I will add something similar.

One problem is that the position is different for review pages, lesson, item pages, etc. I thought about additional up/down buttons to shift the section around interactivity, i will check how to solve it.

1 Like

Which sources are the “original sources”? Tomboy’s script? Everything from all of your databases come back from the dead? The WK ones (of which there are few)?

(It seemed like option 2 to me when I toggled this on “try”.)

Cool, thanks.

If it’s at the very bottom of review/lesson pages, I am cool with that - in those cases I’d rather it not be up front. But the reason I liked Tomboy’s at the top is going to check what was similar/different was my main reason for going to the item pages at all - except for the odd case I was resurrecting something I burnt (because I guessed it, or the typo-variance allowed for a different enough meaning that I didn’t believe I really knew it). Up until today, I’d been opening 2 tabs at once to see the kanji I’d been confusing, and tabbing between them back and forth, since her script broke (she killed the home of the db - there was a time where it was at the top and WK’s were at the bottom, and I often compared and found WK’s severely lacking).

Original sources are from the old script and the data from the PhD thesis mentioned in the top post. In the beginning this script was using only them, that’s why “original”.

But I found them to miss out lots of similar kanji, so there is also a DB coming from Keisei, and one that compares all kanji by measuring how much they overlap.

The original sources often contain weird stuff, like 一 supposed to be similar to some complex kanji, and the scores (sorting) is weird. Still, the original sources occasionally contain very similar kanji the other methods miss, and my approach is to rather show more kanji options and delete the similar kanji you don’t like.

The section from WK relies on people sending in similar kanji, that just doesn’t scale, especially on levels that only a few people reach.

Is the .4/.5 minimum score across the board, or per-kanji?

I’m finding .5 has too few (for 使 for instance, that drops off 便, which I find the most similar, and far more similar than 90% of the list). Just wondering if I have to adjust it for every item I come across or not. I’m trying .4 hoping it’s less items than the .3 that came with the script as default, although on this particular item I didn’t notice a difference.)

I was going to try .45, but it wouldn’t let me. XD

EDIT: True, true. Thanks for the explanation for the “original” database. ^^ :+1:

The settings in the menu are across the board. You can also edit the field manually, values like 0.35 are also possible, even if they don’t show by the buttons.

The scores are from 0 to 1 similarity, but in the end the exact values are arbitrary and hard to compare across different methods, so oftentimes kanji that are very similar might disappear for relatively low values there.

Edit: eh… it should let you use 0.45 :slight_smile: At least the scores are continuous.

No, it wouldn’t let me… it turned the outline of the input field red…

I can screen grab it if you like.
image

Also, can I change the “original db” to all have the values of .8? Then I could perhaps go up to .7 or so as a starting point. The pixel method does seem to get some really weird results. Is that a line of code I could change? (*adjust slightly in one spot → namely only that number ?) Of course, the pixel method does work for some, too, especially more complicated kanji, I’ve noticed. For instance, 4 or 5 complex kanji will appear very similar (to one another) in relation to a very simple kanji (which I would never mix with those).

… Just my 2 cents.

I too would find this very helpful! Please implement in a future release (doesn’t have to be this weekend).

Hmm the input field has step 0.1, but I’m sure I was testing all kinds of values there. Maybe the meaning of “step” got more strict.

The DBs have base values, but they are not easy to change yet. The original script DB has value 0.4 right now.

You can already reorder a bit by “adding” the kanji with the + button even if it is already there, manual kanji always have score 1.0 and appear first in the list.

After that it depends on the order you added.

I use the timeline plugin. Yeah it loads everything like you say.

In that case I think the problem is your browser. You should be able to whitelist all of WaniKani, so that it can actually keep a local cache of all the data.

1 Like

I already did that, but I’ve dived deeper into the settings and tried to allow everything (even Flash and ads). Let’s see if it helps. Wouldn’t you agree it’s related to this script too, since disabling the script fixes the issue?

Normally the WKOF stores the search results for a while, so the loading screen appears only once in a while (if at all) for most users. Niai asks WKOF for data on every page load, but so does every other script that uses WKOF; the noticeable difference for you is that Niai also shows the caching problem on lessons and reviews.

It seems your browser prevents the storage, so WKOF is forced to download the info every time. You should try to fix the settings, you are probably already downloading quite a lot of data from WK because of that anyways.

Probably. I noticed that Brave has saved 3 GB (!!) for community.wanikani.com ? :expressionless:

Is there anything in particular I should set to “Allow”? Don’t want to to it all because of privacy/security.