| 1 | # pinyin-data [](https://travis-ci.org/mozillazg/pinyin-data) |
| 2 | |
| 3 | 汉字拼音数据。 |
| 4 | |
| 5 | |
| 6 | ## 数据介绍 |
| 7 | |
| 8 | 拼音数据的格式: |
| 9 | |
| 10 | {code point}: {pinyins} # {hanzi} {comments} |
| 11 | |
| 12 | * 以 `#` 开头的行是注释,行内 `#` 后面的字符也是注释 |
| 13 | * `{pinyins}` 中使用逗号分隔多个拼音 |
| 14 | * 示例: |
| 15 | |
| 16 | # 注释 |
| 17 | U+4E2D: zhōng,zhòng # 中 |
| 18 | |
| 19 | 拼音文件介绍: |
| 20 | |
| 21 | * `kTGHZ2013.txt`: [Unihan Database][unihan] 中 [kTGHZ2013](http://www.unicode.org/reports/tr38/#kTGHZ2013) 部分的拼音数据(来源于《通用规范汉字字典》的拼音数据) |
| 22 | * `kHanyuPinyin.txt`: [Unihan Database][unihan] 中 [kHanyuPinyin](http://www.unicode.org/reports/tr38/#kHanyuPinyin) 部分的拼音数据(来源于《漢語大字典》的拼音数据) |
| 23 | * `kXHC1983.txt`: [Unihan Database][unihan] 中 [kXHC1983](http://www.unicode.org/reports/tr38/#kXHC1983) 部分的拼音数据(来源于《现代汉语词典》的拼音数据) |
| 24 | * `kHanyuPinlu.txt`: [Unihan Database][unihan] 中 [kHanyuPinlu](http://www.unicode.org/reports/tr38/#kHanyuPinlu) 部分的拼音数据(来源于《現代漢語頻率詞典》的拼音数据) |
| 25 | * `kMandarin.txt`: [Unihan Database][unihan] 中 [kMandarin](http://www.unicode.org/reports/tr38/#kMandarin) 部分的拼音数据(普通话中最常用的一个读音。zh-CN 为主,如果 zh-CN 中没有则使用 zh-TW 中的拼音) |
| 26 | * `kMandarin_overwrite.txt`: 手工纠正 `kMandarin.txt` 中有误的拼音数据(**可以修改**) |
| 27 | * `GBK_PUA.txt`: [Private Use Area](https://en.wikipedia.org/wiki/Private_Use_Areas) 中有拼音的汉字,参考 [GB 18030 - 维基百科,自由的百科全书](https://zh.wikipedia.org/wiki/GB_18030#PUA) (**可以修改**) |
| 28 | * `nonCJKUI.txt`: 不属于 [CJK Unified Ideograph](https://en.wikipedia.org/wiki/CJK_Unified_Ideographs) 但是却有拼音的字符(**可以修改**) |
| 29 | * `kanji.txt`: [日本自造汉字](https://zh.wikipedia.org/wiki/%E6%97%A5%E6%9C%AC%E6%B1%89%E5%AD%97#7_%E6%97%A5%E6%9C%AC%E6%B1%89%E5%AD%97%E7%9A%84%E6%B1%89%E8%AF%AD%E6%99%AE%E9%80%9A%E8%AF%9D%E8%A7%84%E8%8C%83%E8%AF%BB%E9%9F%B3%E8%A1%A8) 的拼音数据 (**可以修改**) |
| 30 | * `kMandarin_8105.txt`: [《通用规范汉字表》](https://zh.wikipedia.org/wiki/通用规范汉字表)(2013 年版)里 8105 个汉字最常用的一个读音 (**可以修改**) |
| 31 | * `overwrite.txt`: 手工纠正的拼音数据(**可以修改**) |
| 32 | * `pinyin.txt`: 合并上述文件后的拼音数据 |
| 33 | * `zdic.txt`: [汉典网](http://zdic.net) 的拼音数据(**可以修改**) |
| 34 | * `cc_cedict.txt`: 根据 [cc-cedict.org](https://cc-cedict.org/) 的词语拼音数据生成的单个汉字拼音数据 |
| 35 | |
| 36 | |
| 37 | [Unihan Database][unihan] 数据版本: |
| 38 | |
| 39 | > Date: 2024-07-31 00:00:00 GMT [KL] |
| 40 | > |
| 41 | > Unicode version: 16.0.0 |
| 42 | |
| 43 | |
| 44 | ## 修改数据 |
| 45 | |
| 46 | * 上面标注了 **可以修改** 字样的文件都可以直接修改 |
| 47 | * 如果汉字的拼音不需要修改,只是调整第一个读音的话,可以直接修改 `kMandarin_8105.txt` 这个文件 |
| 48 | * 执行 `merge_unihan` 命令可以按照合并规则生成最新的 `pinyin.txt` 文件 |
| 49 | * 进入 unihan 目录,执行 `make update` 命令可以更新最新的 Unihan 数据 |
| 50 | |
| 51 | |
| 52 | ## 参考资料 |
| 53 | |
| 54 | * [汉语拼音方案](http://www.moe.edu.cn/s78/A19/yxs_left/moe_810/s230/195802/t19580201_186000.html) |
| 55 | * [Unihan Database Lookup](http://www.unicode.org/charts/unihan.html) |
| 56 | * [汉典 zdic.net](http://www.zdic.net/) |
| 57 | * [字海网,叶典网](http://zisea.com/) |
| 58 | * [国学大师_国学网](http://www.guoxuedashi.com/) |
| 59 | * [Unicode、GB2312、GBK和GB18030中的汉字](http://www.fmddlmyy.cn/text24.html) |
| 60 | * [GB 18030 - 维基百科,自由的百科全书](https://zh.wikipedia.org/wiki/GB_18030#PUA) |
| 61 | * [通用规范汉字表 - 维基百科,自由的百科全书](https://zh.wikipedia.org/wiki/%E9%80%9A%E7%94%A8%E8%A7%84%E8%8C%83%E6%B1%89%E5%AD%97%E8%A1%A8) |
| 62 | * [China’s 通用规范汉字表 (Tōngyòng Guīfàn Hànzìbiǎo)](https://blogs.adobe.com/CCJKType/2014/03/china-8105.html) |
| 63 | * [日本汉字的汉语读音规范](http://www.moe.gov.cn/s78/A19/yxs_left/moe_810/s230/201001/t20100115_75698.html) |
| 64 | * [日本汉字的汉语普通话规范读音表- 维基百科](https://zh.wikipedia.org/wiki/%E6%97%A5%E6%9C%AC%E6%B1%89%E5%AD%97#7_%E6%97%A5%E6%9C%AC%E6%B1%89%E5%AD%97%E7%9A%84%E6%B1%89%E8%AF%AD%E6%99%AE%E9%80%9A%E8%AF%9D%E8%A7%84%E8%8C%83%E8%AF%BB%E9%9F%B3%E8%A1%A8) |
| 65 | * [漢語大字典(第二版)](http://www.ivantsoi.com/hydzd/index.html) |
| 66 | |
| 67 | [unihan]: http://www.unicode.org/charts/unihan.html |
| 68 | |
| 69 | |
| 70 | ## 相关项目 |
| 71 | |
| 72 | * [mozillazg/phrase-pinyin-data](https://github.com/mozillazg/phrase-pinyin-data): 词语拼音数据 |
| 73 | * [mozillazg/python-pinyin](https://github.com/mozillazg/python-pinyin): 汉字转拼音(pypinyin) |
| 74 | * [mozillazg/pypinyin-dict](https://github.com/mozillazg/pypinyin-dict): 在 pypinyin 项目中使用 pinyin-data 里不同数据文件里的数据 |