npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

togscc

v1.3.1

Published

通用规范汉字表 (Table of General Standard Chinese Characters)

Downloads

185

Readme

通用规范汉字表

No Dependencies npm package Coverage Status

最权威的《通用规范汉字表》(Table of General Standard Chinese Characters),数据来源 2013-06-01 中华人民共和国教育部发布的《通用规范汉字表》

⚠️ 注意:拼音注音没有找到官方数据来源,数据来源《维基词典》汉语拼音索引。PDF 数据存放在 @v1.0.0

安装

npm install togscc --save

使用

import data from 'togscc/data/characters.json';
// data 输出 ===>
[
  "一","乙","二","十","丁","厂","七","卜","八","人","入","儿","匕","几",
  // ....
]
import characters from 'togscc/dist/characters';
import pinyin from 'togscc/dist/pinyin';
import shendiao from 'togscc/dist/shendiao';
import raw from 'togscc/dist/pinyin.raw';
import togscc from 'togscc';

console.log(togscc['正']) // => ["zhēng","zhèng"]
console.log("你好世界!".split('').map((han) => togscc[han] ? togscc[han] : han))
// => ["nǐ", ["hǎo","hào"], "shì", "jiè", "!"]

数据说明

| 文件名 | 说明 | 数据说明 | | ---- | ---- | ---- | | characters.txt | 汉字(8105个汉字),行号对应字序 | ⚠️ 维护数据 | | characters.csv | 汉字拼音,表格数据 | - | | characters.json | 汉字,JSON 格式,数组顺序对应字序 | - | | characters.min.json | characters.min.json 的压缩数据 | - | | pinyin.raw.txt | 拼音 | ⚠️ 维护数据 | | pinyin.raw.json | 拼音,JSON 格式,数组顺序对应字序 | - | | pinyin.raw.min.json | pinyin.raw.json 的压缩数据 | - | | pinyin.raw.effect.json | 拼音与文字在一行数组中 | - | | pinyin.txt | 拼音,行号对应 characters.txt 行号 | - | | pinyin.json | 拼音,JSON 格式,数组顺序对应 characters.json 数组顺序 | - | | pinyin.min.json | pinyin.json 的压缩数据 | - | | pinyin.duo.json | 多音汉字数据 | - | | pinyin.duo.min.json | pinyin.duo.json 的压缩数据 | - | | shendiao.json | 字母 + 声调数据 | - | | shendiao.all.json | 字母 + 声调 + 非字母声调数据 | - | | shendiao.object.json | 字母 + 声调声调 JSON 数据 | - | | fanti.txt | 简繁体字数据 | ⚠️ 维护数据 | | simplified.convert.json | -> 体字 | - | | traditional.convert.json | -> 体字 | - |

⚠️ 注意:行号(或数组顺序)对应字序,字序遵循《GB13000.1 字符集汉字字序(笔画序)规范》的规定

更多 CDN 数据访问:https://unpkg.com/togscc/

  • https://rawcdn.githack.com/jaywcjlove/table-of-general-standard-chinese-characters/main/data/characters.json
  • https://cdn.statically.io/gh/jaywcjlove/table-of-general-standard-chinese-characters/main/data/characters.json

characters.txt

一
乙
二
十
....

characters.json

[
  "一","乙","二","十","丁","厂","七","卜","八","人","入","儿","匕","几",
  // ....
]

pinyin.raw.txt

ā 吖 阿 啊 锕 腌
á 啊
ǎ 啊
à 啊
a 啊
āi 哎 哀 埃 挨 唉 锿
ái 挨 皑 癌
ǎi 毐 欸 嗳 矮 蔼 霭
ài 艾 砹 唉 爱 隘 碍 嗳 嗌 嫒 瑷 叆 暧
ān 安 垵 桉 氨 庵 谙 鹌 𩽾 鞍 盦
ǎn 俺 埯 唵 铵
àn 犴 岸 按 胺 案 暗 黯

pinyin.raw.json

{
  "ā": [ "吖", "阿", "啊", "锕", "腌" ],
  "á": [ "啊" ],
  "ǎ": [ "啊" ],
  "à": [ "啊" ],
  "a": [ "啊" ],
  // ....
}

pinyin.raw.effect.json

[
  [ "ā", "吖", "阿", "啊", "锕", "腌" ],
  [ "á", "啊" ],
  [ "ǎ", "啊" ],
  [ "à", "啊" ],
  [ "a", "啊" ],
  // ....
]

pinyin.txt

dīng
chǎng
qī
bo bǔ
bā
rén
rù
ér
bǐ
jī jǐ

pinyin.json

行号对应汉字字序。

[
  "yī",
  "yǐ",
  "èr",
  "shí",
  "dīng",
  "chǎng",
  "qī",
  [
    "bo",
    "bǔ"
  ],
  "bā",
  // ....
]

pinyin.duo.json

{
  "卜": [ "bo", "bǔ" ],
  "几": [ "jī", "jǐ" ],
  "了": [ "le", "liǎo" ],
  "干": [ "gān", "gàn" ],
  // ....
}

shendiao.json

[
  "ā", "ē", "ī", "ō", "ū",
  "á", "é", "í", "ó", "ú",
  "ǎ", "ě", "ǐ", "ǒ", "ǔ",
  "à", "è", "ì", "ò", "ù",
  "a", "e", "i", "o", "u"
]

shendiao.object.json

{
  "ā": "a", "ē": "e", "ī": "i", "ō": "o", "ū": "u",
  "á": "a", "é": "e", "í": "i", "ó": "o", "ú": "u",
  "ǎ": "a", "ě": "e", "ǐ": "i", "ǒ": "o", "ǔ": "u",
  "à": "a", "è": "e", "ì": "i", "ò": "o", "ù": "u"
}

shendiao.all.json

[
  "ā", "ɑ̄", "ē", "ī", "ō", "ū", "ǖ", "Ā", "Ē", "Ī", "Ō", "Ū", "Ǖ",
  "á", "ɑ́", "é", "í", "ó", "ú", "ǘ", "Á", "É", "Í", "Ó", "Ú", "Ǘ",
  "ǎ", "ɑ̌", "ě", "ǐ", "ǒ", "ǔ", "ǚ", "Ǎ", "Ě", "Ǐ", "Ǒ", "Ǔ", "Ǚ",
  "à", "ɑ̀", "è", "ì", "ò", "ù", "ǜ", "À", "È", "Ì", "Ò", "Ù", "Ǜ",
  "a", "ɑ", "e", "i", "o", "u", "ü", "A", "E", "I", "O", "U", "Ü"
]

fanti.txt

对在部分义项和用法上不简化的“瞭、乾、藉、麽”

  • :读liào时不简化作“了”,如“瞭望”“瞭哨”。
  • :读qián时不简化作“干”,如“乾坤”“乾隆”。
  • :读jí或用于慰藉、衬垫义时不简化作“借”,如“狼藉(jí)”“枕藉(jiè)”。
  • :读mó时不简化作“么”,如“幺麽小丑”。
皑(皚)
嗳(噯)
蔼(藹)
边(邊)
编(編)
贬(貶)
变(變,変)

simplified.convert.json

{
  "贬": "貶",
  "变": [
    "變",
    "変"
  ],
  "辩": "辯",
  "辫": "辮"
  // ....
}

traditional.convert.json

{
  "變": "变",
  "変": "变",
  "辯": "辩",
  "辮": "辫",
  // ...
}

其它工具

  • province-city-china 最全最新中国【省、市、区县、乡镇街道】json,csv,sql 数据

参考资料

License

Licensed under the MIT License.