0

Pinyin Chinese text contains less information than its Hanzi equivalent, so its transcription is ambiguous: to identify the correct characters for some given Pinyin requires context.

For this reason ICU uconv will convert Latin text into Han (Hanzi) text, but not the reverse.

Is there free or free-to-use software that will return a list of possible Han characters for a given Pinyin syllable or syllables?

1 Answer 1

2

There are a multitude of online pinyin to Hanzi converters as well as several pinyin-based IMEs that do what you want but not in a way that you can include them in your own program.

Over on the Chinese Language Stack Exchange they suggest using the Google Translate API. This would allow you to integrate it with you own program but won't give you a list of all possible Hanzi characters, like you request.

I can't seem to find an out-of-the-box solution that does everything you need but depending on your programming ability, you may be able to build your own rudimentary pinyin-to-Hanzi converter using available resources. Looking into several Hanzi-to-pinyin converters, I've noticed that most simply perform a dictionary look-up and that they store the actual Hanzi-to-pinyin conversions as plain text files. You could easily read those files yourself, strip out the tonal information, and build a reverse mapping where each valid pinyin syllable maps to a list of Hanzi characters.

1
  • Using those database files is the key then. Thank you so much! Commented Dec 11, 2017 at 21:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.