[Userscript] WaniKani Pitch Info

This is exactly what I was musing about in my head the other day; rising/falling dot diagrams!
Having the potential particle as well is cool.

This would be super awesome!

1 Like

I wish there was a way to get the Mac dictionary on Windows…

1 Like

Okay I’m at the point now where I need to do more research before I continue.

I’m not sure if Invertex has made progress with his original script, my changes are easy enough to incorporate if he returns to this project! Anyway, thanks @Invertex!

I’ll post my version in a few days as there’s still some obvious issues that need to be fixed.

2 Likes

Wow, this looks great!

@nasatitan What do the colors represent? Different color for each number?

Yes, colors represent each number. The description and number are still below with a link to the dictionary.

I’m not sure how useful coloring by numbers is. I’ve watched a few of Dogen’s phonetics videos and he splits them into four groups (with official names) if I remember correctly. He might mention more later, as I said I need to research more. That might be better than following the numbers from a dictionary.

Gotcha. Honestly, I would remove the description below the words. As we’ve mentioned in the thread a few times, it’s actually inaccurate, so it causes more harm than good. With your diagram, you don’t really need the number either in my opinion.

2 Likes

That definitely seems like an ideal solution, what web API are you using to have the correct ones automatically drawn?

I put the Apple dictionary chart into an array. The y axis is the number of kana. And then I use the pitch number you’re pulling from weblio as the X axis.

But it doesn’t take into account compound kana or deficient mora (as per @jjatria’s comment) or any other rules there might be.

I’m keeping track of it on github if you want to try it out, there’s a list of todo and bugs inside the script as well.

https://github.com/blaketrahan/wanikani-pitch-info/blob/master/wanikani-pitch-diagram.js

I removed the description and replaced it with the name of the pitch pattern and kept the link. The colors now correspond to the 平板、尾高、中高、頭高 patterns.

I did not expect to spend my Saturday doing this :sweat_smile::cold_sweat:

2 Likes

Nice work! I just submitted a quick PR to make it only check the length of the first reading, in case multiple readings exist (like what you were seeing for Nine and Seven).

This is very minor, but I find it a bit tricky to read the kana and the pitch graph at the same time. If the high pitch kana were slightly superscripted, or alternatively the low pitch kana were subscripted, it could visually incorporate the pitch information into the kana directly, which is where I have my focus when reading.

For example, imagine this: image

Don’t get me wrong, the graph is very useful. Once I have the basic flow down, I can say it repeatedly to see if it feels like I’m matching that shape.

Slightly unrelated… while I appreciate the information density and typographic simplicity of the red line annotations someone pointed out above, the visual busyness seems to slow down my recognition of the kana.

I think shifting the kana looks terrible. The chart with the dots looks much better.

3 Likes

How would you propose to show the difference between heiban and odaka with that format?

1 Like

It wouldn’t. Apparently, I’m not understanding what I’m seeing. I have to think of the right questions yet.

Alright, I’ve integrated your approach @nasatitan , and created a Github and invited you as Collaborator on it. It should automatically sync pushes done to the Github to the Greasyfork.

I refactored some stuff and made some improvements. It will show two readings now too. The update has been pushed out and should automatically update for users (if not you may need to go into Greasemonkey/Tampermonkey and manually hit update this once.)

a20c7a57763c9a189a09e9cac19e7481

I was thinking this might be useful too, this site shows pitch curves instead of just points, and not just a curve representation of the points but supposedly based off various research into the pitch changes of words.

2 Likes

@Invertex @nasatitan I believe the script still has to be updated to handle digraphs. For example, 遮断機 (しゃだんき) has four mora and drops after the second.

Current Graph:
image

Correct Graph (I think)
image

I don’t have a Mac so I can’t verify this myself, but I think that’s how it should look.

1 Like

That’s correct, I hadn’t taken that into account yet. I am thinking along the lines of your solution of skipping the dot, but I wonder if that’s technically correct, phonetically speaking? Is it more correct to do this for example:

example3

Right now I am collecting all the patterns for all the vocab and storing them into an array (using the weblio part of the script, that is. Not doing this by hand). I would like to manually correct the ones coming up as -1, and you don’t have to parse weblio as well.

1 Like

This is what OJAD gives me for 遮断機

ojad

2 Likes

I believe skipping the dot would be correct. It makes sense to have one dot per mora, plus the extra one for the particle.

Here’s another variation for the diagram, which I think is better than my original one and yours. In this case I put the first dot halfway between the し and the ゃ to show that the dot is for both characters / the entire mora.
image

In the end though, it’s probably best to go with whatever the Mac dictionary does since that’s what you based your diagram on to begin with (though looking at this image, it’s ambiguous which way they do it; some look like my first diagram, and some look like this diagram).


Not having to load from Weblio would be awesome, with the slight downside that the script would miss new vocabulary words. Have you thought about what to do with those cases?

1 Like