0.0.9 • Published 5 years ago

word-pinyinizer v0.0.9

Weekly downloads
5
License
-
Repository
-
Last release
5 years ago

word-pinyinizer

Node.js module that transforms chinese words into pinyin.

IMPORTANT NOTE : this module is fetching the data from writtenchinese front pages. That means there is a huge chance that the data is not available. It returns null if the data was not found or if the website is down. USE only for experimental purpose.

It also means you should obtain the rights from the author of the website if you are to use this script in a production environment (again, not recommended).

Installation

yarn add word-pinyinizer

Usage

import toPinyin from 'word-pinyinizer'

toPinyin('拼音') // returns "pīn yīn"

Command-line

$ yarn global add word-pinyinizer
$ word-pinyinizer 拼音
pīn yīn
$
0.0.9

5 years ago