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

Method LogNewRawChoice

deps/tesseract/ccstruct/pageres.cpp:596–604  ·  view source on GitHub ↗

Saves a copy of the word_choice if it has the best unadjusted rating. Returns true if the word_choice was the new best.

Source from the content-addressed store, hash-verified

594// Saves a copy of the word_choice if it has the best unadjusted rating.
595// Returns true if the word_choice was the new best.
596bool WERD_RES::LogNewRawChoice(WERD_CHOICE* word_choice) {
597 if (raw_choice == NULL || word_choice->rating() < raw_choice->rating()) {
598 delete raw_choice;
599 raw_choice = new WERD_CHOICE(*word_choice);
600 raw_choice->set_permuter(TOP_CHOICE_PERM);
601 return true;
602 }
603 return false;
604}
605
606// Consumes word_choice by adding it to best_choices, (taking ownership) if
607// the certainty for word_choice is some distance of the best choice in

Callers 3

TidyUpMethod · 0.80
CorrectClassifyWordsMethod · 0.80
UpdateBestChoiceMethod · 0.80

Calls 1

ratingMethod · 0.80

Tested by

no test coverage detected