@baranwang/pinyin
TypeScript icon, indicating that this package has built-in type declarations

1.6.0 • Public • Published

Pinyin

Node.js Package

Node.js 汉字转拼音,支持多音字,自动分词

安装

npm i @baranwang/pinyin
# or
yarn add @baranwang/pinyin
# or
pnpm add @baranwang/pinyin

使用

const { Pinyin } = require("@baranwang/pinyin");

const pinyin = new Pinyin();

pinyin.get("你好"); // [["nǐ hǎo"]]

关于

词典来源

mozillazg/pinyin-data

mozillazg/phrase-pinyin-data

分词

novel-segment

Package Sidebar

Install

npm i @baranwang/pinyin

Weekly Downloads

3

Version

1.6.0

License

MIT

Unpacked Size

16.8 MB

Total Files

7

Last publish

Collaborators

  • baranwang