This repository contains the official Sight API Clojure client. The Sight API is a text recognition service.
TODO
(def client (->Client "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"))
(def pages (recognize client (list "invoice.pdf" "receipt.png")))
pages looks like this:
{
"Pages": [
{
"Error": "",
"FileIndex": 0,
"PageNumber": 1,
"NumberOfPagesInFile": 3,
"RecognizedText": [ ... ]
},
...
]
}
FileIndex is the index of this file in the original request's "files" array.
RecognizedText looks like this:
"RecognizedText": [
{
"Text": "Invoice",
"Confidence": 0.22863210084975458
"TopLeftX": 395,
"TopLeftY": 35,
"TopRightX": 449,
"TopRightY": 35,
"BottomLeftX": 395,
"BottomLeftY": 47,
"BottomRightX": 449,
"BottomRightY": 47,
},
...
]
TODO
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.,
(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?Edit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |