gnu: Add wl-clipboard.
[jackhill/guix/guix.git] / gnu / packages / ocr.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
4 ;;;
5 ;;; This file is part of GNU Guix.
6 ;;;
7 ;;; GNU Guix is free software; you can redistribute it and/or modify it
8 ;;; under the terms of the GNU General Public License as published by
9 ;;; the Free Software Foundation; either version 3 of the License, or (at
10 ;;; your option) any later version.
11 ;;;
12 ;;; GNU Guix is distributed in the hope that it will be useful, but
13 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
14 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ;;; GNU General Public License for more details.
16 ;;;
17 ;;; You should have received a copy of the GNU General Public License
18 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
19
20 (define-module (gnu packages ocr)
21 #:use-module ((guix licenses) #:prefix license:)
22 #:use-module (guix packages)
23 #:use-module (guix download)
24 #:use-module (guix build-system gnu)
25 #:use-module (gnu packages compression)
26 #:use-module (gnu packages image))
27
28 (define-public ocrad
29 (package
30 (name "ocrad")
31 (version "0.26")
32 (source (origin
33 (method url-fetch)
34 (uri (string-append "mirror://gnu/ocrad/ocrad-"
35 version ".tar.lz"))
36 (sha256
37 (base32
38 "0g4fq7maybdnd1471kd05a3f5sb7spa3d26k706rk85sd5wd70y3"))))
39 (build-system gnu-build-system)
40 (native-inputs `(("lzip" ,lzip)))
41 (home-page "https://www.gnu.org/software/ocrad/")
42 (synopsis "Optical character recognition based on feature extraction")
43 (description
44 "GNU Ocrad is an optical character recognition program based on a
45 feature extraction method. It can read images in PBM, PGM or PPM formats and
46 it produces text in 8-bit or UTF-8 formats.")
47 (license license:gpl3+)))
48
49 (define-public tesseract-ocr
50 (package
51 (name "tesseract-ocr")
52 (version "3.04.01")
53 (source
54 (origin
55 (method url-fetch)
56 (uri (string-append
57 "https://github.com/tesseract-ocr/tesseract/archive/"
58 version ".tar.gz"))
59 (file-name (string-append name "-" version ".tar.gz"))
60 (sha256
61 (base32 "0snwd8as5i8vx7zkimpd2yg898jl96zf90r65a9w615f2hdkxxjp"))))
62 (build-system gnu-build-system)
63 (inputs
64 `(("leptonica" ,leptonica)))
65 (arguments
66 '(#:configure-flags
67 (let ((leptonica (assoc-ref %build-inputs "leptonica")))
68 (list (string-append "LIBLEPT_HEADERSDIR=" leptonica "/include")))))
69 (home-page "https://github.com/tesseract-ocr")
70 (synopsis "Optical character recognition engine")
71 (description
72 "Tesseract is an optical character recognition (OCR) engine with very
73 high accuracy. It supports many languages, output text formatting, hOCR
74 positional information and page layout analysis. Several image formats are
75 supported through the Leptonica library. It can also detect whether text is
76 monospaced or proportional.")
77 (license license:asl2.0)))