I would like to use the command-line parameters "user_word_suffix", "load_freq_dawg", and "load_system_dawg". After sorting through a lot of documentation, and looking through a lot of code, I realized that these are "init only" parameters. In the TessBaseAPI code, they need to be passed to Init(), either as a set of keys/values or in a config file. Setting the parameters after initialization doesn't work because the traineddata files have already been read and the dictionaries formed.
Suggested fix:
Add a config filename optional parameter (string) to worker.Initialize(...) that gets passed to api.Init(...).
Other fixes:
Add a worker.SetInitParameters() function, just like worker.SetParameters(), that must be called before worker.Initialize, and pass those keys/values to api.Init().
Add a "initParams" optional parameter to worker.Initialize, which contains key/value pairs that get passed to api.Init
I'm suggesting the config file option because it feels like the least work to get the desired result.
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