- 授权协议: MIT
- 开发语言: PHP
- 操作系统: 跨平台
- 软件首页: https://github.com/Yurunsoft/PHPChineseToPinyin
- 软件文档: https://github.com/Yurunsoft/PHPChineseToPinyin/blob/master/README.md
软件介绍
简介
PHP汉字转拼音类,支持多音字、简繁中文,共20902个汉字
有用到PHP汉字转拼音,网上找了一下,这个20902个汉字是微软的字库,支持多音字。
字库是在OSC找到的,他的源代码是每次动态分割字库处理,我直接处理成了静态的PHP数组代码,应该比动态处理要快一些。
我还自己写了转换方法,支持获取一段中文的全拼和拼音首字母,支持自定义拼音分割符,应该能满足大多数使用情况了。
必须在UTF-8编码的情况下使用,否则会报错。
用法
代码
ChineseToPinyin::convert('测试一下啊',' ',$allWord,$firstWord);
print_r($allWord);
print_r($firstWord);输出结果
Array ( [0] => ce shi yi xia a [1] => ce shi yi xia e ) Array ( [0] => c s y x a [1] => c s y x e )
Producing Masculinity
Michele White / Routledge / 2019-3 / $39.95
Thoughtful, witty, and illuminating, in this book Michele White explores the ways normative masculinity is associated with computers and the Internet and is a commonly enacted online gender practice. ......一起来看看 《Producing Masculinity》 这本书的介绍吧!
