# Tesseract.js（圖片轉文字工具用）

Files in this folder are third-party, self-hosted for /tools/ocr. Downloaded from registry.npmjs.org on 2026-10-31.
The only change: the trailing `//# sourceMappingURL=` line was removed from `tesseract.min.js` and `worker.min.js` (map files are not shipped).

| File | Source package | License |
| --- | --- | --- |
| `tesseract.min.js`, `worker.min.js` | tesseract.js 7.0.0 (`dist/`) | Apache-2.0 — `LICENSE`; bundled parts listed in `*.LICENSE.txt` (regenerator-runtime MIT, buffer MIT, ieee754 BSD-3-Clause, zlib.js MIT) |
| `core/tesseract-core-simd-lstm.wasm.js`, `core/tesseract-core-lstm.wasm.js` | tesseract.js-core 7.0.0 | Apache-2.0 — `core/LICENSE` |
| `lang/eng.traineddata.gz`, `lang/chi_tra.traineddata.gz`, `lang/chi_sim.traineddata.gz` | @tesseract.js-data/eng, chi_tra, chi_sim 1.0.0 (`4.0.0_best_int/`) | package MIT; the trained models come from Google's tesseract-ocr/tessdata_best, Apache-2.0 |

tesseract.js-core is Tesseract OCR (https://github.com/tesseract-ocr/tesseract, Apache-2.0) compiled to WebAssembly together with
Leptonica (https://github.com/DanBloomberg/leptonica, BSD-2-Clause style license), libjpeg (Independent JPEG Group license),
libtiff (libtiff license), libpng (libpng license) and zlib (zlib license). All of these are permissive licenses.

Copyright notices:
- tesseract.js — Copyright (c) Kevin Kwok, Guillermo Webster, Jerome Wu and contributors. Apache License 2.0.
- tesseract.js-core — Copyright (c) Jerome Wu, Balearica and contributors. Apache License 2.0.
- Tesseract OCR and tessdata_best — Copyright (c) Google Inc. and the Tesseract contributors. Apache License 2.0.
- Leptonica — Copyright (c) 2001 Leptonica. All rights reserved.
- This software is based in part on the work of the Independent JPEG Group.

Updating: download the new tarballs, replace the files above, then change `T.VER` in `app/static/tools/ocr.js`
and run `node tests/js/ocr.test.js` and `pytest tests/test_tool_ocr.py`.
