From 15b79836199b715a3e8cb1318e80118e2376f534 Mon Sep 17 00:00:00 2001 From: Jerome Wu Date: Sat, 21 Dec 2019 16:39:34 +0800 Subject: [PATCH] Update docs --- README.md | 14 +++++++------- docs/local-installation.md | 12 ++++++------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index fed78e7..bd0ce1d 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ [![Downloads Month](https://img.shields.io/npm/dm/tesseract.js.svg)](https://www.npmjs.com/package/tesseract.js)

- Version 2 beta is now available and under development in the master branch, read a story about v2 beta: Why I refactor tesseract.js v2?
+ Version 2 is now available and under development in the master branch, read a story about v2: Why I refactor tesseract.js v2?
Check the support/1.x branch for version 1

@@ -68,7 +68,7 @@ const worker = createWorker({ [Check out the docs](#docs) for a full explanation of the API. -## Major changes in v2 beta +## Major changes in v2 - Upgrade to tesseract v4.1 (using emscripten 1.38.45) - Support multiple languages at the same time, eg: eng+chi\_tra for English and Traditional Chinese - Supported image formats: png, jpg, bmp, pbm @@ -83,7 +83,7 @@ Tesseract.js works with a ` + @@ -97,12 +97,12 @@ After including the script the `Tesseract` variable will be globally available. ```shell # For v2 -npm install tesseract.js@next -yarn add tesseract.js@next - -# For v1 npm install tesseract.js yarn add tesseract.js + +# For v1 +npm install tesseract.js@1 +yarn add tesseract.js@1 ``` diff --git a/docs/local-installation.md b/docs/local-installation.md index 1f18fe9..6832bba 100644 --- a/docs/local-installation.md +++ b/docs/local-installation.md @@ -10,9 +10,9 @@ In Node.js environment, the only path you may want to customize is languages/lan ```javascript Tesseract.recognize(image, langs, { - workerPath: 'https://unpkg.com/tesseract.js@v2.0.0-beta.1/dist/worker.min.js', + workerPath: 'https://unpkg.com/tesseract.js@v2.0.0/dist/worker.min.js', langPath: 'https://tessdata.projectnaptha.com/4.0.0', - corePath: 'https://unpkg.com/tesseract.js-core@v2.0.0-beta.13/tesseract-core.wasm.js', + corePath: 'https://unpkg.com/tesseract.js-core@v2.0.0/tesseract-core.wasm.js', }) ``` @@ -20,9 +20,9 @@ Or ```javascript const worker = createWorker({ - workerPath: 'https://unpkg.com/tesseract.js@v2.0.0-beta.1/dist/worker.min.js', + workerPath: 'https://unpkg.com/tesseract.js@v2.0.0/dist/worker.min.js', langPath: 'https://tessdata.projectnaptha.com/4.0.0', - corePath: 'https://unpkg.com/tesseract.js-core@v2.0.0-beta.13/tesseract-core.wasm.js', + corePath: 'https://unpkg.com/tesseract.js-core@v2.0.0/tesseract-core.wasm.js', }); ``` @@ -33,6 +33,6 @@ A string specifying the location of the [worker.js](./dist/worker.min.js) file. A string specifying the location of the tesseract language files, with default value 'https://tessdata.projectnaptha.com/4.0.0'. Language file URLs are calculated according to the formula `langPath + langCode + '.traineddata.gz'`. ### corePath -A string specifying the location of the [tesseract.js-core library](https://github.com/naptha/tesseract.js-core), with default value 'https://unpkg.com/tesseract.js-core@v2.0.0-beta.13/tesseract-core.wasm.js' (fallback to tesseract-core.asm.js when WebAssembly is not available). +A string specifying the location of the [tesseract.js-core library](https://github.com/naptha/tesseract.js-core), with default value 'https://unpkg.com/tesseract.js-core@v2.0.0/tesseract-core.wasm.js' (fallback to tesseract-core.asm.js when WebAssembly is not available). -Another WASM option is 'https://unpkg.com/tesseract.js-core@v2.0.0-beta.13/tesseract-core.js' which is a script that loads 'https://unpkg.com/tesseract.js-core@v2.0.0-beta.13/tesseract-core.wasm'. But it fails to fetch at this moment. +Another WASM option is 'https://unpkg.com/tesseract.js-core@v2.0.0/tesseract-core.js' which is a script that loads 'https://unpkg.com/tesseract.js-core@v2.0.0/tesseract-core.wasm'. But it fails to fetch at this moment.