:: 参考了
:: http://wenku.baidu.com/link?url=MjO8qNL3ttMb6gqjmprzXBxIWKvRwxSYjjDNGOSypuM-s5dKeuan1OOF7r3N6Fe6zXrqnrZmBuAB6xhn_Gxqk_
:: http://www.lixin.me/blog/2012/05/26/29536
:: zhangtao
:: 将此bat脚本,保存为xxx.bat,将NAME与LANG两个变量设置为对应的值,然后存放在对应的目录,即可用。
@set NAME=heilongjiang.ft.exp0
@set LANG=heilongjiang
@
if not exist %NAME%.box ( goto LABLE_MAKEBOX )
else ( goto LABLE_TRIAN )
:LABLE_MAKEBOX
@echo -------begin,make box
-----------
@pause
..\ocr.exe %NAME%.tif %NAME% -l eng batch.nochop makebox
@
if not exist %NAME%.box goto END_FLAG
@echo -------end,make box ,ok-----------
@pause
exit
:LABLE_TRIAN
@echo -------begin,train
-----------
@pause
..\ocr.exe %NAME%.tif %NAME% box.train
@pause
..\unicharset_extractor.exe %NAME%.box
@pause
echo ft 0 0 1 0 0 > %LANG%.font_properties
..\mftraining.exe -F %LANG%.font_properties -U unicharset %NAME%.tr
@pause
..\cntraining.exe %NAME%.tr
@pause
@rename normproto %LANG%.normproto
@rename unicharset %LANG%.unicharset
@rename inttemp %LANG%.inttemp
@rename pffmtable %LANG%.pffmtable
@rename shapetable %LANG%.shapetable
@pause
..\combine_tessdata.exe %LANG%.
@echo %NAME%.traineddata
@echo ------end,succ-------------
@pause