Giter VIP home page Giter VIP logo

tesseract.js's Introduction

License Code Style Maintenance

Build Status npm version Downloads Total Downloads Month

Tesseract.js v2 is now available and under development in master branch, check support/1.x branch for v1.

Tesseract.js is a javascript library that gets words in almost any language out of images. (Demo)

fancy demo gif

Tesseract.js works with script tags, webpack, and Node.js. After you install it, using it is as simple as

import { TesseractWorker } from 'tesseract.js';
const worker = new TesseractWorker();

worker.recognize(myImage)
  .progress((p) => { console.log('progress', p);    })
  .then((result) => { console.log('result', result); });

Check out the docs for a full treatment of the API.

Provenance

Tesseract.js wraps an emscripten port of the Tesseract OCR Engine.

Installation

Tesseract.js works with a <script> tag via local copy or CDN, with webpack via npm, and on Node.js via npm. Check out the docs for a full treatment of the API.

CDN

You can simply include Tesseract.js with a CDN like this:

<script src='https://unpkg.com/[email protected]/dist/tesseract.min.js'></script>

After including your scripts, the Tesseract variable will be defined globally!

npm

2.x

Major Changes

  • Upgrade to tesseract v4
  • Support multiple languages, ex: eng+chi_tra
  • Support image formats: png, jpg, bmp, pbm
> yarn add tesseract.js@next

or

> npm install tesseract.js@next --save

1.x

> yarn add tesseract.js

or

> npm install tesseract.js --save

Note: Tesseract.js currently requires Node.js v6.8.0 or higher.

Documentation

Contributing

Development

To run a development copy of tesseract.js, first clone this repo.

> git clone https://github.com/naptha/tesseract.js.git

Then, cd tesseract.js && npm install && npm start

> cd tesseract.js
> npm install && npm start

  ... a bunch of npm stuff ...

  Starting up http-server, serving ./
  Available on:
    http://127.0.0.1:3000
    http://[your ip]:3000

Then open http://localhost:3000/examples/browser/demo.html in your favorite browser. The devServer automatically rebuilds tesseract.dev.js and worker.min.js when you change files in the src folder.

Building Static Files

After you've cloned the repo and run npm install as described in the Development Section, you can build static library files in the dist folder with

> npm run build

tesseract.js's People

Contributors

bijection avatar jeromewu avatar antimatter15 avatar ckuetbach avatar mikewesthad avatar zzarcon avatar hemanth avatar rowasc avatar yonmey avatar reza1615 avatar ytiurin avatar varunshenoy avatar imsukmin avatar rohitjha avatar claushellsing avatar katamaritaco avatar kkota1 avatar aretecode avatar ilyaradinsky avatar gerhut avatar toombs-caeman avatar radarhere avatar andrewthehan avatar helloandre avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.