hanzi

Utilities for dealing with chinese characters

Hanzi

Utilities for dealing with chinese characters

Installation

  1. Add the dependency to your shard.yml:

    dependencies:
      hanzi:
        github: nipinium/hanzi
    
  2. Run shards install

Usage

require "hanzi"

# Convert pinyin numbers to tone marks
puts Hanzi::Pinyin.number_to_tone("pin1 yin1")
# => "pīn yīn"

# Translate hanzi to pinyin
puts Hanzi::Pinyin.hanzi_to_pinyin("节操")
# => "jié cāo"

LICENSE

MIT

Repository

hanzi

Owner
Statistic
  • 1
  • 0
  • 0
  • 0
  • 0
  • about 5 years ago
  • February 7, 2019
License

MIT License

Links
Synced at

Sun, 05 May 2024 01:51:14 GMT

Languages