From df7d1e1f978dbadc5c34ebca63908e533f45ba54 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Thu, 18 Oct 2018 09:34:15 +0200 Subject: [PATCH] Rename API function for getting LSTM choices Signed-off-by: Stefan Weil --- src/api/baseapi.cpp | 2 +- src/ccmain/resultiterator.cpp | 2 +- src/ccmain/resultiterator.h | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/api/baseapi.cpp b/src/api/baseapi.cpp index 7b5ab3e869..56956ef5c9 100644 --- a/src/api/baseapi.cpp +++ b/src/api/baseapi.cpp @@ -1561,7 +1561,7 @@ char* TessBaseAPI::GetHOCRText(ETEXT_DESC* monitor, int page_number) { // Now, process the word... std::vector>>* confidencemap = nullptr; if (tesseract_->lstm_choice_mode) { - confidencemap = res_it->GetChoices(); + confidencemap = res_it->GetBestLSTMChoices(); } hocr_str += "\n >>* ResultIterator::GetChoices() const { +std::vector>>* ResultIterator::GetBestLSTMChoices() const { if (it_->word() != nullptr) { return &it_->word()->timesteps; } else { diff --git a/src/ccmain/resultiterator.h b/src/ccmain/resultiterator.h index 8738897dab..073388827d 100644 --- a/src/ccmain/resultiterator.h +++ b/src/ccmain/resultiterator.h @@ -98,9 +98,9 @@ class TESS_API ResultIterator : public LTRResultIterator { virtual char* GetUTF8Text(PageIteratorLevel level) const; /** - * Returns the lstm choices for every LSTM timestep for the current Word + * Returns the LSTM choices for every LSTM timestep for the current word. */ - virtual std::vector>>* GetChoices() const; + virtual std::vector>>* GetBestLSTMChoices() const; /** * Return whether the current paragraph's dominant reading direction