MCPcopy Create free account
hub / github.com/creatale/node-dv / BestChoiceToCorrectText

Method BestChoiceToCorrectText

deps/tesseract/ccstruct/pageres.cpp:917–925  ·  view source on GitHub ↗

Copies the best_choice strings to the correct_text for adaption/training.

Source from the content-addressed store, hash-verified

915
916// Copies the best_choice strings to the correct_text for adaption/training.
917void WERD_RES::BestChoiceToCorrectText() {
918 correct_text.clear();
919 ASSERT_HOST(best_choice != NULL);
920 for (int i = 0; i < best_choice->length(); ++i) {
921 UNICHAR_ID choice_id = best_choice->unichar_id(i);
922 const char* blob_choice = uch_set->id_to_unichar(choice_id);
923 correct_text.push_back(STRING(blob_choice));
924 }
925}
926
927// Merges 2 adjacent blobs in the result if the permanent callback
928// class_cb returns other than INVALID_UNICHAR_ID, AND the permanent

Callers 2

classify_word_pass1Method · 0.80
AdaptToWordStrMethod · 0.80

Calls 6

unichar_idMethod · 0.80
id_to_unicharMethod · 0.80
STRINGClass · 0.70
clearMethod · 0.45
lengthMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected