File tree Expand file tree Collapse file tree 3 files changed +7
-1
lines changed
Expand file tree Collapse file tree 3 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -175,7 +175,7 @@ bool Tesseract::init_tesseract_lang_data(
175175 tessedit_ocr_engine_mode == OEM_TESSERACT_LSTM_COMBINED) {
176176# endif // ndef DISABLED_LEGACY_ENGINE
177177 if (mgr->IsComponentAvailable (TESSDATA_LSTM)) {
178- lstm_recognizer_ = new LSTMRecognizer;
178+ lstm_recognizer_ = new LSTMRecognizer (language_data_path_prefix) ;
179179 ASSERT_HOST (lstm_recognizer_->Load (
180180 this ->params (), lstm_use_matrix ? language : nullptr , mgr));
181181 } else {
Original file line number Diff line number Diff line change @@ -49,6 +49,11 @@ const double kDictRatio = 2.25;
4949// Default certainty offset to give the dictionary a chance.
5050const double kCertOffset = -0.085 ;
5151
52+ LSTMRecognizer::LSTMRecognizer (const STRING language_data_path_prefix)
53+ : LSTMRecognizer::LSTMRecognizer() {
54+ ccutil_.language_data_path_prefix = language_data_path_prefix;
55+ }
56+
5257LSTMRecognizer::LSTMRecognizer ()
5358 : network_(nullptr ),
5459 training_flags_ (0 ),
Original file line number Diff line number Diff line change @@ -53,6 +53,7 @@ enum TrainingFlags {
5353class LSTMRecognizer {
5454 public:
5555 LSTMRecognizer ();
56+ LSTMRecognizer (const STRING language_data_path_prefix);
5657 ~LSTMRecognizer ();
5758
5859 int NumOutputs () const { return network_->NumOutputs (); }
You can’t perform that action at this time.
0 commit comments