Skip to content
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

ocrd process options #3

Open
bertsky opened this issue Sep 28, 2022 · 1 comment
Open

ocrd process options #3

bertsky opened this issue Sep 28, 2022 · 1 comment

Comments

@bertsky
Copy link

bertsky commented Sep 28, 2022

The current implementation seems to assume ocrd process itself is included on the input side. But how about the options that takes?

  • --page-id: should be part of the NF result, right?
  • --overwrite: same here
  • --mets: should be ignored
  • --log-level: probably same here
@MehmedGIT
Copy link
Owner

MehmedGIT commented Sep 28, 2022

Currently, these options are not supported yet. The current implementation of the converter expects the first line of the OCR-D workflow txt file to always start with ocrd process \. Thanks for mentioning it. I will implement that too.

Edit: Further explanation may be needed. The converter may support two ways of providing parameters.

  1. All parameters passed to the first line of the OCR-D workflow txt file can be inherited by each called processor (if processors, of course, support them).

For example:

ocrd process --log-level debug \
  "cis-ocropy-binarize -I OCR-D-IMG -O OCR-D-BIN" \
  "anybaseocr-crop -I OCR-D-BIN -O OCR-D-CROP" \
  ...

Will set the log level of all processors to debug.

  1. It will be still possible to pass parameters to specific processors.

For example:

ocrd process --log-level debug \
  "cis-ocropy-binarize -I OCR-D-IMG -O OCR-D-BIN" --overwrite \
  "anybaseocr-crop -I OCR-D-BIN -O OCR-D-CROP" \
  ...

I am still not sure if it will be easier on the converter part to force parameters to be provided only to specific processors instead of implementing inheritance parameters. Feedback is always appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants