Re: [ocropus] Digest for ocropus@googlegroups.com - 1 Message in 1 Topic

56 views
Skip to first unread message

Adnan Ul-Hasan

unread,
Feb 27, 2014, 4:07:02 AM2/27/14
to ocr...@googlegroups.com
Hi, 

When you are using -c param, you need to provide gt.txt file names. The error in second case says that it didn't find and gt files from where it can build codec for your case. There are two things you can do:

1. If you know all the alphabets in your data, then simply create a gt.txt file and give it as -c 'abc.gt.txt', or

2. you can read all alphabets from your gt files as -c '*.gt.txt'. 

Hope that it will work :). 

Regards, 
Adnan


On Wed, Feb 26, 2014 at 11:32 PM, <ocr...@googlegroups.com> wrote:

Group: http://groups.google.com/group/ocropus/topics

    Wesley Willians <wesleyw...@gmail.com> Feb 26 01:50PM -0800  

    Hi folks,
     
    I'm starting using ocropus this week, and I would like to train it to
    understand a pattern..
     
    I have the images and the *.gt.txt files with the expected result.
     
    I run exactly as manual said, but, i can see the param -s no longer exists,
    so I tried in many different ways and could succeed.

    Have a look some examples i've been trying..
     
    ocropus-rtrain P1.jpg -o result.txt
     
    # inputs 1
     
    # tests None
     
    import ocrolib.lineest
     
    # CenterNormalizer
     
    # using default codec
     
    # charset size 157 Traceback (most recent call last):
     
    File "/usr/local/bin/ocropus-rtrain", line 121, in <module>
     
    print "["+"".join(charset)+"]"
     
    UnicodeEncodeError: 'ascii' codec can't encode characters in position
    96-155: ordinal not in range(128)
     
     
    When i use the -c 'UTF-8', i get the result:
     
    # inputs 1
     
    # tests None
     
    import ocrolib.lineest
     
    # CenterNormalizer
     
    # building codec
     
    Traceback (most recent call last):
     
    File "/usr/local/bin/ocropus-rtrain", line 106, in <module>
     
    for fname in ocrolib.glob_all(args.codec):
     
    File "/usr/local/lib/python2.7/dist-packages/ocrolib/toplevel.py", line
    215, in argument_checks
     
    result = f(*args,**kw)
     
    File "/usr/local/lib/python2.7/dist-packages/ocrolib/common.py", line
    626, in glob_all
     
    raise Exception("%s: expansion did not yield any files"%arg)
     
    Exception: U: expansion did not yield any files
     
     
    Any help?
     
     
    All the best.

     

--
You received this message because you are subscribed to the Google Groups "ocropus" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ocropus+u...@googlegroups.com.
To post to this group, send email to ocr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ocropus/20cf3074b66010ccaf04f356c877%40google.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
Regards,

Adnan Ul-Hasan,
0176-5642 5292

Reply all
Reply to author
Forward
0 new messages