Skip to content

Commit

Permalink
Rename API function for getting LSTM choices
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Weil <sw@weilnetz.de>
  • Loading branch information
stweil committed Oct 19, 2018
1 parent 0a42c0d commit df7d1e1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/api/baseapi.cpp
Expand Up @@ -1561,7 +1561,7 @@ char* TessBaseAPI::GetHOCRText(ETEXT_DESC* monitor, int page_number) {
// Now, process the word...
std::vector<std::vector<std::pair<const char*, float>>>* confidencemap = nullptr;
if (tesseract_->lstm_choice_mode) {
confidencemap = res_it->GetChoices();
confidencemap = res_it->GetBestLSTMChoices();
}
hocr_str += "\n <span class='ocrx_word'";
AddIdTohOCR(&hocr_str, "word", page_id, wcnt);
Expand Down
2 changes: 1 addition & 1 deletion src/ccmain/resultiterator.cpp
Expand Up @@ -604,7 +604,7 @@ char* ResultIterator::GetUTF8Text(PageIteratorLevel level) const {
return result;
}

std::vector<std::vector<std::pair<const char*, float>>>* ResultIterator::GetChoices() const {
std::vector<std::vector<std::pair<const char*, float>>>* ResultIterator::GetBestLSTMChoices() const {
if (it_->word() != nullptr) {
return &it_->word()->timesteps;
} else {
Expand Down
4 changes: 2 additions & 2 deletions src/ccmain/resultiterator.h
Expand Up @@ -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<std::vector<std::pair<const char*, float>>>* GetChoices() const;
virtual std::vector<std::vector<std::pair<const char*, float>>>* GetBestLSTMChoices() const;

/**
* Return whether the current paragraph's dominant reading direction
Expand Down

0 comments on commit df7d1e1

Please sign in to comment.