2017 © Pedro Peláez
 

library evernote-ocr

Use the Evernote API to perform text recognition (OCR) on an image file.

image

estey/evernote-ocr

Use the Evernote API to perform text recognition (OCR) on an image file.

  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 8 Versions
  • 4 % Grown

The README.md

Evernote OCR

Latest Stable Version Build Status Coverage Status, (*1)

This is an unofficial library for using the Evernote API as a means for image text recognition. Please be advised that using the Evernote API solely for the purpose of OCR for your application is a violation of the API License Agreement., (*2)

Installation

Install this package through Composer by editing your project's composer.json file to require estey/evernote-ocr., (*3)

``` json { "require": { "estey/evernote-ocr": "0.2.*" } }, (*4)


Then, update Composer: composer update To get a new Evernote Dev Token, sign in to your account and use this link: [https://www.evernote.com/api/DeveloperToken.action](https://www.evernote.com/api/DeveloperToken.action) Usage ----- ``` php use Estey\EvernoteOCR\Client; $client = new Client('YOUR DEV TOKEN'); $response = $client->recognize('path/to/image.jpg'); print_r($response);

The recognize method will return an array of TextBlock objects, each with an array of text recognition options. Each Text object contains the recognized text and a confidence score of 0-100. Each TextBlock contains the X and Y coordinates where the text was found and the width and height of the text block in pixels., (*5)

Array
(
    [0] => Estey\EvernoteOCR\TextBlock Object
        (
            [x] => 51
            [y] => 82
            [width] => 307
            [height] => 35
            [options] => Array
                (
                    [0] => Estey\EvernoteOCR\Text Object
                        (
                            [text] => SEPTEMBER
                            [confidence] => 91
                        )

                )

        )

    [1] => Estey\EvernoteOCR\TextBlock Object
        (
            [x] => 370
            [y] => 87
            [width] => 128
            [height] => 30
            [options] => Array
                (
                    [0] => Estey\EvernoteOCR\Text Object
                        (
                            [text] => 2014
                            [confidence] => 77
                        )

                    [1] => Estey\EvernoteOCR\Text Object
                        (
                            [text] => 201 a
                            [confidence] => 35
                        )

                )

        )

)

Laravel Filesystem Adapter

If you're using Laravel, there is a service provider available. Open app/config/app.php, and add the service provider to the providers array. You'll also need to add your Evernote Dev Token to your .env file with the key set to EVERNOTE_DEV_TOKEN., (*6)

'Estey\EvernoteOCR\Providers\Illuminate\EvernoteOCRServiceProvider'

Use it like so:, (*7)

``` php, (*8)

$client = App::make('evernote_ocr', ['path/to/image.jpg']); $response = $client->recognize();, (*9)

print_r($response);, (*10)


Flysystem Adapter ----------------- The Evernote OCR package comes with a built in adapter to support the [Flysystem](http://flysystem.thephpleague.com) filesystem library. ``` php use Estey\EvernoteOCR\Client; use Estey\EvernoteOCR\FileAdapters\FlysystemFileAdapter; use League\Flysystem\Filesystem; use League\Flysystem\Adapter\Local as Adapter; $filesystem = new Filesystem( new Adapter(__DIR__ . '/path/to/root/') ); $client = new Client('YOUR DEV TOKEN'); $file = new FlysystemFileAdapter('path/to/image.jpg', $filesystem); $response = $client->recognize($file); print_r($response);

License

The MIT License (MIT). Please see License File for more information., (*11)

The Versions

17/10 2014

v0.1.3

0.1.3.0 http://www.bradestey.com/projects/evernote-ocr

Use the Evernote API to perform text recognition (OCR) on an image file.

  Sources   Download

MIT

The Requires

 

The Development Requires

evernote ocr text recognition evernote ocr

16/10 2014

v0.1.2

0.1.2.0 http://www.bradestey.com/projects/evernote-ocr

Use the Evernote API to perform text recognition (OCR) on an image file.

  Sources   Download

MIT

The Requires

 

The Development Requires

evernote ocr text recognition evernote ocr

15/10 2014

v0.1.1

0.1.1.0 http://www.bradestey.com/projects/evernote-ocr

Use the Evernote API to perform text recognition (OCR) on an image file.

  Sources   Download

MIT

The Requires

 

The Development Requires

evernote ocr text recognition evernote ocr

13/10 2014

v0.1.0

0.1.0.0 http://www.bradestey.com/projects/evernote-ocr

Use the Evernote API to perform text recognition (OCR) on an image file.

  Sources   Download

MIT

The Requires

 

The Development Requires

evernote ocr text recognition evernote ocr