Custom Chinese Dialect
November 9, 2024 ยท View on GitHub
Make Custom Dict
pinyin-makedict is the tool for creating custom dialect dictionaries.
Create a derived class
Put the dictionary generated by the previous project into the res/dict folder, with the folder name inheriting the id passed in from the ChineseG2p class, and manually create user_dict.txt.
Inherit ToneCoverter class, declare Pinyin Style and implement corresponding conversion function, refer to ManTone.h.
Inherit the ChineseG2p class, initialize the converter in the constructor, and override interfaces such as hanziToPinyin (usually only requiring modification of default parameters), refer to Pinyin.h.