Pinyinizer

Adds proper (Mandarin) Chinese tone diacritics to a string.

The four tones of Chinese are commonly represented by the numbers 1-4. This module enables one to take a string with numerical tone representation and transforming it into a string with proper tone diacritics.

NumericTone DiacriticDescription
ma1level
ma2rising
ma3dipping
ma4falling
mamaneutral

Installation

dependencies:
  pinyinizer: 1.x #latest version
import 'package:pinyinizer/Pinyinizer.dart';

Usage

var pinyinizer = Pinyinizer();
pinyinizer.pinyinize("xie3 dian3er shen2me ba")
// return xiě diǎner shénme ba

Libraries

pinyinizer