如何一次训练Tesseract对多个文件? [英] How to train Tesseract on multiple files at once?
本文介绍了如何一次训练Tesseract对多个文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我第一次训练Tesseract时,我使用的教程显示了在每个相关文件上运行命令的方法,但我不能再找到。
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
推荐答案
对于一个快速和脏的循环,你可以尝试:
For a quick and dirty loop, you can try:
for i in *.tif ; do tesseract $i $i.txt; done;
您也可以使用 find -iname ____ path
从文件子集中进行选择。
You can also do it with a find -iname ____ path
to select from a subset of files.
如果你想真正解析文件名,你可能想使用脚本语言, -foo out。
If you want to really "parse" filenames, you may want to use a scripting language, or get your bash-foo out.
这篇关于如何一次训练Tesseract对多个文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文