postprocess.py 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. from postprocess0103 import postprocess0103
  2. from postprocess0106 import postprocess0106
  3. from postprocess0105 import postprocess0105
  4. from postprocess0104 import postprocess0104
  5. from postprocess0101 import postprocess0101
  6. from postprocess0117 import postprocess0117
  7. from postprocess0108 import postprocess0108
  8. from postprocess0109 import postprocess0109
  9. from postprocess0110 import postprocess0110
  10. from postprocess0111 import postprocess0111
  11. from postprocess0112 import postprocess0112
  12. from postprocess0113 import postprocess0113
  13. from postprocess0114 import postprocess0114
  14. from postprocess0115 import postprocess0115
  15. from mianji import adjust
  16. def postprocess(selected, data, aiclient, qwclient, sfclient, label_name, name_dw, candidates,yqspecial):
  17. l = postprocess_(selected,data,aiclient,qwclient,sfclient,label_name,name_dw,candidates,yqspecial)
  18. return adjust(l, data, aiclient, qwclient, sfclient)
  19. def postprocess_(selected, data, aiclient, qwclient, sfclient, label_name, name_dw, candidates,yqspecial):
  20. if len(selected) == 0:
  21. return []
  22. if data['bianma'].startswith("0103"):
  23. return postprocess0103(selected, data, aiclient, sfclient)
  24. elif data['bianma'].startswith("0117"):
  25. return postprocess0117(selected, data, aiclient, sfclient)
  26. elif data['bianma'].startswith("0101"):
  27. return postprocess0101(selected, data, aiclient, sfclient)
  28. elif data['bianma'].startswith("0104"):
  29. return postprocess0104(selected, data, aiclient, sfclient)
  30. elif data['bianma'].startswith("0105"):
  31. return postprocess0105(selected, data, aiclient, qwclient, sfclient, label_name, name_dw)
  32. elif data['bianma'].startswith("0106"):
  33. return postprocess0106(selected, data, aiclient, qwclient, sfclient, label_name, name_dw,yqspecial)
  34. elif data['bianma'].startswith("0108"):
  35. return postprocess0108(selected, data, aiclient, qwclient, sfclient, label_name, name_dw)
  36. elif data['bianma'].startswith("0109"):
  37. return postprocess0109(selected, data, aiclient, qwclient, sfclient, label_name, name_dw)
  38. elif data['bianma'].startswith("0110"):
  39. return postprocess0110(selected, data, aiclient, qwclient, sfclient, label_name, name_dw)
  40. elif data['bianma'].startswith("0111"):
  41. return postprocess0111(selected, data, aiclient, qwclient, sfclient, label_name, name_dw)
  42. elif data['bianma'].startswith("0112"):
  43. return postprocess0112(selected, data, aiclient, qwclient, sfclient, label_name, name_dw, candidates)
  44. elif data['bianma'].startswith("0113"):
  45. return postprocess0113(selected, data, aiclient, qwclient, sfclient, label_name, name_dw, candidates)
  46. elif data['bianma'].startswith("0114"):
  47. return postprocess0114(selected, data, aiclient, qwclient, sfclient, label_name, name_dw, candidates)
  48. elif data['bianma'].startswith("0115"):
  49. return postprocess0115(selected, data, aiclient, qwclient, sfclient, label_name, name_dw, candidates)
  50. else:
  51. return selected