Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ocr-document-classification

Package Overview
Dependencies
Maintainers
0
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ocr-document-classification - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

5

dist/index.js

@@ -40,3 +40,3 @@ "use strict";

var Tesseract = __toESM(require("tesseract.js"));
var import_pdfjs_dist = require("pdfjs-dist");
var pdfjsLib = __toESM(require("pdfjs-dist"));
function findTargetWords(documentText, targetWords, threshold = 0.75) {

@@ -69,4 +69,3 @@ const foundTargetWords = [];

async function extractTextFromPDF(fileContent) {
import_pdfjs_dist.GlobalWorkerOptions.workerSrc = `//cdnjs.cloudflare.com/ajax/libs/pdf.js/${import_pdfjs_dist.version}/pdf.worker.js`;
const pdf = await (0, import_pdfjs_dist.getDocument)({ data: fileContent }).promise;
const pdf = await pdfjsLib.getDocument({ data: fileContent }).promise;
let text = "";

@@ -73,0 +72,0 @@ for (let i = 0; i < pdf.numPages; i++) {

2

package.json
{
"name": "ocr-document-classification",
"version": "1.1.0",
"version": "1.1.1",
"description": "Document classification using tesseract.js and string-similarity-js.",

@@ -5,0 +5,0 @@ "main": "./dist/index.js",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc