Skip to content

alyssabedard/Hanzi2Pinyin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hanzi2Pinyin


Demo of Hanzi2Pinyin

💜 For the Quick Start Guide click here💜
To download the companion Anki note type click here

Description

This Anki add-on lets you add Pinyin and Zhuyin readings above Chinese characters (Hanzi) in any field.

It works by converting your Chinese text into ruby annotations, where the Pinyin appears as small text above the original characters, making it easier to read and study Chinese text.

Why Hanzi2Pinyin when there are other great add-ons?

⚠️ For the ruby annotation to work use this Anki note type made specifically for this add-on.

Read the Anki documentation on Ruby characters.

Looking for the Quick Start Guide? Need help? Want to raise an issue? Looking for documentation? See Contributing & Support

Example
Type Pinyin Zhuyin
Hanzi 你好 你好
Hanzi to Ruby 你[nǐ]好[hǎo] 你[ㄋㄧˇ]好[ㄏㄠˇ]
HTML Code <ruby>你<rt>nǐ</rt></ruby><ruby>好<rt>hǎo</rt></ruby> <ruby>你<rt>ㄋㄧˇ</rt></ruby><ruby>好<rt>ㄏㄠˇ</rt></ruby>
HTML Output
hǎo
ㄋㄧˇㄏㄠˇ

Demo


Demo of Hanzi2Pinyin Demo
⬇️
Demo
Demo with Zhuyin

Demo of Hanzi2Pinyin
Demo Tools settings (macOS)

Demo of Hanzi2Pinyin

Features

  • Pinyin support - Browse editor dialog
  • Pinyin support - Add editor dialog
  • Zhuyin (Bopomofo) support
  • Note Type that supports ruby text for Chinese

Key benefits:

  • Works with any field name of your choosing (No restrictions)
  • Simple and reliable functionality

Planned Features

Status Feature Details
🔄 Bulk add/remove Available in tools menu
🔄 Jyutping and Cantonese Support for Cantonese pronunciation
🔄 Xiao'erjing Support for Arabic-Persian script (also known as Xiaor jin/Xiaojing)

I plan on making additional Chinese language tools that will be released as separate add-ons to maintain simplicity as I prefer single-purpose add-ons.

Why Hanzi2Pinyin when there are other great add-ons?

This add-on focuses on simplicity and flexibility. While many add-ons offer extensive features, they often come with drawbacks:

  • Break when Anki or Qt versions are updated
  • Restrict you to specific field names
  • Bundle multiple features you might not need

Contributing & Support

Type Description
Issues & Requests Bug reports or feature requests
Contributing Fork the repo and submit a PR
Discussions Getting help and questions
Support Support
Quick Start Guide Quick Start Guide
Technical documentation Technical documentation

OS
This script has been primarily tested on macOS and Windows. I currently don't have access to a Linux machine for thorough testing.

Acknowledgements

Libraries

Library Links
jieba PyPi, GitHub
pypinyin PyPi, GitHub

Other

Description Source
Anki SVG logo Glutanimate

加油

Demo of Hanzi2Pinyin