summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2022-08-12 01:07:51 -0400
committerGuix Patches Tester <>2022-08-12 06:10:29 +0100
commit6924d7cee34261859ec48e78914815fb92a42f0f (patch)
tree7feeebd8b19e364aa373d1683363449e5bc5285d
parentdd7a29faf3eece4d1a672946d421e2bb72f245cf (diff)
downloadguix-patches-6924d7cee34261859ec48e78914815fb92a42f0f.tar
guix-patches-6924d7cee34261859ec48e78914815fb92a42f0f.tar.gz
gnu: Add tesseract-ocr-tessdata-fast.
* gnu/packages/ocr.scm (tesseract-ocr-tessdata-fast): New variable.
-rw-r--r--gnu/packages/ocr.scm27
1 files changed, 27 insertions, 0 deletions
diff --git a/gnu/packages/ocr.scm b/gnu/packages/ocr.scm
index cc0f84d55c..f22aa191c9 100644
--- a/gnu/packages/ocr.scm
+++ b/gnu/packages/ocr.scm
@@ -28,6 +28,7 @@
#:use-module (guix gexp)
#:use-module (guix git-download)
#:use-module (guix build-system cmake)
+ #:use-module (guix build-system copy)
#:use-module (guix build-system gnu)
#:use-module (guix build-system python)
#:use-module (gnu packages)
@@ -73,6 +74,32 @@ feature extraction method. It can read images in PBM, PGM or PPM formats and
it produces text in 8-bit or UTF-8 formats.")
(license license:gpl3+)))
+(define-public tesseract-ocr-tessdata-fast
+ (package
+ (name "tesseract-ocr-tessdata-fast")
+ (version "4.1.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/tesseract-ocr/tessdata_fast")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1m310cpb87xx8l8q7jy9fvzf6a0m8rm0dmjpbiwhc2mi6w4gn084"))))
+ (build-system copy-build-system)
+ (arguments (list #:install-plan #~'(("." "share/tesseract-ocr/tessdata"))
+ #:phases #~(modify-phases %standard-phases
+ (add-after 'unpack 'delete-broken-links
+ (lambda _
+ (delete-file "configs")
+ (delete-file "pdf.ttf"))))))
+ (home-page "https://github.com/tesseract-ocr/tessdata_fast")
+ (synopsis "Fast integer versions of trained LSTM models")
+ (description "This repository contains fast integer versions of trained
+models for the Tesseract OCR Engine.")
+ (license license:asl2.0)))
+
(define-public tesseract-ocr
;; There are useful commits beyond the last official stable release.
(let ((commit "97079fa353557af6df86fd20b5d2e0dff5d8d5df")