Skip to content

Commit

Permalink
Revert "tesstrain: fix relative path to lstm.train"
Browse files Browse the repository at this point in the history
This reverts commit acaa100.

(lstm.train is a config file argument, therefore should not
 be made an absolute path, but kept ambiguous; the user must
 be trusted to put it in one of the expected directories, i.e.
 CWD, TESSDATA_PREFIX/configs, or TESSDATA_PREFIX/tessconfigs)
  • Loading branch information
bertsky committed Mar 21, 2019
1 parent 2c408b3 commit 2e5c98c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
9 changes: 1 addition & 8 deletions src/training/tesstrain.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,7 @@ def main():
phase_UP_generate_unicharset(ctx)

if ctx.linedata:
phase_E_extract_features(ctx, ["--psm", "6",
os.path.join(os.path.dirname(__file__),
os.path.pardir,
os.path.pardir,
"tessdata",
"configs",
"lstm.train")],
"lstmf")
phase_E_extract_features(ctx, ["--psm", "6", "lstm.train"], "lstmf")
make_lstmdata(ctx)

cleanup(ctx)
Expand Down
2 changes: 1 addition & 1 deletion src/training/tesstrain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ initialize_fontconfig
phase_I_generate_image 8
phase_UP_generate_unicharset
if ((LINEDATA)); then
phase_E_extract_features " --psm 6 $(dirname $0)/../../tessdata/configs/lstm.train " 8 "lstmf"
phase_E_extract_features " --psm 6 lstm.train " 8 "lstmf"
make__lstmdata
tlog "\nCreated starter traineddata for LSTM training of language '${LANG_CODE}'\n"
tlog "\nRun 'lstmtraining' command to continue LSTM training for language '${LANG_CODE}'\n"
Expand Down

0 comments on commit 2e5c98c

Please sign in to comment.