Skip to content

Commit 18c8f88

Browse files
stweilzdenop
authored andcommitted
Remove deprecated parameters (#1418)
They were deprecated nearly 3 years ago in commit 0e868ef. Signed-off-by: Stefan Weil <[email protected]>
1 parent 3dcab4e commit 18c8f88

File tree

2 files changed

+0
-151
lines changed

2 files changed

+0
-151
lines changed

ccmain/tesseractclass.cpp

-89
Original file line numberDiff line numberDiff line change
@@ -509,95 +509,6 @@ Tesseract::Tesseract()
509509
"Page separator (default is form feed control character)",
510510
this->params()),
511511

512-
// The following parameters were deprecated and removed from their
513-
// original
514-
// locations. The parameters are temporarily kept here to give Tesseract
515-
// users a chance to updated their [lang].traineddata and config files
516-
// without introducing failures during Tesseract initialization.
517-
// TODO(ocr-team): remove these parameters from the code once we are
518-
// reasonably sure that Tesseract users have updated their data files.
519-
//
520-
// BEGIN DEPRECATED PARAMETERS
521-
BOOL_MEMBER(textord_tabfind_vertical_horizontal_mix, true,
522-
"find horizontal lines such as headers in vertical page mode",
523-
this->params()),
524-
INT_MEMBER(tessedit_ok_mode, 5, "Acceptance decision algorithm",
525-
this->params()),
526-
BOOL_INIT_MEMBER(load_fixed_length_dawgs, true,
527-
"Load fixed length dawgs"
528-
" (e.g. for non-space delimited languages)",
529-
this->params()),
530-
INT_MEMBER(segment_debug, 0, "Debug the whole segmentation process",
531-
this->params()),
532-
BOOL_MEMBER(permute_debug, 0, "Debug char permutation process",
533-
this->params()),
534-
double_MEMBER(bestrate_pruning_factor, 2.0,
535-
"Multiplying factor of"
536-
" current best rate to prune other hypotheses",
537-
this->params()),
538-
BOOL_MEMBER(permute_script_word, 0,
539-
"Turn on word script consistency permuter", this->params()),
540-
BOOL_MEMBER(segment_segcost_rating, 0,
541-
"incorporate segmentation cost in word rating?",
542-
this->params()),
543-
double_MEMBER(segment_reward_script, 0.95,
544-
"Score multipler for script consistency within a word. "
545-
"Being a 'reward' factor, it should be <= 1. "
546-
"Smaller value implies bigger reward.",
547-
this->params()),
548-
BOOL_MEMBER(permute_fixed_length_dawg, 0,
549-
"Turn on fixed-length phrasebook search permuter",
550-
this->params()),
551-
BOOL_MEMBER(permute_chartype_word, 0,
552-
"Turn on character type (property) consistency permuter",
553-
this->params()),
554-
double_MEMBER(segment_reward_chartype, 0.97,
555-
"Score multipler for char type consistency within a word. ",
556-
this->params()),
557-
double_MEMBER(segment_reward_ngram_best_choice, 0.99,
558-
"Score multipler for ngram permuter's best choice"
559-
" (only used in the Han script path).",
560-
this->params()),
561-
BOOL_MEMBER(ngram_permuter_activated, false,
562-
"Activate character-level n-gram-based permuter",
563-
this->params()),
564-
BOOL_MEMBER(permute_only_top, false, "Run only the top choice permuter",
565-
this->params()),
566-
INT_MEMBER(language_model_fixed_length_choices_depth, 3,
567-
"Depth of blob choice lists to explore"
568-
" when fixed length dawgs are on",
569-
this->params()),
570-
BOOL_MEMBER(use_new_state_cost, FALSE,
571-
"use new state cost heuristics for segmentation state"
572-
" evaluation",
573-
this->params()),
574-
double_MEMBER(heuristic_segcost_rating_base, 1.25,
575-
"Base factor for adding segmentation cost into word rating."
576-
" It's a multiplying factor, the larger the value above 1,"
577-
" the bigger the effect of segmentation cost.",
578-
this->params()),
579-
double_MEMBER(heuristic_weight_rating, 1.0,
580-
"weight associated with char rating in combined cost of"
581-
" state",
582-
this->params()),
583-
double_MEMBER(heuristic_weight_width, 1000.0,
584-
"weight associated with width evidence in combined cost of"
585-
" state",
586-
this->params()),
587-
double_MEMBER(heuristic_weight_seamcut, 0.0,
588-
"weight associated with seam cut in combined cost of state",
589-
this->params()),
590-
double_MEMBER(heuristic_max_char_wh_ratio, 2.0,
591-
"max char width-to-height ratio allowed in segmentation",
592-
this->params()),
593-
BOOL_MEMBER(enable_new_segsearch, true,
594-
"Enable new segmentation search path.", this->params()),
595-
double_MEMBER(segsearch_max_fixed_pitch_char_wh_ratio, 2.0,
596-
"Maximum character width-to-height ratio for"
597-
" fixed-pitch fonts",
598-
this->params()),
599-
// END DEPRECATED PARAMETERS
600-
601512
backup_config_file_(NULL),
602513
pix_binary_(NULL),
603514
pix_grey_(NULL),

ccmain/tesseractclass.h

-62
Original file line numberDiff line numberDiff line change
@@ -1106,68 +1106,6 @@ class Tesseract : public Wordrec {
11061106
STRING_VAR_H(page_separator, "\f",
11071107
"Page separator (default is form feed control character)");
11081108

1109-
// The following parameters were deprecated and removed from their original
1110-
// locations. The parameters are temporarily kept here to give Tesseract
1111-
// users a chance to updated their [lang].traineddata and config files
1112-
// without introducing failures during Tesseract initialization.
1113-
// TODO(ocr-team): remove these parameters from the code once we are
1114-
// reasonably sure that Tesseract users have updated their data files.
1115-
//
1116-
// BEGIN DEPRECATED PARAMETERS
1117-
BOOL_VAR_H(textord_tabfind_vertical_horizontal_mix, true,
1118-
"find horizontal lines such as headers in vertical page mode");
1119-
INT_VAR_H(tessedit_ok_mode, 5, "Acceptance decision algorithm");
1120-
BOOL_VAR_H(load_fixed_length_dawgs, true, "Load fixed length"
1121-
" dawgs (e.g. for non-space delimited languages)");
1122-
INT_VAR_H(segment_debug, 0, "Debug the whole segmentation process");
1123-
BOOL_VAR_H(permute_debug, 0, "char permutation debug");
1124-
double_VAR_H(bestrate_pruning_factor, 2.0, "Multiplying factor of"
1125-
" current best rate to prune other hypotheses");
1126-
BOOL_VAR_H(permute_script_word, 0,
1127-
"Turn on word script consistency permuter");
1128-
BOOL_VAR_H(segment_segcost_rating, 0,
1129-
"incorporate segmentation cost in word rating?");
1130-
double_VAR_H(segment_reward_script, 0.95,
1131-
"Score multipler for script consistency within a word. "
1132-
"Being a 'reward' factor, it should be <= 1. "
1133-
"Smaller value implies bigger reward.");
1134-
BOOL_VAR_H(permute_fixed_length_dawg, 0,
1135-
"Turn on fixed-length phrasebook search permuter");
1136-
BOOL_VAR_H(permute_chartype_word, 0,
1137-
"Turn on character type (property) consistency permuter");
1138-
double_VAR_H(segment_reward_chartype, 0.97,
1139-
"Score multipler for char type consistency within a word. ");
1140-
double_VAR_H(segment_reward_ngram_best_choice, 0.99,
1141-
"Score multipler for ngram permuter's best choice"
1142-
" (only used in the Han script path).");
1143-
BOOL_VAR_H(ngram_permuter_activated, false,
1144-
"Activate character-level n-gram-based permuter");
1145-
BOOL_VAR_H(permute_only_top, false, "Run only the top choice permuter");
1146-
INT_VAR_H(language_model_fixed_length_choices_depth, 3,
1147-
"Depth of blob choice lists to explore"
1148-
" when fixed length dawgs are on");
1149-
BOOL_VAR_H(use_new_state_cost, FALSE,
1150-
"use new state cost heuristics for segmentation state evaluation");
1151-
double_VAR_H(heuristic_segcost_rating_base, 1.25,
1152-
"base factor for adding segmentation cost into word rating."
1153-
"It's a multiplying factor, the larger the value above 1, "
1154-
"the bigger the effect of segmentation cost.");
1155-
double_VAR_H(heuristic_weight_rating, 1,
1156-
"weight associated with char rating in combined cost of state");
1157-
double_VAR_H(heuristic_weight_width, 1000.0,
1158-
"weight associated with width evidence in combined cost of"
1159-
" state");
1160-
double_VAR_H(heuristic_weight_seamcut, 0,
1161-
"weight associated with seam cut in combined cost of state");
1162-
double_VAR_H(heuristic_max_char_wh_ratio, 2.0,
1163-
"max char width-to-height ratio allowed in segmentation");
1164-
BOOL_VAR_H(enable_new_segsearch, false,
1165-
"Enable new segmentation search path.");
1166-
double_VAR_H(segsearch_max_fixed_pitch_char_wh_ratio, 2.0,
1167-
"Maximum character width-to-height ratio for"
1168-
"fixed pitch fonts");
1169-
// END DEPRECATED PARAMETERS
1170-
11711109
//// ambigsrecog.cpp /////////////////////////////////////////////////////////
11721110
FILE *init_recog_training(const STRING &fname);
11731111
void recog_training_segmented(const STRING &fname,

0 commit comments

Comments
 (0)