Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/lidashuang/pinyin

chinese pinyin lib for elixir
https://github.com/lidashuang/pinyin

Last synced: 3 months ago
JSON representation

chinese pinyin lib for elixir

Awesome Lists containing this project

README

        

Pinyin for Elixir
=========================

简单的汉字转拼音工具

## Example:

```iex
iex(40)> Pinyin.pinyin "Elixir编程语言"
["Elixir", "biān", "chéng", "yǔ", "yán"]
iex(41)> Pinyin.letter "Elixir编程语言"
["Elixir", "bian", "cheng", "yu", "yan"]
iex(42)> Pinyin.letter_with_tone "Elixir编程语言"
["Elixir", "bian1", "cheng2", "yu3", "yan2"]
iex(43)> Pinyin.permlink "Elixir编程语言"
"Elixir-bian-cheng-yu-yan"
iex(44)>
```
## thanks

The pinyin data library from ruby-pinyin project:

https://github.com/janx/ruby-pinyin