PHP 的拼音扩展 pinyin-php

码农软件 · 软件分类 · 拼音转换工具包 · 2019-08-04 11:28:21

软件介绍

pinyin-php是一个C语言编写的php扩展,用于将汉字翻译为汉语拼音。

v0.4.0
通过逆序中文分词的方法实现提高多音字识别。
将字词库置于程序之外通过php.ini配置文件指定路径加载。

配置
在php.ini中添加如下内容

extension=/path/to/pinyin.so
pinyin.chars=/path/to/chars.csv
pinyin.words=/path/to/words.csv

使用

echo pinyin("汉"),"\n";
// hàn
echo pinyin("わたしわ阿飞, and my English name is Rex Lee. 网名是独孤影! ^_^。下面是一段多音分词歧义测试,这个人无伤无臭味。"),"\n";
// わたしわāfēi, and my English name is Rex Lee. wǎngmíngshìdúgūyǐng! ^_^。xiàmiànshìyīduànduōyīnfēncíqíyìcèshì,zhègèrénwúshāngwúchòuwèi。

本文地址:https://codercto.com/soft/d/11618.html

The Art and Science of Java

The Art and Science of Java

Eric Roberts / Addison-Wesley / 2007-3-1 / USD 121.60

In The Art and Science of Java, Stanford professor and well-known leader in CS Education Eric Roberts emphasizes the student-friendly exposition that led to the success of The Art and Science of C. By......一起来看看 《The Art and Science of Java》 这本书的介绍吧!

HTML 压缩/解压工具
HTML 压缩/解压工具

在线压缩/解压 HTML 代码

MD5 加密
MD5 加密

MD5 加密工具

html转js在线工具
html转js在线工具

html转js在线工具