`pinyin-php` is a php extension which could translate Chinese character into Chinese PinYin.
Clone or download
Latest commit 390cff9 Oct 2, 2017
Permalink
Failed to load latest commit information.
data data format Jan 15, 2015
src support php7 Sep 8, 2016
travis travis Oct 2, 2017
.gitignore support php7 Sep 8, 2016
.travis.yml travis Oct 2, 2017
CMakeLists.txt change CMakeLists.txt Feb 10, 2015
LICENSE Initial commit Aug 9, 2013
README.md add readme for locale option May 13, 2016
clean clean project Jan 14, 2015
config.m4 clean project Jan 14, 2015
config.w32 clean project Jan 14, 2015
pinyin.php finised version 0.4.0, 支持中文分词提高多音字识别率 Feb 22, 2015

README.md

pinyin-php


Build Status travis

pinyin-php is a php extension which could translate Chinese character into Chinese PinYin.

build and install

linux

build the extension

phpize
configure
make
make test

configuration

add following into php.ini

pinyin.chars=/path/to/chars.csv
pinyin.words=/path/to/words.csv
pinyin.locale="en_GB.UTF-8"		[optional]

usage

<?php
echo pinyin(""),"\n";
echo pinyin("わたしわ阿飞, and my English name is Rex Lee. 网名是独孤影! ^_^。下面是一段多音分词歧义测试,这个人无伤无臭味。"),"\n";
?>

License

MIT License