<p>I have written some software that does, this <a href="https://code.google.com/p/tghz-word-tone-annotator/" rel="nofollow">https://code.google.com/p/tghz-word-tone-annotator/</a> . It is however a Microsoft word add-in.</p>

CC BY-SA 3.0
2013-05-14T15:47:36.770Z
Any Feedback would be much appreciated ^_^.
Twig
CC BY-SA 3.0
2013-05-14T15:31:09.230Z
2013-05-14T16:33:55.020Z
2013-05-14T16:33:55.020Z
Twig
<p>Check <a href="https://www.purpleculture.net/chinese-pinyin-converter/" rel="nofollow noreferrer">https://www.purpleculture.net/chinese-pinyin-converter/</a>, this tool can add tone numbers only</p>

CC BY-SA 3.0
2018-04-22T20:56:20.030Z
Yeah, I've also found that tool, which is a lot easier to use. :)
Olle Linge
CC BY-SA 3.0
2018-04-03T06:51:39.043Z
2018-04-03T06:51:39.043Z
Thomas
<p>I'm not quite sure what your question actually is. Do you want to know how:</p>

<ol>
<li>to better teach Chinese tones? (cram specific tone recall quizzes)</li>
<li>to automate adding pinyin with diacritical marks to your text? (google, find e.g. <a href="http://annotator.jiang-long.com" rel="nofollow noreferrer">annotator.jiang-long.com</a>)</li>
<li>to use Ruby annotations in your typesetting environment? (which?)</li>
</ol>

<p>If you use LaTeX, see e.g.: <a href="https://tex.stackexchange.com/questions/4448/tone-marks-above-chinese-characters-in-latex">https://tex.stackexchange.com/questions/4448/tone-marks-above-chinese-characters-in-latex</a></p>

<p>You might also try combining Unicode characters with the program of your choice: <a href="http://en.wikipedia.org/wiki/Combining_character" rel="nofollow noreferrer">http://en.wikipedia.org/wiki/Combining_character</a></p>

<p>The easiest solution to getting the tone marks out of pinyin is to use Regular Expressions. I have written a Javascript bookmark for you, which works with <a href="http://annotator.jiang-long.com" rel="nofollow noreferrer">annotator.jiang-long.com</a>:</p>

<pre><code>javascript:(function(){var e,es,i;es=document.getElementsByTagName("acronym");for(i=0;e=es[i];i++){e.innerHTML=e.innerHTML.replace(/\w*[āɑ̄ēīōūǖĀĒĪŌŪǕ]\w*/g,' ˉ ').replace(/\w*[áɑ́éíóúǘÁÉÍÓÚǗ]\w*/g,' ˊ ').replace(/\w*[ǎɑ̌ěǐǒǔǚǍĚǏǑǓǙ]\w*/g,' ˇ ').replace(/\w*[àɑ̀èìòùǜÀÈÌÒÙǛ]\w*/g,' ˋ ');}})();
</code></pre>

<p>And an advanced version using XPath which also takes care of toneless pinyin:</p>

<pre><code>javascript:(function(){var i,t,ts,e,at;at=parseInt(prompt("Which row is the pinyin in?",1))-1;ts=document.querySelectorAll( 'table.textblock' );for(i=0;t=ts[i];i++){e=t.querySelectorAll('acronym')[at];e.innerHTML=e.innerHTML.replace(/\w*[āɑ̄ēīōūǖĀĒĪŌŪǕ]\w*/g,' ˉ ').replace(/\w*[áɑ́éíóúǘÁÉÍÓÚǗ]\w*/g,' ˊ ').replace(/\w*[ǎɑ̌ěǐǒǔǚǍĚǏǑǓǙ]\w*/g,' ˇ ').replace(/\w*[àɑ̀èìòùǜÀÈÌÒÙǛ]\w*/g,' ˋ ').replace(/[^ˉˊˇˋ ]+/g,' · ').replace(/ /g,'&amp;nbsp;');}})();
</code></pre>

<p>Just create a new bookmark and past the Javascript as URL. It replaces any word containing an āíěòū etc. with the respective tone mark.<br>
I picked <a href="http://annotator.jiang-long.com" rel="nofollow noreferrer">annotator.jiang-long.com</a> totally at random; you may need to adjust the code if you want it to work with your favorite annotator webservice.</p>

<p><strong>Update</strong>: convert pinyin without tonemarks into dots</p>

CC BY-SA 3.0
2014-01-01T22:07:40.573Z
didn’t work for me, worked better when I replaced

'table.textblock'

with

'div.textblock'

but it shows extra neutral tones: http://www.webpagescreenshot.info/img/52c49032495861-48514210
Kai Carver
CC BY-SA 3.0
2017-07-17T00:17:52.297Z
Olle's link is now: http://www.hackingchinese.com/adding-tone-marks-wo-pinyin-above-characters-to-practise-tones/
Kai Carver
CC BY-SA 3.0
2013-04-20T01:48:35.397Z
Thanks for the reply, but I think my description above is fairly accurate? I want to add tone marks (not pinyin, not anything else) above characters in a line of text. That's it.

1) Yes, that's the goal. But it's NOT for cramming or recall or any kind of quizzes, but for reading.

2) I don't want the Pinyin, that would defy the purpose since students would then read the Pinyin and not the characters.

3) Yes, that's what I think most people are doing, but I was looking for an alternative to adding all the diacritics manually. All automated versions I've seen have included Pinyin/Zhuin too.
Olle Linge
CC BY-SA 3.0
2013-04-20T10:31:56.567Z
@Olle Linge What is your typesetting environement? LaTeX? Word? HTML? InDesign?
Jens Jensen
CC BY-SA 3.0
2013-04-21T05:55:27.713Z
Mostly Word or OpenOffice, but I have limited experience of InDesign as well. No LaTeX though.
Olle Linge
CC BY-SA 3.0
2013-04-23T08:56:05.687Z
@Olle Linge: I don't do Office scripting, so I wrote you a Javascript which you can use with the annotator service I googled.
Jens Jensen
CC BY-SA 3.0
2013-04-24T02:25:58.670Z
And it works! Thank you so much! Is it okay with you if I share this (along with the motivation as to why I want to do it) in a blog post? I will of course give you credits. I know other people are interested in doing this.
Olle Linge
CC BY-SA 3.0
2013-04-24T08:52:41.683Z
Feel free to do so, getting knowledge out to people is the purpose of Stackexchange after all =)
Jens Jensen
CC BY-SA 3.0
2013-05-08T09:47:38.020Z
I just noticed that it doesn't seem to handle neutral tones very well (it doesn't do anything). I suppose this is trickier to do, but is it possible to simply remove everything for syllables that have neutral tones?
Olle Linge
CC BY-SA 3.0
2013-05-09T14:25:14.073Z
I changed the Javascript so neutral tones are displayed as dots.
Jens Jensen
CC BY-SA 3.0
2013-05-10T07:26:44.417Z
I think something broke when you updated the code. The old version works fine, but not the new one.
Olle Linge
CC BY-SA 3.0
2013-05-10T12:54:26.953Z
The new version works for me in Chrome 23 and Firefox 19. What browser are you using? Do you get any messages on the Javascript console?
Jens Jensen
CC BY-SA 3.0
2013-05-11T03:50:03.253Z
The first code snippet works well and generates this result: https://www.dropbox.com/s/h9c9zvlk2iwcqjd/version1.png

The second one replaces all characters with dots, it looks like this for me: https://www.dropbox.com/s/le0dtq4p150hbz4/version2.png

I'm using Firefox 20 on Ubuntu.
Olle Linge
CC BY-SA 3.0
2013-05-11T23:16:55.057Z
I added a prompt to choose which row of annotation to substitute. If you only display hanzi and pinyin you should choose "1".
Jens Jensen
CC BY-SA 3.0
2013-05-12T13:41:40.740Z
It works fine now, thanks a lot! I published an article about why I think this is useful here (including how to do it, of course): http://www.hackingchinese.com/?p=3738
Olle Linge
CC BY-SA 3.0
2013-05-12T16:37:28.110Z
Thanks for putting my Stackexchange link in, you can also see http://stackoverflow.com/questions/4003524/latex-question-accents-on-characters , and the program useing this is http://code.google.com/p/hanzi2tghz/ .
Twig
CC BY-SA 3.0
2013-04-19T09:26:49.370Z
2013-05-11T23:11:52.040Z
2017-04-13T12:36:12.587Z
Jens Jensen
<p>I'm looking for a way of adding tone marks above characters. It's fairly easy to add Pinyin with tone marks, but I want to add only tone marks. I want to use this as a teaching tool, because even though most students don't have a big problem with the syllables, they do need to focus more on tones. Thus, adding the tone marks would mean that students can focus on the characters while still being able to see the tones if they need to and focus on them more.</p>

<p>Right now, I have to do this manually, which is quite tedious. However, I'm guessing that there might be a way of doing this automatically. Perhaps there are fonts that display the tone diacritic next to the character? The problem would be characters with multiple readings, of course, but perhaps there is a way around that. Does anybody know of any other way of adding tone marks above characters without having to do it manually?</p>

<p>This is done both in Practical Audio-Visual Chinese and New Practical Chinese Reader (can't remember exactly where it begins and where it stops, though), but I think they've done it manually using some kind of typesetting tool. The best solution would probably be to use Ruby annotation and somehow get rid of the Pinyin/Zhuyin and get only the tone mark. I don't know if that's possible, though.</p>

CC BY-SA 3.0
2013-04-16T17:51:06.843Z
I have been teaching my daughter Mandarin for 6 years. First I taught her pinyin. When she was able to read pinyin correctly, then I helped her read simple stories with pinyin (with tone marks) on each character. Now she can read stories to me without pinyin on characters. I have been learning English for more than 20 years, and my English is still far cry from close to native speakers. So from the 2 cases I mentioned above, I can draw a conclusion that the most effective easiest way to learn a foreign language is to following the way how you learn your own mother language.
孤影萍踪
CC BY-SA 3.0
2013-04-16T18:06:02.583Z
Back to your question, I think you need to get your students able to read pinyin correctly, then give them texts with pinyin on each character. When they have mastered enough basic characters (100~200 maybe), then give them texts without pinyin. I don't know any tools which can put tone marks only on characters. One thing to consider: some characters are polyphones (probably different tones), and the tool, if any, won't know which tone mark to choose. If wrong tone marked on characters, it will mislead or cause confusions.
孤影萍踪
CC BY-SA 3.0
2013-04-17T02:38:04.927Z
The reasons why I want to do this are slightly complicated, but since this is what several textbooks actually do (Practical Audio-Visual Chinese, and New Chinese Practical Reader, for instance), I'm not alone in thinking that this is a good idea.

The thing is that if you have Pinyin next to the characters, it's hard for people used to the Latin alphabet to read the characters at all. Students eyes focus automatically on the Pinyin. This is not good.

Adding only tone marks offers the support the students need without making them read the Pinyin instead of the characters.
Olle Linge
CC BY-SA 3.0
2013-04-17T02:39:33.557Z
Regarding 破音字, that isn't necessarily a big problem. Choosing the most common tone would solve most problems and checking the rest manually would still be much quicker than adding each mark manually. Also, if the tool checked against any dictionary, most 破音字 could be sorted out.
Olle Linge
CC BY-SA 3.0
2013-04-19T22:19:40.407Z
@OlleLinge also consider, I find numerical tones much more easy to remember than graphical tones. I stopped learning with graphical accents. I use numbers now. Probably because of visual memory. But intimately, I personnally think it's because the impact of the number that is bigger visually than a little ` or the other accents, that can be confused.
Stephane Rolland
CC BY-SA 3.0
2013-04-20T01:45:48.447Z
Going with numerals might be the best option. Apart from the fact that some learners (including you and me) seem to think that they are easier to remember, they are also easier to see and much easier to produce.
Olle Linge
<characters><tones>
Adding tone marks to characters
# Adding tone marks to characters

(Asked by: username_0 on 2013-04-16)

I'm looking for a way of adding tone marks above characters. It's fairly easy to add Pinyin with tone marks, but I want to add only tone marks. I want to use this as a teaching tool, because even though most students don't have a big problem with the syllables, they do need to focus more on tones. Thus, adding the tone marks would mean that students can focus on the characters while still being able to see the tones if they need to and focus on them more.

Right now, I have to do this manually, which is quite tedious. However, I'm guessing that there might be a way of doing this automatically. Perhaps there are fonts that display the tone diacritic next to the character? The problem would be characters with multiple readings, of course, but perhaps there is a way around that. Does anybody know of any other way of adding tone marks above characters without having to do it manually?

This is done both in Practical Audio-Visual Chinese and New Practical Chinese Reader (can't remember exactly where it begins and where it stops, though), but I think they've done it manually using some kind of typesetting tool. The best solution would probably be to use Ruby annotation and somehow get rid of the Pinyin/Zhuyin and get only the tone mark. I don't know if that's possible, though.

**Tags:** characters, tones

> **Comments:**
> **username_1**: I have been teaching my daughter Mandarin for 6 years. First I taught her pinyin. When she was able to read pinyin correctly, then I helped her read simple stories with pinyin (with tone marks) on each character. Now she can read stories to me without pinyin on characters. I have been learning English for more than 20 years, and my English is still far cry from close to native speakers. So from the 2 cases I mentioned above, I can draw a conclusion that the most effective easiest way to learn a foreign language is to following the way how you learn your own mother language.  
> **username_1**: Back to your question, I think you need to get your students able to read pinyin correctly, then give them texts with pinyin on each character. When they have mastered enough basic characters (100~200 maybe), then give them texts without pinyin. I don't know any tools which can put tone marks only on characters. One thing to consider: some characters are polyphones (probably different tones), and the tool, if any, won't know which tone mark to choose. If wrong tone marked on characters, it will mislead or cause confusions.  
> **username_0**: The reasons why I want to do this are slightly complicated, but since this is what several textbooks actually do (Practical Audio-Visual Chinese, and New Chinese Practical Reader, for instance), I'm not alone in thinking that this is a good idea.  The thing is that if you have Pinyin next to the characters, it's hard for people used to the Latin alphabet to read the characters at all. Students eyes focus automatically on the Pinyin. This is not good.  Adding only tone marks offers the support the students need without making them read the Pinyin instead of the characters.  
> **username_0**: Regarding 破音字, that isn't necessarily a big problem. Choosing the most common tone would solve most problems and checking the rest manually would still be much quicker than adding each mark manually. Also, if the tool checked against any dictionary, most 破音字 could be sorted out.  
> **username_2**: @OlleLinge also consider, I find numerical tones much more easy to remember than graphical tones. I stopped learning with graphical accents. I use numbers now. Probably because of visual memory. But intimately, I personnally think it's because the impact of the number that is bigger visually than a little ` or the other accents, that can be confused.  
> **username_0**: Going with numerals might be the best option. Apart from the fact that some learners (including you and me) seem to think that they are easier to remember, they are also easier to see and much easier to produce.  

---

## 3 answers

### Answer by username_5 on 2013-04-19. Score: 4 | Accepted answer

I'm not quite sure what your question actually is. Do you want to know how:

to better teach Chinese tones? (cram specific tone recall quizzes)
to automate adding pinyin with diacritical marks to your text? (google, find e.g. annotator.jiang-long.com)
to use Ruby annotations in your typesetting environment? (which?)

If you use LaTeX, see e.g.: https://tex.stackexchange.com/questions/4448/tone-marks-above-chinese-characters-in-latex
You might also try combining Unicode characters with the program of your choice: http://en.wikipedia.org/wiki/Combining_character
The easiest solution to getting the tone marks out of pinyin is to use Regular Expressions. I have written a Javascript bookmark for you, which works with annotator.jiang-long.com:
javascript:(function(){var e,es,i;es=document.getElementsByTagName("acronym");for(i=0;e=es[i];i++){e.innerHTML=e.innerHTML.replace(/\w*[āɑ̄ēīōūǖĀĒĪŌŪǕ]\w*/g,' ˉ ').replace(/\w*[áɑ́éíóúǘÁÉÍÓÚǗ]\w*/g,' ˊ ').replace(/\w*[ǎɑ̌ěǐǒǔǚǍĚǏǑǓǙ]\w*/g,' ˇ ').replace(/\w*[àɑ̀èìòùǜÀÈÌÒÙǛ]\w*/g,' ˋ ');}})();

And an advanced version using XPath which also takes care of toneless pinyin:
javascript:(function(){var i,t,ts,e,at;at=parseInt(prompt("Which row is the pinyin in?",1))-1;ts=document.querySelectorAll( 'table.textblock' );for(i=0;t=ts[i];i++){e=t.querySelectorAll('acronym')[at];e.innerHTML=e.innerHTML.replace(/\w*[āɑ̄ēīōūǖĀĒĪŌŪǕ]\w*/g,' ˉ ').replace(/\w*[áɑ́éíóúǘÁÉÍÓÚǗ]\w*/g,' ˊ ').replace(/\w*[ǎɑ̌ěǐǒǔǚǍĚǏǑǓǙ]\w*/g,' ˇ ').replace(/\w*[àɑ̀èìòùǜÀÈÌÒÙǛ]\w*/g,' ˋ ').replace(/[^ˉˊˇˋ ]+/g,' · ').replace(/ /g,' ');}})();

Just create a new bookmark and past the Javascript as URL. It replaces any word containing an āíěòū etc. with the respective tone mark.
I picked annotator.jiang-long.com totally at random; you may need to adjust the code if you want it to work with your favorite annotator webservice.
Update: convert pinyin without tonemarks into dots

> **Comments:**
> **username_0**: Thanks for the reply, but I think my description above is fairly accurate? I want to add tone marks (not pinyin, not anything else) above characters in a line of text. That's it.  1) Yes, that's the goal. But it's NOT for cramming or recall or any kind of quizzes, but for reading.  2) I don't want the Pinyin, that would defy the purpose since students would then read the Pinyin and not the characters.  3) Yes, that's what I think most people are doing, but I was looking for an alternative to adding all the diacritics manually. All automated versions I've seen have included Pinyin/Zhuin too.  
> **username_5**: @username_0 What is your typesetting environement? LaTeX? Word? HTML? InDesign?  
> **username_0**: Mostly Word or OpenOffice, but I have limited experience of InDesign as well. No LaTeX though.  
> **username_5**: @username_0: I don't do Office scripting, so I wrote you a Javascript which you can use with the annotator service I googled.  
> **username_0**: And it works! Thank you so much! Is it okay with you if I share this (along with the motivation as to why I want to do it) in a blog post? I will of course give you credits. I know other people are interested in doing this.  
> **username_5**: Feel free to do so, getting knowledge out to people is the purpose of Stackexchange after all =)  
> **username_0**: I just noticed that it doesn't seem to handle neutral tones very well (it doesn't do anything). I suppose this is trickier to do, but is it possible to simply remove everything for syllables that have neutral tones?  
> **username_5**: I changed the Javascript so neutral tones are displayed as dots.  
> **username_0**: I think something broke when you updated the code. The old version works fine, but not the new one.  
> **username_5**: The new version works for me in Chrome 23 and Firefox 19. What browser are you using? Do you get any messages on the Javascript console?  
> **username_0**: The first code snippet works well and generates this result: https://www.dropbox.com/s/h9c9zvlk2iwcqjd/version1.png  The second one replaces all characters with dots, it looks like this for me: https://www.dropbox.com/s/le0dtq4p150hbz4/version2.png  I'm using Firefox 20 on Ubuntu.  
> **username_5**: I added a prompt to choose which row of annotation to substitute. If you only display hanzi and pinyin you should choose "1".  
> **username_0**: It works fine now, thanks a lot! I published an article about why I think this is useful here (including how to do it, of course): http://www.hackingchinese.com/?p=3738  
> **username_3**: Thanks for putting my Stackexchange link in, you can also see http://stackoverflow.com/questions/4003524/latex-question-accents-on-characters , and the program useing this is http://code.google.com/p/hanzi2tghz/ .  
> **username_6**: didn’t work for me, worked better when I replaced  'table.textblock'  with  'div.textblock'  but it shows extra neutral tones: http://www.webpagescreenshot.info/img/52c49032495861-48514210  
> **username_6**: Olle's link is now: http://www.hackingchinese.com/adding-tone-marks-wo-pinyin-above-characters-to-practise-tones/  

---

### Answer by username_3 on 2013-05-14. Score: 2

I have written some software that does, this <https://code.google.com/p/tghz-word-tone-annotator/> . It is however a Microsoft word add-in.

> **Comments:**
> **username_3**: Any Feedback would be much appreciated ^_^.  

---

### Answer by username_4 on 2018-04-03. Score: 1

Check <https://www.purpleculture.net/chinese-pinyin-converter/>, this tool can add tone numbers only

> **Comments:**
> **username_0**: Yeah, I've also found that tool, which is a lot easier to use. :)  

---

