MehmedGIT / OtoN_Converter

Converter from basic OCRD process workflow to Nextflow workflow script
Apache License 2.0
4 stars 1 forks source link

ocrd process options #3

Open bertsky opened 2 years ago

bertsky commented 2 years ago

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

MehmedGIT commented 2 years ago

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!