Automate the training procedure for the OCR engine