29 :
blob(word.chopped_word->blobs[index])
31 ,
choices(&(*word.ratings)(index, index)) {}
40 std::vector<BlobData> blobs;
41 for (
const auto &w : words) {
42 if (w.word->ratings !=
nullptr && w.word->ratings->get(0, 0) ==
nullptr) {
43 for (
size_t s = 0; s < w.lang_words.size(); ++s) {
44 Tesseract *sub = s < sub_langs_.size() ? sub_langs_[s] :
this;
45 const WERD_RES &word = *w.lang_words[s];
47 blobs.emplace_back(b, sub, word);
53 if (tessedit_parallelize > 1) {
55# pragma omp parallel for num_threads(10)
58 for (
size_t b = 0; b < blobs.size(); ++b) {
64 for (
auto &blob : blobs) {
65 *blob.choices = blob.tesseract->classify_blob(blob.blob,
"par",
ScrollView::WHITE,
nullptr);
BLOB_CHOICE_LIST ** choices
BlobData(int index, Tesseract *tess, const WERD_RES &word)
void PrerecAllWordsPar(const std::vector< WordData > &words)
unsigned NumBlobs() const
tesseract::Tesseract * tesseract
BLOB_CHOICE_LIST * classify_blob(TBLOB *blob, const char *string, ScrollView::Color color, BlamerBundle *blamer_bundle)