-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parameters set using createWorker
config
argument overwritten by default arguments
#975
Comments
Upon a brief review, it looks like setting the default parameters here may have served a couple different purposes in the past.
I now am fairly confident that this can be cut without consequence, so will do so. |
If we cut the settings discussed above, the only thing left in the defaultParams.js file is the |
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 (notablyload_system_dawg
,load_number_dawg
, andload_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 impactstessedit_pageseg_mode
andtessedit_char_whitelist
, as these are the only Tesseract parameters in the defaults file.tesseract.js/src/worker-script/index.js
Lines 308 to 309 in a936162
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.
The text was updated successfully, but these errors were encountered: