Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

arnebrasseur-pinyin

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

arnebrasseur-pinyin

  • 0.1.5
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

pinyin by Arne Brasseur

== DESCRIPTION:

Pinyin can convert between various systems for phonetically writing Mandarin Chinese. It can also handle various representation of tones, so it can be used to convert pinyin with numbers to pinyin with tones.

Supported formats include Hanyu Pinyin, Bopomofo, Wade-Giles and International Phonetic Alphabet (IPA).

== FEATURES/PROBLEMS:

== SYNOPSIS:

require 'pinyin'

reader = Pinyin::Reader.new(:hanyu, :tones) reader << "wo3 ai4 ni3" # => [<Pinyin::Syllable <initial=Empty, final=Uo, tone=3>>, # <Pinyin::Syllable <initial=Empty, final=Ai, tone=4>>, # <Pinyin::Syllable <initial=Ne, final=I, tone=3>>]

writer = Pinyin::Writer.new(:zhuyin, :marks)

writer << (reader << "wo3 ai4 ni3")

=> "ㄨㄛˇ ㄞˋ ㄋㄧˇ"

require 'pinyin/string'

"wo3 ai4 ni3".pretty_tones

=> "wǒ ài nǐ"

== REQUIREMENTS:

  • $KCODE has to be set to "UTF8" for everything to work correctly
  • Facets

== INSTALL:

  • gem install pinyin

== LICENSE: Copyright (c) 2004-2007, Arne Brasseur. (http://www.arnebrasseur.net)

Available as Free Software under the GPLv3 License, see LICENSE.txt for details

FAQs

Package last updated on 11 Aug 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc