项目作者: uiur

项目描述 :
Translate Chinese pinyin to Japanese kana
高级语言: Ruby
项目地址: git://github.com/uiur/pinyin_to_kana.git
创建时间: 2020-02-27T05:18:42Z
项目社区:https://github.com/uiur/pinyin_to_kana

开源协议:MIT License

下载


PinyinToKana

Translate Chinese pinyin to Japanese kana.

Mapping from pinyin to kana is based on the guideline 中国語音節表記ガイドライン 平凡社版

  1. PinyinToKana.pinyin_to_kana('xi jin ping')
  2. #=> 'シージンピン'

You can translate chinese hanzi to kana with chinese_pinyin gem:

  1. Pinyin.t('習近平')
  2. #=> "xi jin ping"
  3. PinyinToKana.pinyin_to_kana(Pinyin.t('習近平'))
  4. #=> 'シージンピン'

Installation

Add this line to your application’s Gemfile:

  1. gem 'pinyin_to_kana'

And then execute:

  1. $ bundle

Or install it yourself as:

  1. $ gem install pinyin_to_kana

License

The gem is available as open source under the terms of the MIT License.