[Userscript] Niai 似合い Visually Similar Kanji


#1

Niai Visually Similar Kanji

by acm

This is the stable release of my latest script, Niai Visually Similar Kanji!

This is a completely new implementation, and a substitute for the old Wanikani Similar Kanji script, and a more full-featured version of Wanikani’s own Visually Similar Kanji section.

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:)

News

  • v1.2.0 Level detection now working, and WKOF support
  • More control over how many kanji are shown
  • Added new DB based on kanji differences in the Noto font
  • Put vocab examples on top again in lessons
  • Opens all jisho links in a new window
  • The position of kanji in the grid is now stable even when deleting
  • Enter button problems in lessons and reviews should be fixed now (for good now?)

Example Screenshot

Features

  • Five different databases for similar kanji: two from Lars Yencken’s PhD thesis (see below), the Keisei database for phonetic compounds, the database of the old “similar kanji” script, and (planned) manual additions
  • You can add and remove kanji from the list as you like, it will be stored locally in your browser
  • Replaces WK’s section on kanji content pages
  • Also works in reviews, lessons, and lesson reviews

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 (happens rarely :wink:). 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

Controls

buttons

Buttons:

  1. Show/hide badges than can be clicked to delete kanji (see below)
  2. Add a similar kanji (dropdown menu)
  3. Revert your changes (deleted and added similar kanji) for the current kanji only, click twice
  4. Show/hide the section contents once
  5. Settings
  6. Information

Buttons:

  1. Show more debug messages in the console (in case of problems)
  2. Delete all your changes to all kanji (click twice)
  3. Mini mode: always start out with hidden character grid
  4. Edit mode: always start out with the delete badges visible

Editing

=> Click on the x badges to delete

In the + dropdown you can add kanji, only kanji in WK can be added (but at least it fills readings and meanings for you). Enter or paste the kanji, click the button.

License

GPL v3, just do what you want with it.

Data Sources Information

URL: http://lars.yencken.org/datasets/phd/

Original Notice:
This page describes a number of data sets released as part of my PhD work.
All data sets on this page are released under the Creative Commons Attribution 3.0 Unported license.
Unless otherwise specified, the appropriate academic citation for any of these datasets is:

Yencken, Lars (2010) Orthographic support for passing the reading hurdle in Japanese. PhD Thesis, University of Melbourne, Melbourne, Australia.

Disclaimer

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

This is still work in progress, any data you enter may get lost accidentally. Just don’t put your PhD work on similar kanji in there yet. In Tampermonkey you can copy/paste your override_db under Edit>Storage.

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.
I tested it at some stage with Firefox + Tampermonkey/ViolentMonkey, but just message me if you run into trouble.

Other Scripts

One database is imported from the composition script:


Learning kanji - No similar Kanji shown - Why?
Level 19, stuck forever, hating myself, rolling backward
Must have scripts?
What do you want now? (Request extensions here)
[Userscript] WaniKani Similar Kanji
Leech Squashing
Let's praise these USERSCRIPTS and their awesome CREATORS
Favorite or Must Have Scripts and Apps?
How do you efficiently study kanji you're unfamiliar with?
[Userstyle] WaniKani Breeze Dark
Do you use the Mnemonics or opt for rote memorization?
[Userscript] Hitsuji Animated Stroke Order Diagrams
[Userscript] Keisei 形声 Semantic-Phonetic Composition
I've hit the wall
Visually similar kanji add
Feeling the kanji
[Userstyle] WaniKani Breeze Dark
Feature request: "you may be confused with ..."
Advice on differientating between visually similar Kanji?
Quick add-in that might help people a lot
Sunflower - - 里
[Userscript] WIP: Lock Script
About to enter the painful levels... searching for advice on how to handle the pain
Feature Request: Enhance 'visually similar kanji' section
#2

At least @patjennings24 and @Ryouki were interested in this (I found nice DBs, release faster than expected :wink: ).


#3

Wow, that was fast! Thank you so much! I’ll certainly be installing it today!


#4

Awesome. Gonna try it out now. Thanks!


#5

Looks nice. I love these more passive, micro-informational scripts. :smile:


#6

If you add a link to greasyfork.org in the OP then this script will be listed by the App Store script. Please consider including the app store hook (see script OP) so that folks can tell if it’s installed (and how many active users of the script there are).


#7

Any link to greasyfork, or to where? Also, I get a 404 for https://www.wanikani.com/script/appStore, what am I doing wrong (Chrome/Tampermonkey)?


#8

I didn’t realize that you weren’t hosting your script on greasyfork. That app store only knows to look for links to the greasyfork.org. :man_shrugging: I might have to change the app store away from tampering with a 404 page. It seems to cause more problems that it’s worth.


#9

@hitechbunny Not sure how you find the scripts, you might also check for links to files ending in .user.js.


#10

Looks like there were now major problems, marked as stable now.

Fixes:
Changed sorting in grid. Kanji in the grid are sorted by a score, previously the order was not unique when the score was equal, so the kanji would shift around in the grid after deletion (annoying when you wanted to delete two kanji in a row quickly)


#11

https://www.wanikani.com/kanji/%E5%88%83

匁 has “undefined” under reading. I am aware it has no 音読み listed on Jisho, just thought I’d mention it.


#12

@gzovak, Thanks, I also found it, it’s fixed now. It was the only one in the database.


#13

I was pleasantly surprised to see this pop up during lessons (I missed reading this was a thing).
However I wasn’t happy with it’s position within the examples tab so I went to edit it in Tampermonkey to change it to how I would like but the way you have things set up doesn’t allow me to easily change it. I would have liked to put it underneath the Vocabulary Examples section i.e. after the div#supplement-kan-related-vocabulary instead of before it. Maybe have it as a variable in the script so one can change the location of the Visually Similar Kanji section to their liking?

Would you be able to do something like this?

Or maybe I completely missed something, in which case could you point me in the right direction?


#14

I was thinking about some way to move it (like drag and drop or up/down buttons) and then remember the change. I will move the vocab examples up by default for now, it has a fixed height so it’s better on top.

Edit: you can get the new version now :wink:


#15

@jprspereira

Your questions is related to Niai :wink:

Actually I am not really checking which items you have unlocked, I just show everything on your current level or higher as locked. It looked like you need to download a lot of stuff each time to make the check. However I’m considering to use new API v2 to fetch this from WK. The readings and meanings I use are also detached from WK, this will be better then as well.


[Userscript] Keisei 形声 Semantic-Phonetic Composition
#16

I see, thank you for the clarification :slight_smile:


#17

This is an amazing plugin, very helpful, thank you!

Suggestion (or maybe I’m stupid and haven’t found it): please make reordering of the similar kanji possible. Now I have to delete the non-similar kanji in front (how does the plugin determine them anyway?) which presumably makes them disappear forever?


#18

My pleasure :wink:

There is a “reset button” to make everything factory state again for a single kanji, it basically deletes the current kanji from the override DB (see below).

The userscript uses several data sources that give “points” to kanji, which determines the order.

Items 2. and 3. come from a doctoral thesis of someone (http://lars.yencken.org/datasets/phd/). They are machine-generated as far as I understand. Mostly very good, but sometimes there is a 一 or 二 or something with an insanely high score hidden in-between. Main reason why there is an editing feature :wink: These two databases already contains a score from 0–1, so I just use that. (They only have 1945 kanji, however, so a few hundred kanji in WK are not covered.)

If a kanji appears in several places the “higher number” database in this list is used.

  1. The database from the obsolete similar kanji script, everything gets score 0.4
  2. A “Yeh and Li” dataset, somehow based on radicals
  3. “Stroke distance”, I think it tries to figure out how much must change to get from one kanji to the other
  4. Keisei DB (from my other plugin), here the radicals change but the tone mark stays the same (score 0.5)
  5. Manual DB (I’m adding a few kanji that were missed but I feel they should show up (score 0.8)
  6. Override DB: this is what you are editing, deleting gives score -1.0, adding score 1.0

So in principle it is possible to shift kanji around by pushing more differentiated scores than -1 or 1 to the override DB, but I haven’t figured out a way make it user-friendly :slight_smile: Drag’n’drop is possible, but probably not so simple to implement. You could add a kanji that is already in the list to give it a 1 score to move it to the front a bit, but at the moment there are no more user ordering options.


#19

Thanks for your thorough explanation! Yeah, drag 'n drop would make this plugin perfect :slight_smile: Here’s to hoping :smiley:


#20

Adding kanji is a very slow process I found out, what would be super-slick is a “community edition” where sorting and additions are synced to others and you can move them around or delete them again (and get a score from that). But it seems there are not that many people who use this script, and a few weeks full-time would need some funding :slight_smile: