-
Notifications
You must be signed in to change notification settings - Fork 32
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
Implement processing worker in bashlib #1023
Comments
Implementing this in bashlib processors will be very difficult. Honestly, at this point, I'm wondering whether we want to / can continue to support bashlib fully or whether it wouldn't be easier to convert ocrd_olena, ocrd_fileformat etc. to python. |
This is absolutely not about (re-)implementing the Processing Server. It's merely about delegating to the
…instead of…
The reason is not to save you the few extra characters to type, but to implement the (extended) OCR-D CLI fully within bashlib, so as a user/caller you would not need to know whether a certain processor to call is bashlib or Python – as has happened in https://github.com/OCR-D/core/pull/974/files#r1140759640 |
I've said this before, but think it cannot be overstated: Keeping bashlib is as important as it gets. We want core to be a framework for writing OCR-D compliant processors, which can mean implementing them in Python (if possible), but also merely integrating them via a tiny shell wrapper. The latter must always be possible, otherwise developers will have to reimplement our conventions for Java, C++, Go, whathaveyou. |
I'm very fond of bashlib, don't get me wrong. But you could easily reimplement bashlib procesors in python by just delegating the calls of the actual tools to Be that as it may, I just misunderstood the problem, #1024 is indeed straightforward, no need for mongo/queue CLI in bashlib as I feared. |
You mean provide a "wildcard processor" in Python which can do system calls to external tools – like ocrd_wrap's ocrd-preprocess-image, but not just for image processing, and as a base class to inherit from? Ok, perhaps avoiding bash would make our life easier (only maintaining Python parts, being able to use the API). I thought for external modules it would help keeping it (no knowledge of Python necessary). Of course, ATM our bashlib-enabled processor boilerplate (page looping, PAGE handling with xmlstarlet) is so huge that it's not feasible for outsiders anyway. (But perhaps this model can help overcome this.) |
https://github.com/OCR-D/core/pull/974/files#r1140759640
The text was updated successfully, but these errors were encountered: