libpinyin

Library to process and convert Chinese pinyin romanization.

brewmacoslinux
Try with needOr install directly
Source

About

Library to deal with pinyin

Examples

convert Chinese characters to pinyin$ libpinyin-based tools typically used as a library in Python or other languages, not as standalone CLI
look up pinyin for Chinese text$ Applications using libpinyin as a backend library (e.g., RIME, fcitx)
build Chinese input method engine$ Link libpinyin in C/C++ projects: gcc program.c -lpinyin
convert simplified to traditional Chinese with pinyin$ Use libpinyin with IBus or RIME input method frameworks
generate pinyin database for language processing$ Include libpinyin headers in development: #include <pinyin.h>