Public Member Functions |
| Wordrec () |
| ~Wordrec () |
void | save_summary (inT32 elapsed_time) |
int | end_recog () |
BLOB_CHOICE_LIST_VECTOR * | evaluate_chunks (CHUNKS_RECORD *chunks_record, SEARCH_STATE search_state) |
void | update_ratings (const BLOB_CHOICE_LIST_VECTOR &new_choices, const CHUNKS_RECORD *chunks_record, const SEARCH_STATE search_state) |
void | expand_node (FLOAT32 worst_priority, CHUNKS_RECORD *chunks_record, SEARCH_RECORD *the_search) |
BLOB_CHOICE_LIST * | join_blobs_and_classify (TBLOB *blobs, SEAMS seam_list, int x, int y, int fx, const MATRIX *ratings, BLOB_CHOICE_LIST_VECTOR *old_choices) |
MATRIX * | word_associator (TBLOB *blobs, SEAMS seams, STATE *state, int fxid, WERD_CHOICE *best_choice, WERD_CHOICE *raw_choice, char *correct, DANGERR *fixpt, STATE *best_state) |
void | mfeature_init () |
BLOB_CHOICE_LIST * | classify_piece (TBLOB *pieces, SEAMS seams, inT16 start, inT16 end) |
BLOB_CHOICE_LIST * | get_piece_rating (MATRIX *ratings, TBLOB *blobs, SEAMS seams, inT16 start, inT16 end) |
void | dj_statistics (FILE *File) |
void | dj_cleanup () |
FLOAT32 | prioritize_state (CHUNKS_RECORD *chunks_record, SEARCH_RECORD *the_search) |
FLOAT32 | width_priority (CHUNKS_RECORD *chunks_record, STATE *state, int num_joints) |
FLOAT32 | seamcut_priority (SEAMS seams, STATE *state, int num_joints) |
FLOAT32 | rating_priority (CHUNKS_RECORD *chunks_record, STATE *state, int num_joints) |
|
Initialize all the things in the program that need to be initialized. init_permute determines whether to initialize the permute functions and Dawg models.
|
void | program_editup (const char *textbase, bool init_permute) |
|
|
BLOB_CHOICE_LIST_VECTOR * | cc_recog (TWERD *tessword, WERD_CHOICE *best_choice, WERD_CHOICE *best_raw_choice, BOOL8 tester, BOOL8 trainer, bool last_word_on_line) |
|
This function holds any nessessary post processing for the Wise Owl program.
|
void | program_editdown (inT32 elasped_time) |
|
Get ready to do some pass 1 stuff.
|
void | set_pass1 () |
|
Get ready to do some pass 2 stuff.
|
void | set_pass2 () |
|
Startup recog program ready to recognize words.
|
int | start_recog (const char *textbase) |
|
Called from Tess with a blob in tess form. Convert the blob to editor form. Call the matcher setup by the segmenter in tess_matcher. Convert the output choices back to tess form.
|
BLOB_CHOICE_LIST * | call_matcher (TBLOB *ptblob, TBLOB *tessblob, TBLOB *ntblob, void *, TEXTROW *) |
|
Initialize all the things in the program that need to be initialized.
|
void | program_init () |
|
Classify the this blob if it is not already recorded in the match table. Attempt to recognize this blob as a character. The recognition rating for this blob will be stored as a part of the blob. This value will also be returned to the caller.
- Parameters:
-
| pblob | Previous blob |
| blob | Current blob |
| nlob | Next blob |
| row | The row to process |
| string | The string to display in ScrollView |
| color | The colour to use when displayed with ScrollView |
|
BLOB_CHOICE_LIST * | classify_blob (TBLOB *pblob, TBLOB *blob, TBLOB *nblob, TEXTROW *row, const char *string, C_COL color) |
|
For each blob in the given word update match_table with the corresponding BLOB_CHOICES_LIST from choices.
|
void | update_blob_classifications (TWERD *word, const BLOB_CHOICE_LIST_VECTOR &choices) |
|
Evaluate the segmentation that is represented by this state in the best first search. Add this state to the "states_seen" list.
|
inT16 | evaluate_state (CHUNKS_RECORD *chunks_record, SEARCH_RECORD *the_search, DANGERR *fixpt) |
BLOB_CHOICE_LIST_VECTOR * | rebuild_current_state (TBLOB *blobs, SEAMS seam_list, STATE *state, BLOB_CHOICE_LIST_VECTOR *char_choices, int fx, bool force_rebuild, const WERD_CHOICE &best_choice, const MATRIX *ratings) |
|
Find the best segmentation by doing a best first search of the solution space.
|
void | best_first_search (CHUNKS_RECORD *chunks_record, WERD_CHOICE *best_choice, WERD_CHOICE *raw_choice, STATE *state, DANGERR *fixpt, STATE *best_state) |
|
Start with the current word of blobs and its classification. Find the worst blobs and try to divide it up to improve the ratings.
|
bool | improve_one_blob (TWERD *word, BLOB_CHOICE_LIST_VECTOR *char_choices, int fx, inT32 *blob_number, SEAMS *seam_list, DANGERR *fixpt, bool split_next_to_fragment) |
|
Takes a blob and its chop index, converts that chop index to a unichar_id, and stores the chop index in place of the blob's original unichar_id.
|
void | modify_blob_choice (BLOB_CHOICE_LIST *answer, int chop_index) |
|
Start with the current one-blob word and its classification. Find the worst blobs and try to divide it up to improve the ratings. Used for testing chopper.
|
bool | chop_one_blob (TWERD *word, BLOB_CHOICE_LIST_VECTOR *char_choices, inT32 *blob_number, SEAMS *seam_list, int *right_chop_index) |
|
Classify the blobs in this word and permute the results. Find the worst blob in the word and chop it up. Continue this process until a good answer has been found or all the blobs have been chopped up enough. Return the word level ratings.
|
BLOB_CHOICE_LIST_VECTOR * | chop_word_main (register TWERD *word, int fx, WERD_CHOICE *best_choice, WERD_CHOICE *raw_choice, BOOL8 tester, BOOL8 trainer) |
|
Start with the current word of blobs and its classification. Find the worst blobs and try to divide them up to improve the ratings. As long as ratings are produced by the new blob splitting. When all the splitting has been accomplished all the ratings memory is reclaimed.
|
void | improve_by_chopping (register TWERD *word, BLOB_CHOICE_LIST_VECTOR *char_choices, int fx, STATE *best_state, WERD_CHOICE *best_choice, WERD_CHOICE *raw_choice, SEAMS *seam_list, DANGERR *fixpt, STATE *chop_states, inT32 *state_count) |
inT16 | select_blob_to_split (const BLOB_CHOICE_LIST_VECTOR &char_choices, float rating_ceiling, bool split_next_to_fragment) |
|
Test the dictionaries, returning NO_PERM (0) if not found, or one of the PermuterType values if found, according to the dictionary.
|
int | dict_word (const WERD_CHOICE &word) |
Public Attributes |
POLY_MATCHER | tess_matcher |
POLY_TESTER | tess_tester |
POLY_TESTER | tess_trainer |
DENORM * | tess_denorm |
WERD * | tess_word |