How to train Tesseract on multiple files at once?

狂风中的少年 提交于 2019-12-11 08:25:32

问题


When I first trained Tesseract the tutorial I used showed a way to run the commands on each relevant file, but I can no longer find that.

How could I run this command for each file:

tesseract [lang].[fontname].exp[num].tif [lang].[fontname].exp[num] batch.nochop makebox

回答1:


For a quick and dirty loop, you can try:

for i in *.tif ; do tesseract $i $i.txt; done;

You can also do it with a find -iname ____ path to select from a subset of files.

If you want to really "parse" filenames, you may want to use a scripting language, or get your bash-foo out.



来源:https://stackoverflow.com/questions/22117441/how-to-train-tesseract-on-multiple-files-at-once

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!