On 8/2/07, <b class="gmail_sendername">D Tucny</b> <<a href="mailto:d@tucny.com">d@tucny.com</a>> wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Folks,<br><br>With AND 'major roads' data for China on it's way and a slowly growing<br>collection of Chinese data, I just wanted to throw some things about<br>regarding tagging in Chinese that could also carry into other
<br>non-'latin' script areas...<br><br>Why Chinese tagging is complicated<br>Written Chinese carries the meaning, not the pronunciation. There are<br>two main modern forms of written Chinese, Simplified Chinese and
<br>Traditional Chinese, the main difference between the two is that,<br>potentially obviously, a lot of characters in Simplified Chinese have<br>been simplified compared with their traditional variants... Simplified<br>Chinese is used in mainland China, Singapore and Malaysia, Traditional
<br>Chinese is used in Hong Kong, Macau and Taiwan... So that covers<br>written Chinese, however, there are also multiple forms of spoken<br>Chinese, the main two are Mandarin and Cantonese, Mandarin is used in<br>mainland China, Taiwan, Singapore and Malaysia, Cantonese is used in
<br>the Guangdong province, Hong Kong and Macau. There are many form of<br>romanisation used with these spoken forms of Chinese, the main one for<br>Mandarin is Pinyin, for Cantonese there seems to be no clear leader...<br>
To complicate things a bit further, Mandarin and Cantonese are both<br>tonal languages, Mandarin has 4 tones (or 5 if you include the neutral<br>tone) and Cantonese has 9, these tones are optionally used in the<br>romanization schemes too...
<br><br>So, now that we know it's complex...<br><br>What do we need to cover?<br>Well, we'd want our maps to be useful to local folks, so, we need<br>Chinese, probably best to use the form of Chinese that is used in the
<br>area, e.g. Simplified in mainland China, Traditional in Hong Kong.<br>We probably want our maps to be useful to people who don't know any<br>Chinese, as English is used in lots of places as the international<br>alternative, then we probably want to have English where available,
<br>especially where signs have English too, most road signs at least will<br>have English or Pinyin depending on the place, along with the Chinese<br>characters... We probably want to give people the chance of being able
<br>to say names even if they don't understand the written characters, so<br>a romanised form would be useful, i.e. Pinyin where Mandarin is<br>spoken, and to really give people a chance of being understood, we<br>probably need to include tones where we can, tone numbers could be
<br>useful for those who know what those numbers refer to and would be<br>easy to render, but, where tone 'accents' could probably be useful to<br>more people...<br>In summary, that gives us, Chinese, English, Pinyin (for Mandarin
<br>speaking areas), Pinyin with tones (for Mandarin speaking areas)...<br><br>How do we tag it?<br><br>Using Shanghai as an example, it's name is tagged like so...<br><br>name=上海<br>name:en=Shanghai<br>name:zh=上海<br>
name:zh_py=Shanghai<br>name:zh_pyt=Shànghǎi<br>or<br>name:zh_pyt=Shang4hai3 (if you've never seen numeric tone markers<br>before, this isn't probably going to help your pronunciation much)<br><br>Got all our bases covered, but, it looks pretty wasteful, lots of
<br>duplication, so, lets take a real world street name example...<br><br>name=环城北路<br>name:en=Huancheng North Road<br>name:zh=环城北路<br>name:zh_py=Huancheng Bei Lu<br>name:zh_pyt=Huánchéng Běi Lù<br><br>Rendering<br>Currently, only name is rendered on our public maps...
<br><br>osmarender/t@h will render Chinese text if the machine rendering the<br>tile has a suitable Chinese font installed, but that varies...<br><br>mapnik renders nice boxes where Chinese characters should live as the<br>
font doesn't have the characters and mapnik currently doesn't fall<br>back to another font...<br><br>It could perhaps be good to render one/some of the other forms, I've<br>done some renders with osmarender with Chinese and Pinyin with tones
<br>on roads and it looked pretty good... T@H/mapnik folks?<br><br>Of course, if you are doing custom rendering, you can control what<br>gets rendered and how it gets rendered, and if you have the<br>information that you want to render already there, you'll be much
<br>happier than if you have to make it/try to automatically generate<br>it/leave it out...<br><br>So... there's my mind dump on the subject... any comments?</blockquote><div><br>It would be feasible given enough disk space etc, for 
t@h to render a captions as a separate transparent tile set.  This can then be layered on top of the map using an Open Layers overlay layer.<br><br>It then becomes possible to generate caption layers for multiple languages and either manually or automatically switch them on/off depending on who the user is and what part of the world they are looking at.  So the English caption layer would be generated using the name:en tag, but fall back to the name tag if there is no name:en tag.  A Chinese caption layer would use the name:zh tag where there is one, falling back to name where there isn't one.
<br><br>80n<br><br><br> </div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">d<br>_______________________________________________<br>talk mailing list
<br><a href="mailto:talk@openstreetmap.org">talk@openstreetmap.org</a><br><a href="http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/talk">http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/talk</a><br></blockquote>
</div><br>