Socket
Socket
Sign inDemoInstall

cantonese

Package Overview
Dependencies
0
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    cantonese

Cantonese romanization. Cantonese to Latin conversion.


Version published
Maintainers
1
Install size
290 kB
Created

Readme

Source

cantonese

Cantonese romanization. Cantonese to Latin conversion. Supports Traditional and Simplified Chinese characters.

Install via npm:

npm i cantonese

The Cantonese pronunciation data are from www.kawa.net. Please note that not all Chinese characters have corresponding pronunciations in Cantonese.

Usage

  • Function toLatin ( a Chinese character ) returns Array

    Returns possible pronunciations of a Chinese character in Cantonese.

  • Function fromLatin ( a Latin word ) returns Array

    Returns all Chinese characters with specific pronunciation in Cantonese.

Example

var cantonese = require('cantonese'); console.log(cantonese.toLatin('長')); // [ 'cheung', 'jeung' ] console.log(cantonese.fromLatin('cheung')); // [ '倡', '呛', '唱', '嗆', '场', '場', '墙', '娼', '戕', '抢', // '搶', '昌', '暢', '枪', '槍', '牆', '猖', '畅', '祥', '窗', // '翔', '肠', '腸', '蔷', '薔', '詳', '详', '長', '长' ]

Keywords

FAQs

Last updated on 03 Aug 2014

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc