cnchar - A full-featured, multi-terminal Chinese pinyin stroke open source JS library

cnchar - A full-featured, multi-terminal Chinese pinyin stroke open source JS library

A js tool library related to Chinese pinyin and strokes. It is small in size and comprehensive in functions. It can operate Chinese characters through an easy-to-use api.

About cnchar.js

cnchar.js is a Chinese character processing library with a high degree of completion. It has realized all the requirements related to Chinese character pinyin and related requirements. It has comprehensive functions, easy to use, lightweight and compact, and can be introduced on demand to attract development. the characteristics of the person.

cnchar official website

The author of cnchar.js is a developer from Tongji University. He is currently mainly engaged in game development. He started to develop cnchar.js as early as 2017. At first, it was just a tool library for easy access to pinyin and strokes of Chinese characters. It has successively implemented a large number of functions related to Chinese characters, and is an excellent tool library running in the js environment.

Features supported by cnchar.js

Develop hands-on experience and usage suggestions

If there are developers like me who have been engaged in the development of Internet-related products for children before, I believe that the requirements for Chinese pinyin, strokes, idioms, and idioms must be familiar to me. I carefully read the cnchar document and found the requirements for Chinese characters that I can think of. Almost all came true. If the tool library could be known at that time and embedded into the APP through hybrid development, it is certain that the overall quality of the product will be improved by leaps and bounds.

cnchar development documentation

cnchar is the main library of the entire Chinese character tool library. It mainly provides functions such as simplified Chinese pinyin, polyphonic words, tones, and stroke numbers. Other libraries such as stroke order, polyphonic words, visual writing, radicals, idioms/Xiehouyu, etc. can be used. It can be used on demand, even if it contains a large amount of Chinese characters and pinyin data, the space is very small.

The functions provided by cnchar can make many interesting applications. The author has made several small web games based on this tool library, such as the " airplane typing game " I played before posting this article . These shells will automatically find matching words to hit, which is very fun.

Games based on cnchar

Getting started with cnchar is easy, and the official website has plenty of code examples. The most admirable thing about this project is that it supports enough operating environments. As long as it is a js environment, almost all of them are supported. The author has also deployed an online jsbox. It is very convenient to try and get started on the browser.

cnchar code example

It should be noted that the data of cnchar's Chinese characters, idioms and Xiehouyu come from the Internet. Although the author has been correcting and expanding, it is inevitable that there will be errors and omissions. If it is used for education-related products, it is strongly recommended to carefully check the corresponding thesaurus and pinyin library.

Free Open Source Instructions

cnchar.js was created by theajack, a domestic developer, and has been maintained for many years. The code is hosted on Github / Gitee based on the MIT open source agreement , and can be downloaded and used by any individual or company for free.

Original link: https://www.thosefree.com/cnchar

Guess you like

Origin blog.csdn.net/weixin_45583710/article/details/123394995