mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2025-06-11 12:43:17 +08:00
Using overload to avoid API change
This commit is contained in:
parent
30aef44b9f
commit
efb267097d
@ -564,7 +564,15 @@ public:
|
|||||||
* page_number is 0-based but will appear in the output as 1-based.
|
* page_number is 0-based but will appear in the output as 1-based.
|
||||||
* Returned string must be freed with the delete [] operator.
|
* Returned string must be freed with the delete [] operator.
|
||||||
*/
|
*/
|
||||||
char *GetTSVText(int page_number, bool lang_info=false);
|
char *GetTSVText(int page_number);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Make a TSV-formatted string from the internal data structures.
|
||||||
|
* Allows additional column with detected language.
|
||||||
|
* page_number is 0-based but will appear in the output as 1-based.
|
||||||
|
* Returned string must be freed with the delete [] operator.
|
||||||
|
*/
|
||||||
|
char *GetTSVText(int page_number, bool lang_info);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Make a box file for LSTM training from the internal data structures.
|
* Make a box file for LSTM training from the internal data structures.
|
||||||
|
@ -1421,6 +1421,16 @@ static void AddBoxToTSV(const PageIterator *it, PageIteratorLevel level, std::st
|
|||||||
* page_number is 0-based but will appear in the output as 1-based.
|
* page_number is 0-based but will appear in the output as 1-based.
|
||||||
* Returned string must be freed with the delete [] operator.
|
* Returned string must be freed with the delete [] operator.
|
||||||
*/
|
*/
|
||||||
|
char *TessBaseAPI::GetTSVText(int page_number) {
|
||||||
|
return GetTSVText(page_number, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Make a TSV-formatted string from the internal data structures.
|
||||||
|
* Allows additional column with detected language.
|
||||||
|
* page_number is 0-based but will appear in the output as 1-based.
|
||||||
|
* Returned string must be freed with the delete [] operator.
|
||||||
|
*/
|
||||||
char *TessBaseAPI::GetTSVText(int page_number, bool lang_info) {
|
char *TessBaseAPI::GetTSVText(int page_number, bool lang_info) {
|
||||||
if (tesseract_ == nullptr || (page_res_ == nullptr && Recognize(nullptr) < 0)) {
|
if (tesseract_ == nullptr || (page_res_ == nullptr && Recognize(nullptr) < 0)) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
Loading…
Reference in New Issue
Block a user