Misc fixes missed from previous commits

This commit is contained in:
Ray Smith 2015-05-12 18:13:15 -07:00
parent b2a3924585
commit 03f3c9dc88
5 changed files with 9 additions and 14 deletions

View File

@ -636,8 +636,8 @@ void ResultIterator::IterateAndAppendUTF8TextlineText(STRING *text) {
int words_appended = 0; int words_appended = 0;
do { do {
int numSpaces = preserve_interword_spaces_ ? it_->word()->word->space() : int numSpaces = preserve_interword_spaces_ ? it_->word()->word->space()
(words_appended > 0); : (words_appended > 0);
for (int i = 0; i < numSpaces; ++i) { for (int i = 0; i < numSpaces; ++i) {
*text += " "; *text += " ";
} }

View File

@ -78,7 +78,7 @@ bool ReadMemBoxes(int target_page, bool skip_blanks, const char* box_data,
if (!ParseBoxFileStr(lines[i].string(), &page, &utf8_str, &box)) { if (!ParseBoxFileStr(lines[i].string(), &page, &utf8_str, &box)) {
continue; continue;
} }
if (skip_blanks && utf8_str == " ") continue; if (skip_blanks && (utf8_str == " " || utf8_str == "\t")) continue;
if (target_page >= 0 && page != target_page) continue; if (target_page >= 0 && page != target_page) continue;
if (boxes != NULL) boxes->push_back(box); if (boxes != NULL) boxes->push_back(box);
if (texts != NULL) texts->push_back(utf8_str); if (texts != NULL) texts->push_back(utf8_str);

View File

@ -206,9 +206,6 @@ void Classify::AdaptiveClassifier(TBLOB *Blob, BLOB_CHOICE_LIST *Choices) {
PrintAdaptiveMatchResults(*Results); PrintAdaptiveMatchResults(*Results);
} }
if (LargeSpeckle(*Blob) || Choices->length() == 0)
AddLargeSpeckleTo(Results->BlobLength, Choices);
#ifndef GRAPHICS_DISABLED #ifndef GRAPHICS_DISABLED
if (classify_enable_adaptive_debugger) if (classify_enable_adaptive_debugger)
DebugAdaptiveClassifier(Blob, Results); DebugAdaptiveClassifier(Blob, Results);

View File

@ -118,10 +118,8 @@ FEATURE ReadFeature(FILE *File, const FEATURE_DESC_STRUCT *FeatureDesc);
FEATURE_SET ReadFeatureSet(FILE *File, const FEATURE_DESC_STRUCT *FeatureDesc); FEATURE_SET ReadFeatureSet(FILE *File, const FEATURE_DESC_STRUCT *FeatureDesc);
void WriteFeature(FILE *File, FEATURE Feature); void WriteFeature(FEATURE Feature, STRING* str);
void WriteFeatureSet(FILE *File, FEATURE_SET FeatureSet); void WriteFeatureSet(FEATURE_SET FeatureSet, STRING* str);
void WriteOldParamDesc(FILE *File, const FEATURE_DESC_STRUCT *FeatureDesc);
#endif #endif