Do You Even Kana? Okurigana Matcher

Never mind I found the problem, will update soon.

EDIT: Okay it should be all set now.

I’ve been waiting for something like this for forever!!

Thanks a bunch Ethan, this will surely take some stress away from my reviews! ^-^

sorry, I messed up the last update stand by…

okay, fixed now. for some reason I changed the sign of the offset in the last update, which was stupid. you wouldn’t have noticed unless you were doing a review with katakana in it (as it would not have paired it with the appropriate hiragana)

Downloading now. Hurrah!

I don’t understand what it does :frowning:
Anyone mind to explain?

Dunedune said... I don't understand what it does :(
Anyone mind to explain?
 Let's say, for example, you are asked the reading of 例えば. And you type たとあば instead of たとえば, you got the difficult kanji bit - たと - right, since the okurigana was clearly in the question, that must have been a typo if you got it wrong, so you get a second chance. :-)

I just installed it (so I assume latest version) and to my great satisfaction I didn’t need it in my 90+ morning reviews, but on the first lesson I tried:
 
(on firefox, browser and greasemonkey are up to date)


It’s surprising how the users are starting to fix WaniKani instead of the owners…hmm

magneac said... I just installed it (so I assume latest version) and to my great satisfaction I didn't need it in my 90+ morning reviews, but on the first lesson I tried:
 ![](upload://nTpEIOiqExbhFvsU5JcMTiMhDC3.png)
(on firefox, browser and greasemonkey are up to date)


 Ill have a look at it tonight. Thanks for the feedback.

@magneac
I had that same problem while doing my lessons using Chrome yesterday. It might have been an earlier version of the script though. I should be up to date now so I’ll see if I still have issues.

Edit: Yeah, it happened again while typing in the meaning during lessons. I got through the first 10 lessons without any issues. The only difference I can think of is that the other vocab words were kana-free jukugo whereas this one was a verb (移る)

EskimoJo said...
Dunedune said... I don't understand what it does :(
Anyone mind to explain?
 Let's say, for example, you are asked the reading of 例えば. And you type たとあば instead of たとえば, you got the difficult kanji bit - たと - right, since the okurigana was clearly in the question, that must have been a typo if you got it wrong, so you get a second chance. :-)
 Oh, that's great, thank you!

I believe I have fixed the issue now.

Sorry, for some reason I thought the lessons use the same “questionType” value, suffice to say they do not.

What the script was doing was looking at the old review question type, seeing that it was ‘reading’ believed the lesson type was reading, parsed 謝る into /^.+る$/ saw that “to apologize” doesn’t match the regex and triggered.

あやま sorry! :stuck_out_tongue:

The update broke the lessons for me :frowning: The enter key reloads the page instead of sending the answer…
I’ve deactivated the script on lessons where it’s not important to get it right on the first try anyway, so it’s not an issue for me anymore, but maybe other users encountered the same thing?
(That said, it has proved very useful in reviews and I’m very thankful for this script :slight_smile: )

magneac said... The update broke the lessons for me :( The enter key reloads the page instead of sending the answer...
I've deactivated the script on lessons where it's not important to get it right on the first try anyway, so it's not an issue for me anymore, but maybe other users encountered the same thing?
(That said, it has proved very useful in reviews and I'm very thankful for this script :) )
Same here!
magneac said... The update broke the lessons for me :( The enter key reloads the page instead of sending the answer...
I've deactivated the script on lessons where it's not important to get it right on the first try anyway, so it's not an issue for me anymore, but maybe other users encountered the same thing?
(That said, it has proved very useful in reviews and I'm very thankful for this script :) )
 I'm also having this issue, except it's affecting my reviews as well. It's also happening with the WK Quick Info script.

I think I found the problem, but for some reason I wasn’t having issues myself.

Let me know if it is fixed now.

I should pay more attention.

I noticed that this doesn’t accept a trailing 'n' if the vocab word ends in a literal 'ん' (it already worked for words ending in kanji because it just uses /.+/ for them). If anyone else wants it, I changed answerChecker.evaluate to:

answerChecker.evaluate = function(e, t) {
    var isLesson = /^http.*:\/\/www\.wanikani\.com\/lesson/.test(location.href);
    var cI = $.jStorage.get(isLesson ? "l/currentQuizItem" : "currentItem");
    var type = $.jStorage.get(isLesson ? "l/questionType" : "questionType");
    if (cI.voc !== undefined && type === "reading" && !kanaMatches(cI.voc, t)) {
        logMutations();
        return { exception: true };
    } else {
        return oldEvaluate(e, t);
    }
}

function kanaMatches(vocab, input) {
    return makeRegex(vocab).test(input.replace(/n$/, "ん"));
}
2 Likes

I’m thinking this script could use an override or “submit anyway” function for cases where we legit don’t remember the correct answer. Without it, the script refuses to let me submit my answer, and I have to resort to looking up the correct value to continue, which defeats the purpose of the review. Perhaps if the user presses enter more than once (or twice), the script should let the answer be submitted?

Probably a little late for you and I’m not sure if I understood your request correctly but here are two scripts that might help:

  • Double Check: for correcting your answers if you made a typo and manually override the right/wrong identification
  • Don’t know Button: adds a ? to the answer bar if you don’t know the answer and it will submit a long string that cannot possibly be correct

Do you mean if you can’t remember the Kana?
eg. That り is ‘ri’ etc?

It should let you submit anything so long as the kana is correct. You should absolutely be able to get things wrong if you mess up the Kanji. Let me know if that’s not the case.