All Projects → xiaobopang → Pinyin

xiaobopang / Pinyin

Licence: apache-2.0
汉字转带有声调的汉语拼音,汉字转无声调的汉语拼音,汉字转成汉语拼音首字母,获取英文姓名首字母,获取中文名

Labels

Projects that are alternatives of or similar to Pinyin

Phrase Pinyin Data
词语拼音数据
Stars: ✭ 257 (+851.85%)
Mutual labels:  pinyin
Limax
Node.js module to generate URL slugs. Another one? This one cares about i18n and transliterates non-Latin scripts to conform to the RFC3986 standard. Mostly API-compatible with similar modules.
Stars: ✭ 423 (+1466.67%)
Mutual labels:  pinyin
Pinyin
🇨🇳 汉字拼音 ➜ hàn zì pīn yīn
Stars: ✭ 6,047 (+22296.3%)
Mutual labels:  pinyin
Tinypinyin
适用于Java和Android的快速、低内存占用的汉字转拼音库。
Stars: ✭ 3,348 (+12300%)
Mutual labels:  pinyin
Pinyin Engine
JavaScript 拼音匹配引擎
Stars: ✭ 386 (+1329.63%)
Mutual labels:  pinyin
Pinyin
Pure JavaScript library for converting Hanzi to Pinyin.
Stars: ✭ 504 (+1766.67%)
Mutual labels:  pinyin
PHPChineseToPinyin
请移步:
Stars: ✭ 40 (+48.15%)
Mutual labels:  pinyin
Hanbaobao
Mandarin Chinese text segmentation and mobile dictionary Android app (中文分词)
Stars: ✭ 17 (-37.04%)
Mutual labels:  pinyin
Chineseutil
PHP 中文工具包,支持汉字转拼音、拼音分词、简繁互转、数字、金额大写;QQ群:17916227
Stars: ✭ 413 (+1429.63%)
Mutual labels:  pinyin
Pinyin Data
汉字拼音数据
Stars: ✭ 641 (+2274.07%)
Mutual labels:  pinyin
Python Pinyin
汉字转拼音(pypinyin)
Stars: ✭ 3,618 (+13300%)
Mutual labels:  pinyin
Pinyin
🇨🇳 基于词库的中文转拼音优质解决方案
Stars: ✭ 3,824 (+14062.96%)
Mutual labels:  pinyin
Mynlp
一个生产级、高性能、模块化、可扩展的中文NLP工具包。(中文分词、平均感知机、fastText、拼音、新词发现、分词纠错、BM25、人名识别、命名实体、自定义词典)
Stars: ✭ 519 (+1822.22%)
Mutual labels:  pinyin
Chinesepinyin Codecompletionhelper
让你的 JetBrains 系 IDE ( IDEA ,PyCharm,PhpStorm,WebStorm,AndroidStudio,DevEco等 )支持中文标识符以拼音输入方式完成代码补全,享受和英文环境一致的中文智能编码体验,为代码表达提供更多选择,一种值得考虑的折中解决方案
Stars: ✭ 262 (+870.37%)
Mutual labels:  pinyin
Xpinyin
Translate Chinese hanzi to pinyin (拼音) by Python, 汉字转拼音
Stars: ✭ 709 (+2525.93%)
Mutual labels:  pinyin
rust-pinyin
汉字转拼音
Stars: ✭ 111 (+311.11%)
Mutual labels:  pinyin
Rime Cloverpinyin
🍀️四叶草拼音输入方案,做最好用的基于rime开源的简体拼音输入方案!
Stars: ✭ 478 (+1670.37%)
Mutual labels:  pinyin
Go Pinyin
汉字转拼音
Stars: ✭ 907 (+3259.26%)
Mutual labels:  pinyin
Redis Search
Deprecated! High performance real-time prefix search, indexes store in Redis for Rails application
Stars: ✭ 713 (+2540.74%)
Mutual labels:  pinyin
Xmnlp
xmnlp:提供中文分词, 词性标注, 命名体识别,情感分析,文本纠错,文本转拼音,文本摘要,偏旁部首等功能
Stars: ✭ 591 (+2088.89%)
Mutual labels:  pinyin

pinyin

汉字转带有声调的汉语拼音,汉字转无声调的汉语拼音,汉字转成汉语拼音首字母,获取英文姓名首字母,获取中文名

Install

composer require xiaobopang/pinyin

Example

<?php

require_once './vendor/autoload.php';

use Xiaobopang\Pinyin\Pinyin;

$pinyin = new Pinyin();

//没有声调
$testStr = $pinyin->transformWithoutTone("你好,中国");

var_dump($testStr); //string(13) "nihaozhongguo"

//汉字首字母
$testStr1 = $pinyin->transformUcwords("中国");

var_dump($testStr1);  //string(2) "ZG"

//有声调
$testStr2 = $pinyin->transformWithTone("你好,中国");

var_dump($testStr2);  //string(24) "nǐ hǎo ,zhōng guó "

//获取英文名首字母
$testStr3 = $pinyin->getFirstCharacter('peter pang');
var_dump($testStr3);  //string(2) "PP"

//获取中文名
$testStr4 = $pinyin->getFirstName("吴彦祖");
var_dump($testStr4);   //string(6) "彦祖"
    
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].