sxei / pinyinjs Goto Github PK
View Code? Open in Web Editor NEW一个实现汉字与拼音互转的小巧web工具库,演示地址:
Home Page: http://demo.haoji.me/pinyinjs/
License: MIT License
一个实现汉字与拼音互转的小巧web工具库,演示地址:
Home Page: http://demo.haoji.me/pinyinjs/
License: MIT License
比如输入 javascript**
得到的输出是 j a v a s c r i p t zhong guo
理想的状况应该是只处理中文字符,其他字符保持原样
语句:还欠你钱吗
多音字转换后:huán qiàn nǐ qián ma
应该是 hai
支持npm吗
项目非常好,拼音比较全面。赞一个!
喝彩 => hē cǎi
sun xu 不区分
输入 xu 能 match 孙
‘长春‘为何归类到 Z ,网址:http://front.xiangxiangxiao.cn/city
如题
比如:
"呵呵"→keke
"大"→tai
因为"呵"这个字在词典里有三个音:a,he,ke
取的是最后一个ke,但是在在线demo里是对的,是因为加载了pinyin_dict_withtone.js
实际上要显示正确拼音加载的是2个词典,26.2+124.8=151KB
求教哈:
汉字:唔
新华字典(第12版)中的注音:
n2(348页)、n2g(354页)、wu2(513页)
而 pinyin_dict_firstletter.all
中 第 21780 索引对应的是 "E"
而 pinyin_dict_firstletter.polyphone
21780 对应的 "WN"
我看其它多音字的情况,polyphone 中一定包含 all 中的 音序,对于21780,是不是配置有问题呢?
pinyinUnil.getFirstLetter('长城测试物业小区') -> ZCCSWYXQ
使用的pinyin_dict_firstletter.js
在线多音字版本错误:我随便输入了下面这段,就报Cannot read property 'replace' of undefined
javascript 我们没有
使用过程中,很多多音字翻译有问题,比如: “孩子”, “是谁呢”, “卷卷的毛”, “长出耳朵”,等等,
项目太复杂了,可否把拼音输入法和汉字转拼音分成2个网页,我想参考做一个基于Qt的拼音输入法。
我的测试用例是2019年度报表,代码用的这个
pinyinUtil.getPinyin(val, "", false, true);
我看了一下,错误的原因是把2019当作了一个词语,在替换多音字的时候,i+K定位错误了,稍微修改了一下utils里面getPinyin方法中140多行左右的代码,并且去掉了第一个if里面的空格处理。
else{ noChinese+=chinese[i];result.push(chinese[i]);}
已经写的很强大了,感谢。
20周年大会暨澳门特别行政区
20 zhōu nián dà dà huì ào mén tè bié bié xíng qū
我将它改为了nodejs的程序,有可能是这边出错了.但是看见前面其他人说多音字有问题,就没有再次验证具体哪里的问题.
pinyin_dict_notone,"广,厂,放在an里了
"20504":"TC"
js:pinyin_dict_notone.js
这是使用时发现的,而且我将字典中的删掉后‘大’会默认转为‘dai’
错误: guī liè
输入“佛山”试下,会发现是“BS”。
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.