Pure Javascript OCR for more than 100 Languages 📖🎉🖥
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Guillermo 4741312b3e merge 8 years ago
dist add babelrc, switch to createTesseractWorker 8 years ago
src merge 8 years ago
.babelrc add babelrc, switch to createTesseractWorker 8 years ago
.gitignore ginignore, package.json 9 years ago
README.md add plug for pull 8 years ago
devServer.js rewrite 8 years ago
index.html add url option 8 years ago
package.json rewrite 8 years ago
webpack.config.dev.js add babelrc, switch to createTesseractWorker 8 years ago
webpack.config.prod.js add babelrc, switch to createTesseractWorker 8 years ago

README.md

UNDER CONTRUCTION

Due for Release on Monday, Oct 3, 2016

tesseract.js

Tesseract.js is a pure javascript version of the Tesseract OCR Engine that can recognize English, Chinese, Russian, and 60 other languages.

Installation

Tesseract.js works with a <script> tag via local copy or cdn, or with npm (if you're using webpack / browserify).

Script Tag

CDN

<script src='https://cdn.rawgit.com/naptha/tesseract.js/5ed4c0bc/dist/tesseract.js'></script>

<script>
var worker = createTesseractWorker('https://cdn.rawgit.com/naptha/tesseract.js/5ed4c0bc/dist/tesseract.worker.js')

worker.recognize('#my-image')
    .progress(function (p) { console.log('progress', p) })
    .then(function (result) { console.log('result', result) })
</script>

Local

First grab copies of tesseract.js and tesseract.worker.js from the dist folder. Then include tesseract.js on your page like this:

<script src='/path/to/tesseract.js'></script>

<script>
var worker = createTesseractWorker('/path/to/tesseract.worker.js')

worker.recognize('#my-image')
    .progress(function (p) { console.log('progress', p) })
    .then(function (result) { console.log('result', result) })
</script>

npm

###TODO

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 in to the folder, npm install, and npm start

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

  ... a bunch of npm stuff ... 

  tesseract.js@1.0.0 start /Users/guillermo/Desktop/code_static/tesseract.js
  node devServer.js

Listening at http://localhost:7355

Then open http://localhost:7355 in your favorite browser. The devServer automatically rebuilds tesseract.js and tesseract.worker.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

Send us a Pull Request!