00001
00020 #ifndef OUTPUT_H
00021 #define OUTPUT_H
00022
00023 #include "varable.h"
00024
00025 #include "pageres.h"
00026 #include "notdll.h"
00027
00030 extern BOOL_EVAR_H (tessedit_write_block_separators, TRUE,
00031 "Write block separators in output");
00032 extern BOOL_VAR_H (tessedit_write_raw_output, FALSE,
00033 "Write raw stuff to name.raw");
00034 extern BOOL_EVAR_H (tessedit_write_output, TRUE, "Write text to name.txt");
00035 extern BOOL_EVAR_H (tessedit_write_txt_map, TRUE,
00036 "Write .txt to .etx map file");
00037 extern BOOL_EVAR_H (tessedit_write_rep_codes, TRUE,
00038 "Write repetition char code");
00039 extern BOOL_EVAR_H (tessedit_write_unlv, FALSE, "Write .unlv output file");
00040 extern STRING_EVAR_H (unrecognised_char, "|",
00041 "Output char for unidentified blobs");
00042 extern INT_EVAR_H (suspect_level, 99, "Suspect marker level");
00043 extern INT_VAR_H (suspect_space_level, 100,
00044 "Min suspect level for rejecting spaces");
00045 extern INT_VAR_H (suspect_short_words, 2,
00046 "Dont Suspect dict wds longer than this");
00047 extern BOOL_VAR_H (suspect_constrain_1Il, FALSE,
00048 "UNLV keep 1Il chars rejected");
00049 extern double_VAR_H (suspect_rating_per_ch, 999.9,
00050 "Dont touch bad rating limit");
00051 extern double_VAR_H (suspect_accept_rating, -999.9,
00052 "Accept good rating limit");
00053 extern BOOL_EVAR_H (tessedit_minimal_rejection, FALSE,
00054 "Only reject tess failures");
00055 extern BOOL_VAR_H (tessedit_zero_rejection, FALSE, "Dont reject ANYTHING");
00056 extern BOOL_VAR_H (tessedit_word_for_word, FALSE,
00057 "Make output have exactly one word per WERD");
00058 extern BOOL_VAR_H (tessedit_consistent_reps, TRUE,
00059 "Force all rep chars the same");
00061 void output_pass(
00062 PAGE_RES_IT &page_res_it,
00063 BOOL8 write_to_shm);
00064 void write_results(
00065 PAGE_RES_IT &page_res_it,
00066 char newline_type,
00067 BOOL8 force_eol,
00068 BOOL8 write_to_shm
00069 );
00070 WERD_CHOICE *make_epaper_choice(
00071 WERD_RES *word,
00072 char newline_type
00073 );
00074 INT16 make_reject (
00075 BOX * inset_box,
00076 INT16 prevright,
00077 INT16 nextleft,
00078 DENORM * denorm,
00079 char word_string[]
00080 );
00081 char determine_newline_type(
00082 WERD *word,
00083 BLOCK *block,
00084 WERD *next_word,
00085 BLOCK *next_block
00086 );
00087 void write_cooked_text(
00088 WERD *word,
00089 const STRING &text,
00090 BOOL8 acceptable,
00091 BOOL8 pass2,
00092 FILE *fp
00093 );
00094 void write_shm_text(
00095 WERD_RES *word,
00096 BLOCK *block,
00097 ROW_RES *row,
00098 const STRING &text
00099 );
00100 void write_map(
00101 FILE *mapfile,
00102 WERD_RES *word);
00103 FILE *open_outfile(
00104 const char *extension);
00105 void write_unlv_text(WERD_RES *word);
00106 char get_rep_char(
00107 WERD_RES *word);
00108 void ensure_rep_chars_are_consistent(WERD_RES *word);
00109 void set_unlv_suspects(WERD_RES *word);
00110 INT16 count_alphas(
00111 const char *s);
00112 INT16 count_alphanums(
00113 const char *s);
00114 BOOL8 acceptable_number_string(const char *s);
00115 #endif