ccmain/output.h

Go to the documentation of this file.
00001 
00020 #ifndef           OUTPUT_H
00021 #define           OUTPUT_H
00022 
00023 #include          "varable.h"
00024 //#include                                      "epapconv.h"
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(  // Tess output pass (send to api)
00062                  PAGE_RES_IT &page_res_it,
00063                  BOOL8 write_to_shm);
00064 void write_results(                           // output a word
00065                    PAGE_RES_IT &page_res_it,  // full info
00066                    char newline_type,         // type of newline
00067                    BOOL8 force_eol,           //override tilde crunch?
00068                    BOOL8 write_to_shm         //send to api
00069                   );
00070 WERD_CHOICE *make_epaper_choice(                   //convert one word
00071                                 WERD_RES *word,    //word to do
00072                                 char newline_type  //type of newline
00073                                );
00074 INT16 make_reject (              //make reject code
00075 BOX * inset_box,                 //bounding box
00076 INT16 prevright,                 //previous char
00077 INT16 nextleft,                  //next char
00078 DENORM * denorm,                 //de-normalizer
00079 char word_string[]               //output string
00080 );
00081 char determine_newline_type(                   //test line ends
00082                             WERD *word,        //word to do
00083                             BLOCK *block,      //current block
00084                             WERD *next_word,   //next word
00085                             BLOCK *next_block  //block of next word
00086                            );
00087 void write_cooked_text(                     //write output
00088                        WERD *word,          //word to do
00089                        const STRING &text,  //text to write
00090                        BOOL8 acceptable,    //good stuff
00091                        BOOL8 pass2,         //done on pass2
00092                        FILE *fp             //file to write
00093                       );
00094 void write_shm_text(                    //write output
00095                     WERD_RES *word,     //word to do
00096                     BLOCK *block,       //block it is from
00097                     ROW_RES *row,       //row it is from
00098                     const STRING &text  //text to write
00099                    );
00100 void write_map(                //output a map file
00101                FILE *mapfile,  //mapfile to write to
00102                WERD_RES *word);
00103 FILE *open_outfile(  //open .map & .unlv file
00104                    const char *extension);
00105 void write_unlv_text(WERD_RES *word); 
00106 char get_rep_char(  // what char is repeated?
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(  //how many alphas
00111                    const char *s);
00112 INT16 count_alphanums(  //how many alphanums
00113                       const char *s);
00114 BOOL8 acceptable_number_string(const char *s); 
00115 #endif

Generated on Wed Feb 28 19:49:07 2007 for Tesseract by  doxygen 1.5.1