Removed references to concat method of specifying multiple langs per #887 (#889)

master
Balearica 8 months ago committed by GitHub
parent c0479a165c
commit dcb016a127
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      docs/api.md
  2. 2
      docs/examples.md
  3. 4
      tests/recognize.test.js

@ -31,7 +31,7 @@
**Arguments:**
- `langs` a string to indicate the languages traineddata to download, multiple languages are concated with **+**, ex: **eng+chi\_tra**
- `langs` a string to indicate the languages traineddata to download, multiple languages are specified using an array (['eng', 'chi_sim'])
- `oem` a enum to indicate the OCR Engine Mode you use
- `options` an object of customized options
- `corePath` path to a directory containing **both** `tesseract-core.wasm.js` and `tesseract-core-simd.wasm.js` from [Tesseract.js-core](https://www.npmjs.com/package/tesseract.js-core) package
@ -155,7 +155,7 @@ This list is incomplete. As Tesseract.js passes parameters to the Tesseract eng
**Arguments:**
- `langs` a string to indicate the languages traineddata to download, multiple languages are concated with **+**, ex: **eng+chi\_tra**
- `langs` a string to indicate the languages traineddata to download, multiple languages are specified using an array (['eng', 'chi_sim'])
- `oem` a enum to indicate the OCR Engine Mode you use
- `config` an object of customized options which are set prior to initialization (see details above)
- `jobId` Please see details above

@ -37,7 +37,7 @@ const worker = await createWorker('eng', 1, {
```javascript
const { createWorker } = require('tesseract.js');
const worker = await createWorker('eng+chi_tra');
const worker = await createWorker(['eng', 'chi_tra']);
(async () => {
const { data: { text } } = await worker.recognize('https://tesseract.projectnaptha.com/img/eng_bw.png');

@ -145,7 +145,7 @@ describe('recognize()', () => {
.map(name => ({ name, mode: PSM[name] }))
.forEach(({ name, mode }) => (
it(`support PSM.${name} mode`, async () => {
await workerLegacy.reinitialize('eng+osd');
await workerLegacy.reinitialize(['eng', 'osd']);
await workerLegacy.setParameters({
tessedit_pageseg_mode: mode,
});
@ -162,7 +162,7 @@ describe('recognize()', () => {
.map(name => ({ name, mode: PSM[name] }))
.forEach(({ name, mode }) => (
it(`support PSM.${name} mode`, async () => {
await worker.reinitialize('eng+osd');
await worker.reinitialize(['eng', 'osd']);
await worker.setParameters({
tessedit_pageseg_mode: mode,
});

Loading…
Cancel
Save