# 词库资源索引（chinese-xinhua）

> 中华新华字典数据库 ｜ 来源：https://github.com/pwxcoo/chinese-xinhua
> 协议：**MIT**（可自由使用、修改、商用，保留版权声明即可）
> 版权：Copyright (c) 2018 PWXCOO ｜ 数据版本：2018-12-16 ｜ 编码：UTF-8

## 文件清单

| 文件 | 内容 | 条数 | 体积 | 主键字段 |
|---|---|---|---|---|
| `idiom.json` | 成语 | 30,895 | 9.8 MB | `word` |
| `word.json` | 汉字 | 16,142 | 26.1 MB | `word` |
| `ci.json` | 词语 | 264,434 | 24.9 MB | `ci` |
| `xiehouyu.json` | 歇后语 | 14,032 | 1.2 MB | `riddle` |

## 字段说明

### idiom.json —— 成语

成语词典，含拼音、释义、出处、例句、拼音首字母，其中四字成语 29502 条

字段：`derivation`、`example`、`explanation`、`pinyin`、`word`、`abbreviation`

### word.json —— 汉字

汉字字典，含部首、笔画、拼音、详细释义

字段：`word`、`oldword`、`strokes`、`pinyin`、`radicals`、`explanation`、`more`

### ci.json —— 词语

词语词典，含释义（无拼音）

字段：`ci`、`explanation`

### xiehouyu.json —— 歇后语

歇后语，含谜面与谜底，去重谜底 9117 个

字段：`riddle`、`answer`

## 用法提示

- 成语数据中 `example` 字段值为 **"无"** 表示该条目没有例句——实测**常用成语有例句率 100%、生僻成语仅 10%**，可用这个信号粗筛常用度
- `derivation` 字段值为 "无" 表示没有出处
- 成语共 30,895 条，但**大部分为生僻成语**，直接全量使用需先按常用度筛选
- 中文数组文件建议前端按需懒加载，勿在首屏全量拉取
- 各文件均为标准 JSON 数组，UTF-8 编码，可直接 `JSON.parse`

## 授权原文

```
MIT License

Copyright (c) 2018 PWXCOO

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
```
