Hi partrick,
 can you give me a simple example how to use the traineddata? Is there
any tutorials available?

thanks,
srinivasan

On May 2, 6:16 pm, patrickq <[email protected]> wrote:
> I believe that you need to append "/" to the path - at least that's
> what we do (successfully) and I think it failed without it. Tesseract
> is apparently not recognizing anything not ending with "/" as a
> directory.
>
> Patrick
>
> On May 2, 8:46 am, srinivasan <[email protected]> wrote:
>
> > Hi jes,
>
> > Im also facing the same problem. I was trying to use it in android but
> > I copied the eng.traineddata.
>
> > Did you get any approach to solve it?
>
> > thanks,
> > Srinivasan
>
> > On Apr 7, 11:57 pm, Jes Chergui <[email protected]> wrote:
>
> > > i solved the above. now i am stuck after providing the init method
> > > with the name of my own traineddata file like so:
> > > tess->Init([dataPath cStringUsingEncoding:NSUTF8StringEncoding],
> > > "sid");
> > > even though all my language files plus the sid.traineddata if was
> > > correctly copied from the bundle to copied to the iphone simulator
> > > folder.
>
> > > I still get this weird error:
> > > actual_tessdata_num_entries_ <= TESSDATA_NUM_ENTRIES:Error:Assert
> > > failed in file tessdatamanager.cpp line 55
> > > Program received signal: "EXC_BAD_ACCESS".
>
> > > the assert that fails is in the following code:
> > > void TessdataManager::Init(const char *data_file_name) {
> > >   int i;
> > >   data_file_ = fopen(data_file_name, "rb");
> > >   if (data_file_ == NULL) {
> > >     tprintf("Error openning data file %s\n", data_file_name);
> > >     exit(1);
> > >   }
> > >   fread(&actual_tessdata_num_entries_, sizeof(inT32), 1, data_file_);
> > >   bool swap = (actual_tessdata_num_entries_ > kMaxNumTessdataEntries);
> > >   if (swap) {
> > >     actual_tessdata_num_entries_ =
> > > reverse32(actual_tessdata_num_entries_);
> > >   }
> > >   ASSERT_HOST(actual_tessdata_num_entries_ <= TESSDATA_NUM_ENTRIES);
> > >   fread(offset_table_, sizeof(inT64),
> > >         actual_tessdata_num_entries_, data_file_);
> > >   if (swap) {
> > >     for (i = 0 ; i < actual_tessdata_num_entries_; ++i) {
> > >       offset_table_[i] = reverse64(offset_table_[i]);
> > >     }
> > >   }
> > >   if (global_tessdata_manager_debug_level) {
> > >     tprintf("TessdataManager loaded %d types of tesseract data files.
> > > \n",
> > >             actual_tessdata_num_entries_);
> > >     for (i = 0; i < actual_tessdata_num_entries_; ++i) {
> > >       tprintf("Offset for type %d is %lld\n", i, offset_table_[i]);
> > >     }
> > >   }
>
> > > any insights?

-- 
You received this message because you are subscribed to the Google
Groups "tesseract-ocr" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/tesseract-ocr?hl=en

Reply via email to