tesseract.js
Advanced tools
Comparing version 4.0.0 to 4.0.1
@@ -13,5 +13,5 @@ ## Local Installation | ||
Tesseract.recognize(image, langs, { | ||
workerPath: 'https://unpkg.com/tesseract.js@v2.0.0/dist/worker.min.js', | ||
workerPath: 'https://unpkg.com/tesseract.js@v4.0.0/dist/worker.min.js', | ||
langPath: 'https://tessdata.projectnaptha.com/4.0.0', | ||
corePath: 'https://unpkg.com/tesseract.js-core@v2.0.0/tesseract-core.wasm.js', | ||
corePath: 'https://unpkg.com/tesseract.js-core@v4.0.0/tesseract-core.wasm.js', | ||
}) | ||
@@ -24,5 +24,5 @@ ``` | ||
const worker = await createWorker({ | ||
workerPath: 'https://unpkg.com/tesseract.js@v2.0.0/dist/worker.min.js', | ||
workerPath: 'https://unpkg.com/tesseract.js@v4.0.0/dist/worker.min.js', | ||
langPath: 'https://tessdata.projectnaptha.com/4.0.0', | ||
corePath: 'https://unpkg.com/tesseract.js-core@v2.0.0/tesseract-core.wasm.js', | ||
corePath: 'https://unpkg.com/tesseract.js-core@v4.0.0/tesseract-core.wasm.js', | ||
}); | ||
@@ -38,4 +38,4 @@ ``` | ||
### 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/tesseract-core.wasm.js'. | ||
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@v4.0.0/tesseract-core.wasm.js'. | ||
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. | ||
Another WASM option is 'https://unpkg.com/tesseract.js-core@v4.0.0/tesseract-core.js' which is a script that loads 'https://unpkg.com/tesseract.js-core@v4.0.0/tesseract-core.wasm'. But it fails to fetch at this moment. |
{ | ||
"name": "tesseract.js", | ||
"version": "4.0.0", | ||
"version": "4.0.1", | ||
"description": "Pure Javascript Multilingual OCR", | ||
@@ -73,3 +73,3 @@ "main": "src/index.js", | ||
"resolve-url": "^0.2.1", | ||
"tesseract.js-core": "^4.0.0", | ||
"tesseract.js-core": "^4.0.1", | ||
"wasm-feature-detect": "^1.2.11", | ||
@@ -76,0 +76,0 @@ "zlibjs": "^0.3.1" |
@@ -100,7 +100,4 @@ <p align="center"> | ||
```html | ||
<!-- v2 --> | ||
<script src='https://unpkg.com/tesseract.js@v2.1.0/dist/tesseract.min.js'></script> | ||
<!-- v1 --> | ||
<script src='https://unpkg.com/tesseract.js@1.0.19/src/index.js'></script> | ||
<!-- v4 --> | ||
<script src='https://unpkg.com/tesseract.js@4.0.0/dist/tesseract.min.js'></script> | ||
``` | ||
@@ -112,12 +109,12 @@ After including the script the `Tesseract` variable will be globally available. | ||
**Tesseract.js v3 requires Node.js v14 or higher** | ||
**Requires Node.js v14 or higher** | ||
```shell | ||
# For v3 | ||
# For latest version | ||
npm install tesseract.js | ||
yarn add tesseract.js | ||
# For v2 | ||
npm install tesseract.js@2 | ||
yarn add tesseract.js@2 | ||
# For old versions | ||
npm install tesseract.js@3.0.3 | ||
yarn add tesseract.js@3.0.3 | ||
``` | ||
@@ -124,0 +121,0 @@ |
@@ -102,3 +102,3 @@ /** | ||
if (isURL(langPath) || langPath.startsWith('moz-extension://') || langPath.startsWith('chrome-extension://') || langPath.startsWith('file://')) { /** When langPath is an URL */ | ||
path = langPath; | ||
path = langPath.replace(/\/$/, ''); | ||
} | ||
@@ -105,0 +105,0 @@ |
@@ -30,3 +30,4 @@ const bmp = require('bmp-js'); | ||
api.SetImageFile(exif, angle); | ||
const res = api.SetImageFile(exif, angle); | ||
if (res === 1) throw Error('Error attempting to read image.'); | ||
}; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13318735
3303
204
Updatedtesseract.js-core@^4.0.1