This is great; I can’t wait to see how it helps once I catch up to my previous studies.
I noticed early the kanji start problem (where 入り in 入り口 was highlighted for 入る)
That might be a problem in the corpus though. Combined with undo script it’s not a big problem.
edit: Actually it was the exact same double kanji bug; I just didn’t read carefully enough. The full example sentence is: “ちゃんと入り口から入ってください。” So it is just a problem of just choosing the first instance.
I installed this as a beginner as I thought it makes a lot of sense. A warning would be nice as it REQUIRES grammar knowledge to differentiate conjugations. As a beginner, I do not have that grammar knowledge so this script forced me to guess my answers several times. Very frustrating. In an ideal world I would like to see a version with context only using the standard form that is also taught by WK and an option to also include conjugations. I had to deactivate this script and will come back to it in a few months when I worked through genki…
I disabled it by editing the script. Go to line 157 and delete the mark tags and extra +'s, then add .bold() so you can still see the word bolded. Like this
The crux is you typically don’t always see words in the same context, which is why this method never works for me (I have tried. Multiple times).
After a few times, I just naturally start to recocnize which of the various context sentences this is and then I know what it means, even if I don’t remember the actual words.
If there were enough context sentences that it could show you a different one each time, then sure that’d be pretty realisic.
I’d find this a lot more useful if it’d replace the vocab after having answered instead. (Maybe I should try to learn enough userscripting to make such a script…)
Well… by stealing a bunch of stuff from this script as well as Anki Mode I’ve cobbled something together, mostly for my own usage.
Basically what my version does is that it replaces only the vocab meaning quizzes with this anki inspired verson:
The input box is removed
Pressing enter shows sample sentence (translation hidden).
With sample sentence visible, pressing h shows translation
With sample sentence visible, you now answer anki-style: 1 if you were wrong, 2 if you were right.
So basically I’ll first show just the word, then once I think I know what it means, or can put it in context, I compare with the sample sentence (or optional translation) and grade myself accordingly.
I also made one that just replaces the word with the sample sentence after you’ve typed the answer, nothing else changed.
Like I said, I made this for myself, and it’s not super high code quality (most of which is stolen anyway), but I thought I’d mention it in case someone wants to give it a try, in which case I’ll try to figure out what my greasy fork username was and share it there.
The second is that I’ve added a text-to-speech function for the sentences. Assuming your browser supports it, if you click on an example sentence, a machine-generated audio will play.
This is because the script couldn’t find the word in the sentence. The word is もうしこむ or 申し込む but the one in the sentence is 申込をしました. (Seems that the WK team has changed the latest context sentence to use 申し込む).
The script tries to find the index of the word in the sentence. Because it’s not found, the index is -1. Then the script run a substr() function for the purpose of the highlighting. When you execute substr(-1), it will go to the end of the sentence and grab the 。character instead. Then it will cut some part of the sentence and add that character in front. That’s how you get this.
Maybe it’s better to add another checking logic. If the index is not found, don’t show the context. I would add:
Thanks for this! I took your gist and made two small changes
I wanted the dictionary form of the verb, not the verb as in the sentence. I realize this is less good to learn as in the wild we’ll see the verbs conjugated, but I was making mistakes because I was guessing wrong what the original verb was and for new words I prefer to focus on just learning the word itself.
Not sure if because of my edit but the ~ was being taken off the main word, which led to me confusing ~君 and 君 (both were showing up as 君). Made sure the ~ is being shown.
@OnigiriBoooy, I’m not sure if you’re aware of this, but I think the WK team added certain words and there isn’t context sentences for them yet. The one I’ve seen so far is “lucky” 「運がいい」I thought you may want to know about this so yeah, but otherwise, love the script!
I am also hoping for an update. Is there an alternative? I only see some scripts displaying the sentence below the target item, but merging it like in this script here is much better imo.