tesseract.js
Advanced tools
Comparing version 5.0.2 to 5.0.3
@@ -5,3 +5,3 @@ # Overview | ||
# Option 1: Using Workers Directly | ||
Tesseract.js also supports creating and managing workers (the objects that execute recognition) manually. | ||
The following snippet recognizes text from an image using a single worker. | ||
@@ -52,2 +52,2 @@ ``` | ||
When working with schedulers, note that workers added to the same scheduler should all be homogenous—they should have the same language be configured with the same parameters. Schedulers assign jobs to workers in a non-deterministic manner, so if the workers are not identical then recognition results will depend on which worker the job is assigned to. | ||
When working with schedulers, note that workers added to the same scheduler should all be homogenous—they should have the same language be configured with the same parameters. Schedulers assign jobs to workers in a non-deterministic manner, so if the workers are not identical then recognition results will depend on which worker the job is assigned to. |
{ | ||
"name": "tesseract.js", | ||
"version": "5.0.2", | ||
"version": "5.0.3", | ||
"description": "Pure Javascript Multilingual OCR", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -42,4 +42,4 @@ <p align="center"> | ||
const worker = await createWorker('eng'); | ||
const data = await worker.recognize('https://tesseract.projectnaptha.com/img/eng_bw.png'); | ||
console.log(data.text); | ||
const ret = await worker.recognize('https://tesseract.projectnaptha.com/img/eng_bw.png'); | ||
console.log(ret.data.text); | ||
await worker.terminate(); | ||
@@ -126,8 +126,8 @@ })(); | ||
- Electron Version: https://github.com/Balearica/tesseract.js-electron | ||
- Typescript: https://github.com/Balearica/tesseract.js-typescript | ||
- Chrome Extension (with Manifest V3): https://github.com/Tshetrim/Image-To-Text-OCR-extension-for-ChatGPT | ||
- Converting PDF to text: https://github.com/racosa/pdf2text-ocr | ||
The following are old examples that use depreciated versions of Tesseract.js. Updating to Tesseract.js v4 is highly recommended. Users are encouraged to create updated examples (or make entirely new ones) and submit them as pull requests. | ||
The following are old examples that use depreciated versions of Tesseract.js. Updating to Tesseract.js v5 is highly recommended. Users are encouraged to create updated examples (or make entirely new ones) and submit them as pull requests. | ||
- Offline Version: https://github.com/jeromewu/tesseract.js-offline | ||
- Custom Traineddata: https://github.com/jeromewu/tesseract.js-custom-traineddata | ||
- Firefox Extension: https://github.com/gnonio/korporize | ||
@@ -137,3 +137,2 @@ - With Vue: https://github.com/jeromewu/tesseract.js-vue-app | ||
- With React: https://github.com/jeromewu/tesseract.js-react-app | ||
- Typescript: https://github.com/jeromewu/tesseract.js-typescript | ||
- Video Real-time Recognition: https://github.com/jeromewu/tesseract.js-video | ||
@@ -140,0 +139,0 @@ |
@@ -71,2 +71,3 @@ declare namespace Tesseract { | ||
tessedit_char_whitelist: string | ||
tessedit_char_blacklist: string | ||
preserve_interword_spaces: string | ||
@@ -79,2 +80,3 @@ user_defined_dpi: string | ||
tessjs_create_osd: string | ||
[propName: string]: any | ||
} | ||
@@ -81,0 +83,0 @@ interface OutputFormats { |
const { simd } = require('wasm-feature-detect'); | ||
const { dependencies } = require('../../../package.json'); | ||
const coreVersion = require('../../../package.json').dependencies['tesseract.js-core']; | ||
@@ -12,3 +12,3 @@ module.exports = async (lstmOnly, corePath, res) => { | ||
// Otherwise, default to CDN | ||
const corePathImport = corePath || `https://cdn.jsdelivr.net/npm/tesseract.js-core@v${dependencies['tesseract.js-core'].substring(1)}`; | ||
const corePathImport = corePath || `https://cdn.jsdelivr.net/npm/tesseract.js-core@v${coreVersion.substring(1)}`; | ||
@@ -15,0 +15,0 @@ // If a user specifies a specific JavaScript file, load that file. |
@@ -1,2 +0,2 @@ | ||
const { version } = require('../../../package.json'); | ||
const version = require('../../../package.json').version; | ||
const defaultOptions = require('../../constants/defaultOptions'); | ||
@@ -3,0 +3,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
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
1450847
3385
200