Skip to content

Latest commit

 

History

History
57 lines (44 loc) · 1.45 KB

README.org

File metadata and controls

57 lines (44 loc) · 1.45 KB

Tesseract-Capi - Tesseract C API wrapper

This system provides SWIG generated C API wrappers for Tesseract versions 3.05.02, 4.1.1, and 5.0.0. Using https://github.com/egao1980/swig/tree/revive-cffi as SWIG dropped CFFI support a while ago.

Usage

CL-USER> (ql:quickload :tesseract-capi)
To load "tesseract-capi":
  Load 1 ASDF system:
    tesseract-capi
; Loading "tesseract-capi"
...
(:TESSERACT-CAPI)
CL-USER> (tesseract-capi:tessversion)
"5.0.0-alpha-647-g4a00"

Installation

Preferred way of installing tesseract-capi is by using Ultralisp.org distribution.

;; install Ultralisp if you haven't done it yet
(ql-dist:install-dist "http://dist.ultralisp.org/"
                      :prompt nil)

;; install the wrapper code
(ql:quickload :tesseract-capi)

(let ((tesseract-capi:*tessdata-directory* "path/to/tessdata"))
           (tesseract-capi:image-to-text "tests/data/fox.png"))

"This is a lot of 12 point text to test the
ocr code and see if it works on all types
of fle format

The quick brown dog jumped over the
lazy fox. The quick brown dog jumped
over the lazy fox. The quick brown dog
jumped over the lazy fox. The quick
brown dog jumped over the lazy fox
"

Author

  • Nikolai Matiushev

Credits

Copyright

2020 Nikolai Matiushev 2015 Edward Geist (egeist@stanford.edu)

License

Licensed under the MIT License.