tesstrain_utils.sh: remove redundant code

This commit is contained in:
zdenop 2019-06-20 18:42:29 +02:00
parent 5f23290655
commit 60b4c68d31

View File

@ -554,10 +554,6 @@ phase_B_generate_ambiguities() {
make__lstmdata() {
tlog "\n=== Constructing LSTM training data ==="
local lang_prefix="${LANGDATA_ROOT}/${LANG_CODE}/${LANG_CODE}"
if [[ ! -d "${OUTPUT_DIR}" ]]; then
tlog "Creating new directory ${OUTPUT_DIR}"
mkdir -p "${OUTPUT_DIR}"
fi
local lang_is_rtl=""
if [[ "${LANG_IS_RTL}" == "1" ]]; then
lang_is_rtl="--lang_is_rtl"
@ -618,10 +614,6 @@ make__traineddata() {
run_command combine_tessdata ${TRAINING_DIR}/${LANG_CODE}.
# Copy it to the output dir, overwriting only if allowed by the cmdline flag.
if [[ ! -d ${OUTPUT_DIR} ]]; then
tlog "Creating new directory ${OUTPUT_DIR}"
mkdir -p ${OUTPUT_DIR}
fi
local destfile=${OUTPUT_DIR}/${LANG_CODE}.traineddata;
if [[ -f ${destfile} ]] && ! $OVERWRITE; then
err_exit "File ${destfile} exists and no --overwrite specified";