twighk / tghz-word-tone-annotator

A Microsoft Word add-in for adding tone graphs, pinyin or zhuyin to Hanzi(汉字).
https://twighk.github.io/tghz-word-tone-annotator/
9 stars 1 forks source link

Adding pinyin causes duplication of characters #13

Closed MichaelNZ85 closed 4 years ago

MichaelNZ85 commented 4 years ago

After much hassle about the trusted source, I managed to install the program. However, when I selected some Chinese text (traditional), it added pinyin but duplicated most of the characters (some were even copied twice!) What's more, some of the duplicated characters were romanised with another reading (大 was romanised as dai the second time instead of da).See image below.

Annotation 2019-11-17 020848

twighk commented 4 years ago

Sorry this is intended behavior. It does it because it doesn't know which reading you want, so it lists most of them (if you add tones instead, it puts multiple tones above the same character). For Pinyin once it's added duplicates, you can go through the text deleting the ones that you don't want. You can give it readings to use by default by using the edit dictionary button to add words.

The way it works is it searches through the dictionary for the longest string of characters it can find, and then puts in all the readings. For example at the start the longest it can find is 大, which has two readings, da4 and dai4(as in the word 大夫).

The duplication of the character 佛 fu2 looks like a bug, but i don't have the tools to fix them any more.

Sorry about the hassle about the trusted source, is there any way i can make the instructions clearer for that?