[Userscript] Prevent "Your answer was a bit off" answers from being accepted a.k.a. "Close But No Cigar"

However I am able to install other scripts on GreasFork.org just fine.

beetlejuice321 said... Thanks for posting this, it would be helpful.

However can you tell me how to install the script? I tried with Firefox and I get message "Error: @match: Could not parse the pattern."
 I think I fixed the problem, update to 0.7 and tell me if it works now.

This is great script, thanks for sharing it.

I did get this interesting thing on a lesson quiz: (Firefox 35.0.1, Linux Mint 17.1 Cinnamon 64-bit)



In my local copy I changed the regex from [oku]{1,2}n’yomi to [a-zA-Z’]+ and it now displays the try again message in the lesson quiz. I don’t know if changing this will mess something else up, but it seems ok so far.

Thanks again for the script, it has saved me the palava of deliberately failing false correct answers next time round or adding fake synonyms to get it to come back in the same session.





hoovard said...In my local copy I changed the regex from [oku]{1,2}n'yomi to [a-zA-Z']+ and it now displays the try again message in the lesson quiz. I don't know if changing this will mess something else up, but it seems ok so far.
Nice, I'll probably add that to the next update, I thought that it always returned kun'yomi for anything that didn't match "on'yomi" (including 'undefined') so I tried to regex as tightly as possible. I suppose that is not the case, at least in lessons. I don't see how this would mess anything up and thanks for the feedback.

And if WaniKani really is looking for an undefined reading, good luck! Methinks it will be looking for some time. :P

Hey! Just came in to request one thing…

I love this script, though it can get a little annoying sometimes when I try to spell out things like “achievement”.
I know how to spell words like that, though I’m used to spell checker helping me out :wink:
So, my request is to be able to set a maximum word length to which this script applies. That’d be wonderful ^-^
Thanks!

GreenWarrior said... Hey! Just came in to request one thing...

I love this script, though it can get a little annoying sometimes when I try to spell out things like "achievement".
I know how to spell words like that, though I'm used to spell checker helping me out ;)
So, my request is to be able to set a maximum word length to which this script applies. That'd be wonderful ^-^
Thanks!
 Request denied!
:P

the nature of the code is a catch all for answers wanikani considers close.
 I wrap the function in my filthy code and then pass it off as said function for all the times it's called.
What your asking will require far more complex programming for very little gain. If want it to accept typos, you can always enter them as user synonyms.

Besides, it makes you a better speller.
i could make it so that close answers are marked incorrect but thought that would be a little too cruel, I might make it an option.

Still doesn’t work with Firefox (37.0.2, Greasemonkey 3.1):

Download Error

Could not parse script:
Ignoring @match pattern http*://www.wanikani.com/review/session* because:
Error: @match: Could not parse the pattern.,Ignoring @match pattern http*://www.wanikani.com/lesson/session/* because:
Error: @match: Could not parse the pattern.

Yeah same problem here- would be grateful for a working link.

Terilian said... Yeah same problem here- would be grateful for a working link.
 Give me a minute, the '@match's need to be changed to '@include's

EDIT: Fixed, sorry about that.

Thanks a bunch for your quick aid :slight_smile:

I’ve avoided installing scripts because I could be doing reviews on any of three places.

But this script is great! I want this as a native option.

Thank you! This will probably get me some more errors in the short term as I figure out which cards I need synonyms for… but I keep getting “to join” correct when I write “to suit” like an idiot and it keeps marking me correct, so I really appreciate this. X_x

@Ethan If you are still around, please consider renaming the topic to “Close but no cigar” since that’s how people know it anyways and now it’s impossible to find with the search function. Making a detour via Shotty’s API list to find this topic shouldn’t be necessary.

2 Likes

Looks like @plantron beat me to it.

Number one script for improving your English (spelling).

3 Likes

Is the script broken? No cigar word seems to be accepted.

Oh, [UserScript] WaniKani Double Check 2.0.x seems to break the script, i.e. incompatible.

No Cigar can be activated in Double Check 2.0 simply by

I’ve added the above code to Double-Check now.

:point_right: [v2.0.7] Wanikani Double-Check

  • Added optional support for “Close But No Cigar” mode.
  • (Added hook for compatibility with @polv’s script “WaniKani Disable Default Answers”)

The “Close But No Cigar” mode can be enabled at the top of the script by changing the setting at the top of the script:

    // Shake when slightly off (i.e. "Close, but no cigar" script)
    shake_when_slightly_off: 1,
1 Like

It would be nice if the “But no cigar” script can still ignore difference of whitespaces.
i often type the ‘spacebar’ twice, and this minor difference triggers the slightly-off detector.

1 Like