Browse Source

Fixes to README.md

pull/36/head
Rohit Jha 8 years ago
parent
commit
7fb328e3e6
  1. 14
      README.md

14
README.md

@ -2,14 +2,14 @@ @@ -2,14 +2,14 @@
[![npm version](https://badge.fury.io/js/tesseract.js.svg)](https://badge.fury.io/js/tesseract.js)
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/))
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/))
<!-- Under the hood, Tesseract.js wraps [tesseract.js-core](https://github.com/naptha/tesseract.js-core), an [emscripten](https://github.com/kripken/emscripten) port of the [Tesseract OCR Engine](https://github.com/tesseract-ocr/tesseract).
-->
[![fancy demo gif](./demo.gif "Demo")](http://tesseract.projectnaptha.com)
Tesseract.js works with script tags, webpack/browserify, and node. [After you install it](#installation), using it is as simple as
Tesseract.js works with script tags, webpack/Browserify, and Node.js. [After you install it](#installation), using it is as simple as
```javascript
Tesseract.recognize(myImage)
.progress(function (p) { console.log('progress', p) })
@ -20,11 +20,11 @@ Tesseract.recognize(myImage) @@ -20,11 +20,11 @@ Tesseract.recognize(myImage)
# Installation
Tesseract.js works with a `<script>` tag via local copy or cdn, with webpack and browserify via `npm`, and on node via `npm`. [Check out the docs](#docs) for a full treatment of the API.
Tesseract.js works with a `<script>` tag via local copy or CDN, with webpack and Browserify via `npm`, and on Node.js via `npm`. [Check out the docs](#docs) for a full treatment of the API.
## &lt;script />
You can simply include Tesseract.js with a cdn like this:
You can simply include Tesseract.js with a CDN like this:
```html
<script src='https://cdn.rawgit.com/naptha/tesseract.js/1.0.7/dist/tesseract.js'></script>
```
@ -36,7 +36,7 @@ First: @@ -36,7 +36,7 @@ First:
```shell
> npm install tesseract.js --save
```
> Note: Tesseract.js currently requires node v6.8.0 or greater.
> Note: Tesseract.js currently requires Node.js v6.8.0 or higher.
Then
@ -141,7 +141,7 @@ On a browser, an image can be: @@ -141,7 +141,7 @@ On a browser, an image can be:
In NodeJS, an image can be
In Node.js, an image can be
- a path to a local image
- a `Buffer` instance containing a `PNG` or `JPEG` image
- a `ImageData` instance (an object containing `width`, `height` and `data` properties)
@ -256,7 +256,7 @@ A string specifying the location of the [tesseract.js-core library](https://gith @@ -256,7 +256,7 @@ A string specifying the location of the [tesseract.js-core library](https://gith
A string specifying the location of the [tesseract.worker.js](./dist/tesseract.worker.js) file. Set this string before calling `Tesseract.recognize` and `Tesseract.detect` if you want Tesseract.js to use a different file.
### langPath
A string specifying the location of the tesseract language files, with default value 'https://cdn.rawgit.com/naptha/tessdata/gh-pages/3.02/'. Language file urls are calculated according to the formula `langPath + langCode + '.traineddata.gz'`. Set this string before calling `Tesseract.recognize` and `Tesseract.detect` if you want Tesseract.js to use different language files.
A string specifying the location of the tesseract language files, with default value 'https://cdn.rawgit.com/naptha/tessdata/gh-pages/3.02/'. Language file URLs are calculated according to the formula `langPath + langCode + '.traineddata.gz'`. Set this string before calling `Tesseract.recognize` and `Tesseract.detect` if you want Tesseract.js to use different language files.
## Contributing

Loading…
Cancel
Save