2016-11-07 14:12:37 -08:00
|
|
|
.. _lang-packs:
|
|
|
|
|
2016-09-06 13:52:40 -07:00
|
|
|
Installing additional language packs
|
|
|
|
====================================
|
|
|
|
|
2019-03-01 23:15:32 -08:00
|
|
|
OCRmyPDF uses Tesseract for OCR, and relies on its language packs for languages other than English.
|
2016-09-06 13:52:40 -07:00
|
|
|
|
|
|
|
Tesseract supports `most languages <https://github.com/tesseract-ocr/tesseract/blob/master/doc/tesseract.1.asc#languages>`_.
|
|
|
|
|
|
|
|
For Linux users, you can often find packages that provide language packs:
|
|
|
|
|
|
|
|
Debian and Ubuntu users
|
|
|
|
-----------------------
|
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
|
|
|
|
# Display a list of all Tesseract language packs
|
|
|
|
apt-cache search tesseract-ocr
|
|
|
|
|
2018-10-14 16:28:50 -04:00
|
|
|
# Install Chinese Simplified language pack
|
|
|
|
apt-get install tesseract-ocr-chi-sim
|
|
|
|
|
2016-09-06 13:52:40 -07:00
|
|
|
You can then pass the ``-l LANG`` argument to OCRmyPDF to give a hint as to what languages it should search for. Multiple
|
2016-11-07 14:12:37 -08:00
|
|
|
languages can be requested using either ``-l eng+fre`` (English and French) or ``-l eng -l fre``.
|
2016-09-06 13:52:40 -07:00
|
|
|
|
2018-10-14 16:28:50 -04:00
|
|
|
Fedora users
|
|
|
|
------------
|
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
|
|
|
|
# Display a list of all Tesseract language packs
|
|
|
|
dnf search tesseract
|
|
|
|
|
|
|
|
# Install Chinese Simplified language pack
|
|
|
|
dnf install tesseract-langpack-chi_sim
|
|
|
|
|
|
|
|
You can then pass the ``-l LANG`` argument to OCRmyPDF to give a hint as to
|
|
|
|
what languages it should search for. Multiple languages can be requested using
|
|
|
|
either ``-l eng+fre`` (English and French) or ``-l eng -l fre``.
|
|
|
|
|
2017-01-26 23:02:44 -08:00
|
|
|
macOS users
|
|
|
|
-----------
|
2016-09-06 13:52:40 -07:00
|
|
|
|
|
|
|
You can install additional language packs by :ref:`installing Tesseract using Homebrew with all language packs <macos-all-languages>`.
|
|
|
|
|
|
|
|
Docker users
|
|
|
|
------------
|
|
|
|
|
2019-03-01 23:15:32 -08:00
|
|
|
Users of the OCRmyPDF Docker image should install language packs into a derived Docker image as :ref:`described in that section <docker-lang-packs>`.
|