go-pinyin
Convert Chinese characters to Pinyin
Convert Chinese characters to Pinyin. By default, characters without pinyin are ignored (you can customize how to handle characters without pinyin by customizing the value of the Fallbackparameter, see the example for details). According to the "Chinese Pinyin Scheme" y, w, ü (yu) are not initials, and not all pinyins have initials, if this is not what you expected, what you may need is the initial style FirstLetter ( details ).