lledit (was: OCRopus 0.5.4 - a missing run-time prerequisite)

91 views
Skip to first unread message

Janusz S. Bień

unread,
Aug 1, 2012, 2:44:12 AM8/1/12
to ocr...@googlegroups.com

As I have now OCRopus installed I would like to experiment with
lledit. I understand the right tool for creating the database is
ocrupus-cluster-db, but it seems unavailable. Am I missing something?

Best regards

Janusz

On Wed, 01 Aug 2012 jsb...@mimuw.edu.pl (Janusz S. Bień) wrote:

> Following the advice of Cezary Kruk I've compiled OCRopus on Linux
> Mint 13 Maya installed from the scratch.
>
> However to use it I had to install additionally libiulib0. Perhaps the
> library should be installed by ocroinst packages?
>
> Best regards
>
> Janusz
>
> --
> ,
> Prof. dr hab. Janusz S. Bien - Uniwersytet Warszawski (Katedra Lingwistyki Formalnej)
> Prof. Janusz S. Bien - University of Warsaw (Formal Linguistics Department)
> jsb...@uw.edu.pl, jsb...@mimuw.edu.pl, http://fleksem.klf.uw.edu.pl/~jsbien/

--
,
Prof. dr hab. Janusz S. Bien - Uniwersytet Warszawski (Katedra Lingwistyki Formalnej)
Prof. Janusz S. Bien - University of Warsaw (Formal Linguistics Department)
jsb...@uw.edu.pl, jsb...@mimuw.edu.pl, http://fleksem.klf.uw.edu.pl/~jsbien/

Tom

unread,
Aug 1, 2012, 3:50:31 AM8/1/12
to ocr...@googlegroups.com, jsb...@mimuw.edu.pl
Please see the playlist here, which runs you through the steps in 0.5 (the steps haven't changed, but the commands are different, and the database format is now HDF5):


Tom

jsb...@mimuw.edu.pl

unread,
Aug 1, 2012, 9:39:01 AM8/1/12
to ocr...@googlegroups.com, jsb...@mimuw.edu.pl
> Please see the playlist here, which runs you through the steps in 0.5 (the
> steps haven't changed, but the commands are different, and the database
> format is now HDF5):
>
> http://www.youtube.com/playlist?list=PL8B1A3C55DD915896&feature=view_all

Trying to reproduce the 1st minute of the second video on my machine I get

user@Mint-VirtualBox ~ $ llgen -f llgen.fonts

=== /home/tmb/bin/Fonts/DejaVuSansMono.ttf @ 36

Traceback (most recent call last):
File "/usr/local/bin/llgen", line 160, in <module>
font = ImageFont.truetype(fontfile,size)
File "/usr/lib/python2.7/dist-packages/PIL/ImageFont.py", line 218, in
truetype
return FreeTypeFont(filename, size, index, encoding)
File "/usr/lib/python2.7/dist-packages/PIL/ImageFont.py", line 134, in
__init__
self.font = core.getfont(file, size, index, encoding)
IOError: cannot open resource

What am I doing wrong?

Best regards

Janusz


Tom

unread,
Aug 1, 2012, 1:15:35 PM8/1/12
to ocr...@googlegroups.com, jsb...@mimuw.edu.pl
Well, it is telling you: it can't find the font because you don't have it installed.  You need to get a collection of TrueType fonts for training, put them in some directory, and then point the llgen command at that directory using its options (type llgen --help to find the option).

There are lots of TrueType fonts you can install on Ubuntu; do an "apt-cache search truetype font", then install them.

You can also find TrueType fonts on your machine with "locate .ttf".

Tom

Janusz S. Bień

unread,
Aug 1, 2012, 1:45:47 PM8/1/12
to Tom, ocr...@googlegroups.com
On Wed, 1 Aug 2012 Tom <tmb...@gmail.com> wrote:

]> 1. (*) text/plain ( ) text/html
>
> Well, it is telling you: it can't find the font because you don't have it
> installed. You need to get a collection of TrueType fonts for training,
> put them in some directory,

I intended to put the fonts in the default directory but made a
mistake. Sorry for bothering you.
Reply all
Reply to author
Forward
0 new messages