**Tessearct.js v2 is now available and under development in master branch, check [support/1.x](https://github.com/naptha/tesseract.js/tree/support/1.x) branch for v1.**
**Tesseract.js v2 is now available and under development in master branch, check [support/1.x](https://github.com/naptha/tesseract.js/tree/support/1.x) branch for v1.**
Tesseract.js is a javascript library that gets words in [almost any language](./docs/tesseract_lang_list.md) out of images. ([Demo](http://tesseract.projectnaptha.com/))
@ -13,7 +13,7 @@ Returns a [TesseractJob](#tesseractjob) whose `then`, `progress`, `catch` and `f
@@ -13,7 +13,7 @@ Returns a [TesseractJob](#tesseractjob) whose `then`, `progress`, `catch` and `f
### Simple Example:
```javascript
const worker = new Tessearct.TesseractWorker();
const worker = new Tesseract.TesseractWorker();
worker
.recognize(myImage)
.then(function(result){
@ -23,7 +23,7 @@ worker
@@ -23,7 +23,7 @@ worker
### More Complicated Example:
```javascript
const worker = new Tessearct.TesseractWorker();
const worker = new Tesseract.TesseractWorker();
// if we know our image is of spanish words without the letter 'e':
worker
.recognize(myImage, 'spa', {
@ -43,7 +43,7 @@ Figures out what script (e.g. 'Latin', 'Chinese') the words in image are writte
@@ -43,7 +43,7 @@ Figures out what script (e.g. 'Latin', 'Chinese') the words in image are writte
Returns a [TesseractJob](#tesseractjob) whose `then`, `progress`, `catch` and `finally` methods can be used to act on the result of the script.
```javascript
const worker = new Tessearct.TesseractWorker();
const worker = new Tesseract.TesseractWorker();
worker
.detect(myImage)
.then(function(result){
@ -57,7 +57,7 @@ A TesseractJob is an object returned by a call to `recognize` or `detect`. It's
@@ -57,7 +57,7 @@ A TesseractJob is an object returned by a call to `recognize` or `detect`. It's
@ -87,7 +87,7 @@ Sets `callback` as the function that will be called every time the job progresse
@@ -87,7 +87,7 @@ Sets `callback` as the function that will be called every time the job progresse
For example:
```javascript
const worker = new Tessearct.TesseractWorker();
const worker = new Tesseract.TesseractWorker();
worker.recognize(myImage)
.progress(function(message){console.log('progress is: ', message)});
```
@ -113,7 +113,7 @@ Sets `callback` as the function that will be called if and when the job successf
@@ -113,7 +113,7 @@ Sets `callback` as the function that will be called if and when the job successf
For example:
```javascript
const worker = new Tessearct.TesseractWorker();
const worker = new Tesseract.TesseractWorker();
worker.recognize(myImage)
.then(function(result){console.log('result is: ', result)});
@ -4,7 +4,7 @@ Check here for an example: https://github.com/jeromewu/tesseract.js-offline
@@ -4,7 +4,7 @@ Check here for an example: https://github.com/jeromewu/tesseract.js-offline
In browser environment, `tesseract.js` simply provides the API layer. Internally, it opens a WebWorker to handle requests. That worker itself loads code from the Emscripten-built `tesseract.js-core` which itself is hosted on a CDN. Then it dynamically loads language files hosted on another CDN.
Because of this we recommend loading `tesseract.js` from a CDN. But if you really need to have all your files local, you can pass extra arguments to `TessearctWorker` to specify custom paths for workers, languages, and core.
Because of this we recommend loading `tesseract.js` from a CDN. But if you really need to have all your files local, you can pass extra arguments to `TesseractWorker` to specify custom paths for workers, languages, and core.
In Node.js environment, the only path you may want to customize is languages/langPath.