[Userscript] WaniKani Pitch Info

As a result of the discussions in this thread, I made a userscript that displays the pitch type for a given vocabulary reading. The data has been automatically generated from results on http://www.weblio.jp and will auto-lookup any new ones WaniKani may add in the future.



A userscript app for you given browser, tested working with:

Tampermonkey (Most Browsers, Preferred)


TODO List:

-Check if pitch info is different for secondary readings and display it
-Handle checking for contextual pitch info
-Look into Greasemonkey compatibility issues

—(Maybe) Implement some more colorful/visual modifications of the readings themselves instead of just a description. Done! Big thanks to nasatitan for programming this visual representation of pitch.

-(Maybe) Give occasional knowledge about general pitch rules.
-(Maybe) Option to require writing the correct tone number in your answer.


Pitch-Accent Awareness Corner
About the voice actor and pitch
Userscripts on Android (Browser)
How long do you take on lessons?
Both "municipal" and "private" are pronounced "shiritsu". How does this not cause a lot of confusion?
WaniKani New Audio Update: Part 1
Japanese Pronunciation
[iOS] Tsurukame - native app with offline lessons and reviews
Worried about my accuracy?
On'yomi focus?
What do you use to learn pitch accent?
How do you practice pronunciation?
Favorite or Must Have Scripts and Apps?
The New And Improved List Of API and Third Party Apps
Powerpunching my way to the golden badge! (AKA my level 60 thread)
Writing kanji - what resources do you use?
[Userscript] WaniKani Context
Pitch/accent on word/kanji readings
Do you write down Wanikani lessons?
How do I get the most out of WaniKani?
[Android] Flaming Durtles - Android app with offline support
What do you want now? (Request extensions here)
How do people tell apart the different kanjis' on'yomi readings?
[Android] Flaming Durtles - Android app with offline support
Wanikani Dark Azure 2 Theme
Wanikani Dark Azure 2 Theme
Pitch accent in japanese
Pitch accent of Kenichi
How much do you pay attention to 高低アクセント?
My Journey of 368 days (+ The Ultimate Guide for WK :open_book: )
Pitch accent of Kenichi
The Lv60 Instrumentality Project
Telling apart the meanings behind 写るand 写す?
Doing 7 levels in a month
The long and winding immersion path to WaniKani level 60
Useful Add-ons for a beginner
Pitch accent on vocab
Add Pitch Accent Guide
Pitch Accent and Vocab Pronunciation
Wondering how you would memorize the pitch of a kanji? There is the sound of the kanji and also the pitch graphic
Fallynleaf's study log
No audio in lessons or reviews
I Can't Get The Subscription
Before the Basics -- Advice for Distinguishing Pitch?
This is a certified "Level 60" classic
Wanikani screenshots :camera_flash:
Wanikani screenshots :camera_flash:
Looking for pronounciation resources
[iOS/Android/Windows] Jakeipuu
After 2 Years, I'm finally at Lvl.60
Fallynleaf's study log
人工 vs 人口 (homophones?)
[Unsupported] App Store script
I am the Kanji Master™ (Lv 60 self-indulgement post)
List of very useful scripts that are no longer?!
Pronounciatian of certain Kanji
[Userscript] Wanikani Katakana For Onyomi
Wanikani screenshots :camera_flash:
Does anyone here study the pitch accent as well?
Some questions - Not Sure WaniKani is for me
Effectively Including WaniKani in Japanese Language Studies
Pitch Accents? Where did these come from..?
The New And Improved List Of API and Third Party Apps
Wanikani screenshots :camera_flash:
Must have scripts?
[iOS] Mobile AlliCrab for WaniKani
ロウェナの学習ログ・(Rowena's Study Log)
Trial Period Graduation
Who Wants to Challenge Me to a Race?
I just became a subscriber ! But I just saw a video that threw me a bit off
An overdue level 60 post
The Most Interesting Thing
I'm level 29 and I just now noticed this
Let's praise these USERSCRIPTS and their awesome CREATORS
WaniKani Routine Thread
Level 60! Double Cake Day!
Sum up your recent WaniKani Review sessions with a short clip/gif

[quote=“seanblue, post:54, topic:18721”]
@Invertex It might make sense to create a dedicated forum topic for your script for feedback and updates. My only suggestion at the moment would be to also include the raw number from Weblio, in addition to your description of the number’s meaning.[/quote]
Done :smiley:
And will do for the next update.

I had some conflicting information on this, but looking into it further I seems mora is the most used term so I’ll switch to that, thanks.

No I’ve not, but I will for sure!

Pushed out new update, 0.17, it should fix that issue, but with it new bugs may be introduced due to unknown edge-cases with how weblio formats their results. I already caught a couple, hopefully shouldn’t be any other but keep an eye out!

Also now displays the pitch value and uses mora instead of moji.

1 Like

This is the best thing ever, thank you so much! I was already wondering what would be the best way to incorporate pitch accents into my learning since I wanted to get this information into my head as soon as possible.

I may be wrong (since I’m a beginner and have no experience with pitch accents) but I just installed 0.17 and I think the bug that was mentioned before still exists (or a similar one).
For example:
「父(ちゃん)」の意味や使い方 わかりやすく解説 Weblio辞書
Pitch starts low, stays high for 2 mora, ends low. [2]


edit: Nvm, it seems correct.

ちち [2] [1] 【父】

親のうちの,男の方。実父・継父・養父の総称。 ↔ 母 「二児の-となる」

新しい物事の開拓者。先駆者。また,偉大な貢献をした人。 「近代経済学の-」 「独立の-」


Should I be using the second number out of those two numbers or something? Or should I be displaying both in some way?

I believe you should be showing both. This means that they are both valid pitches.

1 Like

I don’t see the pitch info.

That’s weird @netpapa , the script is working correctly for me here.

1 Like

Spotted this item that came up with having no pitch accent found, likely because there are two possible readings, I’m guessing. The handy link you included in the number gives the information on the Weblio page however.

Nice job on the script so far :smiley:

1 Like

Alright, implemented it in the latest version, 0.18! Thanks.

Also, does anyone know of any words that might have more than 2 acceptable pitches? I hard coded it for two since it was simpler but if there is the possibility of a word having more than two I’ll make it dynamic.

Hmm, well I guess I should add that my script is programmed in TamperMonkey. So it could be my script has issues with Greasemonkey? Could you give TamperMonkey a try and see if it works? It supports most browsers.

Thanks, I’ll have a look into it!

I don’t offhand, but I did find another case with two pitches that is interesting. It’s a more complicated case, where the pitch accent depends on the part of speech.

When used as a noun or na-adjective, it seems that 多分 has a pitch accent of [0]. But when used as an adverb, it has a pitch accent of [1].

1 Like

Alright, fixed that! Indeed, it was because of the two readings so it was breaking the string matching.

Hrmm interesting, yeah I had seen a few pages like that but didn’t know enough to interpret them. I guess I’l have to add that to a TODO list, as that will be a bit more of an undertaking to create handling for.

1 Like

I haven’t tried the script so far, but it looks like a welcome addition!

What I would change is the way information is displayed. In a related (now defunct?) thread I made the following proposal:

If what you have is a number, then one way to do this would be to split the word into kana, and apply the relevant style to the appropriate character. The one thing that might be tricky is that compound kana should be treated as one.

It might be helpful to know that so-called “defficient” mora (long vowels, ん, and the small っ) cannot bear the accent (but are still counted).

1 Like

Yeah, and I just found an even better one. Two parts of speech, one has two valid pitches and the other has one.

1 Like

Why does this strike you as wrong? Is it because it adds up to 3 mora? This includes any attached particles.

EDIT: oh you mean the description. Yeah… A 2 mora character can’t start low, stay high for 2 and the go low. It would start low, go high, then go low for the attached particle

Thanks for this!

So I was curious to look up the pitch accent on 当たり and 辺り. 当たり starts low, ends high, and 辺り starts high ends low. But the audio on WK totally doesn’t match (at least to me). 辺り sounds like it starts low, goes high, then goes in the middle (is that even a thing?) and 当たり sounds like it goes from high to low. Is this just my imagination? I am pretty confused now. :confused:

1 Like

I was thinking that the right part of the picture would be the best way to display this. It’s not obvious how it should work for words that have more than one valid pitch though.

So just to make sure I understand, a word like がっこう has four mora, but such a word could not downstep on the っ or う? However, digraphs count as a single mora, so かいしゃ has three mora, right?

Thanks :blush:

1 Like

That was the first one I had looked up as well and was confused, so instead I went and listened to other vocab and most others seemed to match the pitch info. I think the case might just be whoever did the recordings has some pitch influence from their own region of Japan?

Cool :slight_smile:

The idea I’m suggesting has a similar feel actually to this extension. This extension points out not only when a Kanji has a certain (on’yomi) pronounciation, but also points out when its a Rule or an exception for that radical, so you can learn the rules from it. WaniKani Phonetic-Semantic Composition for Greasemonkey

Of course that extension is teaching on’yomi, whereas yours is teaching pitch accent so its different, but the way-of-teaching could be similar.

Thanks, it works in TamperMonkey.

1 Like