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

Responsive Web Design

Responsive Web Design

Ethan Marcotte / Happy Cog / 2011-6 / USD 18.00

From mobile browsers to netbooks and tablets, users are visiting your sites from an increasing array of devices and browsers. Are your designs ready? Learn how to think beyond the desktop and craft be......一起来看看 《Responsive Web Design》 这本书的介绍吧!

图片转BASE64编码
图片转BASE64编码

在线图片转Base64编码工具

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

html转js在线工具

UNIX 时间戳转换
UNIX 时间戳转换

UNIX 时间戳转换