sofish / han Goto Github PK
View Code? Open in Web Editor NEWa module for tanslating Chinese(汉字) into /\w+/ or pinyin
License: MIT License
a module for tanslating Chinese(汉字) into /\w+/ or pinyin
License: MIT License
./~/han/lib/Mandarin.json
Module parse failed: /Users/fdhuang/repractise/echeveria-editor/node_modules/han/lib/Mandarin.json Line 2: Unexpected token :
You may need an appropriate loader to handle this file type.
| {
| "_comment": "copyright: fayland, https://github.com/fayland/perl-lingua-han/tree/master/Lingua-Han-PinYin/lib/Lingua/Han/PinYin",
| "3400": "QIU1",
| "3401": "TIAN3 TIAN4",
@ ./~/han/lib/translate.js 3:11-37
设置为- 时,显示正常:
console.log(han.letter('本票通','-'));
ben-piao-tong
设置为“”时,会显示空格:
console.log(han.letter('本票通',''));
ben piao tong
我是用han获取城市拼音,很常用的词语都是错的。
我查到表中其实是有多音字表的,可否.letter也提供一个返回数组的选项呢?
如果今晚没有回复就自己写然后给您提PR :)
“信用卡” 转化成了 xinyongqia
不知道有没有常见多音字的解决方案
首字母还是有场景需要的,比如我想实现根据首字母查询功能
希望可以提供一个方法,用与首字母的获取
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.