pypinyin-dict provides custom pinyin data files from pinyin-data and phrase-pinyin-data to override or supplement the built-in pinyin data in pypinyin. It allows users to use only specific pinyin data sources. Current version 0.9.0, with stable but infrequent releases.
pip install pypinyin-dictVerified import paths — ran on the pinned version, not inferred.
Load a custom pinyin data file (kxhc1983) and use pypinyin normally.
Change 'from pypinyin_dict import load' to 'from pypinyin_dict.pinyin_data import kxhc1983' and call kxhc1983.load()
Use pypinyin_dict.pinyin_data instead of pypinyin_dict.data
Ensure that load() is called only once before any pypinyin calls.