Skip to content

Commit f9dac07

Browse files
authored
Update api.md
1 parent 9d9b666 commit f9dac07

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

docs/api.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,12 @@
3434
- `langs` a string to indicate the languages traineddata to download, multiple languages are specified using an array (['eng', 'chi_sim'])
3535
- `oem` a enum to indicate the OCR Engine Mode you use
3636
- `options` an object of customized options
37-
- `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
38-
- Setting `corePath` to a specific `.js` file is **strongly discouraged.** To provide the best performance on all devices, Tesseract.js needs to be able to pick between `tesseract-core.wasm.js` and `tesseract-core-simd.wasm.js`. See [this issue](https://github.com/naptha/tesseract.js/issues/735) for more detail.
37+
- `corePath` path to a directory containing **all of** the following files from [Tesseract.js-core](https://www.npmjs.com/package/tesseract.js-core) package:
38+
- `tesseract-core.wasm.js`
39+
- `tesseract-core-simd.wasm.js`
40+
- `tesseract-core-lstm.wasm.js`
41+
- `tesseract-core-simd-lstm.wasm.js`
42+
- Some code snippets found online set `corePath` to a specific `.js` file. This is **strongly discouraged.** To provide the best performance and lowest network usage, Tesseract.js needs to be able to pick between builds.
3943
- `langPath` path for downloading traineddata, do not include `/` at the end of the path
4044
- `workerPath` path for downloading worker script
4145
- `dataPath` path for saving traineddata in WebAssembly file system, not common to modify

0 commit comments

Comments
 (0)