ttempe / chinese-support-addon

Addon for Anki2 that makes easier to input Chinese, in the spirit of batterseapower’s pinyin-toolkit for Anki1
https://github.com/ttempe/chinese-support-addon/wiki
47 stars 19 forks source link

3rd tone sandhi, resolving other issues of colouring and pinyin generation #25

Closed chinskycraze closed 11 years ago

chinskycraze commented 11 years ago

Hi,

first of all, I'm so glad that someone with the know-how is working on a functional alternative of Pinyin Toolkit. I'm also glad to see some fresh ideas that use the new functionalities of Anki 2.0. That said, I still believe the Chinese Support add-on has a long way to go, especially with regard to the most important feature i.e. pinyin and colour generation:

First of all, (inaccuracies put aside) there's some crucial functions missing from the pinyin and colour generation, notably the 3rd tone sandhi feature known form Pinyin Toolkit. whenever a 3rd tone character preceded another 3rd tone character, the pinyin toolkit would colour it in a light shade of green. I hope you'll consider implementing the feature in your future releases.

Similar option could be introduced for the Characters 不 and 一, which change their tones depending on the next characters. I don't know why, but when I tested the pinyin generation on some phrases, I ended up with 不 in yellow. Sure, it can be pronounced in the second tone (although it's rather unorthodox and somewhat confusing to transcribe it as such in Pinyin) before another character in the 4th tone, but the yellow 不 I got was in the phrase 不打扫, i.e. before a character in the 3rd tone. Curiously, the phrase 打扫 was also rendered as yellow+green, i.e. 2+3rd tone. Not sure if that is intentional to show the pronunciation change of 打 from 3rd to 2nd tone before another 3rd tone character, but it is terribly confusing. If I were new to learning Chinese I might have gotten the impression that 2nd tone is the default pronunciation of 打. On the other hand, 打 is a 多音字, so it might have just been its much much less frequent pronunciation for the meaning of a dozen.

Another, more important issue is that the add-on is not really compatible with the cards generated with the old Pinyin Toolkit. It will time and again try to override the reading field that was generated with the old toolkit but fail resulting in a scrambled pronunciation. This is a serious issue as it can corrupt users' databases.

ttempe commented 11 years ago

Hello, Please create one issue by problem.

ttempe commented 11 years ago

Sorry, I won't add the Tone Sandhi function.

I've thought about it more, and while it's reasonable to Sandhi two consecutive 3rd tones, getting it right in general is much more complex (you mention words that change tone based on the next character. There's no right way to solve that except for manual correction by the user).

The best place to address this issue is in face-to-face lessons with a qualified teacher.

Moreover, it's only correct for one flavor of Chinese (Mandarin), others will have their own particularisms.

If you want to add 3rd tone Sandhi, feel free to make a pull request. (I suggest adding a big regexp in edit_functions, at the end of colorize()). But be sure not to break other dialects.