[Userscript] ConfusionGuesser

@Kumirei
1

2 Likes

251446983644938240

Dang, I had a feeling you might know.

1 Like

Kumirei is mom confirmed

1 Like

Those are the ones that come to mind. If I come across any others while catching up I will let you know! Thanks

2 Likes

Version 1.7 patch-notes:

Image radical support

36 of WaniKani’s radicals are represented by images rather than characters. Until now, guesses containing such a radical showed the radical’s name again instead of the symbol. With this update, the radical image is displayed. Furthermore, most of these radicals are mapped to characters that appear in ideographic description sequences (IDS), leading to improved similarity ratings. For example, if I answer with “spring” for the “gladiator” review, I get now:

Spring and Gladiator are both image radicals, and before this update, no guesses were shown in this case. Furthermore, the “𡗗 Spring” guess would instead have displayed “Spring Spring”, and its similarity rating was always 0, pushing it to the bottom of the list.

Joke meaning filter

The WK vocabulary items “四十二” and “国宝” include jokes in the accepted meanings. It can be confusing to get “国宝” suggested as a guess if you wrongly answer with “cage” at some point. Therefore, these two meanings are now filtered.

Text color setting

Added a setting for changing the text color. The setting is located in the “Guess colors” tab of the ConfusionGuesser settings dialog.

"From button color" option

Added the option to set the guess colors to resemble the buttons below the input box on the review page (Wrap Up, Last 10, Item Info…). This is intended for dark mode users to quickly get colors that match the theme. If you are using “Dark Azure 2”, the text color gets set to blue, which might blend in or clash with the background. You can solve this by either changing the text color from blue back to white (or something else), or you can activate the “High contrast mode” in the “Interface” tab, which darkens the background behind the guess list.

If I broke something please let me know.
Link to previous script version for downgrading in case version 1.7 doesn’t work for you

3 Likes

Hi @Sinyaven I wonder if it’s a bug or something, because the script is not appearing in the list of scripts I have installed.

List of scripts


image

I even tried to downgrade to 1.6, but didn’t work either. I miss your script ;-; Is a good one

1 Like

Never mind. It’s suddenly working again! :sweat_smile: :partying_face:

1 Like

I’m glad to hear that it’s working again :slight_smile:

If I’m not mistaken, the screenshots were of the Tampermonkey popup menu that appears when you click the extension icon? I think this list only shows the scripts that run (or could run) on the current website, and considering that the list contains scripts like “Wanikani Heatmap” I assume this list was from the WaniKani dashboard? The ConfusionGuesser script only runs on the review page, so it isn’t supposed to appear in the list on the dashboard.

1 Like

Ohhh, that makes sense. Yeah, was from the dashboard, but I swear I couldn’t see it appear in the list even when I was on the reviews page.

At least it’s working now :+1:

image (reviews page)

2 Likes

Hey, fantastic userscript!!

I just have one small feature request: in the interest of making the display more neat and tidy, could we maybe get an option to disable/hide the “label” part? (i.e. the “丸 ⇔ 九,” “on ⇔ kun,” etc.)

Mousing over could still provide a breakdown of what exactly went wrong, but I feel like 99% of the time, I can already tell what went wrong simply by looking at what’s in the list (at which point, the labels are just visual clutter).

1 Like

Thank you!

Sure, no problem.

Version 1.8 + 1.9 patch-notes:

Added option to hide guess type

The settings menu now contains an option “Show guess types” in the “Interface” tab which allows to hide the guess type (丸⬄九, on⬄kun etc.).

Added hover tip to guesses

Hovering with the mouse cursor above a guess now displays a short description of the guess type (“Visually similar”, “Used on’yomi but needed kun’yomi” etc.).

If I broke something please let me know.
Link to previous script version for downgrading in case version 1.9 doesn’t work for you

1 Like

Awesome, thank you! :slight_smile:

1 Like

New question: what code can I add to the script to blacklist 私, 僕, 俺, and 吾輩?

I commonly type “I” to force an incorrect answer (it’s probably the easiest/fastest vowel for me to type, and typing any consonant instead would result in unresolved kana on reading reviews).

I can’t imagine genuinely confusing these words with anything else, anyway :rofl:

 

Edit 1:
Or, maybe it would be better to just block the script from displaying anything if I only type 1-2 letters, since there might be a long list of other suggestions waiting behind all the pronouns

Edit 2:
Yep, just had い bring up ~位

What exactly is the problem when the script shows guesses even if your input was not intended as a serious answer to the review?

When I created this script, I first had planned to add a filter that removes highly unlikely guesses, but after some considering I came to the conclusion that this would not be beneficial. Even if two kanji are visually completely distinct, there is still a chance that the user has confused them anyway. And I don’t see any harm in sometimes showing superfluous guesses, since the bad guesses should be sorted to the end of the list. And if you know that you don’t need guesses (for example because you entered “i” to signify that you don’t know), you can just ignore them?

If you really hate getting guesses when you enter “i” or “い”, you could search in the script for the lines

function guessForMeaning(answer, question) {

and

function guessForReading(answer, expected, question) {

and add one line after each of them:

	function guessForMeaning(answer, question) {
		if (answer === "i" || answer === "I") return [];

and

	function guessForReading(answer, expected, question) {
		if (answer === "い") return [];

You will have to redo this change every time the script gets updated.

1 Like

Isn’t there another script which lets you fail a card on purpose if you just don’t know it and want the answer? I think it works by entering a long string that would never be correct, iirc.

@Kai_973 seems to already know about that script, but wants a variation of it:

And if you know that you don’t need guesses (for example because you entered “i” to signify that you don’t know), you can just ignore them?

The pop-out is just very attention-grabbing :stuck_out_tongue_closed_eyes:

Thanks a ton!! :slight_smile:

Version 1.10 patch-notes:

Switched to spaced_repetition_systems API endpoint

The spoiler warning feature used the srs_stages endpoint to get the review intervals. This endpoint is now deprecated and gets replaced with the spaced_repetition_systems endpoint, so I updated my script accordingly.

Please let me know if something doesn’t work.
Link to previous script version for downgrading in case version 1.10 doesn’t work for you

1 Like

Hey, thanks for this script~ It’s helped me a fair bit so far^^

But, ConfusionGuesser has seemingly been failing to load for me, like I’ll get an answer wrong and ConfusionGuesser won’t pop up and it isn’t visible in the gear/settings menu.
Web console:


Downgrading to 1.9 appears to have fixed it, I’m using Firefox 79 with Tampermonkey 4.11.6117