00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef FIXSPACE_H
00023 #define FIXSPACE_H
00024
00025 #include "pageres.h"
00026 #include "varable.h"
00027 #include "ocrclass.h"
00028 #include "notdll.h"
00029
00030 extern BOOL_VAR_H (fixsp_check_for_fp_noise_space, TRUE,
00031 "Try turning noise to space in fixed pitch");
00032 extern BOOL_VAR_H (fixsp_fp_eval, TRUE, "Use alternate evaluation for fp");
00033 extern BOOL_VAR_H (fixsp_noise_score_fixing, TRUE, "More sophisticated?");
00034 extern INT_VAR_H (fixsp_non_noise_limit, 1,
00035 "How many non-noise blbs either side?");
00036 extern double_VAR_H (fixsp_small_outlines_size, 0.28,
00037 "Small if lt xht x this");
00038 extern BOOL_VAR_H (fixsp_ignore_punct, TRUE, "In uniform spacing calc");
00039 extern BOOL_VAR_H (fixsp_numeric_fix, TRUE, "Try to deal with numeric punct");
00040 extern BOOL_VAR_H (fixsp_prefer_joined_1s, TRUE, "Arbitrary boost");
00041 extern BOOL_VAR_H (tessedit_test_uniform_wd_spacing, FALSE,
00042 "Limit context word spacing");
00043 extern BOOL_VAR_H (tessedit_prefer_joined_punct, FALSE,
00044 "Reward punctation joins");
00045 extern INT_VAR_H (fixsp_done_mode, 1, "What constitutes done for spacing");
00046 extern INT_VAR_H (debug_fix_space_level, 0, "Contextual fixspace debug");
00047 extern STRING_VAR_H (numeric_punctuation, ".,",
00048 "Punct. chs expected WITHIN numbers");
00049 void initialise_search(WERD_RES_LIST &src_list, WERD_RES_LIST &new_list);
00050 void transform_to_next_perm(WERD_RES_LIST &words);
00051 void dump_words(WERD_RES_LIST &perm, inT16 score, inT16 mode, BOOL8 improved);
00052 BOOL8 uniformly_spaced(
00053 WERD_RES *word);
00054 BOOL8 fixspace_thinks_word_done(WERD_RES *word);
00055 void break_noisiest_blob_word(WERD_RES_LIST &words);
00056 inT16 worst_noise_blob(WERD_RES *word_res, float *worst_noise_score);
00057 float blob_noise_score(PBLOB *blob);
00058 void fixspace_dbg(WERD_RES *word);
00059 #endif