def sixtuple2baxter(chars, debug=False, rhymebook=None):
if not rhymebook:<EOL><INDENT>rhymebook = _cd.GY<EOL><DEDENT>if len(chars) != <NUM_LIT:6>:<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>chars = gbk2big5(chars)<EOL>she,hu,deng,diao,yun,sheng = list(chars) <EOL>initial = rhymebook['<STR_LIT>'].get(sheng, '<STR_LIT:?>')<EOL>final = rhymebook['<STR_LIT>'].get(yun, '<STR_LIT:?>')<EOL>tone = rhymebook['<STR_LIT>'].get(diao, '<STR_LIT:?>')<EOL>medial = rhymebook['<STR_LIT>'].get(hu, '<STR_LIT:?>')<EOL>division = rhymebook['<STR_LIT>'].get(deng, '<STR_LIT:?>')<EOL>if debug:<EOL><INDENT>return [(sheng, initial), (hu, medial), (deng, division),(yun, final),<EOL>(diao, tone)]<EOL><DEDENT>if "<STR_LIT:?>" in [initial, final, tone, medial, division]:<EOL><INDENT>raise ValueError("<STR_LIT>".format(<EOL>'<STR_LIT:U+0020>'.join([initial, final, tone, medial, division])))<EOL><DEDENT>final = final[<NUM_LIT:1>:] if final[<NUM_LIT:0>] == '<STR_LIT>' and division in '<STR_LIT:4>'else final<EOL>final = final[<NUM_LIT:1>:] if final[<NUM_LIT:0>] == '<STR_LIT>' and division in '<STR_LIT:3>'else final<EOL>final = final[<NUM_LIT:1>:] if final[<NUM_LIT:0>] == '<STR_LIT:w>' else final<EOL>medial = '<STR_LIT>' if (initial[<NUM_LIT:0>] in '<STR_LIT>' and '<STR_LIT:*>' not in final)or final[<NUM_LIT:0>] in '<STR_LIT:u>'or '<STR_LIT:o>' in final and not '<STR_LIT:*>' in final and not '<STR_LIT:?>' in finalelse medial<EOL>initial = initial[:-<NUM_LIT:1>] if initial.endswith('<STR_LIT>') else initial<EOL>medial = "<STR_LIT>" + medial if division == '<STR_LIT:3>'and '<STR_LIT:i>' not in finaland '<STR_LIT:y>' not in initialelse medial<EOL>final = final[<NUM_LIT:1>:] if final[<NUM_LIT:0>] in '<STR_LIT>' and '<STR_LIT>' in medial else final<EOL>final = final[<NUM_LIT:1>:] if final[<NUM_LIT:0>] in '<STR_LIT:w>' and '<STR_LIT:w>' in medial else final<EOL>final = final[<NUM_LIT:1>:] if final[<NUM_LIT:0>] == '<STR_LIT:*>' or final[<NUM_LIT:0>] == '<STR_LIT:?>' else final<EOL>final = '<STR_LIT:i>' + final[<NUM_LIT:1>:] if final[<NUM_LIT:0>] == '<STR_LIT:!>'and division == '<STR_LIT:4>'and '<STR_LIT:i>' not in finaland (initial[<NUM_LIT:0>] in "<STR_LIT>" or initial.startswith('<STR_LIT>'))else final<EOL>medial = '<STR_LIT>' + medial if division == '<STR_LIT:4>'and '<STR_LIT:!>' in finaland '<STR_LIT>' not in medialand (initial[<NUM_LIT:0>] in "<STR_LIT>" or initial.startswith('<STR_LIT>'))else medial<EOL>final = final[<NUM_LIT:1>:] if final[<NUM_LIT:0>] == '<STR_LIT:!>' else final<EOL>return [initial,medial,final,tone]<EOL>
Convert the classicial six-tuple representation of MCH readings into IPA
(or Baxter's ASCII system). 
This function is more or less implemented in MiddleChinese.