#include <ltrresultiterator.h>
Definition at line 191 of file ltrresultiterator.h.
◆ ChoiceIterator()
Definition at line 363 of file ltrresultiterator.cpp.
363 {
365 word_res_ = result_it.it_->
word();
366 BLOB_CHOICE_LIST* choices = nullptr;
367 if (word_res_->
ratings !=
nullptr)
369 if (choices != nullptr && !choices->empty()) {
370 choice_it_ = new BLOB_CHOICE_IT(choices);
371 choice_it_->mark_cycle_pt();
372 } else {
373 choice_it_ = nullptr;
374 }
375}
BLOB_CHOICE_LIST * GetBlobChoices(int index) const
◆ ~ChoiceIterator()
| tesseract::ChoiceIterator::~ChoiceIterator |
( |
| ) |
|
◆ Confidence()
| float tesseract::ChoiceIterator::Confidence |
( |
| ) |
const |
Definition at line 400 of file ltrresultiterator.cpp.
400 {
401 if (choice_it_ == nullptr) return 0.0f;
402 float confidence = 100 + 5 * choice_it_->data()->certainty();
403 if (confidence < 0.0f) confidence = 0.0f;
404 if (confidence > 100.0f) confidence = 100.0f;
405 return confidence;
406}
◆ GetUTF8Text()
| const char * tesseract::ChoiceIterator::GetUTF8Text |
( |
| ) |
const |
Definition at line 388 of file ltrresultiterator.cpp.
388 {
389 if (choice_it_ == nullptr) return nullptr;
390 UNICHAR_ID id = choice_it_->data()->unichar_id();
392}
const UNICHARSET * uch_set
const char * id_to_unichar_ext(UNICHAR_ID id) const
◆ Next()
| bool tesseract::ChoiceIterator::Next |
( |
| ) |
|
Definition at line 380 of file ltrresultiterator.cpp.
380 {
381 if (choice_it_ == nullptr) return false;
382 choice_it_->forward();
383 return !choice_it_->cycled_list();
384}
The documentation for this class was generated from the following files: