src/classify/blobclass.cpp
bool Classify::WriteTRFile(const char *filename) {
  bool result = false;
  std::string tr_filename = filename;
  tr_filename += ".tr";
  FILE *fp = fopen(tr_filename.c_str(), "wb");
  if (fp) {
    result = tesseract::Serialize(fp, &tr_file_data_[0], tr_file_data_.length());
    fclose(fp);
  }
  tr_file_data_.resize(0);
  return result;
}
// Writes stored training data to a .tr file based on the given filename.
// Returns false on error.
Writes stored training data to a .tr file based on the given filename.
Returns false on error.
Writes stored training data to a . tr file based on the given filename . Returns false on error .
bool Classify::WriteTRFile(const char *filename) {
  bool result = false;
  std::string tr_filename = filename;
  tr_filename += ".tr";
  FILE *fp = fopen(tr_filename.c_str(), "wb");
  if (fp) {
    result = tesseract::Serialize(fp, &tr_file_data_[0], tr_file_data_.length());
    fclose(fp);
  }
  tr_file_data_.resize(0);
  return result;
}
bool Classify :: WriteTRFile ( const char * filename ) { bool result = false ; std :: string tr_filename = filename ; tr_filename += " " ; FILE * fp = fopen ( tr_filename . c_str ( ) , " " ) ; if ( fp ) { result = tesseract :: Serialize ( fp , & tr_file_data_ [ 0 ] , tr_file_data_ . length ( ) ) ; fclose ( fp ) ; } tr_file_data_ . resize ( 0 ) ; return result ; }
Writes stored training data to a .tr file based on the given filename.
Writes stored training data to a . tr file based on the given filename .