10 3
Sign in to rate

Pinyin on top of Hanzi

10.83MB. Updated 2018-01-31. Only supports Anki 2.1.x.

This item is large, and may take some time to download.

Description

For the source code, the GitHub link. In a nutshell, this addon turns into The way the addon achieves this is really quite simple. At its core is the recent addition of ruby characters to HTML. Here is a part of above example's ruby HTML: <ruby>老师<rt>lǎo shī</rt></ruby>. Because it's pure HTML we can directly add the ruby to one of the note's fields. Make sure to add a field beforehand to your note, as the addon can (currently) only work with existing fields. The addon works whether you already have matching Pinyin. It helps to have matching Pinyin, but the addon is smart enough to generate (usually correct) Pinyin on its own. The interface was designed for ease of use. After installation, to start the Pinyin generation, go to Tools → Chinese tools → Pinyin helper. Then choose the deck, note type, and field with the Hanzi characters. If you already have a field with matching Pinyin, select the first option. The addon will match Hanzi and Pinyin together to the best of its ability. You can preview the output by selecting any one of the Hanzi on the left (from your own cards) and see the matched Hanzi and Pinyin on the right. Make sure to select a field for where the ruby output should go. Here is an example of the addon generating Pinyin when there is no pre-existing Pinyin to match with the Hanzi. The addon goes beyond assigning Pinyin to individual Hanzi, which is error-prone — there are many Hanzi with multiple Pinyin readings. It instead first splits the Hanzi sentence (in which there are usually no spaces) into words, then looks up each word in an internal dictionary. While it may make the occasional mistake it is remarkably adept at assigning the right Pinyin. There is also the option of generating a table of definitions from the internal dictionary: The addon restricts the dictionary entries to match the Pinyin readings, which it finds in the note if you specified a Pinyin field, or generates on its own if you haven't. The dictionary entries are also entirely in HTML, and come with CSS selectors for the word, Pinyin, and definitions columns. Remember to specify another field in the note where the table of definitions will go. This addon would not have been possible without two third-party Python modules. I've used as well as the free Chinese dictionary CEDICT. Everything is bundled in the addon, which explains its large download size. Notes

Download

As add-ons are programs downloaded from the internet, they are potentially malicious. You should only download add-ons you trust.

To download this add-on, please copy and paste the following code into the desktop program:

417709332

If you were linked to this page from the internet, please open Anki on your computer, go to the Tools menu and then Add-ons>Browse & Install to paste in the code.

Other Anki 2.1.x Add-Ons Ask a Question

Reviews

on 1573570534
Doesn't work with traditional characters. What a shame.
on 1572893761
tip if you have text that happens to have spaces between the words in hanzi, if you replace the space with \ this plugin will parse better. i don't think you can find and replace it in anki (you'd have to export, import etc )
on 1571864182
holy crap. this plus wordquery (for j-k-e dictionaries as well as when pinyin on top of hanzi doesn't parse correctly which is RARE), subs2srs decks, morphman (priority.db etc), Search cards based on length, Automatically show answer after X seconds have made learning mandarin very easy and fun! https://massimmersionapproach.com/table-of-contents/anki/morphman/ I'm all for avoiding manually copy pasting and clicking crap 5 billion times!

BE SURE YOU DESIGNATE THE CORRECT FIELD OTHERWISE IT WILL WRITE OVER YOUR HANZI FIELD ETC.

wordquery autohtokey script https://www.reddit.com/r/ChineseLanguage/comments/d054pv/authotkey_scripts_for_wordquery_plugin_in_anki/
on 1569282567
hi this looks like a great addon but because of my stupid mistake i apply this and now my front card has all the pinyin and i cant practice reading them anymore... i only have 1 question, how do i remove pinyin above hanzi? i can manually remove them but i have 2k cards affected by this... is this the only way??
on 1565273718
Great idea, but I found it doesn't work on complicated sentences. A lot of times the add-on gets confused wether a character is related to the character before or after. Also, when I add pinyin to a sentence, some characters just disappear. Would be awesome if we could just select the words we wanted to generate pinyin for in the "Add card" editor!
on 1564248259
Is anyone else here trying to install the anki 2.0 version of this add-on that is found in the Github link above?

I don't know whether the interface is different with this version, or if I am simply not installing it correctly when I manually put the file into the add-on folder.

Any help would be much appreciated...
on 1555020501
It's the most useful Chinese addon available.
on 1541414364
Works really well!
on 1535166333
Love it!
on 1525305600
Thank you for the Add-on, but I am not able to download it. Error message:

"Download failed: Error downloading: 404"

I am able to install other add-ons though. Could you please take a look? Thank you so much!
on 1525046400
Haven't tried this yet, seems like a GOD idea.
on 1518220800
Addon is quite useful. Much more aesthetic than separate fields.
Though in my opionion the pinyin should not written to the hanzi field, but instead still added as separate pinyin field.
This way you can train to read the hanzi.
The addon allows this. But maybe the default configuration or the documentation should mention this.
Also, better have a working backup before applying the update, the hanzi fields get overrridden.
on 1517529600
Really cool!

I don't use Anki for learning Chinese, but I'll definitely be recommending this add-on to other users. Great job!

– G