【问题标题】:How to install language in tesseract OCR如何在 tesseract OCR 中安装语言
【发布时间】:2023-12-09 00:10:01
【问题描述】:

我已经安装了 tesseract OCR,它的语言列表中只有 'eng' 和 'osd'。我需要德语。我厌倦了遵循命令

brew install tesseract-ocr-deu

但我遇到了错误。

Error: No available formula with the name "tesseract-ocr-deu" 
==> Searching for a previously deleted formula (in the last month)...
Warning: homebrew/core is shallow clone. To get complete history run:
   git -C "$(brew --repo homebrew/core)" fetch --unshallow

Error: No previously deleted formula found.
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching taps...
==> Searching taps on GitHub...
Error: No formulae found in taps.

【问题讨论】:

标签: ocr tesseract


【解决方案1】:

Mac OS 类型

brew install tesseract-lang 

安装所有语言,您可以检查它们,

tesseract --list-langs

【讨论】:

    【解决方案2】:

    在 MacOS Mojave (10.14.3) 上有效:

       brew install tesseract-lang
    

    【讨论】:

      【解决方案3】:

      为了完整起见,我添加了一个关于如何在 Linux 上通过 Tesseract OCR 安装和使用非英语语言的答案。由于这是我在 Google 上获得的第一个结果,我认为它可能会对某人有所帮助。

      在 Ubuntu/Debian 上安装德语:

      $ sudo apt-get install tesseract-ocr-deu
      

      所有支持语言的语言代码都可以在这里找到:

      https://github.com/tesseract-ocr/tessdoc/blob/master/Data-Files-in-different-versions.md

      在 OCR 引擎使用选项中指定语言:-l lang,例如德语:

      $ tesseract -l deu 'imagename' 'stdout'
      

      【讨论】:

        【解决方案4】:

        您从 tesseract 存储库下载它们。

        目前 4.0 的 tessdata 可用 here 和 3.04 的 tessdata here

        【讨论】:

          最近更新 更多