21 #ifndef TESSERACT_CCMAIN_RESULT_ITERATOR_H_
22 #define TESSERACT_CCMAIN_RESULT_ITERATOR_H_
49 void Begin()
override;
83 int BlanksBeforeWord()
const;
96 virtual std::vector<std::vector<std::vector<std::pair<const char *, float>>>>
97 *GetRawLSTMTimesteps()
const;
98 virtual std::vector<std::vector<std::pair<const char *, float>>>
99 *GetBestLSTMSymbolChoices()
const;
105 bool ParagraphIsLtr()
const;
131 static void CalculateTextlineOrder(
132 bool paragraph_is_ltr,
133 const std::vector<StrongScriptDirection> &word_dirs,
134 std::vector<int> *reading_order);
154 bool CurrentParagraphIsLtr()
const;
167 void CalculateTextlineOrder(
bool paragraph_is_ltr,
169 std::vector<int> *indices)
const;
171 void CalculateTextlineOrder(
bool paragraph_is_ltr,
173 std::vector<StrongScriptDirection> *ssd,
174 std::vector<int> *indices)
const;
180 int LTRWordIndex()
const;
186 void CalculateBlobOrder(std::vector<int> *blob_indices)
const;
189 void MoveToLogicalStartOfTextline();
195 void MoveToLogicalStartOfWord();
198 bool IsAtFinalSymbolOfWord()
const;
201 bool IsAtFirstSymbolOfWord()
const;
207 void AppendSuffixMarks(std::string *text)
const;
210 void AppendUTF8WordText(std::string *text)
const;
219 void IterateAndAppendUTF8TextlineText(std::string *text);
227 void AppendUTF8ParagraphText(std::string *text)
const;
230 bool BidiDebug(
int min_level)
const;
232 bool current_paragraph_is_ltr_;
238 bool at_beginning_of_minor_run_;
241 bool in_minor_direction_;
247 bool preserve_interword_spaces_;
static const int kMinorRunEnd
static const int kMinorRunStart
~ResultIterator() override=default
static const int kComplexWord