mithilesh1125 / tesseract-ocr

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

cntraining fails when opening normproto file on windows. #611

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Run cntraining on windows

What is the expected output? What do you see instead?
cntraining fails, no normproto file is created

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

Please provide any additional information below.

in cntraining.cpp the function WriteNormProtos accepts a directory. In 
WriteNormProtos a check is done to see if directory is not null, if it is not 
then the contents of directory is prepended to the filename followed by a slash 
then the filename. On Windows at least, the directory is passed as a null 
string, so directory itself is not null but points to a null. This then means 
that a filename of "/normproto" is tried to be opened, which will fail. A check 
should be added to make sure that directory is not only not null, but also does 
not point to a null string.

There is also the issue that the language should be prepended to normproto as 
well, as combine_tessdata now seems to look for a file called 
"<lang>.normproto" not just "normproto"

Original issue reported on code.google.com by wilhad...@gmail.com on 9 Feb 2012 at 11:18

GoogleCodeExporter commented 9 years ago
under version 3.02, cntraining will generate normproto also generate 
traineddata - never failed so far - it is my personal experience. [OS=winXp]
will you please upload either  text file  or tif/box file for testing and 
feedback to you.

Original comment by withbles...@gmail.com on 26 Feb 2012 at 3:49

GoogleCodeExporter commented 9 years ago
I saw a fix had gone in about a week ago that fixes this issue, so I'd say this 
can be closed. 

In fact here it is : http://code.google.com/p/tesseract-ocr/source/detail?r=674

Original comment by wilhad...@gmail.com on 26 Feb 2012 at 9:12

GoogleCodeExporter commented 9 years ago

Original comment by zde...@gmail.com on 27 Feb 2012 at 6:56

GoogleCodeExporter commented 9 years ago
I have the same problem. Tesseract crashes when reading .tr file on cntraining 
command. I made the 2 changes and it doesn't help. I use version 3.01 on win7.

Original comment by doroteap...@gmail.com on 12 May 2012 at 5:34

GoogleCodeExporter commented 9 years ago
Hy.

I have a some problems with version 3.02.02:
http://code.google.com/p/tesseract-ocr/issues/detail?id=1111

Original comment by samuel...@gmail.com on 13 Feb 2014 at 5:45