# Local Tesseract OCR assets

Arrange Evidence uses these pinned assets for opt-in, on-device English OCR.
OCR runs in a browser worker with WebAssembly. No image or PDF content is sent
to Tesseract, a cloud service, or another network destination. All runtime
asset paths must stay same-origin and be supplied explicitly; Tesseract.js has
remote defaults if these options are omitted.

## Pinned sources and licenses

| Component | Pin / upstream source | License | Upstream archive or file |
| --- | --- | --- | --- |
| Browser API and worker | `tesseract.js` 7.0.0, [official npm package](https://www.npmjs.com/package/tesseract.js/v/7.0.0) | Apache-2.0; bundled dependency notices are in the adjacent `*.LICENSE.txt` files | npm tarball SHA-256 `9a93bf51c3387f945d10a24bf8b3a4bf2e45c7c7161b8242aafbaf9d3c4b606a`; npm integrity `sha512-exPBkd+z+wM1BuMkx/Bjv43OeLBxhL5kKWsz/9JY+DXcXdiBjiAch0V49QR3oAJqCaL5qURE0vx9Eo+G5YE7mA==`; 616,435 bytes compressed / 1,411,341 bytes unpacked |
| WebAssembly OCR core | [`tesseract.js-core` 7.0.0](https://www.npmjs.com/package/tesseract.js-core/v/7.0.0), required by Tesseract.js 7 | Apache-2.0 | npm tarball SHA-256 `ba584355515eaff877552022853c0e71f2cb70466e759d1d6940484929718ee0`; npm integrity `sha512-WnNH518NzmbSq9zgTPeoF8c+xmilS8rFIl1YKbk/ptuuc7p6cLNELNuPAzcmsYw450ca6bLa8j3t0VAtq435Vw==`; 16,935,308 bytes compressed / 45,262,431 bytes unpacked upstream |
| English LSTM language data | [`tessdata_fast`](https://github.com/tesseract-ocr/tessdata_fast/tree/87416418657359cb625c412a48b6e1d6d41c29bd), git commit `87416418657359cb625c412a48b6e1d6d41c29bd`, file `eng.traineddata` | Apache-2.0 | Upstream raw file: 4,113,088 bytes, SHA-256 `7d4322bd2a7749724879683fc3912cb542f19906c83bcc1a52132556427170b2`; bundled gzip is reproducibly generated with `gzip -n -9` (1,976,293 bytes, SHA-256 `2a66ec904bc0e7657b27e200a874c01e1bc8a58b756cbbaa9afbae736fa50edc`) |

The exact license texts are retained as `LICENSE.md`, `core/LICENSE`, and
`lang/LICENSE`; distribution-specific dependency notices are retained as
`tesseract.min.js.LICENSE.txt` and `worker.min.js.LICENSE.txt`.

## Included runtime files

| File | Bytes | SHA-256 |
| --- | ---: | --- |
| `tesseract.min.js` | 62,961 | `000c27d9cd0def655f77b36c72a389c0ab13793aa31cb4d7aab56d09c0afbc7e` |
| `worker.min.js` | 111,307 | `576b7df7e3393e137e51849357c9adb53fe7ac1bb69bfa06cf3d61520f182c6d` |
| `core/tesseract-core-lstm.wasm.js` | 3,896,484 | `eef5f8b2f8e20e150680b20adaec4a60babafee3adbe8a94583c81fee46e8680` |
| `core/tesseract-core-simd-lstm.wasm.js` | 3,899,472 | `c58b46a4c796c0b8afccf77591d5b875b6896b45d402bbce8caa6f5362447b38` |
| `core/tesseract-core-relaxedsimd-lstm.wasm.js` | 3,905,767 | `861a536cf9ef8e63cb644d57bab39c388f37f7d6b6f60024b741c5f6b39a59b3` |
| `lang/eng.traineddata.gz` | 1,976,293 | `2a66ec904bc0e7657b27e200a874c01e1bc8a58b756cbbaa9afbae736fa50edc` |

The six runtime files total **13,852,284 bytes** (13.21 MiB) in this checkout.
When OCR starts, the browser loads the 62,961-byte API bundle if it is not
already loaded, the 111,307-byte worker, the English model, and one compatible
LSTM core variant. The core directory includes standard, SIMD, and Relaxed SIMD
LSTM builds because Tesseract.js 7 selects among all three; it loads only the
selected variant for a worker. Language data and OCR inputs are kept in memory
for the current session. `cacheMethod: 'none'` disables Tesseract.js browser
cache reads and writes. This does not control browser HTTP caches, OS swap,
crash dumps, or secure erasure.

## Runtime configuration

Load `tesseract.min.js` from this local directory. Use these explicit paths and
options; do not rely on Tesseract.js defaults:

```js
const worker = await Tesseract.createWorker('eng', Tesseract.OEM.LSTM_ONLY, {
  workerPath: new URL('js/vendor/tesseract/worker.min.js', document.baseURI).href,
  corePath: new URL('js/vendor/tesseract/core/', document.baseURI).href,
  langPath: new URL('js/vendor/tesseract/lang', document.baseURI).href,
  cacheMethod: 'none',
  gzip: true,
  workerBlobURL: false,
  logger: onLocalProgress,
});
```

Request word/region output explicitly when needed, and call `worker.terminate()`
when work completes or is cancelled. The supported model bundled here is
English only. Other languages are unsupported until their licensed models are
separately reviewed, pinned, bundled, and documented.

Tesseract.js installation and API references:

- <https://github.com/naptha/tesseract.js/blob/v7.0.0/docs/local-installation.md>
- <https://github.com/naptha/tesseract.js/blob/v7.0.0/docs/api.md>
- <https://www.npmjs.com/package/tesseract.js-core/v/7.0.0>
