pinyin
3.3.0, released 3 years ago by sunjiao.net
Convert Chinese characters to Pinyin, Zhuyin, and simplified or traditional Chinese.
WASM-ready
What it does
Converts Chinese text to Pinyin and Zhuyin (bopomofo) with multiple formatting options like tone marks or numbers. It also handles simplified and traditional Chinese conversion, heteronyms, and supports custom dictionaries.
AI-written summary of version 3.3.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to convert Chinese characters to Pinyin for sorting or searching.
- You are building apps that require Zhuyin support or Chinese character simplification/traditionalization.
Skip it when
- You need full natural language translation rather than character-to-pinyin transcription.
Strengths
- Accurate and complete Chinese character dictionary with heteronym support.
- Fast conversion speed with multiple output formats (tone marks, numbers, abbreviations).
- Supports Zhuyin and custom user dictionaries.
Weaknesses
- Limited to Chinese character phonetic conversion and text transformation.
- Does not handle full sentence machine translation.
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
import 'package:pinyin/pinyin.dart';
String text = "天府广场";
String pinyin = PinyinHelper.getPinyin(text, separator: " ", format: PinyinFormat.WITHOUT_TONE);Alternatives
Packages that do the same job and could replace pinyin.