mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2025-06-08 02:12:40 +08:00
tesstrain_utils.sh: remove redundant code
This commit is contained in:
parent
5f23290655
commit
60b4c68d31
@ -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";
|
||||
|
Loading…
Reference in New Issue
Block a user