擅长:python、mysql、java
<p><code>tools</code>是一个列表,您需要迭代它们;
这些项目是单独的工具:</p>
<pre><code>for tool in pyocr.get_available_tools():
for lang in tool.get_available_languages():
print("Tool {} supports language {}".format(tool, lang))
</code></pre>
<p>或者,假设您知道要使用<code>tesseract</code>,您可以直接导入它:</p>
^{pr2}$
<p>但是,工具列表反映了系统上安装的程序;要在<code>pyocr</code>中启用<code>tesseract</code>工具,您需要安装单独的<code>tesseract</code>程序。如果在命令路径中找到它,<code>get_available_tools()</code>将列出tesseract。<code>pyocr</code>支持的另一个工具是<code>cuneiform</code>。在</p>