turkic-ocr-code / scripts /r5_print /r5_print_rerun_loop.sh
treoa's picture
Release 1
24aaa76
Raw History Blame Contribute Delete
472 Bytes
#!/bin/bash
# run a language, add the documents flagged by the tail-letter check to the exclusion file, rerun (at most 3 times in total)
CODE=/path/to/TURKIC_OCR_CODE
for L in "$@"; do
for i in 1 2 3; do
bash $CODE/scripts/r5_print/r5_print_rerun.sh $L | grep -E "DONE|accepted"
n=$($CODE/.venv_print/bin/python -I $CODE/scripts/r5_print/r5_print_suspects.py $L)
echo "$L round $i new suspect documents: $n"
if [ "$n" = "0" ]; then break; fi
done
done