- 授权协议: MIT
- 开发语言: JavaScript
- 操作系统: 跨平台
- 软件首页: https://github.com/superbiger/pinyin4js
- 软件文档: https://github.com/superbiger/pinyin4js/blob/master/README.md
软件介绍
pinyin4js 是一个汉字转拼音的 JavaScript 开源库,零依赖。
特点
零依赖
词库灵活导入,打包
可以自行调整字典,具体可以参照src/dict;所有资源调用由PinyinResource封装,可自行修改后打包准确、完善的字库
Unicode编码从4E00-9FA5范围及3007(〇)的20903个汉字中,pinyin4js能转换除46个异体字(异体字不存在标准拼音)之外的所有汉字拼音转换速度快
经测试,从4E00-9FA5范围的20902个汉字,pinyin4js耗时约110毫秒多拼音格式输出支持
支持多种拼音输出格式:带音标、不带音标、数字表示音标以及拼音首字母输出格式常见多音字识别
支持常见多音字的识别,其中包括词组、成语、地名等简繁体中文转换
支持添加自定义字典
支持添加用户自定义字典
如何使用
安装
Brower
<script src="./dist/pinyin4js.js"></script>
Node
npm install pinyin4js
使用
//ES5
require("pinyin4js"); //import 'pinyin4js';
// more detail methods in test
// WITH_TONE_NUMBER--数字代表声调,WITHOUT_TONE--不带声调,WITH_TONE_MARK--带声调
// output: xià#mén#nǐ#hǎo#dà#shà#xià#mén
console.log(PinyinHelper.convertToPinyinString('厦门你好大厦厦门', '#', PinyinFormat.WITH_TONE_MARK))如何开发
Init
git clone https://github.com/superbiger/pinyin4js.git cd pinyin4js npm install
Build ES6 ---> ES5
npm run build
Build Browser
npm run build npm run build-browser
Test
npm run test
Mastering Flask
Jack Stouffer / Packt Publishing / 2015-9-30 / USD 49.99
Work with scalable Flask application structures to create complex web apps Discover the most powerful Flask extensions and learn how to create one Deploy your application to real-world platforms......一起来看看 《Mastering Flask》 这本书的介绍吧!
RGB转16进制工具
RGB HEX 互转工具
XML 在线格式化
在线 XML 格式化压缩工具
