replit-tesseract-ocr

1.0.3 • Public • Published

Tesseract OCR for Node.js (Replit)

Installation

First, you need to install Tesseract After you've installed Tesseract, you can go installing the npm-package:

npm install replit-tesseract-ocr

Usage

const tesseract = require("replit-tesseract-ocr")

const config = {
  lang: "eng", // default
  oem: 0,
  psm: 3,
}

async function main() {
  try {
    const text = await tesseract.recognize("image.jpg", config)
    console.log("Result:", text)
  } catch (error) {
    console.log(error.message)
  }
}

main()

Readme

Keywords

Package Sidebar

Install

npm i replit-tesseract-ocr

Weekly Downloads

1

Version

1.0.3

License

ISC

Unpacked Size

2.36 kB

Total Files

3

Last publish

Collaborators

  • httpget