Comments (5)
I am working on this project with matthieu, dont hesitate to ping me too if you have any solutions ^^
from tesseract.js.
Any news? :)
from tesseract.js.
Please provide an example image that can be used to replicate this issue.
from tesseract.js.
I would like to know if there is a way to suppress this specific output from being logged to the console. I have attempted to use custom logger functions, but the message still appears. Temporarily overriding console.log, console.warn, and console.error works, but it feels like a hack rather than a solution.
Since these warning messages are created by Tesseract rather than being something added by Tesseract.js, disabling specific warning messages at the source is outside of the scope of this repo. Indeed, the only way filter messages Tesseract prints to stderr
without modifying the Tesseract codebase would be to implement the hacky solutions you describe (e.g. overriding console.log
).
However, Tesseract does support saving warning messages as an output, rather than printing them to stderr
(which maps to console.warn
in JavaScript). Therefore, by redirecting the messages to the output, you should be able to implement something similar to what you are describing. To capture debugging messages in the output object, rather than printing them to console, set the debug
to true
within the output options.
const worker = await await Tesseract.createWorker("eng");
const ret = await worker.recognize(files[i], undefined, {debug: true});
console.log(ret.data.text);
console.log(`Captured message: ${ret.data.debug}`);
Captured message: Estimating resolution as 390
Once you have the debug output string, you can either ignore it or save it to a string--essentially suppressing all warning messages from the console--or write a wrapper function that prints warnings only when they meet certain criteria.
from tesseract.js.
Hello, sorry for my inactivity hereπ , this method seems to work for me, thanks again π
from tesseract.js.
Related Issues (20)
- Execution `worker.recognize` repeatedly causes "Out of Memory" error in JSFiddle HOT 5
- Error: Network error while fetching HOT 1
- how to use installed tessercat lib on windows for tesseract.js? HOT 1
- createWorker throws exception with option.langPath set in electron HOT 7
- Auto fill forms by scanning ID cards
- Tesseract.js Bug on IBM i Server HOT 9
- Legacy model does not work for indic and arabic scripts due to Legacy data being removed
- Combine worker and scheduler interfaces
- Issue with Tesseract.js OCR Integration in Angular Application HOT 5
- Rectangles not working, pure white image interpreted as tildes HOT 3
- Legacy code/data not being automatically downloaded when `oem` set to `2`
- Detects correct rotation/degrees, but fails to read the text HOT 1
- How to suppress console logs? HOT 1
- Drop support for non-SIMD version
- scheduler job not running HOT 2
- Tesseract.js doesn't work in CloudFlare Workers HOT 2
- repo broken by design HOT 1
- Broken character not recognizable HOT 2
- Browser extension Manifest version 3 is experiencing issues with Tesseract.js HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tesseract.js.