mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-11-23 18:49:08 +08:00
fix training tools build
This commit is contained in:
parent
3295dc29e2
commit
769fef8c96
84
.gitignore
vendored
84
.gitignore
vendored
@ -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
0
configure.ac
Executable file → Normal 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;
|
||||
|
@ -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());
|
||||
|
Loading…
Reference in New Issue
Block a user