Wow, that DID fix it. Thank you!
Where did you find that new version? It was 0.52 but on greasyfork it’s still back on 0.51
Such a small code change and we all good woo~
Ah, yeah it’s just a small hassle to go back to my mouse when I’m controlling the Lessons completely through the keyboard already. Plus it sucks when I honestly do need to go back and refer to the Meaning or Context but if I go back to the Reading the graph is gone
It’s a pity that scripts get abandoned so frequently when their authors leave WaniKani
If you wanted you could put it up on GreasyFork (with an appropriate name that indicates it’s a new and maintained version) and add a thread here to point people to it.
I probably won’t do that for now. When somebody posts on the forums asking about a bug in a script, I often only post a fix if I have already written one for myself, rather than creating a fix in response to the post. I think by posting the code on the forums instead, it’s maybe easier for people to understand that if the script breaks in the future, somebody else might need to fix it, and that even if I do eventually fix it, it will only be when it annoys me enough which might be a long time.
There are also some other things like I don’t know how much script development I will continue to do after I reach level 60, and don’t want to contribute to the problem of more abandoned scripts on Greaseyfork.
Since the upcoming changes to the WK lesson screen will break this script, I have looked into fixing it by letting it use my newly developed WK Item Info Injector library script. But while I was adapting the code, I also noticed that the weblio queries don’t seem to work anymore? Does anyone know where to find the pitch info now? Or was it removed from weblio entirely?
Thank you! And thanks for the heads-up about the part-of-speech special cases. Luckily, this currently affects only 19 WK vocabulary items. Unluckily, already the first of these seems to pose a problem: WK teaches 多分 as adverb and noun, and the accents.txt file says: (名;形動)0,(副)1. So for nouns it’s , and for adverbs it’s . My first idea to address this was to color each word type in the respective color:
but for items like 大事, this won’t work, because they have multiple possible pitch accents per word type: (名)1,3,(形動)0,3. Only relying on colors is probably not the best idea anyway for accessibility reasons. Maybe appending the corresponding numbers behind each word type is better?
Or would that make the interface too cluttered? It seems a bit redundant to have the pitch accent numbers listed below the reading and also in “Word Type” under meaning. And during lessons, the word types are not on the screen at the same time as the pitch accent graph. Although it wouldn’t be hard to also display the “Word Type” in the reading tab.
Aside from that problem, 392 WK vocabulary items are not in accents.txt. I’m wondering if there is an easy way to reduce this number, or if these items should just be left at 不詳 [-1]. Some examples: 〜円 (suffixes marked with 〜), 二万 (numerals), 仕方がない (expressions), 工学者 (compounds), 決定する (する verbs where WK included the する). For the する verbs, would it be correct to look up the word without the する and use that pitch accent?
The script currently inserts links to weblio, but they are not helpful in regards to pitch accent anymore. Should they link somewhere else, like OJAD, which I’ve seen mentioned in this thread? Or should the links be removed?
Originally, I just wanted to modify this script so that it works with the changes to the lessons, but in the end it turned into a complete rewrite of this script. I don’t know what I should do with it now? Is it considered rude to make a pull request that basically replaces the entire code? Should I instead publish it as a new script? But that seems bad because the current script users won’t get the update automatically.
This version only uses the github file suggested by @seanblue. A few hundred WK vocabulary items are missing from this file (see previous post). For する verbs, my script currently looks up the word without the する and use that pitch accent. I’m a bit worried that this might not always be correct.
Screenshots of the new script version
I have added some “settings” to the script (a few variables at the top of the script code, no fancy UI). The radius of the dots and the line thickness can be changed. Digraphs are now not squashed by default, as can be seen in the screenshot for きゅう (but this can also be changed with a setting):
The description below the reading now shows which pitch accent belongs to which word type:
I think if they are in the file you can consider them separate words from a dictionary perspective. I just meant that I think it’s a reasonable assumption that if the する version isn’t in the file that you can just grab the non-する version. If you’re really concerned, add a small disclaimer on the page in those cases.
I’ve noticed a bug whenever I do more than 5 lessons. For the first set of 5 lessons, the script works fine, but when the next set of 5 loads, the script causes my entire WaniKani tab to freeze once I try to see the reading of the first word. This happens every time for me, so I end up having to close the tab and reopen WaniKani each time I want to do 5 more lessons.
I realise the script creator hasn’t been online in a year or two, so I doubt it’ll be fixed. Is anyone else experiencing this problem? It may just be a problem with my set-up so I thought I should ask
I think I have found the bug that you described in my “WaniKani Item Info Injector” library script that “WaniKani Pitch Info” uses. I have fixed it and will create a pull request for “WaniKani Pitch Info” to update to the newest version of “WaniKani Item Info Injector”.