ecit241 / tesseract-ocr

Automatically exported from code.google.com/p/tesseract-ocr
Other
0 stars 0 forks source link

{PATCH] fix --fontlist error in tesstrain.sh #1311

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.running tesstrain.sh with --fontlist as parameter
2.
3.

What is the expected output? What do you see instead?

the fontlist given should be used for processing.
instead I get error 

sh tesstrain.sh --lang hin --bin_dir /usr/local/bin --langdata_dir langdata 
--tessdata_dir tessdata --fontlist Arial
ERROR: Unrecognized argument Arial

$ sh tesstrain.sh --lang hin --bin_dir /usr/local/bin --langdata_dir langdata 
--tessdata_dir tessdata --fontlist Arial+Siddhanta
ERROR: Unrecognized argument Arial+Siddhanta

What version of the product are you using? On what operating system?

latest source from git, on windows 8, msys2

Please provide any additional information below.

Patch file is attached. 
Works after change made to tesstrain.sh

$ sh tesstrain.sh --lang hin --bin_dir /usr/local/bin --langdata_dir langdata 
--tessdata_dir tessdata --fontlist "Arial Unicode MS"+"Siddhanta"

=== Starting training for language 'hin'
Cleaning workspace directory /tmp/tesstrain/hin...

=== Phase I: Generating training images ===
Rendering using Arial Unicode MS
[13 Sep 2014 20:31:54] /usr/local/bin/text2image --leading=32 
--fonts_dir=/usr/share/fonts/truetype/ --box_padding=0 
--strip_unrenderable_words --char_spacing=0.0 --exposure=0 --font=Arial Unicode 
MS --outputbase=/tmp/tesstrain/hin/hin.Arial_Unicode_MS.exp0 
--text=langdata/hin/hin.training_text
ERROR: /tmp/tesstrain/hin/hin.Arial_Unicode_MS.exp0.box does not exist or is 
not readable

(dies because text2image does not work)

Original issue reported on code.google.com by shreeshrii on 13 Sep 2014 at 3:13

GoogleCodeExporter commented 9 years ago
Patch attached.

Original comment by shreeshrii on 13 Sep 2014 at 3:21

Attachments:

GoogleCodeExporter commented 9 years ago
Fixed in r93f7899a9e9a

Original comment by zde...@gmail.com on 14 Sep 2014 at 1:12