tesseract_download | R Documentation |
Helper function to download training data from the official tessdata repository. On Linux, the fast training data can be installed directly with yum or apt-get.
tesseract_download(
lang,
datapath = NULL,
model = c("fast", "best"),
progress = interactive()
)
lang |
three letter code for language, see tessdata repository. |
datapath |
destination directory where to download store the file |
model |
either |
progress |
print progress while downloading |
Tesseract uses training data to perform OCR. Most systems default to English training data. To improve OCR performance for other languages you can to install the training data from your distribution. For example to install the spanish training data:
tesseract-ocr-spa (Debian, Ubuntu)
tesseract-langpack-spa
(Fedora, EPEL)
On Windows and MacOS you can install languages using the tesseract_download function
which downloads training data directly from github
and stores it in a the path on disk given by the TESSDATA_PREFIX
variable.
Other tesseract:
ocr()
,
tesseract()
## Not run:
if(is.na(match("fra", tesseract_info()$available)))
tesseract_download("fra", model = 'best')
french <- tesseract("fra")
text <- ocr("https://jeroen.github.io/images/french_text.png", engine = french)
cat(text)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.