Skip to content

Commit df7d1e1

Browse files
committed
Rename API function for getting LSTM choices
Signed-off-by: Stefan Weil <[email protected]>
1 parent 0a42c0d commit df7d1e1

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/api/baseapi.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1561,7 +1561,7 @@ char* TessBaseAPI::GetHOCRText(ETEXT_DESC* monitor, int page_number) {
15611561
// Now, process the word...
15621562
std::vector<std::vector<std::pair<const char*, float>>>* confidencemap = nullptr;
15631563
if (tesseract_->lstm_choice_mode) {
1564-
confidencemap = res_it->GetChoices();
1564+
confidencemap = res_it->GetBestLSTMChoices();
15651565
}
15661566
hocr_str += "\n <span class='ocrx_word'";
15671567
AddIdTohOCR(&hocr_str, "word", page_id, wcnt);

src/ccmain/resultiterator.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,7 @@ char* ResultIterator::GetUTF8Text(PageIteratorLevel level) const {
604604
return result;
605605
}
606606

607-
std::vector<std::vector<std::pair<const char*, float>>>* ResultIterator::GetChoices() const {
607+
std::vector<std::vector<std::pair<const char*, float>>>* ResultIterator::GetBestLSTMChoices() const {
608608
if (it_->word() != nullptr) {
609609
return &it_->word()->timesteps;
610610
} else {

src/ccmain/resultiterator.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,9 @@ class TESS_API ResultIterator : public LTRResultIterator {
9898
virtual char* GetUTF8Text(PageIteratorLevel level) const;
9999

100100
/**
101-
* Returns the lstm choices for every LSTM timestep for the current Word
101+
* Returns the LSTM choices for every LSTM timestep for the current word.
102102
*/
103-
virtual std::vector<std::vector<std::pair<const char*, float>>>* GetChoices() const;
103+
virtual std::vector<std::vector<std::pair<const char*, float>>>* GetBestLSTMChoices() const;
104104

105105
/**
106106
* Return whether the current paragraph's dominant reading direction

0 commit comments

Comments
 (0)