1. Generate mapping from character to Pinyin
Choose a Pinyin for each character, using the data source A and data source B.
If a character is in data source B, choose the first Pinyin.
If a character is not in data source B, and has a Pinyin using tone 5, chose the one with tone 5
Otherwise, choose the first PinYin in alphabetical order
Use "uy" to represent "ü"
Add "e" for PinYin without vowel: "ng" -> "eng", "hng" -> "heng"
2. Generate stroke letters
Pick the two leading strokes of each character, using data source C
If there is only one stroke, pick only the first stroke
If the two leading strokes are the same, pick only the first stroke
Convert the one or two strokes to letters as table below
3. Generate PinHua
Insert the one or two stroke-based letters and tone leter before the first vowel letter
Stroke-to-Letter Conversion Table