Cnchar
🇨🇳 功能全面的汉字工具库 (拼音 笔画 偏旁 成语 语音 可视化等) (Chinese character util)
Install / Use
/learn @theajack/CncharREADME
English | 在线试用/文档 | 更新日志 | 反馈错误/缺漏 | Gitee | QQ Group: 958278438 | 留言板
Sponsors
<p align="center"> <a href="https://alinsjs.github.io/docs"> <img width="75" src="https://shiyix.cn/images/alins.png" alt="alins"> </a> <a style="margin-left: 10px" href="https://github.com/lim-f/react-lim"> <img width="80" src="https://shiyix.cn/images/react.svg" alt="alins"> </a> <a style="margin-left: 10px" href="https://github.com/lim-f/vue-lim"> <img width="80" src="https://shiyix.cn/images/vue.svg" alt="alins"> </a> </p>应用例子
开始文档之前,先通过一些应用案例看看 cnchar 能够做些什么
汉字打字游戏 | 打字弹钢琴 | 成语接龙 | 通讯录排序 | 取名字 | 输入法 | 歇后语 | 语音识别与合成 | 简繁体转换
<details> <summary>展开目录</summary> <!-- toc -->
- Sponsors
- 应用例子
- 前言
- 0.快速使用
- 1.功能
- 2.功能及插件概览
- 3.安装
- 4.使用
- 5.API
- 6.参数介绍
- 6.1 spell 参数
- 6.2 stroke 参数
- 6.3 orderToWord 参数
- 6.4 spellToWord 参数
- 6.5 strokeToWord 参数
- 6.6 idiom 参数
- 6.7 xhy 参数
- 6.8 radical 参数
- 6.9 words 与 explain 参数
- 6.10 使用实例大全:
- 6.10.0 安装使用
- 6.10.1 cnchar 基础库功能
- 6.10.2 cnchar-poly 库功能
- 6.10.3 cnchar-order 库功能
- 6.10.4 cnchar-trad 库功能
- 6.10.5 cnchar-idiom 库功能
- 6.10.6 cnchar-xhy 库功能
- 6.10.7 cnchar-radical 库功能
- 6.10.8 cnchar-words
- 6.10.8 cnchar-explain
- 6.10.10 cnchar-voice
- 6.10.11 工具方法
- 6.10.11.1 spellInfo
- 6.10.11.2 isCnChar
- 6.10.11.3 transformTone
- 6.10.11.4 compareSpell
- 6.10.11.5 compareStroke
- 6.10.11.6 sortSpell
- 6.10.11.7 sortStroke
- 6.10.11.8 isPolyWord
- 6.10.11.9 shapeSpell
- 6.10.11.10 setSpell
- 6.10.11.11 setSpellDefault
- 6.10.11.12 setStrokeCount
- 6.10.11.13 setOrder
- 6.10.11.14 setPolyPhrase
- 6.10.11.15 setRadical
- 6.10.11.16 addXhy
前言
感谢同学们对于 cnchar 的支持,由于 cnchar 词库来源于网络,虽然经过了本人的修改和扩充,但是还是难免有错误与缺漏之处,希望大家可以将使用中发现的错误与缺漏之处 反馈 给我(或自行修改提交,经过审查无误过后会合到 cnchar 中)
关于该文档
由于文档较长,做一下简介,请按照需要阅读
- 第零章可以帮助开发者快速接入cnchar
- 第一、二章介绍了cnchar的功能及其功能库
- 第三章介绍了cnchar的安装和使用
- 第四章介绍了各种不同环境下cnchar的使用差异
- 第五章详细介绍了cnchar及其功能库的API使用
- 第六章列举了各个方法的参数和大量的cnchar使用实例
另外,由于插件较多,编写文档工作量巨大,如有遗漏请参考 cnchar-types 定义。也欢迎大家一起帮忙完善文档
0.快速使用
使用 npm 安装:
npm i cnchar
import cnchar from 'cnchar';
'汉字'.spell();
'汉字'.stroke();
使用 script 标签使用:
如果 jsdelivr 挂了可以使用 unpkg (https://unpkg.com/cnchar/cnchar.min.js)
<script src="https://fastly.jsdelivr.net/npm/cnchar/cnchar.min.js"></script>
<script>
'汉字'.spell();
'汉字'.stroke();
</script>
Related Skills
node-connect
337.4kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
83.2kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
337.4kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
83.2kCommit, push, and open a PR
