louismullie / treat

Natural language processing framework for Ruby.
Other
1.36k stars 128 forks source link

Update Ocropus calls to work with v 0.7 #55

Closed wstrinz closed 11 years ago

wstrinz commented 11 years ago

I noticed the Ocropus functions the gem uses are no longer supported in the latest version. I basically just copied the four commands from the FAQ, although I added the --minscale 2 flag since I think it should at least try to recognize low resolution images. Maybe this could be part of the options hash though?

It works just fine as part of a script, but for some reason when I try to create a document object with an image file in IRB it hangs after returning the new object. I'm pretty sure its some problem with the image worker, but I haven't figured out what yet.

edit: looks like the IRB problem is with the silence_stdout method; when it runs the prompt isn't restored and you can't see keystrokes.

louismullie commented 11 years ago

Thanks!