start.bat 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. echo 1 Create Box File
  2. tesseract num.font.exp0.tif num.font.exp0 -l chi_sim --psm 7 batch.nochop makebox
  3. pause
  4. echo 2 Create Tr File
  5. tesseract num.font.exp0.tif num.font.exp0 -l chi_sim --psm 7 box.train
  6. echo 3 Create Unicharset File
  7. unicharset_extractor num.font.exp0.box
  8. echo 4 Create font_properties File
  9. echo "font 0 0 0 0 0" > font_properties
  10. echo 5 Create Shape File
  11. shapeclustering -F font_properties -U unicharset -O num.unicharset num.font.exp0.tr
  12. echo 6 Training the data
  13. mftraining -F font_properties -U unicharset -O num.unicharset num.font.exp0.tr
  14. echo 7 Create Shapetable Inttemp Pffmtable Normproto File
  15. cntraining num.font.exp0.tr
  16. echo 8 Rename four files
  17. rename shapetable num.shapetable
  18. rename inttemp num.inttemp
  19. rename pffmtable num.pffmtable
  20. rename normproto num.normproto
  21. echo 9 Create .traineddata file
  22. combine_tessdata num.
  23. echo 10 remove files
  24. del font_properties -y
  25. del unicharset -y
  26. del num.font.exp0.tr -y
  27. del num.inttemp -y
  28. del num.pffmtable -y
  29. del num.shapetable -y
  30. del num.unicharset -y
  31. del num.normproto -y
  32. echo 11 copy files
  33. copy num.traineddata D:\Tesseract-OCR\tessdata
  34. pause