Bỏ qua đến nội dung

Chinese Pinyin Translator Zhuyin Bopomofo Gwoyeu Romatzyh

Chờ xử lý #anki #addon #chinese #pinyin #translator #zhuyin #bopomofo
Unknown
9/11/2018

Cách tải addon Chinese Pinyin Translator Zhuyin Bopomofo Gwoyeu Romatzyh

Bạn có thể tải addon bằng một trong hai cách sau:

Click nút Copy bên dưới để copy code vào clipboard

1792056402

Sau đó mở Anki → Tools → Add-ons → Get Add-ons → Dán code → OK

Mở trang addon trên AnkiWeb và tìm mã code ở cuối trang

Mở trên AnkiWeb

Cuộn xuống cuối trang AnkiWeb, tìm dòng có mã code 1792056402 và copy

4
2

Mô tả chi tiết

Intro: This is a plugin I made to translate premade (shared) Chinese decks with Pinyin fields into different reading formats. I made this because I prefer Gwoyeu Romatzyh, the problem is that there is hardly any material for learning with GR. This add-on supports translating to and from Pinyin, Zhuyin (Bopomofo), IPA, and GR (Gwoyeu Romatzyh). (It will auto-detect the language) This plugin is still in its developmental stage, however, it worked for me, so I want others to be able to use it too. If it fails and you really want to use it, please send me an email and I will update the plugin(addon) to work for your deck. mjaspers [a@t] mtu {d0t.}edu

Use:

  1. Install the plugin

  2. Go to deck browser>Filter>Decks>choose deck

  3. Copy the text in the search bar e.g:“deck:Chinese:: 3000 Hanzi to learn first”

  4. Remove “deck: and ” so, Chinese:: 3000 Hanzi to learn first

  5. Fields…>Add. Make a new field to store the translation for example, name it “Zhuyin”

  6. Take note of the field name with the text you want to translate e.g:Pinyin

  7. Go to the main Anki window and then Tools>Add-ons>this plugin>Config

  8. Change line 1 to the text in step 4 e.g:Chinese:: 3000 Hanzi to learn first

  9. Change line 2 to step 7 e.g:(do not change in this case, it is default Pinyin)

  10. Change line 3 to step 6 (Zhuyin)

  11. Choose the translation language on line 4 eg:zhuyin (not case sensitive)

  12. Click OK to save

  13. Go to deck browser

  14. Notes>Translate Pinyin

  15. If error, change config

  16. If message “done”, then success!

Advanced: You can make an extra field with pinyin, but with numbers instead of accent by changing line 5 to false. If the source field has HTML (eg: <span class=“tone4”>shì</span>), you can keep this or remove it by editing line 6 to true or false. Set to false will replace the string found between > and <, but leave the rest of the HTML. If set to false, you may need to change line 7 to 1 or 2 if you get a translation failed error (otherwise leave 0).

Credits: Thank you tsroten for the python library dragonmapper and zhon to translate pinyin to other formats. I have edited the source of Dragon Mapper to also work with Gwoyeu Romatzyh, as this is was not yet supported. And thank you Yuen Ren Chao and Lin Yutang, for creating Gwoyeu Romatzyh, I have been using it for a while now and it is very nice for learning and remembering Chinese pronunciation. I hope this add-on makes GR more accessible for learners.

Note: I have tested it on Linux and Windows for Anki 2.1 Again, I know this software is full of bugs, and it may not work for your deck configuration. I also understand that the instructions may not be super clear, you can check the source code by going to the add-on folder and viewing init.py with a text editor, as there are some comments that may help. If the add-on does not work, send me a mail and I will fix it for you.


Reviews (6)

👍 2024-08-30

Works in general but fails to convert v to ㄩ

👍 2024-08-08

Worked as intended

👍 2022-08-03

Works in general, but fails for random words (pinyin with marks to pinyin with numbers)

👍 2021-10-20

I love it but can you make some buttons or so to save different configs. Because I use your Add-on First to convert my Pinyin with numbers to the other(don’t know how I should call them) and after that i let it convert my Pinyin to Zhuyin. For that i alwasy go in the config and change it. And I have the problem that words like a, ai, er aren’t able to convert

👍 2021-01-18

Adding all the Bopomofo+IPA+GR fields for multiple decks requires repeatedly open/closing Addons and Configuration but doesn’t require restarting.

The deck must contain ONLY the cards you want to translate. I had a deck of radical and bopomofo cards, and it errored on not finding the Pinyin field on the bopomofo cards: line 117, in translateCatchError tlThis= re.sub(’<[^<]+?>’, ”, note[inputFieldName]) File “anki otes.py”, line 113, in getitem File “anki otes.py”, line 110, in _fie

👍 2020-08-12

it doesnt work