This repository contains the official Sight API Clojure client. The Sight API is a text recognition service.
[sight "1.1.0"]
sight {:mvn/version "1.1.0"}
compile 'sight:sight:1.1.0
<dependency>
<groupId>sight</groupId>
<artifactId>sight</artifactId>
<version>1.1.0</version>
</dependency>
:require
:(ns my-namespace
...
(:require [sight.core :as sight]))
(let [client (sight/->Client "9736d226-07ff-4ebc-9f53-74461eed2fc3")
files ["/user/foos/dummy.pdf"]]
(sight/recognize client files))
Response would look something like this
{:pages [{:error "",
:file-index 0,
:page-number 1,
:number-of-pages-in-file 1,
:recognized-text [{:top-left-y 193,
:bottom-right-y 243,
:bottom-left-x 152,
:top-right-x 500,
:bottom-left-y 248,
:top-right-y 188,
:top-left-x 151,
:bottom-right-x 501,
:confidence 0.10092532855610954,
:text "Dummy PDF file"}]}]}
:file-index
is the index of this file in the original request's "files" array.
recognize
has an additional signature with a third parameter, word-level-bounding-boxes
. If it's true
then word-level bounding boxes are returned instead of sentence-level bounding boxes. E.g.,
(sight/recognize client (list "invoice.pdf" "receipt.png") true)
Here is the official documentation for the Sight API.
This code is licensed under Apache V2.0. The full text of the license can be found in the "LICENSE" file.
Can you improve this documentation? These fine people already did:
Siftrics Founder & Ashwin BhaskarEdit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close