📜 ⬆️ ⬇️

Recognize text with cuneiform

The task was to establish automatic recognition of text from photographs, i.e. When a user uploads a photo graphic to the server, the user also receives the text recognized from it. No sooner said than done. A good free console solution was found - cuneiform . The nix version is here: https://launchpad.net/cuneiform-linux .

So installation. In Ubunt, version 0.7 from the repositories is available by the way. Version 0.9 is the latest at the moment.
<br> wget http://launchpad.net/cuneiform-linux/0.9/cuneiform-linux-0.9/+download/cuneiform-linux-0.9.0.tar.bz2<br> tar xvjf cuneiform-linux-0.9.0.tar.bz2<br> cd cuneiform-linux-0.9.0<br> mkdir builddir<br> cd builddir<br> cmake -DCMAKE_BUILD_TYPE=debug ..<br> make<br> make install<br>
The optional argument "-DCMAKE_INSTALL_PREFIX = / your / dir" will set cuneiform to the correct directory.
You can run with the following argrumentami:

-l
Specifies the document language. From the possible: eng (by default) get it out.
')
-o
Saves to file.

-f
The format of the received text. Supported: text (default), html, rtf, smarttext (plain text with TeX paragraphs), hocr (hOCR HTML format), native (Cuneiform 2000 format)

--dotmatrix
Optimization of the script for an image printed using a dot-matrix printer.

--fax
Optimization of the script under the image, printed using a fax.

--singlecolumn
Turns off the analysis of the page and implies that our image consists of a single column of text.

Example of use:
cuneiform -l ruseng -o /our/dir/text.txt /our/dir/book_1.tif

GUI


Next, I already wanted a graphical interface for household needs. There are 2 pieces to choose from - this is YAGF and Cuneiform-Qt :

YAGF

Cuneiform-Qt

It was decided to use YAGF. It is also written in qt and also requires the aspell spell check package. Download, install:

wget http://symmetrica.net/cuneiform-linux/yagf-0.8.1.tar.gz<br> tar xvfz yagf-0.8.1.tar.gz <br> cd yagf-0.8.1/<br> cmake ./<br> make<br> make install<br>

Source: https://habr.com/ru/post/95479/


All Articles