Skip to content

toritaba/ruby_string_to_pinyin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A Ruby gem that converts a string consisting of Simplified Chinese characters into Hanyu Pinyin.

It adds a 'to_pinyin' method to the String class.

Example Usage:

require 'rubygems'
require 'string_to_pinyin'

a = '名'
puts a.to_pinyin
# "míng"

*Note: It requires the unix program 'grep' to be installed

Installation:
  <sudo> gem install ruby_string_to_pinyin


License:
  The MIT License. See LICENSE file for more information.

See also two alternative gems:
http://github.com/superslau/pinyinify
http://github.com/chenillen/pinyin

About

Converts Simplified Chinese characters to pinyin

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages