Skip to main content

Overview

https://travis-ci.org/OpenPhilology/nidaba.svg

Nidaba is the central controller for the entire OGL OCR pipeline. It oversees and automates the process of converting raw images into citable collections of digitized texts.

It offers the following functionality:

  • Grayscale Conversion

  • Binarization utilizing Sauvola adaptive thresholding, Otsu, or ocropus’s nlbin algorithm

  • Deskewing

  • Dewarping

  • Integration of tesseract, kraken, and ocropus OCR engines

  • Page segmentation from the aforementioned OCR packages

  • Various postprocessing utilities like spell-checking, merging of multiple results, and ground truth comparison.

As it is designed to use a common storage medium on network attached storage and the celery distributed task queue it scales nicely to multi-machine clusters.

Build

To easiest way to install the latest stable(-ish) nidaba is from PyPi:

$ pip install nidaba

or run:

$ pip install .

in the git repository for the bleeding edge development version.

Some useful tasks have external dependencies. A good start is:

# apt-get install libtesseract3 tesseract-ocr-eng libleptonica-dev liblept

Tests

Per default no dictionaries and OCR models necessary to runs the tests are installed. To download the necessary files run:

$ python setup.py download
$ python setup.py nosetests

Tests for modules that call external programs, at the time only tesseract, ocropus, and kraken, will be skipped if these aren’t installed.

Running

First edit (the installed) nidaba.yaml and celery.yaml to fit your needs. Have a look at the docs if you haven’t set up a celery-based application before.

Then start up the celery daemon with something like:

$ celery -A nidaba worker

Next jobs can be added to the pipeline using the nidaba executable:

$ nidaba batch -b otsu -l tesseract -o tesseract:eng -- ./input.tiff
Preparing filestore             [✓]
Building batch                  [✓]
951c57e5-f8a0-432d-8d77-8a2e27fff53c

Using the return code the current state of the job can be retrieved:

$ nidaba status 25d79a54-9d4a-4939-acb6-8e168d6dbc7c
PENDING

When the job has been processed the status command will return a list of paths containing the final output:

$ nidaba status 951c57e5-f8a0-432d-8d77-8a2e27fff53c
SUCCESS
14.tif → .../input_img.rgb_to_gray_binarize.otsu_ocr.tesseract_grc.tif.hocr

Documentation

Want to learn more? Read the Docs

Metadata

Release files for nidaba 2.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nidaba 2.0.4
File Size Uploaded
nidaba-2.0.4.tar.gz 1.5 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for nidaba 2.0.4
File Interpreter ABI Platform
nidaba-2.0.4-py2-none-any.whl Python 2 none any Details

Total release size: 3.0 MB

Release files / nidaba-2.0.4.tar.gz

Download URL nidaba-2.0.4.tar.gz
Size 1.5 MB
Tags Source
SHA-256 checksum
How to use checksums
f5df3827852734371604d8aa6cd370f38fa515807f1513e954188341025b7afa
BLAKE2b-256 checksum
How to use checksums
bb68a524ba980896eb85fe8d2d9943feaeb4dfff922e9796c4575a15bca8b62e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / nidaba-2.0.4-py2-none-any.whl

Download URL nidaba-2.0.4-py2-none-any.whl
Size 1.5 MB
Tags Python 2
SHA-256 checksum
How to use checksums
54ef04715183c65fb10a4625987e5faa40f79627734b149cb8da29ce091b1156
BLAKE2b-256 checksum
How to use checksums
35dc8027248f7c71febec5840dc8ddfd717737060c9c3f0b463919768a6fe6da
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

2.0.4 This release

2 release files

2.0.1

2 release files

0.9.8

2 release files

0.9.7

2 release files

0.9.6

2 release files

0.9.5

2 release files

0.9.4

2 release files

0.9.3

2 release files

0.9.2

2 release files

0.9.1

2 release files

0.9.0

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.4

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.15

2 release files

0.3.14

2 release files

0.3.13

2 release files

0.3.10

2 release files

0.3.9

2 release files

0.3.8

2 release files

0.3.7

0.3.6.post1

0.3.6

2 release files

0.3.5

2 release files

0.3.4

2 release files

0.3.3

1 release file

0.3.2

1 release file

0.3.1

1 release file

0.3.0

1 release file

0.2.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page