# download the french training data
# this is wrapped around a \donttest{} block because otherwise the clang19
# CRAN check will fail with a "> 5 seconds" message
# \donttest{
dir <- tempdir()
tesseract_download("fra", model = "best", datapath = dir)
file <- system.file("examples", "french.png", package = "cpp11tesseract")
text <- ocr(file, engine = tesseract("fra", datapath = dir))
cat(text)
# }
# download the greek training data
# this is wrapped around a \donttest{} block because otherwise the clang19
# CRAN check will fail with a "> 5 seconds" message
# \donttest{
dir <- tempdir()
tesseract_contributed_download("grc_hist", model = "best", datapath = dir)
file <- system.file("examples", "polytonicgreek.png",
package = "cpp11tesseract")
text <- ocr(file, engine = tesseract("grc_hist", datapath = dir))
cat(text)
# }
Run the code above in your browser using DataLab