Closed mollierobbert closed 9 years ago
At the moment, no. The only parameters passed to Init are datapath, language, and oem. The longer form of Init supports (what would in Python be) a list of paths to config files, and a dict of key-value pairs to override the config files.
I'll add this as a feature request.
Great, thank you. I'd be happy to help if you can give me some pointers.
It's not too bad... I should find some time to do this in the next day or two (I hope!), but should you be interested:
Basically, these lines of tesserpy.cpp build up parameters to pass to TessBaseApi::Init. It would just take adding a couple of items to the kwargs list, then building up char* arrays, and key/value vectors from passed in list and dict. Conversion shouldn't be too hard, and the lifetime of the values should (I need to confirm in Tesseract's source) only need to be as long as the Init call itself.
If you need this right away and want to do the work yourself, let me know, otherwise I'll get started on it soon.
I'm (perversely) glad to see you running into the limits of this little toy, and slowly pushing them a little further out...
Glad to hear it's not too much trouble. I won't have time for it until Monday, so I won't be of much help if you're planning to add this over the weekend (that's really quick!).
Some parameters are 'init only' (see ControlParams). Is it possible to pass those to the constructor, like in the C API?