diff --git a/training/tesstrain.sh b/training/tesstrain.sh index 37de22222d..c1af1e86c1 100755 --- a/training/tesstrain.sh +++ b/training/tesstrain.sh @@ -49,11 +49,8 @@ source `dirname $0`/tesstrain_utils.sh ARGV=("$@") parse_flags -tlog "\n=== Starting training for language '${LANG_CODE}'" - -tlog "Cleaning workspace directory ${TRAINING_DIR}..." mkdir -p ${TRAINING_DIR} -rm -fr ${TRAINING_DIR}/* +tlog "\n=== Starting training for language '${LANG_CODE}'" source `dirname $0`/language-specific.sh set_lang_specific_parameters ${LANG_CODE} diff --git a/training/tesstrain_utils.sh b/training/tesstrain_utils.sh index 2983764978..30006bc1f7 100755 --- a/training/tesstrain_utils.sh +++ b/training/tesstrain_utils.sh @@ -25,7 +25,7 @@ OUTPUT_DIR="/tmp/tesstrain/tessdata" OVERWRITE=0 RUN_SHAPE_CLUSTERING=0 EXTRACT_FONT_PROPERTIES=1 -WORKSPACE_DIR="/tmp/tesstrain" +WORKSPACE_DIR=`mktemp -d` EXPOSURES=0 # Logging helper functions.