PSeitz / prettify_pinyin

Prettify Pinyin: Turn tone numbers into tone marks

Home Page:https://crates.io/crates/prettify_pinyin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

prettify_pinyin

v1.1.1

About

Turn pinyin written with tone numbers and turn it into pinyin with node marks. prettify_pinyin accepts input in the CC-CEDICT pinyin format (space separated syllables with tone numbers at the end of each syllable), for example: "ni3 hao3" will get turned into "nǐ hǎo".

Usage

extern crate prettify_pinyin;

use prettify_pinyin::prettify;

let test = String::from("ma1 ma2 ma3 ma4 ma");
let formatted: String = prettify(test);

println!("{}", formatted); // --> mā má mǎ mà ma

License

MIT

About

Prettify Pinyin: Turn tone numbers into tone marks

https://crates.io/crates/prettify_pinyin

License:MIT License


Languages

Language:Rust 100.0%