[Userscript] Leech training

Does this not have support for automatically playing back audio? Maybe I’m misremembering but I remember it doing that. It’s not

That must be another script, I’m afraid.

Very nice script I must say. And congrats on your new job!

Hi there,

Could you or anyone else explain what a leech is?

Thank you.

Maybe you’re familiar with the animal called leech. Those animals attach to their hosts with a sucker. The expression “leech on to somebody” means that something or somebody attaches themselves to somebody and won’t let go - literally or figuratively.

When you learn something, you occasionally come across things that are harder to learn than others. Maybe there’s that one vocabulary you get wrong every time, or that one kanji you just can’t remember. That item “sticks to you”, so to speak, it “leeches on to you”, and you just can’t seem to get it done and over with. Items like that are sometimes called “leeches”.

Hey, Thanks for the explanation and the link. I have seen those animals in movies.

Nice, so this script allows you to practice those leeches, separate from the usual SRS timeframes when they would be coming in?

Yup! It has no impact on your WK reviews at all, so you can practise without affecting them.

1 Like

is this script supposed to syncronize if I use my wk account in different computers?

Because in one computer I had completed all my leeches, then when I am using this one right now, it shows 83 leeches!

Any way to fix this?

That’s odd. It should show you the same numbers as the stats are saved on the server.

An update! There’s a major version bump for the script, which corresponds to it looking at the rewritten backend. I’m hoping you don’t see any problems (numbers may change slightly as the new backend doesn’t have your history of lessons), but please shout if you do. If it’s totally broken, revert your userscript to the last version.

In the Greasemonkey button in your browser you’ll find the menu options, including one for resetting your stats. If you’ve been beta testing the new backend previously you might want to do this, I’ve certainly uncovered a few bugs in the code which come from me storing bad data. It’s been a long time coming, but at least I now have full understanding of the backend and actual logging to help debug issues!

Two new features you might like are the ability to change the size of the quiz, and also what you consider to be a leech. If you have a lot of leeches you might want to increase the score and work on your worst leeches for a bit.

Edit:
As expected, there are a few problems! The old backend is still up and running, so if you find things are broken to the point of no return (or, at least, come back again later), the previous userscript is here: Shin WaniKani Leech Trainer

@rosshendry,
What calculation do you use to identify leeches?

1 Like

I went from 0 to 311 leeches after the update.

Thanks for working on this!

I installed the new version, but when I click on it, it seems to have trouble fetching the leeches. It says “you have … leeches” and the button to squash them fails to launch the quiz. I got it to work by deleting my stats, but when I tried to do another quiz after that, it just gave me the “you have … leeches” message again and wouldn’t launch.

The ... means the backend is still trying to work it all out. Sometimes that can involve retrieving a bunch of data from WK itself which takes a little bit of time. The good news is I have logs now to track down issues! If you can give me the last block of characters in your API key then I should be able to take a look and see what needs speeding up.

1 Like

It’s 39272bbee42e! And thanks!

That’s a big jump, sorry!

It’s using (caveat: should be) the same calculation as the old backend, the difference being that the new database doesn’t have any record of leeches you’d previously trained. I might be able to port it across, but not today. I would be impressed if you’d driven it down from >300 to 0, though!

The old system is still up and running so you can switch back if needed. There’s also a frontend on the old one for listing leeches (on my todo list for the new one) so you can put your key in and see how long the list is there: http://wk-stats.herokuapp.com/. You’ll also see just how many I have, and why it’s easy for me to miss things. And why I’m on vacation mode to take a break! :smiley:

New method should be same as the old method. The old one is here, and the new one is the same (haven’t made it public yet while I tidy up a few bits).

Oooh! While I think about it, there was a bug in previous versions where it managed to store a valid, but very low, personal preference for leech score. If you look in the GreaseMonkey menu options you can see what your score threshold is set to.

What threshold should I set? This morning I have 347 leeches!

Oooft! The old one had it set to 1.0. If that still results in huge amounts of leeches then probably best to downgrade for now. If you let me know the last section of your API key I can try and use your account as a test subject for migrating the data about when you last trained a leech. That’s my current thinking about why you’ve so many.