Anki add-on: Japanese Pitch Accent

—————<[ P U R P O S E ]>————— Automatically adds pitch accent information to cards. —————<[ B A S I C U S A G E ]>————— ① Tools → Pitch Accent → bulk add ② Choose a deck ③ Select a note type (is skipped if whole deck is one note type) ④ Select the field containing the Japanese expression ⑤ Select the field containing the reading ⑥ Select the field to which the pitch accent info will be added ⑦ Done Result —————<[ A D D I T I O N A L F E A T U R E S ]>————— Add, edit, or remove pitch annotations of single cards with the card editor's pitch accent buttons. Annotations sync to mobile (e.g. AnkiDroid) as well as AnkiWeb Annotations are customizable via CSS Example usage: svg.pitch { height: 150px; width: auto; } svg.pitch text { font-weight: bold !important; } svg.pitch > path { stroke: #fa7 !important; } svg.pitch > circle[r="5"] { fill: #fa7 !important; } svg.pitch > circle[r="3.25"] { fill: #cf9 !important; } If you’re using night mode , use the following style to invert the pitch accent color. .nightMode svg.pitch { filter: invert(1); } —————<[ L I M I T A T I O N S ]>————— ① Does only support words (and some expressions), but not whole sentences. ② If the field in a card with the Japanese expression contains additional text, pitch accent lookup might fail (e.g. “<数字>頭” in a card for the counter of large animals). ③ When an expression has several possible readings (e.g. 汚れ) the script tries to determine which one is used by inspecting the reading field of the card. This does not always work. —————<[ M I S C ]>————— Code Issues & Suggestions —————<[ C H A N G E L O G ]>————— 2023/05/07 -- Added function to automatically set single pitch. Made add-on Qt6 compatible. Various stability, performance and UI improvements. 2022/03/26 -- Fixed bugs concerning functionality to manually add/edit/remove annotations. (Thanks kclisp) 2022/01/23 -- Updated pitch accent DB (from roughly 100k to 200k entries). 2021/08/22 -- Added cancel buttons to selection dialogs. 2021/01/26 -- Added support for successive bulk adding of annotations to different fields of notes. 2020/10/05 -- Added functionality to manually add/edit/remove annotations. 2020/08/02 -- Made code compatible with new Anki 2.1.29 DB schema. 2019/09/22 -- Added support for multiple note types within a single deck.

GitHub repository: illdepence/anki_add_pitch_plugin
Repository description: Anki addon to automatically add pitch accent information to cards.
Languages: Python, Makefile