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.0.0 to 1.0.1

2

dist/index.d.ts

@@ -5,3 +5,3 @@ type documentDictionary = {

declare function classifyDocument(file: File, onProgress: (progress: number) => void, customDocumentDictionary?: documentDictionary): Promise<{
declare function classifyDocument(file: File, onProgress?: (progress: number) => void, customDocumentDictionary?: documentDictionary): Promise<{
classification: string;

@@ -8,0 +8,0 @@ text: string;

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

let progress = 0;
onProgress(progress);
if (onProgress) onProgress(progress);
const { data: { text } } = await Tesseract.recognize(imageDataUrl, "nor+eng", {

@@ -79,3 +79,3 @@ logger: (m) => {

progress = m.progress * 0.8;
onProgress(progress);
if (onProgress) onProgress(progress);
}

@@ -87,6 +87,6 @@ }

progress = 0.9;
onProgress(progress);
if (onProgress) onProgress(progress);
const classification = determineClassification(targetWordsFound, documentDictionary);
progress = 1;
onProgress(progress);
if (onProgress) onProgress(progress);
resolve({ classification, text });

@@ -93,0 +93,0 @@ } catch (err) {

{
"name": "ocr-document-classification",
"version": "1.0.0",
"version": "1.0.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

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