Pinyin Php Save

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

Project README

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

Open Source Agenda is not affiliated with "Pinyin Php" Project. README Source: duguying/pinyin-php
Stars
29
Open Issues
0
Last Commit
2 years ago
Repository
License
MIT

Open Source Agenda Badge

Open Source Agenda Rating