A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/naptha/tesseract.js/issues/975 below:

Parameters set using `createWorker` `config` argument overwritten by default arguments · Issue #975 · naptha/tesseract.js · GitHub

The createWorker config argument allows for setting parameters prior to initialization. While this function was originally added to support a handful of init-only parameters (notably load_system_dawg, load_number_dawg, and load_punc_dawg), it should be able to support all parameters, and there is nothing in the documentation to indicate it only supports specific parameters.

However, at present, any settings provided in this config argument that conflict with the default parameters defined in defaultParams.js are overwritten by the defaults. It looks like this only impacts tessedit_pageseg_mode and tessedit_char_whitelist, as these are the only Tesseract parameters in the defaults file.

params = defaultParams; await setParameters({ payload: { params } });

I will investigate the commit history before making a change, however I currently believe the code that sets the default Tesseract parameters can be cut entirely. Both values we are setting are already the defaults for the Tesseract API, so it's unclear why we are setting them manually.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4