Skip to content

Commit

Permalink
Removed references to concat method of specifying multiple langs per #…
Browse files Browse the repository at this point in the history
  • Loading branch information
Balearica committed Feb 13, 2024
1 parent c0479a1 commit be12314
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
4 changes: 2 additions & 2 deletions tests/recognize.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
});
Expand All @@ -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,
});
Expand Down

0 comments on commit be12314

Please sign in to comment.