Skip to content

Commit

Permalink
init project.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Jun 4, 2022
1 parent e4e7bf7 commit f323a2a
Show file tree
Hide file tree
Showing 18 changed files with 70,516 additions and 2 deletions.
19 changes: 19 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
coverage
build
node_modules
npm-debug.log*
package-lock.json
cjs
esm

.eslintcache
.DS_Store
.cache
.vscode

*.bak
*.tem
*.temp
#.swp
*.*~
~*.*
149 changes: 147 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,149 @@
Table of General Standard Chinese Characters
通用规范汉字表 (Table of General Standard Chinese Characters)
===

通用规范汉字表。数据来源 [通用规范汉字表](http://www.moe.gov.cn/jyb_sjzl/ziliao/A19/201306/t20130601_186002.html) 中华人民共和国教育部。
![No Dependencies](http://jaywcjlove.github.io/sb/status/no-dependencies.svg)
[![npm package](https://img.shields.io/npm/v/togscc.svg)](https://www.npmjs.com/package/togscc)

最权威的《通用规范汉字表》(**T**able **o**f **G**eneral **S**tandard **C**hinese **C**haracters),数据来源 2013-06-01 中华人民共和国教育部发布的[《通用规范汉字表》](http://www.moe.gov.cn/jyb_sjzl/ziliao/A19/201306/t20130601_186002.html)

⚠️ 注意:拼音注音没有找到官方数据来源,数据来源[《维基词典》](https://zh.wiktionary.org/wiki/Appendix:汉语拼音索引/通用规范汉字表)汉语拼音索引。

## 安装

```bash
npm install togscc --save
```

## 使用

```js
import data from 'togscc/data/characters.json';
// data 输出 ===>
[
"","","","","","","","","","","","","","",
// ....
]
```

## 数据说明

| 文件名 | 说明 | 数据说明 |
| ---- | ---- | ---- |
| `characters.txt` | 汉字(8105个汉字),行号对应字序 | ⚠️ 维护数据 |
| `characters.csv` | 汉字拼音,表格数据 | 基于 `characters.txt``pinyin.raw.json` 生成 |
| `characters.json` | 汉字,JSON 格式,数组顺序对应字序 | 基于 `characters.txt` 生成 |
| `characters.min.json` | `characters.min.json` 的压缩数据 | 基于 `characters.txt` 生成 |
| `pinyin.raw.txt` | 拼音 | ⚠️ 维护数据 |
| `pinyin.raw.json` | 拼音,JSON 格式,数组顺序对应字序 | 基于 `pinyin.raw.txt` 生成 |
| `pinyin.raw.min.json` | `pinyin.raw.json` 的压缩数据 | 基于 `pinyin.raw.json` 生成 |
| `pinyin.raw.effect.json` | 拼音与文字在一行数组中 | 基于 `pinyin.raw.txt` 生成 |
| `pinyin.txt` | 拼音,行号对应 `characters.txt` 行号 | 基于 `pinyin.raw.txt` 生成 |
| `pinyin.json` | 拼音,JSON 格式,数组顺序对应 `characters.json` 数组顺序 | 基于 `pinyin.txt` 生成 |
| `pinyin.min.json` | `pinyin.json` 的压缩数据 | 基于 `pinyin.txt` 生成 |
| `pinyin.duo.json` | 多音汉字数据 | 基于 `pinyin.txt` 生成 |
| `pinyin.duo.min.json` | `pinyin.duo.json` 的压缩数据 | 基于 `pinyin.txt``characters.txt` 生成 |

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

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


### `characters.txt`

```
....
```

### `characters.json`

```js
[
"","","","","","","","","","","","","","",
// ....
]
```

### `pinyin.raw.txt`

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

### `pinyin.raw.json`

```js
{
"ā": [ "", "", "", "", "" ],
"á": [ "" ],
"ǎ": [ "" ],
"à": [ "" ],
"a": [ "" ],
// ....
}
```

### `pinyin.raw.effect.json`

```js
[
[ "ā", "", "", "", "", "" ],
[ "á", "" ],
[ "ǎ", "" ],
[ "à", "" ],
[ "a", "" ],
// ....
]
```

### `pinyin.json`

行号对应汉字字序。

```js
[
"",
"",
"èr",
"shí",
"dīng",
"chǎng",
"",
[
"bo",
""
],
"",
// ....
]
```

### `pinyin.duo.json`

```js
{
"": [ "bo", "" ],
"": [ "", "" ],
"": [ "le", "liǎo" ],
"": [ "gān", "gàn" ],
// ....
}
```

## License

Licensed under the MIT License.
Loading

0 comments on commit f323a2a

Please sign in to comment.