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.
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"
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
"
- Nikolai Matiushev
- Inspired by and uses parts of code from https://github.com/GOFAI/cl-tesseract
2020 Nikolai Matiushev 2015 Edward Geist ([email protected])
Licensed under the MIT License.