Tesseract auxiliary commands - tesseract

I installed Tesseract and its basic functionality is fine. But when I try following this instruction on language file generation, tesseract-dependent commands like wordlist2dawg are "not found" by the shell.
Q: How do I install Tesseract with all these commands available? It's my understanding that they should work once I installed Tesseract, but it isn't the case. I installed Tesseract via port install tesseract, might be that I missed something.
Q2: How do I actually train Tesseract? I know it's an opaque topic; most results I get online are 3 years old at best, and it's difficult to figure out the exact training mechanism.

You'll need to build the training tools and then follow the instructions in the page.
https://github.com/tesseract-ocr/tesseract/wiki/TrainingTesseract#building-the-training-tools

Related

How to build gnuradio without the documentation (from source)

I'm trying to build gnuradio 3.7.9 on raspberry pi as the version provided by apt-get has some problems.
However the classic cmake/make/mke install procedure tries to build the documentation which requires latex to be installed. As don't want to install latex, I'm looking for an option to build gnuradio without the documentation.
Any help appreciated
Cmake will just disable documentation of it doesn't find doxygen. And if doxygen doesn't find LaTeX, it should just skip the formulas.
Anyway, use cmake with the -DENABLE_DOXYGEN=OFF flag.
More importantly, don't build GNU Radio on the pi itself. The raspberry pi is an embedded device, not a compilation platform, to be honest. RAM will quickly become a bottleneck, and together with the limited storage bandwidth that means that even if successful, the build will take days.
Instead, spend that time on fixing whatever is wrong with the packet. I do happen to know the maintainer of the Debian gnuradio packages, and he's a really nice guy. If you can write a good bug report, I'm sure he, or the GNU Radio mailing list, will figure something out.

How to run text2image.cpp

I am working on tesseract. I want create new training language for tesseract. Please can anyone tell me what are the specific steps for training new language. And also tell me how to run text2image.cpp program. Thanks in advance.
To run text2image first compile and link text2image.cpp using an appropriate C++ toolchain then run the executable with the appropriate text file as an input. Alternatively you can download a windows installer which will give you an executable to use rather than the .cpp.
Instructions on building the tesseract tool chain are here and on how to train for currently unsupported languages is here.

How to implement LIBSVM Matlab interface?

I am having problem with implementing LibSVM to MATLAB. I downloaded LibSVM package, libsvm-3.14 to my Windows 7 PC and tried to implement it, but I got this message:
"No supported SDK or compiler was found on this computer. For a list of supported compilers, see
http://www.mathworks.com/support/compilers/R2011a/win64.html
If make.m fails, please check README about detailed instructions."
The problem is yet not solved even after downloading the folder from this website: http://www.csie.ntu.edu.tw/~cjlin/libsvm/#matlab Is there another site where I could download that?
I am using libsvm from the site you mentioned - no problems.
Sounds like you don't have the Windows SDK installed.
You can install it from the link at http://www.mathworks.com.au/support/compilers/R2011a/win64.html
Another possibility is that you don't have mex setup.
You can check using mex.getCompilerConfigurations()
If not run: mex -setup
You might also need to install a c++ compiler - there is a link to get VC2010 expressed om the web page above.

IPython starting ipclusters

I'm using this amazing IPython notebook. I'm very interested into parallel computing right now and would like to use MPI with IPython (and MPI4py). But I can't start a cluster with
ipcluster start -n 4
on Windows7. I just get back "failed to create process". If I use the notebook and start a cluster in the "Clusters" register it's all working fine. But with cmd (even with admin rights) I just get this message. Same with all attempts of using MPI (MPICH2). All path vars are set. Maybe this problem has no connection to Python at all...
I can't say anything about IPython's parallel features, but if you're having problems with MPI in Windows in general, I would offer these suggestions. I've had quite a few issues in the past in trying to get MPI working in Windows. The most convenient method for me in the past has been to use an OpenMPI Windows binary http://www.open-mpi.org/software/ompi/v1.6/. These are now only available in previous releases. And even then, you might have to try more than one before you find one that works. I don't know why, but the latest didn't work on my machine. The release before that one did, however. After this, you have to call mpicc and mpiexec from the Microsoft Visual Studio Command Prompt or it won't work (without a lot of other stuff).
After you have verified that MPI is working, you can try installing mpi4py separately and see if that works. In my experience, sometimes this has worked fine and sometimes I've had to wrestle with configurations. You might just try your luck with an unofficial, prepackaged binary (for example, http://www.lfd.uci.edu/~gohlke/pythonlibs/).
Hope this helps!

QR Code generation in shell / mac terminal

I want to create QR codes for a project I'm working on in applescript the resulting qr will be placed in the indesign document. I have found that there is a plugin for indesign but I suspect that requires user interaction.
So I've been search for how to generate the qr using a shell command. I've found things related to php and rails and even coldfusion but none of those will fit the bill on this. I need to generate them using shell command so image events or perl basically anything I can run from the command line that comes with the mac os
thanks for your help.
antotheer
I wonder if I could call a url using curl or somthing to get one ?
For doing something similar, we use libqrencode.
It's a c library for generating QR codes, but it comes with a command line utility (called qrencode) which lets you generate QR codes from a string, e.g.:
./qrencode -o /tmp/foo.png "This is the input string"
It supports most options you'd probably want (e.g. error correction level, image size, etc.).
We've used it in production for a year or two, with no problems.
I've only run it on linux systems, but there's no reason you shouldn't be able to compile it on Mac OS, assuming you have a compiler and build tools installed (and any libraries it depends on of course).
As Riccardo Cossu mentioned please use homebrew:
brew install qrencode
qrencode -o so.png "http://stackoverflow.com"