Japanese Pitch Accent (Anki add-on)
フラットです
I wanted my Anki cards to display the pitch accent of words, so I wrote a plugin that automatically adds that information. Some noteworthy points:
- I kind of don’t like the types of pitch annotations that draw lines within the kana rendition of a word, like た|しゅ|み, or that only indicate the downstep. For my add-on I chose a style like the 大辞林 dictionary and Dogen use. Circles connected by lines where (1) each circle shows the pitch of one mora (i.e. if two characters make up a 拗音, they are grouped together) and (2) the pitch of the mora following the word is also shown.
- The pitch illustrations are added to cards as SVG, making them customizable via CSS, more lightweight than pixel graphics, and part of the Anki cards themselves rather than embedded media.
- The pitch information is taken from Wadoku, who permissively share their dictionary data.
- Looking for a suitable data source was a great way to learn about different pitch accent annotation schemes (see notes in my Wadoku parsing script).
If you have some use for it: here’s the plugin and here’s the code. In case you have a use for SVG pitch accent illustrations outside of Anki or just want to play around a bit here’s an online version.