🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more

ocr-tesseractjs-selfcontained

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ocr-tesseractjs-selfcontained

Self-contained, bundled wrapper of tesseract.js for the web.

0.0.3
latest
Version published
Weekly downloads
2
-81.82%
Maintainers
1
Weekly downloads
 
Created

Self-contained, bundled wrapper of tesseract.js for the web.

Usage

This library exposes a single function that wraps Tesseract.js (see src/index.ts):

async function ocr(png: tesseract.ImageLike): Promise<string>;

For an example usage see below.

Dev Setup

Usage:

npm i

# Downloads external files required by tesseract.js into ./src/assets:
# - deu.traineddata file
# - Tesseract.js core wasm module (lstm-only, simd and non-simd version)
# - Tesseract.js worker code
npm run download-assets

# Builds a single file self-contained library exposing a single function that wraps tesseract.js.
npm run build

# Run an example.
npm run example

# Publish to npm
npm publish

FAQs

Package last updated on 07 Apr 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts