fix training tools build

This commit is contained in:
Zdenko Podobný 2014-08-13 22:07:44 +02:00
parent 3295dc29e2
commit 769fef8c96
4 changed files with 52 additions and 39 deletions

84
.gitignore vendored
View File

@ -1,36 +1,48 @@
# Windows
*.user
*.log
*.tlog
*.cache
*.obj
*.sdf
*.opensdf
*.lastbuildstate
*.unsuccessfulbuild
# Linux
# ignore local configuration
config.*
config/*
Makefile
Makefile.in
*.m4
# ignore help scripts/files
configure
libtool
stamp-h1
tesseract.pc
config_auto.h
api/tesseract
# ignore compilation files
*/.deps/*
*/.libs/*
*.lo
*.la
*.o
*.Plo
*.a
# Windows
*.user
*.log
*.tlog
*.cache
*.obj
*.sdf
*.opensdf
*.lastbuildstate
*.unsuccessfulbuild
# Linux
# ignore local configuration
config.*
config/*
Makefile
Makefile.in
*.m4
# ignore help scripts/files
configure
libtool
stamp-h1
tesseract.pc
config_auto.h
api/tesseract
training/ambiguous_words
training/classifier_tester
training/cntraining
training/combine_tessdata
training/dawg2wordlist
training/mftraining
training/set_unicharset_properties
training/shapeclustering
training/text2image
training/unicharset_extractor
training/wordlist2dawg
*.patch
# ignore compilation files
*/.deps/*
*/.libs/*
*.lo
*.la
*.o
*.Plo
*.a

0
configure.ac Executable file → Normal file
View File

View File

@ -84,12 +84,12 @@ class StringRenderer {
// underline. This implementation consider words to be space-delimited
// sequences of characters.
void set_underline_start_prob(const double frac) {
underline_start_prob_ = min(max(frac, 0.0), 1.0);
underline_start_prob_ = std::min(std::max(frac, 0.0), 1.0);
}
// Set the probability (value in [0, 1]) of continuing a started underline to
// the next word.
void set_underline_continuation_prob(const double frac) {
underline_continuation_prob_ = min(max(frac, 0.0), 1.0);
underline_continuation_prob_ = std::min(std::max(frac, 0.0), 1.0);
}
void set_underline_style(const PangoUnderline style) {
underline_style_ = style;

View File

@ -630,7 +630,8 @@ int main(int argc, char** argv) {
box_name += ".box";
render.WriteAllBoxes(box_name);
} else if (!FLAGS_render_per_font && !font_names.empty()) {
string filename = FLAGS_outputbase + ".fontlist.txt";
string filename = FLAGS_outputbase.c_str();
filename += ".fontlist.txt";
FILE* fp = fopen(filename.c_str(), "wb");
if (fp == NULL) {
tprintf("Failed to create output font list %s\n", filename.c_str());